记录功能想法和实践方式
需求:对论文库数据进行统计分析可视化
分析维度:
- 主题维度统计(论文数、引用数、活跃度)
- 发表年份分布 ✅
- 来源分布 ✅
- 阅读状态概览 ✅
- 月度入库趋势 ✅
- 顶会/期刊分布 ✅
- 入库来源统计 ✅
实现方案:
- 后端新增主题统计 API 接口
- 前端新建 Statistics 独立页面
- 实现主题维度统计图表组件
- 侧边栏添加统计入口
Todo:
- apps/api: 新增主题统计 API 接口
- frontend: 新建 Statistics 页面
- frontend: 实现主题维度统计图表组件
- frontend: 侧边栏添加统计入口
实现细节:
packages/storage/repositories.py: 添加topic_stats()+paper_distribution_stats()方法apps/api/routers/topics.py: 添加GET /topics/stats+GET /topics/distributionAPIfrontend/src/pages/Statistics.tsx: 主题统计 + 年份分布 + 来源分布frontend/src/components/Sidebar.tsx: 添加"主题统计"入口frontend/src/services/api.ts: 添加topicApi.stats()+topicApi.distribution()frontend/src/types/index.ts: 添加TopicStats+PaperDistributionResponse类型
| 功能 | 描述 | 优先级 |
|---|---|---|
| 时间维度统计 | 按年份/月份统计论文数量和引用量 | 中 |
| 阅读状态分布 | 统计已读/未读/收藏比例 | 低 |
| 导出功能 | 支持导出统计报告为 CSV/PDF | 低 |
最后更新: 2026-03-19