feat: 素材选取路径接入 smart_match 评分,让用过降权真正生效 #1615
Reference in New Issue
Block a user
Delete Branch "feat/smart-match-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
改动内容
路径1: from-assets (clips.py)
sorted_candidates排序键改为(-smart_score, use_count, random)路径2: 一键生成 (plan_generator_service.py)
_distribute_assets在非随机模式下先按 smart_match 评分排序素材_sort_assets_by_smart_score方法random_selection模式不受影响测试
🚀 预览环境已部署
代码审查结果 - PR #1615
⚠️ 问题(0个需要修改)
(无)
💡 建议(1个可选)
_sort_assets_by_smart_score方法中循环调用self._asset_repo.get(asset_id)获取素材详情。而在调用_distribute_assets之前,通常已经调用过_fetch_asset_durations(或其他逻辑)获取过素材信息。这会导致重复的数据库查询或缓存调用。✅ 格式检查通过 | ✅ 逻辑审查通过 | ⚠️ 建议关注性能
🤖 由 AI 代码审查机器人自动生成 | 2026-09-01 12:16:39 | 模型:
🗑️ 预览环境已清理
PR #1615 已关闭或合并,对应的预览环境已被清理。