Files
AIclinicalresearch/docs/02-通用能力层/[AI对接] 通用能力快速上下文.md
HaHafeng 8eef9e0544 feat(asl): Complete Week 4 - Results display and Excel export with hybrid solution
Features:
- Backend statistics API (cloud-native Prisma aggregation)
- Results page with hybrid solution (AI consensus + human final decision)
- Excel export (frontend generation, zero disk write, cloud-native)
- PRISMA-style exclusion reason analysis with bar chart
- Batch selection and export (3 export methods)
- Fixed logic contradiction (inclusion does not show exclusion reason)
- Optimized table width (870px, no horizontal scroll)

Components:
- Backend: screeningController.ts - add getProjectStatistics API
- Frontend: ScreeningResults.tsx - complete results page (hybrid solution)
- Frontend: excelExport.ts - Excel export utility (40 columns full info)
- Frontend: ScreeningWorkbench.tsx - add navigation button
- Utils: get-test-projects.mjs - quick test tool

Architecture:
- Cloud-native: backend aggregation reduces network transfer
- Cloud-native: frontend Excel generation (zero file persistence)
- Reuse platform: global prisma instance, logger
- Performance: statistics API < 500ms, Excel export < 3s (1000 records)

Documentation:
- Update module status guide (add Week 4 features)
- Update task breakdown (mark Week 4 completed)
- Update API design spec (add statistics API)
- Update database design (add field usage notes)
- Create Week 4 development plan
- Create Week 4 completion report
- Create technical debt list

Test:
- End-to-end flow test passed
- All features verified
- Performance test passed
- Cloud-native compliance verified

Ref: Week 4 Development Plan
Scope: ASL Module MVP - Title Abstract Screening Results
Cloud-Native: Backend aggregation + Frontend Excel generation
2025-11-21 20:12:38 +08:00

3.7 KiB
Raw Blame History

[AI对接] 通用能力快速上下文

阅读时间: 2-3分钟 | Token消耗 ~1500 tokens
层级: L1 | 前置阅读: 00-系统总体设计/[AI对接] 快速上下文.md


📋 通用能力层定位

通用能力层是跨业务模块共享的核心技术能力,是业务逻辑的基础。

核心原则:

  • 可复用(多个业务模块共享)
  • 业务相关(包含领域知识)
  • 独立部署(可以独立为微服务)
  • 高内聚(每个能力职责单一)

🎯 5个核心能力

1. LLM大模型网关 最高优先级

复用率: 71% (5个模块依赖)

依赖模块:

  • AIAAI智能问答
  • ASLAI智能文献
  • PKB个人知识库
  • DC数据清洗
  • RVW稿件审查

核心价值:

商业模式的技术基础!

功能1根据用户版本选择模型
- 专业版 → DeepSeek¥1/百万)
- 高级版 → DeepSeek + Qwen3
- 旗舰版 → 全部模型

功能2成本控制
- 统一监控所有LLM调用
- 超出配额自动限流
- 按版本计费

功能3统一调用接口
- 屏蔽不同LLM API差异
- 流式/非流式统一处理

状态: 待实现
优先级: P0必须在ASL模块开发前完成
预计时间: 3-5天


2. 文档处理引擎

复用率: 86% (6个模块依赖)

核心功能:

  • PDF提取Nougat + PyMuPDF
  • Docx提取Mammoth
  • Txt提取多编码
  • Excel处理

状态: 已实现Python微服务
位置: extraction_service/


3. RAG引擎

复用率: 43% (3个模块依赖)

核心功能:

  • 向量化存储Embedding
  • 语义检索Semantic Search
  • RAG问答
  • 智能引用100%准确溯源)

状态: 已实现基于Dify

优化成果:

  • 检索覆盖率从5%提升到40-50%8-10倍

4. 数据ETL引擎

复用率: 29% (2个模块依赖)

依赖模块:

  • DC数据清洗
  • SSA智能统计

核心功能:

  • Excel多表JOIN
  • 数据清洗
  • 数据转换

技术方案:

  • 云端版Polars性能极高
  • 单机版SQLite内存友好

状态: 待实现


5. 医学NLP引擎

复用率: 14% (1个模块依赖)

依赖模块:

  • DC数据清洗 - 病例NER提取

核心功能:

  • 医学实体识别疾病、药物、TNM分期
  • 医学术语标准化

技术方案:

  • 云端版LLM API高准确率
  • 单机版spaCy隐私优先

状态: 待实现


📊 优先级排序

能力 复用率 优先级 状态 原因
LLM网关 71% P0 5个模块依赖商业模式基础
文档处理 86% - 已实现,需要增强
RAG引擎 43% - 已实现,需要优化
ETL引擎 29% P2 DC模块开发时再实现
医学NLP 14% P2 DC模块开发时再实现

⚠️ 关键提醒

LLM网关必须优先实现

  • 5个模块依赖71%
  • ASL模块开发的前置条件
  • 商业模式的技术基础

预计时间: 3-5天
建议: ASL模块Week 1同步开发


🔗 快速导航

详细设计文档:


最后更新: 2025-11-06
维护人: 技术架构师