API-AI-008:LearningAnalysisSnapshot Schema #169

Open
opened 2026-06-10 21:02:29 +08:00 by wangdl · 0 comments
Owner

目标

新增 AI 分析快照表,将用户画像、AI 设置、学习行为、设备场景、资料进度、内容结构摘要压缩成 Runtime 可消费的结构化输入。

字段建议

  • id
  • userId
  • scopeType
  • scopeId
  • snapshotVersion
  • sourceDataVersion
  • privacyScope
  • userProfile
  • aiSettings
  • deviceContext
  • learningBehaviorSummary
  • materialProgressSummary
  • contentStructureSummary
  • behaviorSignals
  • scoreSignals
  • constraints
  • allowedModelFields
  • expiresAt
  • createdAt
  • updatedAt

scopeType

  • user
  • material
  • knowledge_point
  • knowledge_base

设计要求

  1. Snapshot 不直接保存海量原始 ReadingEvent。
  2. Snapshot 必须保存聚合后的学习行为信号。
  3. Snapshot 必须保存隐私授权范围。
  4. Snapshot 必须保存 allowedModelFields。
  5. Snapshot 必须版本化。

验收标准

  1. 新增 LearningAnalysisSnapshot schema。
  2. 支持 user 级 snapshot。
  3. 支持 material 级 snapshot。
  4. 支持 snapshotVersion。
  5. 支持 expiresAt。
  6. 支持 JSON 字段保存结构化摘要。
  7. 提供 repository/service。
  8. 提供基础测试。
## 目标 新增 AI 分析快照表,将用户画像、AI 设置、学习行为、设备场景、资料进度、内容结构摘要压缩成 Runtime 可消费的结构化输入。 ## 字段建议 - id - userId - scopeType - scopeId - snapshotVersion - sourceDataVersion - privacyScope - userProfile - aiSettings - deviceContext - learningBehaviorSummary - materialProgressSummary - contentStructureSummary - behaviorSignals - scoreSignals - constraints - allowedModelFields - expiresAt - createdAt - updatedAt ## scopeType - user - material - knowledge_point - knowledge_base ## 设计要求 1. Snapshot 不直接保存海量原始 ReadingEvent。 2. Snapshot 必须保存聚合后的学习行为信号。 3. Snapshot 必须保存隐私授权范围。 4. Snapshot 必须保存 allowedModelFields。 5. Snapshot 必须版本化。 ## 验收标准 1. 新增 LearningAnalysisSnapshot schema。 2. 支持 user 级 snapshot。 3. 支持 material 级 snapshot。 4. 支持 snapshotVersion。 5. 支持 expiresAt。 6. 支持 JSON 字段保存结构化摘要。 7. 提供 repository/service。 8. 提供基础测试。
wangdl added this to the M-API-AI-RUNTIME:API AI Runtime 调度与落库 milestone 2026-06-10 21:02:29 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/api-server#169
No description provided.