[文档] 代码-文档一致性整理 - README 同步 v3 全量(2.1网络/3模块表/4表结构/5 API含people-clips/6.1历史标注/8部署systemd+Vue3+config/12进度); docs/DEPLOY.md 重写为 v3; 删除过时 start_ui.sh(Streamlit); start_edge.sh 注明 systemd 为准; 补提交 test_motion_notifier

This commit is contained in:
ericwyuan
2026-08-22 13:14:38 +08:00
parent 96644599d3
commit 354ff18101
6 changed files with 348 additions and 212 deletions

View File

@@ -22,6 +22,14 @@
- **E2E 验证(真机)**:素材 `Generic_ONVIF-001-20260822-110859-...mp4` → 分割 35 段(真实 event_id 25504-25538、duration 1-132s→ 片段只分析summary 真实:人物/动作)→ events绝对时间 ts→ NAS 同步 → `/api/ui/videos` 显示 motion_ 片段字段契约不变filename/event_start_time/camera_name/event_count/summary_json/compute_provider`/api/ui/videos/<id>` 详情 events + people 正常 → `/api/proxy/frame` 帧图 200 OK
- **关键认知**SS 事件 duration=0 仅在动作**进行中**(结束时必为正数,实测 id=25538 从 0→2s故只分割已结束事件start+duration ≤ now+grace进行中的等下一轮。
- **部署注意**Oracle fam-edge 由 **systemd `fam-edge.service` 守护**Restart=always代码部署后必须 `sudo systemctl restart fam-edge`(手动 setsid 会与守护打架导致端口冲突)。
## 2026-08-22 清数据重提取 + 人物管理重设计 + 文档同步commits 4cf4fc4/6a29e88/9664459
- **清数据重提取**用户决策整段提取旧数据全删按运动视频重新提取Oracle videos(364)/events(1687)/people(44)/model_calls/service_activity 全清 + motion_clips 清空(保留 ss_motion_events 93 条 + 素材 + 配置先备份NAS sync_* 四表全清重启两端自动重提取8/22 素材→运动片段8/15-21 历史素材无运动事件→0 段)
- **时间轴过滤**:历史素材"分割 0 段"空会话淹没时间轴 → db_layer.get_sync_videos/get_sync_stats 加内容过滤(`LEFT(filename,7)='motion_'` OR 有事件),前端契约不变;**踩坑pymysql execute 用 % 做占位符SQL 字面量 'motion_%' 的 % 报 "unsupported format character" 500 → 改 LEFT 判断**
- **人物管理重设计**`GET /api/ui/people/clips?label=`db_layer.get_sync_people_clips按 label/canonical_name 匹配 person_list_json → 关联运动片段,含 first_ts/clip_eventsPersonCard.vue 新增「运动片段」区块(缩略图/时间/摘要/事件数,点击跳 `/timeline?video=`Timeline.vue 支持 query 定位
- **文档同步**README 更新 2.1 网络要点/2.2 拓扑(Streamlit→Vue3)/3.1-3.3 模块表(poll 主路径+people clips)/4.1 表清单(motion_event_id/ss_motion_events)/5.1-5.2 API 表(people/clips+frame/avatar)/6.1 历史标注/8 部署(systemd+Vue3+motion_segment config)/12 进度docs/DEPLOY.md 重写为 v3已 push
- **验证**/api/ui/videos 全为 motion_ 片段15 条);/api/ui/people 3 身份people/clips 返回媳妇 3 个片段;前端 dist 已构建部署
| Tailscale | Oracle ↔ NAS | 100.74 ↔ 100.70 | ⚠️ 待修复 | Tailscale 运行但端口不通当前用公网IP |
| FAM-UI | NAS | 0.0.0.0:8501 | ✅ 运行中 | Streamlit 1.61.1, HTTP 200, health=ok |