DOC-FULL-003:ReadingEvent V2 #104

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

目标

定义 V2 阅读事件模型,作为 iOS 上传 API 的原始事件来源。

字段

  • eventId
  • clientSessionId
  • materialId
  • eventType
  • position
  • activeSecondsDelta
  • timestampMs
  • sequence

eventType

  • material_opened
  • position_changed
  • heartbeat
  • marked_as_read
  • material_closed

Rust 不生成字段

  • readingTargetType
  • platform
  • appVersion
  • clientTimezoneOffsetMinutes
  • userId
  • knowledgeBaseId

这些字段由 iOS / API 补充。

activeSecondsDelta 规则

  • material_opened: 0
  • position_changed: 0
  • marked_as_read: 0
  • heartbeat: 本次 tick 新增有效学习秒数
  • material_closed: 最后残余有效学习秒数

验收标准

  1. 新增 ReadingEvent V2 类型。
  2. eventId 由 Rust 生成。
  3. eventType 使用稳定枚举。
  4. activeSecondsDelta 使用增量语义。
  5. timestampMs 使用毫秒时间戳。
  6. sequence 单 session 内递增。
  7. 不包含 readingTargetType。
  8. 可序列化为 FFI DTO。
  9. 有事件生成单元测试。
## 目标 定义 V2 阅读事件模型,作为 iOS 上传 API 的原始事件来源。 ## 字段 - eventId - clientSessionId - materialId - eventType - position - activeSecondsDelta - timestampMs - sequence ## eventType - material_opened - position_changed - heartbeat - marked_as_read - material_closed ## Rust 不生成字段 - readingTargetType - platform - appVersion - clientTimezoneOffsetMinutes - userId - knowledgeBaseId 这些字段由 iOS / API 补充。 ## activeSecondsDelta 规则 - material_opened: 0 - position_changed: 0 - marked_as_read: 0 - heartbeat: 本次 tick 新增有效学习秒数 - material_closed: 最后残余有效学习秒数 ## 验收标准 1. 新增 ReadingEvent V2 类型。 2. eventId 由 Rust 生成。 3. eventType 使用稳定枚举。 4. activeSecondsDelta 使用增量语义。 5. timestampMs 使用毫秒时间戳。 6. sequence 单 session 内递增。 7. 不包含 readingTargetType。 8. 可序列化为 FFI DTO。 9. 有事件生成单元测试。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-10 21:18:32 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#104
No description provided.