docs(plan): 填写Task4判别记录(双编码发现+逐码证据+回填终态+前端兜底注意)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-25 15:32:07 +08:00
parent 64577a1b02
commit c21758dfb2
@@ -988,23 +988,36 @@ cd ../yunkes && npx vue-tsc --noEmit && npm run build # 通过
---
## 附:判别记录(Task 4 Step 1 填写)
## 附:判别记录(Task 4 Step 1 spike 结论,2026-08-25 实测 smoke.db,每类 ≥3 样本)
| type_raw | 样本摘要 | 判定 type |
|---|---|---|
| 21 | | |
| 15 | | |
| 9 | | |
| 10 | | |
| 4 | | |
| 18 | | |
| 8 | | |
| 6 | | |
| 22 | | |
| 13 | | |
| 14 | | |
| 5 | | |
| 11 | | |
| 20 | | |
| 10000 | | |
| 7 | | |
**核心发现:云客 API 双编码**——`raw_json.messageType`=经典微信协议码(1/3/34/43/47/42/48/49/50/10000+合成大数),`raw_json.type`=云客自编码;DB `type_raw` 列两者混合。归一化采用 **messageType 优先 → 49/appmsg 行级拆分 → 云客码兜底** 三层。
| type_raw(云客码) | messageType | 行数 | 样本摘要 | 判定 type | 置信度 |
|---|---|---|---|---|---|
| 1 | '1' | 473,922 | 普通会话文本 | text | 强 |
| 2 | '3' | 50,154 | md5+OSS fileTh URL | image | 强 |
| 3 | **'34'** | **8,754** | **file=语音hex键、text=时长数字** | **voice(旧 3→image_legacy 系误标,已回填修正)** | 强 |
| 3 | '3' | 201 | md5+OSS 图片 | image | 强 |
| 4 | '43' | 4,835 | picType/md5 视频 | video | 强 |
| 5 | '436207665' | 625 | file=wx.gtimg.com/hongbao 封面 | red_packet | 强 |
| 6 | '50' | 2,077 | VOIP+duration 无 text | voice_call | 中(6/7 同为 mt=50 无区分字段,按频率先验;最坏 77 行互换) |
| 7 | '50' | 77 | 同上 | video_call | 中(同上) |
| 8 | '47' | 4,224 | tc.qq.com 表情 CDN | emoji | 强 |
| 9 | '49' | 9,075 | xlsx/pdf 文件名+OSS file | file | 强 |
| 10 | '49' | 6,868 | 92% 带封面图(车源模板文本) | link | 强 |
| 11 | '419430449' | 386 | text="发送转账:¥100.00" | transfer | 强 |
| 13 | '42' | 950 | text=昵称,file=头像 | namecard | 强 |
| 14 | '48' | 647 | text=地址,file="lat,lng" | location | 强 |
| 15 / 10000 | '10000'/合成码 | 18,489 | "你已添加了…打招呼消息" | system | 强 |
| 18 | '49' | 4,792 | 99.8% 公众号封面 mmbiz.qpic.cn | link | 强 |
| 20 | '754974769' | 129 | 视频号封面+话题#标签 | link | 中(视频号分享,非原生视频) |
| 21 非XML | '822083633' | 30,165 | 全部带 referMsg(引用回复) | text | 强 |
| 21 XML | '49' | 1,701 | `<type>19</type>` 聊天记录 | merged_forward | 强 |
| 22 | '922746929' | 1,877 | 零 text,带 patMsgRecordNum/patMsgs(拍一拍) | unknown(保守——拍一拍无规范类型,system 会渲染空) | 证据不足留 unknown |
| 19 | '-1879048186' | 5 | 空文本无字段 | unknown | 证据不足 |
| 49 旧行 | '49' | 202 | raw_json.type 子码 10/21/18/9 | link(143)/file(52)/merged_forward(7) | 强 |
- paymsgid 实测数据全空(红包/转账真实判据=hongbao 封面 URL 与"发送转账"文本);paymsgid 非空且无 XML type → transfer(转账语义,比 plan 草稿更准)
- 回填结果(2026-08-25 实跑):scanned 620,279 / updated 94,268 / unknown 87,198→1,885 / image_legacy 8,955→0;终态 text 504,174 · system 18,489 · image 50,355 · link 11,932 · file 9,075 · voice 8,815 · video 4,835 · emoji 4,242 · voice_call 2,077 · merged_forward 1,704 · namecard 953 · location 651 · red_packet 625 · transfer 390 · video_call 77
- **范围外遗留**:`app/scraper/parsers.py normalize_wechat_type`(orchestrator 旧路径)仍写旧标签——orchestrator 运行后需重跑回填自愈;WhatsApp 渠道 unknown ~8,800 行是另一套编码,建议独立任务
- **前端 Task 11 注意**:时间线会出现下拉之外的 type 标签(system/emoji/namecard/location/merged_forward/unknown)——气泡渲染需兜底;mini_program 无样本行(查空属数据现实)