[文档] 代码-文档一致性整理 - 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:
@@ -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_events);PersonCard.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 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user