I am the initiator and main developer of this project. First and foremost, I want to personally thank you for your continued attention, contributions, and enthusiasm for the `Weibo_PublicOpinion_AnalysisSystem` project.
-**多智能体协作架构**:5个专门化Agent协同工作,各司其职
-**全方位数据采集**:整合微博爬虫、新闻搜索、网络信息多维度数据源
-**深度情感分析**:基于微调BERT/GPT-2/Qwen模型的精准情感识别
-**智能报告生成**:自动生成结构化HTML分析报告
-**Agent论坛交流**:Forum Engine提供Agent间信息共享和协作决策平台
-**高性能异步处理**:支持并发处理多个舆情任务
Over the past period, as the project has expanded, I have noticed several challenges that require attention:
## 系统架构
1.**Architectural and Module Issues:** Through rapid iteration, many modules have been integrated. However, a lack of unified top-level design has led to some module conflicts and a need for structural optimization.
2.**High Barrier to Entry:** A significant current challenge is that users need to configure their own crawlers and scrape data from scratch. This makes the deployment and startup process relatively complex, creating an inconvenience for many new users.
3.**Development and Presentation Limitations:** The development progress of various functional modules has been uneven. Additionally, the existing dashboard paradigm has limitations in compatibility and scalability that hinder my future development goals.
4.**Constraints of the Self-Trained Model:** Considering its size and maintenance costs, the previously trained model has become a constraint on the project's long-term development.
### 整体架构图
After a careful evaluation of these points, and in light of current technological trends (especially in LLMs, and Agents), I have decided to initiate a **comprehensive, bottom-up architectural refactoring** of the project, with the goal of providing a more user-friendly tool for everyone.
```mermaid
graph TB
subgraph "前端展示层"
UI[Web界面<br/>Flask + Streamlit]
end
subgraph "多Agent协作层"
QE[QueryEngine<br/>新闻搜索Agent]
ME[MediaEngine<br/>多媒体搜索Agent]
IE[InsightEngine<br/>深度洞察Agent]
RE[ReportEngine<br/>报告生成Agent]
Forum[ForumEngine<br/>Agent论坛交流中心]
end
subgraph "数据处理层"
MS[MindSpider<br/>微博爬虫系统]
SA[SentimentAnalysis<br/>情感分析模型]
DB[(MySQL<br/>数据库)]
end
subgraph "外部服务层"
LLM[LLM API<br/>DeepSeek/Kimi/Gemini]
Search[搜索API<br/>Tavily/Bocha]
end
UI --> QE
UI --> ME
UI --> IE
UI --> RE
QE --> Search
ME --> Search
IE --> MS
IE --> SA
QE --> LLM
ME --> LLM
IE --> LLM
RE --> LLM
MS --> DB
SA --> DB
%% Agent论坛交流机制
QE <--> Forum
ME <--> Forum
IE <--> Forum
RE <--> Forum
style UI fill:#e1f5fe
style QE fill:#fff3e0
style ME fill:#fff3e0
style IE fill:#fff3e0
style RE fill:#f3e5f5
style Forum fill:#e8f5e9
style MS fill:#fce4ec
style SA fill:#fce4ec
style DB fill:#fff9c4
style LLM fill:#e3f2fd
style Search fill:#e3f2fd
```
**My next update plan will focus on:**
### 数据流程图
1.**Optimizing the Core Architecture:** I will be moving away from the current dashboard-centric presentation to design a more lightweight and flexible system framework.
2.**Focusing on Core Competencies:** The new architecture will refocus my efforts on the crawling, processing, and in-depth analysis of Weibo data, aiming to build a stable and efficient data core.
3.**Integrating Advanced Large Language Models (LLMs):** I plan to discontinue maintenance of the self-trained model and will instead utilize APIs to call mainstream large language models for analysis tasks, enhancing the system's analytical capabilities and flexibility.
4.**The Ultimate Goal: A New Model of "Deployable Core + Online Service":**
-**For Developers:** I aim to refine the project into a **"minimal, user-friendly, low-cost, modular"** public opinion analysis **core engine** to facilitate secondary development and private deployment.
-**For General Users:** Leveraging the new architecture, I **plan to introduce a new "Online Service" version, designed to address the challenges of deployment and data acquisition.**
-**Providing a Shared Database:** I will begin building and maintaining a **continuously updated, shared database**. This will allow users to access our data source directly, **removing the need to configure and run their own crawlers.**
-**Simplifying the User Experience:** This will eliminate the need for a complex local setup, enabling a **click-to-use** experience.
-**Retaining Personalized Analysis:** Users will still be able to configure their own LLM API keys in the online service to perform personalized, in-depth analysis with our data core.
```mermaid
sequenceDiagram
participant User as 用户
participant UI as Web界面
participant QE as QueryEngine
participant ME as MediaEngine
participant IE as InsightEngine
participant Forum as ForumEngine
participant RE as ReportEngine
participant DB as 数据库
User->>UI: 输入查询关键词
UI->>QE: 发起搜索请求
UI->>ME: 发起搜索请求
UI->>IE: 发起搜索请求
Note over QE,IE: Agent执行前先读取论坛信息
QE->>Forum: 读取论坛交流信息
ME->>Forum: 读取论坛交流信息
IE->>Forum: 读取论坛交流信息
par 并行处理与持续思维链交流
Note over QE: 结构思考→反思搜索→持续交流
QE->>QE: 确定新闻搜索结构
QE->>Forum: 思维链交流(结构思考)
QE->>QE: 多步反思与搜索分析
QE->>Forum: 思维链交流(搜索进展)
QE->>QE: 生成汇总报告
QE->>Forum: 思维链交流(关键发现)
and
Note over ME: 结构思考→反思搜索→持续交流
ME->>ME: 确定多媒体搜索结构
ME->>Forum: 思维链交流(结构思考)
ME->>ME: 多步反思与搜索分析
ME->>Forum: 思维链交流(搜索进展)
ME->>ME: 生成汇总报告
ME->>Forum: 思维链交流(关键发现)
and
Note over IE: 结构思考→反思搜索→持续交流
IE->>IE: 确定洞察分析结构
IE->>Forum: 思维链交流(结构思考)
IE->>DB: 查询微博数据
IE->>IE: 多步反思与情感洞察
IE->>Forum: 思维链交流(洞察进展)
IE->>IE: 生成汇总报告
IE->>Forum: 思维链交流(关键发现)
end
Note over Forum: 论坛汇总Agent交流信息
Forum->>RE: 触发报告生成
RE->>Forum: 读取所有Agent的交流信息
RE->>QE: 获取QueryEngine汇总报告
RE->>ME: 获取MediaEngine汇总报告
RE->>IE: 获取InsightEngine汇总报告
Note over RE: ReportEngine智能报告生成
RE->>RE: 读取模板库与样式库并选择
RE->>RE: 分步思考生成报告各部分
RE->>RE: 整合生成最终报告
RE->>UI: 生成综合HTML报告
UI->>User: 展示分析结果
```
This refactoring is a necessary step in our development. I understand this will require adjusting and, in some cases, rewriting code to which many of you have contributed. However, for the long-term health of the project and to make it accessible to a broader audience, I believe this step is essential.
## 项目结构
In the coming weeks, I will begin to outline the new project blueprint and will keep the community updated on my progress. I value your wisdom and support now more than ever.
```
Weibo_PublicOpinion_AnalysisSystem/
├── QueryEngine/ # web查询引擎Agent
│ ├── agent.py # Agent主逻辑
│ ├── llms/ # LLM接口封装
│ ├── nodes/ # 处理节点
│ ├── tools/ # 搜索工具
│ └── utils/ # 工具函数
├── MediaEngine/ # 媒体引擎Agent
│ └── (类似结构)
├── InsightEngine/ # 数据库引擎Agent
│ └── (类似结构)
├── ReportEngine/ # 报告生成Agent
│ ├── report_template/ # 报告模板
│ └── flask_interface.py # API接口
├── ForumEgine/ # 论坛交流Agent
│ └── monitor.py # 论坛交流管理器
├── MindSpider/ # 微博爬虫系统
│ ├── BroadTopicExtraction/ # 话题提取
│ ├── DeepSentimentCrawling/ # 深度爬取
│ └── schema/ # 数据库结构
├── SentimentAnalysisModel/ # 情感分析模型
│ ├── BertTopicDetection_Finetuned/
│ ├── WeiboSentiment_Finetuned/
│ └── WeiboSentiment_MachineLearning/
├── SingleEngineApp/ # Streamlit应用
├── templates/ # Flask模板
├── static/ # 静态资源
├── logs/ # 运行日志
├── app.py # 主应用入口
├── config.py # 配置文件
└── requirements.txt # 依赖包
```
Thank you once again for your understanding and support! Let's look forward to the next evolution of `Weibo_PublicOpinion_AnalysisSystem`.