跳到主要内容

RecordingData JSON 格式

RecordingData 是打点记录的完整数据包装,序列化为 JSON 后通过 BlinkCrypto 加密存储到 .blink 文件。

JSON 结构

{
"sportType": "足球",
"startTime": "2026-04-13T10:00:00.000Z",
"endTime": "2026-04-13T11:30:00.000Z",
"duration": 5400000,
"dotRecords": [
{
"id": 900000,
"action": "射门",
"timestamp": "2026-04-13T10:15:00.000Z",
"recordingTime": 900000,
"inputSource": "ble_ring"
},
{
"id": 1200000,
"action": "犯规",
"timestamp": "2026-04-13T10:20:00.000Z",
"recordingTime": 1200000,
"inputSource": "gesture"
}
],
"dotCounts": {
"射门": 8,
"犯规": 3,
"精彩": 5
},
"totalDots": 16,
"recordType": 1,
"alignOffsetMs": null,
"inputSources": ["ble_ring", "gesture"]
}

字段说明

字段类型必填说明
sportTypestring运动类型
startTimeISO8601录制开始时间 (UTC)
endTimeISO8601录制结束时间 (UTC)
durationint总时长 (毫秒)
dotRecordsarray打点事件列表
dotCountsobject按动作类型的计数
totalDotsint打点总数
recordTypeint1=录制+打点, 2=仅打点, 3=外部导入
alignOffsetMsint?对齐偏移(仅 recordType=2/3)
inputSourcesstring[]?使用的输入源列表

dotRecords 元素

字段类型说明
idint稳定 ID(= recordingTime 毫秒值)
actionstring动作类型名称
timestampISO8601绝对 UTC 时间戳
recordingTimeint相对录制开始的偏移(毫秒)
inputSourcestringble_ring / gesture / watch / manual

存储位置

/sdcard/Documents/BlinkLife/
└── {date}_{timestamp}/
└── recording_data.blink ← AES-256-CBC 加密的此 JSON

读写方式

  • 写入:FileService.saveRecordingData()BlinkCrypto.writeFile()
  • 读取:FileService.loadRecordingData()BlinkCrypto.readFile()
  • 禁止直接 readAsString/writeAsString

相关文档