[P1] 降重手段: 正式生成时片段随机重排 #1663

Closed
opened 2026-09-03 18:45:35 +08:00 by xiaoxia · 0 comments
Owner

背景

当前预览生成时已有 random.shuffle(asset_ids)plan_generator_utils.py),但正式生成时素材按顺序分配。需要在正式生成时也启用片段随机重排来降低查重率。

任务

  1. packages/domain/plan_generator_utils.pydistribute_assets() 中,正式生成也启用 random_selection=True
  2. 或者在 apps/worker/worker_app/tasks/generation.py 中,生成最终视频前对 clips 的素材分配做随机化处理
  3. 默认开启,无需配置开关

效果评估

片段重排是降重效果最好的手段之一(),打乱叙事结构能有效破坏时序一致性。

优先级

P1

依赖

技术债务约束(铁律)

  • 新代码必须有单元测试覆盖
  • 不引入新的 if/else 分支兼容旧逻辑
  • staging 先验证通过再上生产
## 背景 当前预览生成时已有 `random.shuffle(asset_ids)`(`plan_generator_utils.py`),但正式生成时素材按顺序分配。需要在正式生成时也启用片段随机重排来降低查重率。 ## 任务 1. 在 `packages/domain/plan_generator_utils.py` 的 `distribute_assets()` 中,正式生成也启用 `random_selection=True` 2. 或者在 `apps/worker/worker_app/tasks/generation.py` 中,生成最终视频前对 clips 的素材分配做随机化处理 3. 默认开启,无需配置开关 ## 效果评估 片段重排是降重效果最好的手段之一(⭐⭐⭐⭐),打乱叙事结构能有效破坏时序一致性。 ## 优先级 P1 ## 依赖 无 ## 技术债务约束(铁律) - 新代码必须有单元测试覆盖 - 不引入新的 if/else 分支兼容旧逻辑 - staging 先验证通过再上生产
xiaoxia added this to the 技术债务与优化 milestone 2026-09-03 18:45:35 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoxia/xiaoxia-saas#1663