{"text_format":"2","workbook":"xlsx","n_sheets":8,"sheets":["00_四条数据流总览","01_piaoquan数据流","02_全局树数据流","03_changwen数据流","04_zengzhang数据流","05_公共Agent生成与落库流","06_字段字典与跨流血缘","07_实测校验_疑点_Checker"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":0,"defined_names":8,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"00_四条数据流总览","index":0,"n_rows":6,"n_cols":14,"rows_kept":6,"cut":false,"hidden":false,"merged":[]}
["数据流","触发/运行状态","输入业务对象","输入证据","输入库/表/字段定位","主要加工","技术手段/算法/SQL口径","公共汇流点","最终业务落点","输出库/表/字段定位","不是最终结果的对象","实测规模/样例","核对状态","证据"]
["piaoquan","Web API 和 APScheduler 可触发；按昨日供需缺口品类生成任务","merge二级品类，例如迷信祝福、国家科技力量","ODPS 视频表现和缺量分；open_aigc_pattern 中该品类的 Pattern Tree、元素、频繁组合","loghubods.video_dimension_detail_add_column；open_aigc_pattern.cluster_execution/global_category/global_element/global_post/topic_pattern_*；运行时 MySQL demand_task/demand_content；loghubods.dwd_multi_demand_pool_di","筛出要补需求的品类和视频证据，构建或复用 Pattern 快照，按近 14 天 ROV 给元素/分类打权重，再交给 Agent 生成需求","ODPS 缺量聚合 + SQLAlchemy Pattern 快照 + FP-Growth + 近14天 avg_rov_t0 权重 + Agent tools/LLM + MySQL/ODPS 写入","execution_id 绑定的权重 JSON、Pattern 工具返回 JSON、DemandItem JSON","运行时 MySQL demand_content；同步 Hive/ODPS loghubods.dwd_multi_demand_pool_di","demand_content(merge_leve2,name,reason,suggestion,score,ext_data,dt)；dwd_multi_demand_pool_di(strategy,demand_id,demand_name,weight,type,video_count,video_list,extend,dt)","demand_task 是任务台账；result/{execution_id} 是本地中间 JSON","open_aigc_pattern 最新成功 execution_id=1922，迷信祝福，post_count=50，itemset_count=152；下游实测 demand_content 总 24151 行；dt=20260528 为 665 行；迷信祝福当前 20 行样例","MySQL 已只读实测；ODPS 本轮没有本地客户端，使用源码 SQL 和已有审计样例","web_api.py；piaoquan_prepare.py；pattern_builds/*；run.py；data_query_tools.py"]
["全局树","作为 piaoquan 的特殊固定补充对象运行；调度和 CLI 默认会追加","固定 cluster_name=全局树，platform_type=piaoquan","全局树 Pattern Tree、元素、频繁组合；去年同期 7 天视频表现窗口","open_aigc_pattern topic_pattern_*；loghubods.video_dimension_detail_add_column；result DemandItem JSON","用全局树 Pattern 生成更通用的特征点需求，权重窗口和最终落点都不同于普通 piaoquan","复用 Pattern Mining + 去年同期7天 avg_rov_t0 权重 + Agent 生成 + feature_point_data ODPS INSERT","execution_id 权重 JSON、Pattern 工具返回 JSON、DemandItem JSON","Hive/ODPS feature_point_data","feature_point_data(特征点,总分发曝光pv,质bn_rovn,dt)","不写 demand_content；feature_point_data 不保留 reason/suggestion/video_ids 等需求解释字段","源码写入形态：dt=20260528，特征点=<需求名>，总分发曝光pv=5000，质bn_rovn=0.1；本轮 ODPS 未实连","源码路径已核对；ODPS 本轮没有本地客户端","run.py；data_query_tools.py；weight_score_query_tools.py"]
["changwen","Web API 可放行；按公众号/账号组织数据","公众号名和其近 30 天内容","ODPS 长文账号表现；open_aigc 上游内容解构元素和分类映射","loghubods.video_action_log_rp/user_share_log/ods_video_play_log_day/gzh_fans_info/user_wechat_identity_info_ha/video_merge_tag；videoods.content_profile/wx_video；open_aigc 解构表；open_aigc_pattern.topic_pattern_*","先取账号内容表现，过滤推荐曝光低于阈值的内容，再按 videoid 拉解构元素，生成 Pattern 和权重，交给 Agent 判断需求","30天账号 ODPS 聚合 + 推荐曝光过滤 + open_aigc 解构导入 + FP-Growth + realplay_uv/曝光uv 权重 + Agent 生成","changwen_data/{account}.json、execution_id 权重 JSON、DemandItem JSON","运行时 MySQL demand_content；同步 Hive/ODPS loghubods.dwd_multi_demand_pool_di","demand_content；dwd_multi_demand_pool_di；中间 changwen_data/{account}.json","changwen_data 文件是输入缓存；topic_pattern_* 是中间 Pattern 快照","长文 SQL 窗口为昨天往前 30 天；open_aigc 本轮握手阶段连接提前关闭，未取得真实行数","源码 SQL 已核对；open_aigc 实连失败，不补造统计","changwen_prepare.py；pattern_from_open_aigc.py；run.py"]
["zengzhang","源码有分支；当前 Web API 和定时入口未放行","增长合作方名/简称和其近 30 天内容","ODPS dws_growth_partner_vid_data；open_aigc 上游内容解构元素和分类映射","loghubods.dws_growth_partner_vid_data；open_aigc 解构表；open_aigc_pattern.topic_pattern_*","按合作方取内容表现，删除 推荐曝光数<1000 的低曝光内容，再进入和 changwen 同构的 Pattern/权重/Agent 链路","30天合作方 ODPS 聚合 + 推荐曝光过滤 + open_aigc 解构导入 + FP-Growth + realplay_uv/曝光uv 权重 + Agent 生成；当前入口未放行","zengzhang_data/{account}.json、execution_id 权重 JSON、DemandItem JSON","代码写法最终同普通需求池：demand_content 和 dwd_multi_demand_pool_di；但入口当前不放行","手工触发时 demand_content/dwd_multi_demand_pool_di；中间 zengzhang_data/{account}.json","zengzhang_data 文件是输入缓存；topic_pattern_* 是中间 Pattern 快照","源码确认使用近 30 天窗口；ODPS 本轮未实连，open_aigc 本轮连接失败","源码路径已核对；入口状态按 web_api.py 和 scheduler 分支确认","zengzhang_prepare.py；web_api.py；run.py"]
["公共 Agent 生成/落库","四条来源流完成证据组织后都会进入","权重 JSON、Pattern Tree、频繁组合、共现证据","元素/分类分数、support、absolute_support、matched_post_ids、相关视频和分类路径","data/{execution_id}/*.json；open_aigc_pattern.topic_pattern_itemset/itemset_item/category/element；result DemandItem JSON","工具把结构化证据喂给 LLM；LLM 生成 DemandItem；落库函数按来源分支写不同最终表","@tool 工具查询 + AgentRunner/SimplePrompt + create_demand_items + write_demand_items_to_mysql/write_feature_point_data_to_hive/write_dwd_multi_demand_pool_di_to_hive","DemandItem JSON，包含 element_names、reason、desc、type、score、video_ids","普通流写 demand_content 并同步 dwd_multi_demand_pool_di；全局树写 feature_point_data；API 任务写 demand_task","普通流 demand_content + dwd_multi_demand_pool_di；全局树 feature_point_data；API demand_task","本地 result JSON 和 trace 是调试/中间产物；demand_task 是任务台账","实测 downstream demand_content 样例：迷信祝福 / 仪式行为,特定时期习俗 / score=0.0164285","MySQL 下游线索已只读实测；运行时 DB 地址由环境配置决定，仓库本身不固定写死输出库","demand_pattern_tools.py；weight_score_query_tools.py；demand_build_agent_tools.py；run.py；mysql/db_config.py"]

{"sheet":"01_piaoquan数据流","index":1,"n_rows":8,"n_cols":18,"rows_kept":8,"cut":false,"hidden":false,"merged":[]}
["数据流","阶段","本步业务问题","输入对象","输入字段","输入库/表/字段定位","输入字段业务含义","本步加工逻辑","技术手段/算法/SQL口径","输出对象","输出字段","输出库/表/字段定位","输出字段业务含义","最终落点","是否最终业务结果","真实规模/样例","核对状态","代码/SQL证据"]
["piaoquan","缺量品类选择","今天应该优先给哪些品类补需求","ODPS loghubods.video_dimension_detail_add_column","dt；视频id；merge二级品类；当日分发曝光pv；当日分发回流uv；累计分享回流uv；rov_t0；总供需分；缺量；控量；质bn_rovn","loghubods.video_dimension_detail_add_column(dt, 视频id, merge二级品类, 当日分发曝光pv, 当日分发回流uv, 累计分享回流uv, 推荐天数间隔, 总日分发视频数, 总日回流uv)","dt 是业务日期；视频id 是内容证据；merge二级品类 是补需求的业务品类；曝光/回流/ROV 衡量内容表现；缺量和供需分决定是否值得补需求","按昨日分区聚合品类表现和供需缺口，形成待生成需求的品类列表和数量","ODPS 聚合 SQL：按 dt=昨天、merge二级品类 GROUP BY；计算质bn_rovn、总供需分、新供需分、缺量/控量；按缺量阈值映射 count=70/60/40/20/10。","任务入参 cluster_name/merge_leve2/count/platform","cluster_name=业务品类；merge_leve2=同品类名；count=计划生成需求条数；platform=piaoquan","任务参数 cluster_name/platform_type/count；运行时 MySQL demand_task(execution_id, name, platform, status, log)；Pattern 表 topic_pattern_execution(cluster_name, merge_leve2, platform, post_count, status)","把一个缺量品类变成一次 DemandAgent 任务范围","demand_task 记录任务；后续 topic_pattern_execution 记录 Pattern 执行","任务台账，不是最终需求结果","已有审计样例：dt=20260526，video_id=69518811，merge二级品类=国家科技力量，当日分发曝光pv=1020851，rov_t0=0.12；本轮 ODPS 未实连","源码 SQL 已核对；本轮无 ODPS 客户端","data_query_tools.py:get_video_dimension_detail_add_column；web_api.py；run.py"]
["piaoquan","Pattern 快照执行","这个品类已有内容里有哪些稳定结构可以转成需求候选","MySQL open_aigc_pattern.cluster_execution/global_category/global_element/global_post","cluster_name；post_id；source_type；category_path；element_name；classification_path","open_aigc_pattern.cluster_execution(id, name, status, create_time)；global_category(stable_id, source_type, name, path, level, parent_stable_id)；global_element(name, type, category_path)；global_post(post_id, execution_id)","cluster_name 限定品类；post_id 是视频证据；source_type 区分实质/形式/意图；category_path 是元素在树上的位置；element_name 是内容解构出的具体元素","取最新成功聚类/全局树结果，写入 topic_pattern_execution，并把分类树、帖子级元素、帖子集合固化到 topic_pattern_*","SQLAlchemy 查询最新成功 cluster_execution；抽取 global_category/global_element/global_post；建立 TopicPatternExecution；批量写入 topic_pattern_category 和 topic_pattern_element。","topic_pattern_execution；topic_pattern_category；topic_pattern_element","execution_id；status；post_count；source_type；path；level；post_id；point_type；element_type；name；category_path","open_aigc_pattern.topic_pattern_execution(id, cluster_name, merge_leve2, platform, post_count, status, start_time, end_time)；topic_pattern_category(execution_id, source_type, name, path, level, parent_id, element_count)；topic_pattern_element(execution_id, post_id, point_type, element_type, name, category_id, category_path)","execution_id 是后续所有 Pattern、权重、Agent 工具查询的关联键；category/element 表把原始解构结果固定成一次可复现快照","open_aigc_pattern.topic_pattern_*","中间 Pattern 快照，不是最终需求结果","实测最新成功 execution_id=1922，迷信祝福，post_count=50，status=success，2026-05-28 00:26:14-00:26:15","MySQL 已只读实测","pattern_builds/pattern_from_global.py；models.py；topic_pattern_execution/topic_pattern_category/topic_pattern_element"]
["piaoquan","Pattern Tree 和元素规模","这个品类的内容结构有多大，覆盖多少证据视频","topic_pattern_category；topic_pattern_element","source_type；path；level；element_count；post_id；name；category_path","open_aigc_pattern.topic_pattern_category(execution_id, source_type, path, level, element_count)；topic_pattern_element(execution_id, element_type, name, post_id, category_path)","source_type 是结构维度；path/level 是树层级；element_count 是分类下元素数；post_id/name 说明某个视频出现了某个元素","统计分类节点、元素行、distinct 元素名和覆盖视频数，用来判断该品类证据是否足够","只读统计 SQL：按 source_type/element_type GROUP BY，COUNT 分类节点、COUNT 元素行、COUNT DISTINCT name、COUNT DISTINCT post_id。","可被 Pattern 工具和权重工具查询的树和元素明细","分类节点数；元素行数；元素名去重数；覆盖 post 数","统计结果用于 Excel：nodes/max_level/element_count_sum/rows_count/distinct_names/post_count；不写回业务库。","给 Agent 提供可枚举的候选元素和分类路径","open_aigc_pattern.topic_pattern_category/topic_pattern_element","中间证据，不是最终需求结果","execution_id=1922：实质 39 节点/411 元素行/288 distinct/50 帖；形式 32/350/231/50；意图 7/40/7/39","MySQL 已只读实测","SQL: group by execution_id, source_type；models.py"]
["piaoquan","频繁组合挖掘","哪些元素组合在多条内容里一起出现，足够稳定可以作为组合型需求","topic_pattern_element","post_id；point_type；element_type；name；category_path；source_type","open_aigc_pattern.topic_pattern_element(execution_id, post_id, point_type, element_type, name, category_path)","post_id 用来组成一条交易；element 代表交易里的一个内容要素；category_path 保留元素的业务分类","按帖子构造交易，FP-Growth 挖共现组合，过滤长度和支持度，写 itemset 和 itemset_item","把每个 post_id 的元素集合转成 transaction；使用 FP-Growth/frequent itemset mining；min_absolute_support=3，过滤保留 item_count>=3；拆 item 维度和分类路径。","topic_pattern_itemset；topic_pattern_itemset_item","combination_type；item_count；support；absolute_support；matched_post_ids；dimensions；element_name；category_path","open_aigc_pattern.topic_pattern_itemset(execution_id, mining_config_id, combination_type, item_count, support, absolute_support, dimensions, is_cross_point, matched_post_ids)；topic_pattern_itemset_item(itemset_id, point_type, dimension, category_id, category_path, element_name)","support/absolute_support 说明组合出现比例和出现帖子数；matched_post_ids 是支撑这个组合的证据内容","open_aigc_pattern.topic_pattern_itemset/topic_pattern_itemset_item","中间 Pattern 组合，不是最终需求结果","execution_id=1922：152 个 itemset，support=0.06..0.18，absolute_support=3..9；样例组合类型：关键点×目的点_混合","MySQL 已只读实测","pattern_builds/frequent_itemset.py；demand_pattern_tools.py"]
["piaoquan","ROV 权重计算","同样是元素或分类，哪些更值得优先生成需求","ODPS video_dimension_detail_add_column；topic_pattern_element/category","视频id；rov_t0；当日分发曝光pv；post_id；name；category_path","loghubods.video_dimension_detail_add_column(视频id, dt, 当日分发曝光pv, rov_t0)；open_aigc_pattern.topic_pattern_element(post_id, name, category_path)；topic_pattern_category(path, name)","视频id/post_id 串联表现数据和解构元素；rov_t0 是内容回流价值；name/category_path 是要打分的元素或分类","按 execution_id 的 video_ids 查近 14 天表现；元素分数取相关视频 ROV 均值；分类分数按路径上元素分数汇总","ODPS SQL：WHERE 视频id IN execution videos AND dt BETWEEN 今天-14天 AND 昨天；曝光 PV 累计 <1000 则 avg_rov_t0=0，否则 AVG(NULLIF(rov_t0,0))；元素 score=覆盖视频 avg_rov_t0 均值，分类 score=路径相关元素累计/汇总。","data/{execution_id}/{实质|形式|意图}_元素.json；data/{execution_id}/{实质|形式|意图}_分类.json","name；score；post_ids_count；category_paths；category_path；category","本地 JSON data/{execution_id}/{实质|形式|意图}_元素.json(name, score, post_ids_count, category_paths)；data/{execution_id}/{维度}_分类.json(category_path, category, score, post_ids_count)","score 是 Agent 排序候选的表现权重；post_ids_count 是这个元素/分类背后的证据视频数","${process cwd}/data/{execution_id}/","Agent 输入中间文件，不是最终需求结果","piaoquan 普通流按 video_ids + 近 14 天 ROV 查询；之前说按 merge_leve2 过滤不准确","源码路径已核对；ODPS 本轮未实连","data_query_tools.py:get_rov_by_merge_leve2_and_video_ids；weight_score_query_tools.py"]
["piaoquan","Agent 生成需求","哪些元素/分类/组合能被表达成一条下游可使用的需求","权重 JSON；topic_pattern_itemset；topic_pattern_category/element","score；support；absolute_support；matched_post_ids；category_path；element_name","本地 data/{execution_id}/*.json(score/name/category_path/post_ids_count)；open_aigc_pattern.topic_pattern_itemset/support/absolute_support/matched_post_ids；topic_pattern_element/category_path/name","score 代表表现优先级；support 代表结构稳定性；matched_post_ids 给需求提供证据视频；category_path/element_name 是需求命名材料","Agent 工具查询 Top 权重和频繁组合，LLM 按 prompt 选择需求，调用 create_demand_items 写 DemandItem","@tool 工具查询 + LLM Prompt：get_weight_score_topn/get_weight_score_by_name 返回高权重元素/分类；get_frequent_itemsets/get_element_co_occurrences 返回频繁组合/共现；AgentRunner 调 SimplePrompt，由 create_demand_items 落本地 JSON。","result/{execution_id}/execution_id_{execution_id}_demand_items.json","element_names；reason；desc；type；score；video_ids","本地 result/{execution_id}/execution_id_{execution_id}_demand_items.json(items[].element_names, reason, desc, type, score, video_ids)","element_names 是需求名组成；reason 是成立理由；desc 是需求描述；type 是需求类型；video_ids 是证据内容","${process cwd}/result/{execution_id}/","中间 JSON，不是最终业务结果","下游实测样例需求：迷信祝福 / 仪式行为,特定时期习俗 / score=0.0164285","代码路径已核对；需求样例来自下游只读实测","demand.md；demand_build_agent_tools.py:create_demand_items；run.py:run_once"]
["piaoquan","需求池落库","把 Agent 选出的需求交给下游寻找/生产链路","DemandItem JSON","element_names；reason；desc；type；score；video_ids；merge_leve2；dt","本地 result/{execution_id}/execution_id_{execution_id}_demand_items.json；data/{execution_id}/*.json；open_aigc_pattern.topic_pattern_element/category 用于反查 video_ids/category level","element_names 变成需求名；reason/desc/type 解释需求；score 保留权重；video_ids 是证据；merge_leve2/dt 让下游按品类和日期消费","普通流写 MySQL demand_content，再同步 dwd_multi_demand_pool_di 两种 strategy","Python 映射：element_names 逗号拼 name；score 从权重 JSON 按名称均值计算；query_video_ids_by_names 反查证据视频；mysql insert_many 写 demand_content；随后 ODPS INSERT SELECT UNION ALL 写两种 strategy。","demand_content；loghubods.dwd_multi_demand_pool_di","name；reason；suggestion；ext_data；score；merge_leve2；demand_name；weight；type；video_count；strategy；dt","运行时 MySQL demand_content(merge_leve2, name, reason, suggestion, score, ext_data, dt)；loghubods.dwd_multi_demand_pool_di(strategy, demand_id, demand_name, weight, type, video_count, video_list, extend, dt)","demand_content 是需求池主结果；dwd_multi_demand_pool_di 是 Hive/ODPS 下游消费视图","运行时 MySQL 输出库；Hive/ODPS loghubods.dwd_multi_demand_pool_di","最终业务结果","content-deconstruction-supply 作为运行环境观察：demand_content 总 24151 行；dt=20260528 为 665 行；迷信祝福当前 20 行；不是仓库硬编码输出库","下游 MySQL 已只读实测；运行时输出库地址由环境配置决定","run.py:write_demand_items_to_mysql；data_query_tools.py:write_dwd_multi_demand_pool_di_to_hive；mysql/db_config.py"]

{"sheet":"02_全局树数据流","index":2,"n_rows":6,"n_cols":18,"rows_kept":6,"cut":false,"hidden":false,"merged":[]}
["数据流","阶段","本步业务问题","输入对象","输入字段","输入库/表/字段定位","输入字段业务含义","本步加工逻辑","技术手段/算法/SQL口径","输出对象","输出字段","输出库/表/字段定位","输出字段业务含义","最终落点","是否最终业务结果","真实规模/样例","核对状态","代码/SQL证据"]
["全局树","固定对象进入任务","除了缺量品类外，是否还需要生成更通用的特征点需求","调度/CLI 任务参数","cluster_name；platform_type；count","web_api/APScheduler 参数：cluster_name=全局树, platform_type=piaoquan, count=50；run.py CLI 默认 merge_level2=全局树","cluster_name 固定为全局树；platform_type=piaoquan 表示仍用票圈内容体系；count 是计划生成数量","调度在普通品类任务外追加全局树任务，CLI 默认也会跑全局树","调度层固定追加全局树任务；执行层仍调用 piaoquan_prepare，后续用 merge_leve2==全局树 触发特殊权重和特殊落点。","execution_id 对应的全局树 Pattern 任务","execution_id；cluster_name=全局树；platform=piaoquan","topic_pattern_execution(cluster_name=全局树, platform=piaoquan)；最终写 feature_point_data，而不是 demand_content。","把固定全局对象变成一次 Pattern/Agent 执行范围","topic_pattern_execution；后续 feature_point_data","任务范围，不是最终业务结果","代码确认全局树是 piaoquan 特殊分支，不是独立平台","代码路径已核对","run.py；web_api.py"]
["全局树","Pattern Tree 查询/快照","全局内容结构里哪些元素和组合能形成跨品类特征点","open_aigc_pattern cluster_execution/global_* 或 topic_pattern_*","source_type；category_path；element_name；post_id；execution_id","open_aigc_pattern.cluster_execution/global_category/global_element/global_post 或已生成的 topic_pattern_category/topic_pattern_element/topic_pattern_itemset","source_type 区分实质/形式/意图；category_path 是元素树位置；element_name 是候选特征点材料；post_id 是证据视频","和 piaoquan 复用 Pattern Mining 逻辑，把全局树结构固化为 topic_pattern_category/element/itemset","复用 piaoquan Pattern Mining：分类树快照 + 帖子级元素 + FP-Growth itemset；用 execution_id 固化一次全局树证据。","topic_pattern_category；topic_pattern_element；topic_pattern_itemset","path；level；name；category_path；support；absolute_support；matched_post_ids","open_aigc_pattern.topic_pattern_category(execution_id, source_type, path, level)；topic_pattern_element(post_id, element_type, name, category_path)；topic_pattern_itemset(support, absolute_support, matched_post_ids)","分类树、元素和组合共同构成 Agent 可查询的候选空间","open_aigc_pattern.topic_pattern_*","中间 Pattern 证据","本轮 DB 实测 case 是迷信祝福；全局树具体 execution 需运行时任务 ID 才能定位","源码路径已核对；未使用错误 case 代替全局树规模","pattern_builds/*；models.py"]
["全局树","去年同期权重","跨品类特征点该按什么表现窗口排序","ODPS video_dimension_detail_add_column；全局树 video_ids","视频id；rov_t0；dt；post_id；name；category_path","loghubods.video_dimension_detail_add_column(视频id, dt, 当日分发曝光pv, rov_t0)；topic_pattern_element(post_id, name, category_path)","dt 取去年同期 7 天窗口；rov_t0 衡量内容回流价值；post_id/videoid 串联表现和元素","按全局树相关视频查去年同期 7 天 ROV，计算元素/分类 score","ODPS SQL：WHERE 视频id IN execution videos AND dt BETWEEN 去年今日 AND 去年今日+7天；曝光 PV <1000 则 0，否则 AVG(NULLIF(rov_t0,0))；再生成元素/分类 score JSON。","data/{execution_id}/{维度}_元素.json；data/{execution_id}/{维度}_分类.json","name；score；post_ids_count；category_path；category","本地 JSON data/{execution_id}/{维度}_元素.json(name, score, post_ids_count, category_paths)；{维度}_分类.json(category_path, category, score, post_ids_count)","score 是全局特征点优先级，不是普通品类近 14 天权重","${process cwd}/data/{execution_id}/","Agent 输入中间文件","源码确认全局树调用 get_rov_by_tree_and_video_ids；本轮 ODPS 未实连","代码路径已核对；本轮无 ODPS 客户端","data_query_tools.py:get_rov_by_tree_and_video_ids；weight_score_query_tools.py"]
["全局树","Agent 生成特征点","哪些全局元素可以作为下游通用特征点","权重 JSON；Pattern 工具返回 JSON","score；support；absolute_support；category_path；element_name","data/{execution_id}/*.json；topic_pattern_itemset/topic_pattern_itemset_item；topic_pattern_element/category","score 表示表现权重；support 表示结构稳定性；element_name/category_path 是特征点命名材料","复用公共 Agent 生成 DemandItem，但后续只取需求名落特征点表","与普通流相同：权重工具 + Pattern 工具 + SimplePrompt + AgentRunner；生成 DemandItem，但后续落表只使用 element_names。","DemandItem JSON","element_names；reason；desc；type；score；video_ids","result/{execution_id}/execution_id_{execution_id}_demand_items.json(items[].element_names, reason, desc, type, score, video_ids)","DemandItem 仍包含解释字段，但全局树落表阶段不会全部保留","${process cwd}/result/{execution_id}/","中间 JSON","代码确认 result 路径取 process cwd，不固定在仓库目录","代码路径已核对","demand_build_agent_tools.py；run.py"]
["全局树","feature_point_data 落表","把全局需求转成下游可直接使用的特征点列表","DemandItem JSON","element_names；dt","DemandItem JSON items[].element_names；运行日期 Asia/Shanghai","element_names 拼接后作为特征点名；dt 是当天分区","只取需求名写 feature_point_data，并填固定曝光和固定 ROV 字段","Python 映射 + ODPS INSERT：把 element_names 逗号拼接为 name；构造 SELECT UNION ALL；固定 总分发曝光pv=5000、质bn_rovn=0.1，按当天 dt 分区写入。","Hive/ODPS loghubods.feature_point_data","特征点；总分发曝光pv；质bn_rovn；dt","loghubods.feature_point_data(特征点, 总分发曝光pv, 质bn_rovn, dt)","特征点是最终给下游用的名字；总分发曝光pv 固定 5000；质bn_rovn 固定 0.1；dt 是当天业务日期","Hive/ODPS loghubods.feature_point_data","最终业务结果","源码写入形态：dt=20260528，特征点=<需求名>，总分发曝光pv=5000，质bn_rovn=0.1；本轮未取得真实今日行","源码已核对；ODPS 本轮未实连","data_query_tools.py:write_feature_point_data_to_hive；run.py"]

{"sheet":"03_changwen数据流","index":3,"n_rows":6,"n_cols":18,"rows_kept":6,"cut":false,"hidden":false,"merged":[]}
["数据流","阶段","本步业务问题","输入对象","输入字段","输入库/表/字段定位","输入字段业务含义","本步加工逻辑","技术手段/算法/SQL口径","输出对象","输出字段","输出库/表/字段定位","输出字段业务含义","最终落点","是否最终业务结果","真实规模/样例","核对状态","代码/SQL证据"]
["changwen","账号内容表现抽取","某个公众号近 30 天哪些内容能作为生成需求的证据","ODPS 长文相关表","account_name；videoid；一级品类；二级品类；推荐曝光数；当日分发曝光uv；分发realplay_uv；分享；回流；vov分子","loghubods.video_action_log_rp(mid, videoid, businesstype, pagesource, dt)；user_share_log；ods_video_play_log_day；gzh_fans_info(account_name)；user_wechat_identity_info_ha；videoods.wx_video；videoods.content_profile；loghubods.video_merge_tag(merge_leve1, merge_leve2)","account_name 是公众号；videoid 是内容证据；品类字段描述内容归属；曝光/播放/分享/回流衡量内容表现；vov分子表示回流进入分发曝光次数","按公众号取昨天往前 30 天内容表现，过滤推荐曝光数低于 1000 的内容，保留可用于解构和打权重的视频","ODPS 多表聚合 SQL：窗口为昨天往前 30 天；按公众号名和 videoid 聚合头部曝光/播放/分享/回流、推荐曝光/realplay/share/回流、vov分子；ORDER BY 推荐曝光数 DESC。","data/changwen_data/{account}.json","account_name；videoid；一级品类；二级品类；ext_data","本地 data/changwen_data/{account}.json(account_name, videoid, 一级品类, 二级品类, ext_data{头部曝光, 当日分发曝光uv, 分发realplay_uv, 推荐回流数, vov分子...})","ext_data 保存头部和分发表现指标，后面用于权重计算和样例追溯","${process cwd}/data/changwen_data/{account}.json","输入缓存，不是最终业务结果","源码 SQL 确认窗口为 30 天；本轮 ODPS 未实连，因此不写行数","源码 SQL 已核对；本轮无 ODPS 客户端","changwen_prepare.py:get_changwen_weight"]
["changwen","上游解构元素读取","这些长文视频已经被解构出了哪些元素和分类","MySQL open_aigc.post/post_decode_result/post_decode_topic_point/post_decode_topic_point_element/element_classification_mapping/global_category/global_element/post_classification_status","post_id；topic_point_type；element_type；element_name；classification_path；completion_rate","MySQL open_aigc.post；post_decode_result；post_decode_topic_point；post_decode_topic_point_element；element_classification_mapping；global_category；global_element；post_classification_status","post_id 对应 videoid；topic_point_type 区分灵感/目的/关键点；element_name 是内容元素；classification_path 是元素分类树路径；completion_rate 约束解构完成度","用 videoid 拉上游解构结果，要求实质/形式分类完成率达到阈值，并补齐分类祖先节点","按 videoid/post_id 拉取已解构点位元素；要求实质/形式分类完成度阈值；补齐分类祖先和元素映射；导入 DemandAgent 的 topic_pattern_* 快照。","topic_pattern_category；topic_pattern_element","execution_id；post_id；point_type；element_type；name；category_path；source_type","open_aigc_pattern.topic_pattern_category(execution_id, source_type, name, path, level, parent_id)；topic_pattern_element(execution_id, post_id, point_type, element_type, name, category_path)","把上游解构数据转成 DemandAgent 自己的 Pattern 快照格式","open_aigc_pattern.topic_pattern_*","中间 Pattern 快照","本轮按源码账号连接 open_aigc 失败：握手阶段连接提前关闭；未取得真实样例","实连失败；不补造统计","pattern_builds/pattern_from_open_aigc.py；models.py"]
["changwen","Pattern 和组合","长文账号的内容里哪些元素组合稳定出现","topic_pattern_element","post_id；element_type；name；category_path；source_type","open_aigc_pattern.topic_pattern_element(execution_id, post_id, point_type, element_type, name, category_path)","post_id 组成交易；element 字段组成候选项；source_type 保留实质/形式/意图维度","复用 Pattern Mining，把长文账号内容转成分类树、元素和频繁组合","按 post_id 构造 transaction；FP-Growth 挖频繁项集；min_absolute_support=3，保留 item_count>=3 的组合；写 itemset 和 itemset_item，供 Agent 查询组合稳定性。","topic_pattern_itemset；topic_pattern_itemset_item","support；absolute_support；matched_post_ids；element_name；category_path","open_aigc_pattern.topic_pattern_itemset(combination_type, item_count, support, absolute_support, dimensions, matched_post_ids)；topic_pattern_itemset_item(point_type, dimension, category_path, element_name)","support/absolute_support 表示组合稳定性；matched_post_ids 是支撑视频","open_aigc_pattern.topic_pattern_itemset/topic_pattern_itemset_item","中间 Pattern 组合","结构同 piaoquan；open_aigc 实连失败，所以本轮不写具体长文 execution 规模","源码路径已核对；实连未完成","pattern_builds/frequent_itemset.py；demand_pattern_tools.py"]
["changwen","长文权重计算","账号内容里哪些元素对需求更重要","changwen_data/{account}.json；topic_pattern_element/category","videoid；分发realplay_uv；当日分发曝光uv；post_id；name；category_path","data/changwen_data/{account}.json(videoid, ext_data.分发realplay_uv, ext_data.当日分发曝光uv)；topic_pattern_element(post_id, name, category_path)","realplay_uv/曝光uv 衡量长文内容表现；post_id/videoid 负责把表现指标映射到元素","按元素覆盖的视频计算 realplay_uv / 当日分发曝光uv，得到元素平均权重；分类权重按路径汇总","Python 计算：先删除 推荐曝光数<1000 的记录，仅保留 推荐曝光数>=1000 的内容；对元素覆盖 video 求 分发realplay_uv / 当日分发曝光uv 的平均值；分类按路径聚合。","data/{execution_id}/{维度}_元素.json；data/{execution_id}/{维度}_分类.json","name；score；post_ids_count；category_paths","data/{execution_id}/{维度}_元素.json(name, score, post_ids_count, category_paths)；{维度}_分类.json(category_path, category, score, post_ids_count)","score 是长文账号内的表现权重，供 Agent 排序候选","${process cwd}/data/{execution_id}/","Agent 输入中间文件","源码确认使用分发realplay_uv/当日分发曝光uv；本轮未取得长文真实行数","源码路径已核对","changwen_prepare.py；weight_score_query_tools.py"]
["changwen","Agent 生成和落库","把账号内容结构转成可被下游使用的需求","权重 JSON；Pattern 工具返回 JSON；DemandItem JSON","score；support；absolute_support；element_names；reason；desc；type；video_ids","data/{execution_id}/*.json；open_aigc_pattern.topic_pattern_itemset/itemset_item；DemandItem JSON","score 决定优先级；support 决定组合稳定性；DemandItem 字段表达需求名、理由、描述、类型和证据","公共 Agent 生成 DemandItem；普通需求池路径写 demand_content 并同步 dwd_multi_demand_pool_di","公共 Agent 生成；普通流 write_demand_items_to_mysql；再 write_dwd_multi_demand_pool_di_to_hive。长文与 piaoquan 共用最终表，但权重口径和输入证据不同。","demand_content；dwd_multi_demand_pool_di","merge_leve2；name；reason；suggestion；score；ext_data；demand_name；weight；strategy；dt","运行时 MySQL demand_content(merge_leve2, name, reason, suggestion, score, ext_data, dt)；loghubods.dwd_multi_demand_pool_di(strategy, demand_id, demand_name, weight, type, video_count, video_list, extend, dt)","merge_leve2 在长文语境下承载账号/业务对象；name 是需求名；strategy 标记需求来源策略","运行时 MySQL 输出库；Hive/ODPS loghubods.dwd_multi_demand_pool_di","最终业务结果","代码路径确认；下游实测样例来自 piaoquan，不冒充 changwen 样例","代码路径已核对","run.py；data_query_tools.py:write_dwd_multi_demand_pool_di_to_hive"]

{"sheet":"04_zengzhang数据流","index":4,"n_rows":6,"n_cols":18,"rows_kept":6,"cut":false,"hidden":false,"merged":[]}
["数据流","阶段","本步业务问题","输入对象","输入字段","输入库/表/字段定位","输入字段业务含义","本步加工逻辑","技术手段/算法/SQL口径","输出对象","输出字段","输出库/表/字段定位","输出字段业务含义","最终落点","是否最终业务结果","真实规模/样例","核对状态","代码/SQL证据"]
["zengzhang","入口状态","增长合作方这条链路现在是否会被线上入口触发","web_api.py；APScheduler 配置","platform；cluster_name；count","web_api.py 请求模型 platform_type Literal 当前只放行 piaoquan/changwen；run.py 仍保留 zengzhang 分支；zengzhang_prepare.py 存在","platform 决定走哪个 prepare；cluster_name 在增长语境下是合作方名；count 是期望需求数","源码有 zengzhang_prepare 分支，但 Web API 和定时当前未放行 zengzhang","静态代码检查：API 校验 platform_type not in (piaoquan, changwen) 会拒绝；手工 run.py platform_type=zengzhang 仍可进入 prepare。","未自动创建线上增长任务","入口状态=代码存在但当前不放行","当前线上入口不自动生成 zengzhang 任务；手工触发才会进入普通 demand_content/dwd_multi_demand_pool_di 写法。","说明这条链路属于可实现/历史或预留能力，不应和当前稳定线上流量混写","没有自动落表；手工调用仍会走普通需求池写法","当前入口不产生最终业务结果","代码分支存在；入口状态按 web_api.py 和调度条件确认","代码路径已核对","web_api.py；zengzhang_prepare.py"]
["zengzhang","合作方内容表现抽取","某个增长合作方近 30 天哪些内容能作为需求证据","ODPS loghubods.dws_growth_partner_vid_data","account_name；合作方简称；videoid；一级品类；二级品类；推荐曝光数；分发realplay_uv；分享；回流；vov分子","loghubods.dws_growth_partner_vid_data(dt, 合作方名, 合作方简称, videoid, 一级品类, 二级品类, 头部曝光, 推荐曝光数, 当日分发曝光uv, 分发realplay_uv, 推荐分享数, 推荐回流数, vov分子)","account_name/合作方简称 定位增长合作方；videoid 是内容证据；表现字段衡量内容分发效果","按合作方取昨天往前 30 天内容，过滤推荐曝光数低于 1000 的内容","ODPS 聚合 SQL：dt BETWEEN 昨天-30天 AND 昨天；WHERE 合作方名=:account_name；GROUP BY 合作方名/简称/videoid/品类；SUM 表现指标。","data/zengzhang_data/{account}.json","account_name；合作方简称；videoid；一级品类；二级品类；ext_data","本地 data/zengzhang_data/{account}.json(account_name, 合作方简称, videoid, 一级品类, 二级品类, ext_data{推荐曝光数, 当日分发曝光uv, 分发realplay_uv, vov分子...})","为后续解构查询、权重计算和证据追溯提供合作方内容清单","${process cwd}/data/zengzhang_data/{account}.json","输入缓存，不是最终业务结果","源码 SQL 确认窗口为 30 天；本轮 ODPS 未实连","源码 SQL 已核对；本轮无 ODPS 客户端","zengzhang_prepare.py:get_zengzhang_weight"]
["zengzhang","上游解构与 Pattern","增长合作方内容已经被解构出哪些元素和稳定组合","MySQL open_aigc 解构表；open_aigc_pattern.topic_pattern_*","post_id；topic_point_type；element_type；element_name；classification_path；support；absolute_support","MySQL open_aigc 解构表：post/post_decode_result/post_decode_topic_point/post_decode_topic_point_element/element_classification_mapping/global_category/global_element/post_classification_status；open_aigc_pattern.topic_pattern_*","post_id 对应合作方 videoid；element_name/category_path 是内容要素；support 表示组合稳定性","用合作方 videoid 拉 open_aigc 解构数据，生成 topic_pattern_category/element/itemset","按合作方 videoid 读取 open_aigc 解构元素；导入 topic_pattern_category/element；FP-Growth 生成 itemset；本轮 open_aigc 实连失败，不补造规模。","topic_pattern_category；topic_pattern_element；topic_pattern_itemset","execution_id；source_type；name；category_path；support；matched_post_ids","open_aigc_pattern.topic_pattern_category/topic_pattern_element/topic_pattern_itemset/topic_pattern_itemset_item","把合作方内容证据转成公共 Agent 可查询的数据结构","open_aigc_pattern.topic_pattern_*","中间 Pattern 快照","open_aigc 本轮连接失败；不写合作方 Pattern 真实规模","实连失败；代码路径已核对","pattern_builds/pattern_from_open_aigc.py；frequent_itemset.py"]
["zengzhang","增长权重计算","合作方内容里哪些元素更值得变成需求","zengzhang_data/{account}.json；topic_pattern_element/category","videoid；分发realplay_uv；当日分发曝光uv；post_id；name；category_path","data/zengzhang_data/{account}.json(videoid, ext_data.分发realplay_uv, ext_data.当日分发曝光uv)；topic_pattern_element(post_id, name, category_path)","realplay_uv/曝光uv 衡量增长内容表现；post_id/videoid 串联表现和元素","与 changwen 同构，按相关视频表现计算元素平均权重和分类路径权重","Python 计算：删除 推荐曝光数<1000 的记录，仅保留 推荐曝光数>=1000 的内容；元素 score=覆盖 video 的 分发realplay_uv/当日分发曝光uv 平均值；分类按路径聚合。","data/{execution_id}/{维度}_元素.json；data/{execution_id}/{维度}_分类.json","name；score；post_ids_count；category_paths","data/{execution_id}/{维度}_元素.json(name, score, post_ids_count, category_paths)；{维度}_分类.json(category_path, category, score, post_ids_count)","score 是合作方语境下的表现权重","${process cwd}/data/{execution_id}/","Agent 输入中间文件","源码确认同构权重逻辑；本轮未取得真实合作方样例","代码路径已核对","zengzhang_prepare.py；weight_score_query_tools.py"]
["zengzhang","Agent 生成和潜在落库","如果手工触发增长链路，最终会写成什么","权重 JSON；Pattern 工具返回 JSON；DemandItem JSON","element_names；reason；desc；type；score；video_ids","data/{execution_id}/*.json；open_aigc_pattern.topic_pattern_itemset/itemset_item；DemandItem JSON","DemandItem 表达增长合作方内容结构衍生出的需求","公共 Agent 生成 DemandItem；普通流落库函数会写 demand_content 并同步 dwd_multi_demand_pool_di","公共 Agent 生成；若手工触发则走普通 write_demand_items_to_mysql 和 write_dwd_multi_demand_pool_di_to_hive；当前 API/定时未放行。","demand_content；dwd_multi_demand_pool_di","name；reason；suggestion；score；ext_data；demand_name；weight；strategy；dt","运行时 MySQL demand_content(merge_leve2, name, reason, suggestion, score, ext_data, dt)；loghubods.dwd_multi_demand_pool_di(strategy, demand_id, demand_name, weight, type, video_count, video_list, extend, dt)","代码能力存在，但当前入口未放行，所以不能把它写成已稳定产出的线上数据流","运行时 MySQL 输出库；Hive/ODPS loghubods.dwd_multi_demand_pool_di","手工触发时是最终业务结果；当前入口不自动产生","没有本轮真实增长落库样例","代码路径已核对；入口未放行","run.py；data_query_tools.py；web_api.py"]

{"sheet":"05_公共Agent生成与落库流","index":5,"n_rows":10,"n_cols":16,"rows_kept":10,"cut":false,"hidden":false,"merged":[]}
["来源数据流","公共阶段","输入对象","输入字段及含义","输入库/表/字段定位","工具/处理节点","技术手段/算法/SQL口径","处理后对象","处理后字段及含义","输出库/表/字段定位","最终落点","是否最终业务结果","来源到落点说明","真实规模/样例","核对状态","代码/SQL证据"]
["piaoquan / 全局树 / changwen / zengzhang","权重 TopN 查询","data/{execution_id}/{实质|形式|意图}_元素.json 和 _分类.json","name/category_path 是候选元素或分类；score 是表现权重；post_ids_count 是证据视频数","本地 data/{execution_id}/{维度}_元素.json(name,score,post_ids_count,category_paths)；{维度}_分类.json(category_path,category,score,post_ids_count)","get_weight_score_topn；get_weight_score_by_name","Python JSON 读取和排序/切片；按 level=元素/分类、dimension=实质/形式/意图、start/end 返回 TopN；get_weight_score_by_name 精确回查。","Agent 可读的权重候选列表","name/category_path/score/post_ids_count：告诉 Agent 哪些元素或分类更重要","Agent tool return JSON(name/category_path, score, post_ids_count, category_paths)","没有直接落库；进入 LLM prompt","中间加工节点","四条来源流都先把各自权重转成同一种 Agent 工具返回格式","piaoquan 普通流使用近 14 天 ROV；全局树使用去年同期 7 天 ROV；changwen/zengzhang 使用 realplay_uv/曝光uv","代码路径已核对","weight_score_query_tools.py"]
["piaoquan / 全局树 / changwen / zengzhang","Pattern 组合查询","topic_pattern_itemset；topic_pattern_itemset_item","support/absolute_support 表示组合稳定性；matched_post_ids 是支撑视频；element_name/category_path 是组合里的元素","open_aigc_pattern.topic_pattern_itemset(execution_id, combination_type, item_count, support, absolute_support, matched_post_ids)；topic_pattern_itemset_item(itemset_id, point_type, dimension, category_path, element_name)","get_frequent_itemsets；get_element_cooccurrence","SQLAlchemy/SQL 按 execution_id 查询频繁项集；按 support/absolute_support 排序；必要时 join itemset_item 展开组合明细。","Agent 可读的频繁组合和共现证据","combination_type/support/absolute_support/matched_post_ids/items：告诉 Agent 哪些元素经常一起出现","Agent tool return JSON(combination_type, support, absolute_support, matched_post_ids, items[])","没有直接落库；进入 LLM prompt","中间加工节点","四条来源流都通过 execution_id 查询同一组 Pattern 表","execution_id=1922 实测 152 个 itemset，absolute_support=3..9","MySQL 已只读实测","demand_pattern_tools.py；topic_pattern_itemset/topic_pattern_itemset_item"]
["piaoquan / 全局树 / changwen / zengzhang","LLM 需求判断","权重候选 + Pattern 组合 + prompt 规则","score 表示表现；support 表示稳定；category_path/element_name 提供需求语义；matched_post_ids 提供证据","Agent tool returns；prompt 变量 merge_level2/count；data/result local JSON","AgentRunner + SimplePrompt + @tool create_demand_items","AgentRunner 调 SimplePrompt；工具白名单注册；LLM 依据权重和支持度调用 create_demand_items；本地 JSON append/overwrite。","DemandItem JSON","element_names 是需求名组成；reason 是成立理由；desc 是需求描述；type 是需求类型；score 是综合分；video_ids 是证据内容","result/{execution_id}/execution_id_{execution_id}_demand_items.json(items[].element_names, reason, desc, type, score, video_ids)","${process cwd}/result/{execution_id}/execution_id_{execution_id}_demand_items.json","中间结果","所有来源先统一生成 DemandItem，再按来源决定最终落点","下游实测样例需求名：仪式行为,特定时期习俗；score=0.0164285","代码路径已核对；样例来自下游只读实测","demand.md；demand_build_agent_tools.py；run.py:run_once"]
["piaoquan","普通需求池落 MySQL","DemandItem JSON","element_names/reason/desc/type/score/video_ids 表示需求本体和证据；merge_leve2 表示品类；dt 表示日期","result DemandItem JSON；data/{execution_id} 权重 JSON；open_aigc_pattern.topic_pattern_element/category","write_demand_items_to_mysql","Python 字段映射 + score 均值 + video_ids 反查 + mysql_db.insert_many。","demand_content 行","name 是需求名；reason 是理由；suggestion/desc 是描述建议；score 是权重；ext_data 保存 type/video_ids 等扩展证据；merge_leve2 是品类；dt 是分区日期","运行时 MySQL demand_content(merge_leve2,name,reason,suggestion,score,ext_data,dt)","运行时 MySQL demand_content；本轮只读观察到 content-deconstruction-supply.demand_content（仅实测环境线索，非仓库硬编码）","最终业务结果","piaoquan 从品类需求落到需求池，供下游寻找/生产链路消费","下游实测 demand_content 总 24151 行；dt=20260528 为 665 行；迷信祝福当前 20 行。样例：仪式行为,特定时期习俗，score=0.0164285，video_count=24","下游 MySQL 已只读实测；content-deconstruction-supply 仅作为运行环境观察，仓库不硬编码该库为唯一输出库","run.py:write_demand_items_to_mysql；mysql/db_config.py"]
["changwen","普通需求池落 MySQL","DemandItem JSON","element_names/reason/desc/type/score/video_ids；cluster_name 在长文语境下是公众号/账号对象","result DemandItem JSON；data/{execution_id} 权重 JSON；open_aigc_pattern.topic_pattern_element/category","write_demand_items_to_mysql","Python 字段映射 + score 均值 + video_ids 反查 + mysql_db.insert_many。","demand_content 行","name/reason/suggestion/score/ext_data/dt，业务对象字段承载账号来源","运行时 MySQL demand_content(merge_leve2,name,reason,suggestion,score,ext_data,dt)","运行时 MySQL demand_content","最终业务结果","changwen 账号流和 piaoquan 共用落库函数，但上游证据和权重口径不同","本轮没有真实 changwen 落库样例；代码路径确认","代码路径已核对","run.py:write_demand_items_to_mysql；changwen_prepare.py"]
["zengzhang","普通需求池潜在落 MySQL","DemandItem JSON","element_names/reason/desc/type/score/video_ids；cluster_name 在增长语境下是合作方对象","result DemandItem JSON；data/{execution_id} 权重 JSON；open_aigc_pattern.topic_pattern_element/category","write_demand_items_to_mysql","与普通需求池相同，但 zengzhang 当前 API/定时未放行；仅手工触发时执行。","demand_content 行","name/reason/suggestion/score/ext_data/dt，业务对象字段承载合作方来源","运行时 MySQL demand_content(merge_leve2,name,reason,suggestion,score,ext_data,dt)","运行时 MySQL demand_content","手工触发时是最终业务结果；当前入口不自动产生","zengzhang 代码共用普通落库函数，但 Web API/定时未放行","没有本轮真实增长落库样例","代码路径已核对；入口未放行","run.py；zengzhang_prepare.py；web_api.py"]
["piaoquan / changwen / zengzhang","同步 Hive/ODPS 需求池","demand_content 或 DemandItem 派生行","demand_name/name 是需求名；weight/score 是权重；type 是需求类型；video_count 是证据视频数量；dt 是日期分区","demand_content rows: merge_leve2,name,score,ext_data(type,video_ids)","write_dwd_multi_demand_pool_di_to_hive","构造 ODPS INSERT INTO TABLE ... PARTITION(dt)；每条需求写两种 strategy；demand_id=MD5(strategy + demand_name/name + type + dt)。","loghubods.dwd_multi_demand_pool_di 行","demand_name；weight；type；video_count；strategy；dt：供下游按策略和日期读取需求池","loghubods.dwd_multi_demand_pool_di(strategy,demand_id,demand_name,weight,type,video_count,video_list,extend,dt)","Hive/ODPS loghubods.dwd_multi_demand_pool_di","最终业务结果/下游消费表","普通需求流同步到 Hive 表；代码写 strategy 包含 当下供需gap 和 当下供需gap-分词","已有审计样例 dt=20260528，strategy 含 当下供需gap、当下供需gap-分词；本轮 ODPS 未实连","源码路径已核对；ODPS 本轮未实连","data_query_tools.py:write_dwd_multi_demand_pool_di_to_hive"]
["全局树","特征点落 Hive/ODPS","DemandItem JSON","element_names 是特征点来源；dt 是当天日期","DemandItem JSON items[].element_names","write_global_tree_demand_items_to_hive / write_feature_point_data_to_hive","构造 ODPS INSERT INTO TABLE feature_point_data PARTITION(dt) SELECT UNION ALL；固定曝光和 ROV。","feature_point_data 行","特征点 是需求名；总分发曝光pv 固定 5000；质bn_rovn 固定 0.1；dt 是日期分区","loghubods.feature_point_data(特征点,总分发曝光pv,质bn_rovn,dt)","Hive/ODPS loghubods.feature_point_data","最终业务结果","全局树不写 demand_content，而是把需求名压成特征点表","源码写入形态已确认；本轮未取得 ODPS 今日真实行","源码路径已核对；ODPS 本轮未实连","run.py:write_global_tree_demand_items_to_hive；data_query_tools.py:write_feature_point_data_to_hive"]
["API 触发的 piaoquan/changwen","任务台账","API 请求和 execution_id","execution_id 关联 Pattern 执行；name/cluster_name 是任务对象；platform 是来源；status 是任务状态；log 是错误或运行信息","API 请求 cluster_name/platform/count；execution_id；运行日志","demand_task 创建和状态更新","mysql_db.insert 创建 status=0；执行成功/失败后 mysql_db.update status/log。","demand_task 行","execution_id；name；platform；status；log：记录任务生命周期，不表达需求本体","运行时 MySQL demand_task(execution_id,name,platform,status,log)","运行时 MySQL demand_task；本轮只读观察到 content-deconstruction-supply.demand_task（仅实测环境线索，非仓库硬编码）","不是最终需求结果","用来追踪任务成功失败，不能当需求池统计","实测任务样例：id=1856，execution_id=1922，迷信祝福，piaoquan，status=1","下游 MySQL 已只读实测","web_api.py；run.py；mysql/models.py"]

{"sheet":"06_字段字典与跨流血缘","index":6,"n_rows":13,"n_cols":11,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
["业务字段","字段业务含义","出现在哪些流","来源对象/字段","库表字段定位/技术口径","中间加工","输出对象/字段","是否进入最终需求","真实样例","核对状态","证据"]
["cluster_name / merge_leve2","本次生成需求的业务对象；piaoquan 是二级品类，changwen 是公众号，zengzhang 是合作方，全局树是固定对象","四条来源流","API 参数；调度品类列表；prepare 入参","topic_pattern_execution.cluster_name/merge_leve2；demand_task.name；demand_content.merge_leve2；API/run.py 入参 cluster_name","写入 topic_pattern_execution，并传给 Agent 和落库函数","demand_content.merge_leve2；demand_task.name；topic_pattern_execution.cluster_name","进入最终需求的品类/对象字段","迷信祝福","MySQL 已只读实测","topic_pattern_execution；run.py"]
["videoid / post_id","内容证据 ID，用来把表现数据、解构元素、Pattern 组合和需求证据串起来","四条来源流","ODPS videoid；open_aigc/global_post post_id","ODPS videoid/视频id；topic_pattern_element.post_id；topic_pattern_itemset.matched_post_ids；DemandItem.video_ids；demand_content.ext_data.video_ids","转换为 topic_pattern_element.post_id；参与 matched_post_ids 和 video_ids","DemandItem.video_ids；demand_content.ext_data.video_ids；itemset.matched_post_ids","作为证据进入最终需求扩展字段","64741971；69518811","MySQL 已只读实测；ODPS 样例来自已有审计","topic_pattern_element；topic_pattern_itemset；demand_content"]
["source_type","内容结构维度，区分实质、形式、意图","四条来源流","上游解构/全局树分类维度","topic_pattern_category.source_type；topic_pattern_element.element_type/source_type 语义；本地 JSON 文件名维度 实质/形式/意图","用于分组写分类树、元素 JSON 和 Pattern 查询","topic_pattern_category.source_type；topic_pattern_element.source_type；data/{execution_id}/{维度}_*.json","间接影响需求候选","实质、形式、意图","MySQL 已只读实测","models.py；topic_pattern_category"]
["element_name / name","内容解构出来的具体要素，例如习俗、动作、意图、表达形式","四条来源流","global_element.name；post_decode_topic_point_element.element_name；topic_pattern_element.name","topic_pattern_element.name；topic_pattern_itemset_item.element_name；DemandItem.element_names；demand_content.name；feature_point_data.特征点","参与频繁组合、权重排序和 Agent 需求命名","DemandItem.element_names；demand_content.name；feature_point_data.特征点","进入最终需求名","腊月二十三；仪式行为,特定时期习俗","MySQL 已只读实测","topic_pattern_element；demand_build_agent_tools.py"]
["category_path","元素在分类树里的完整路径，帮助理解元素属于什么业务语义","四条来源流","global_category.path；element_classification_mapping","topic_pattern_category.path；topic_pattern_element.category_path；topic_pattern_itemset_item.category_path；权重 JSON category_paths","补齐祖先节点，给分类和元素都保留路径","topic_pattern_category.path；topic_pattern_element.category_path；权重 JSON category_paths","间接进入需求理由和命名","民俗事项 > 特定时期习俗","MySQL 已只读实测","topic_pattern_category；pattern_builds/*"]
["score / weight","元素、分类或需求的表现权重，用于决定候选优先级","四条来源流","piaoquan ROV；全局树去年同期 ROV；changwen/zengzhang realplay_uv/曝光uv","data/{execution_id} JSON score；DemandItem.score；demand_content.score；dwd_multi_demand_pool_di.weight；ROV 或 realplay_uv/曝光uv 计算得到","元素取相关视频均值，分类按路径汇总，DemandItem 继承或综合该分数","权重 JSON.score；DemandItem.score；demand_content.score；dwd_multi_demand_pool_di.weight","进入最终需求权重","0.0164285；rov_t0=0.12","代码路径已核对；部分样例已实测","weight_score_query_tools.py；data_query_tools.py；demand_content"]
["support / absolute_support","Pattern 组合稳定性；support 是比例，absolute_support 是出现帖子数","四条来源流","topic_pattern_itemset","topic_pattern_itemset.support/absolute_support；Agent 只读查询，通常不直接落最终表","Agent 工具读取后判断组合是否足够稳定","Agent prompt 证据；DemandItem.reason 可能引用","间接进入需求判断，不是落库字段本体","execution_id=1922：support=0.06..0.18，absolute_support=3..9","MySQL 已只读实测","topic_pattern_itemset；demand_pattern_tools.py"]
["matched_post_ids / video_ids","支撑某个组合或需求的证据视频集合","四条来源流","topic_pattern_itemset.matched_post_ids；topic_pattern_element.post_id","topic_pattern_itemset.matched_post_ids；query_video_ids_by_names 输出；DemandItem.video_ids；dwd_multi_demand_pool_di.video_list/video_count","Agent 选择需求后写入 DemandItem.video_ids","demand_content.ext_data.video_ids；dwd_multi_demand_pool_di.video_count","进入最终需求证据或视频数量","execution_id=1922 itemset 支撑视频数 3..9","MySQL 已只读实测","topic_pattern_itemset；run.py"]
["DemandItem.reason","Agent 判断需求成立的文字理由","四条来源流","LLM 根据权重、support、分类路径和证据视频生成","result DemandItem.reason；demand_content.reason；demand_content.ext_data.reason","create_demand_items 保存到本地 JSON，落库时写 reason/ext_data","demand_content.reason；demand_content.ext_data.reason","进入最终需求解释","样例存在于下游需求行，聊天不展开长文本","下游 MySQL 已只读实测","demand_build_agent_tools.py；run.py"]
["DemandItem.desc / suggestion","给下游理解和生产需求用的描述或建议","普通三流","LLM 输出 DemandItem.desc","result DemandItem.desc；demand_content.suggestion；demand_content.ext_data.desc","落库时映射为 suggestion/desc","demand_content.suggestion；ext_data.desc","进入最终需求描述","下游样例有 suggestion 字段","下游 MySQL 已只读实测","run.py:write_demand_items_to_mysql"]
["dt","业务日期分区，用来区分每天的输入表现和输出需求","四条来源流","ODPS 分区；运行日期","ODPS 输入分区 dt；demand_content.dt；dwd_multi_demand_pool_di.dt；feature_point_data.dt；按 Asia/Shanghai 当天/昨天口径","查询输入表现、写 Hive/ODPS 输出分区","demand_content.dt；dwd_multi_demand_pool_di.dt；feature_point_data.dt","进入最终分区字段","20260528","已按当前日期口径记录","data_query_tools.py"]
["strategy","Hive/ODPS 需求池里的需求来源策略标识","普通三流","落库函数固定写入策略","dwd_multi_demand_pool_di.strategy；代码固定 当下供需gap / 当下供需gap-分词","同步 dwd_multi_demand_pool_di 时生成","dwd_multi_demand_pool_di.strategy","进入下游消费表","当下供需gap；当下供需gap-分词","已有审计样例；ODPS 本轮未实连","data_query_tools.py:write_dwd_multi_demand_pool_di_to_hive"]

{"sheet":"07_实测校验_疑点_Checker","index":7,"n_rows":12,"n_cols":8,"rows_kept":12,"cut":false,"hidden":false,"merged":[]}
["类型","对象","本次结论","真实规模/样例","需要避免的误写","后续建议","核对状态","证据"]
["DB 实测","open_aigc_pattern.topic_pattern_execution","最新成功 Pattern case 可作为 piaoquan 样例","execution_id=1922，迷信祝福，platform=piaoquan，post_count=50，itemset_count=152，status=success","不要把这个 case 代表所有平台规模","后续如需 changwen/zengzhang 样例，需要对应 execution_id 或跑只读查询","MySQL 已只读实测","DB subagent；topic_pattern_execution"]
["DB 实测","Pattern Tree / 元素 / itemset","分类树、元素、频繁组合三层均已核对","实质 39 节点/411 元素行；形式 32/350；意图 7/40；itemset 152，absolute_support=3..9","不要只写 Pattern Tree，DemandAgent 还消费 itemset 和权重 JSON","Excel 中把 tree、element、itemset、weight 分开写","MySQL 已只读实测","topic_pattern_category/topic_pattern_element/topic_pattern_itemset"]
["DB 实测","content-deconstruction-supply.demand_content","这是运行环境观察到的下游需求池线索，不是 DemandAgent 仓库硬编码输出库","demand_content 总 24151 行；dt=20260528 为 665 行；迷信祝福当前 20 行。样例：仪式行为,特定时期习俗，score=0.0164285，video_count=24","不要写成 open_aigc_pattern.demand_content，也不要写成仓库固定输出库","报告和 Excel 中统一标注运行时 MySQL 输出库由环境变量/DB_INFO 决定","下游 MySQL 已只读实测","run.py；mysql/db_config.py；DB subagent"]
["DB 实测","content-deconstruction-supply.demand_task","任务台账可核对 execution_id 和状态，但不是需求结果","样例：id=1856，execution_id=1922，迷信祝福，piaoquan，status=1","不要把 demand_task 行数当需求池行数","单独作为调度/任务状态表说明","下游 MySQL 已只读实测","web_api.py；run.py"]
["ODPS 状态","video_dimension_detail_add_column / dwd_multi_demand_pool_di / feature_point_data","源码 SQL 和已有审计样例可写；本轮环境没有 pyodps/odpscmd，不能新增实测行数","已有审计样例包含 video_dimension_detail_add_column、dwd_multi_demand_pool_di strategy、feature_point_data 写入形态","不要把本轮未实连的 ODPS 写成刚刚查到的实时统计","安装或配置 ODPS 客户端后可补一轮只读实测","源码 SQL 已核对；本轮未实连","data_query_tools.py；DB subagent"]
["实连失败","open_aigc","长文/增长上游解构库按源码账号补测失败，错误在握手阶段连接提前关闭","未取得真实样例和行数","不要伪造 open_aigc 行数；不要用 piaoquan case 冒充 changwen/zengzhang","需要网络或账号侧修复后再补查 post/decode/element 表","实连失败","pattern_from_open_aigc.py；DB subagent"]
["代码核对","全局树落点","全局树不走 demand_content 主需求池，而是写 feature_point_data","写入字段：特征点、总分发曝光pv=5000、质bn_rovn=0.1、dt","不要把全局树和普通 piaoquan 混成同一个最终落点","在 05 公共流中单独列出全局树分支","代码路径已核对","run.py；data_query_tools.py"]
["代码核对","zengzhang 入口","zengzhang 代码存在，但 Web API/定时当前不放行","没有本轮真实落库样例","不要写成当前线上稳定运行的数据流","标成代码存在/入口未放行/手工触发才可能落库","代码路径已核对","web_api.py；zengzhang_prepare.py"]
["Checker 复核","新版 Excel 表达","checker 已确认新版以数据字段流转为主，四条来源流和公共汇流清楚，字段含义可读","本轮复核未发现 secret 原文风险；未发现单独低信息占位单元格","避免使用单独低信息占位词；若写未实连、未取得规模或配置受限，必须说明原因和边界","生成后抽取 workbook 文本检查，并让 checker subagent 复核","本轮已复核","本 sheet 检查清单"]
["本轮补充","加工技术手段和库表字段","已在 00-06 补入输入库表字段、技术手段/算法/SQL口径、输出库表字段；subagent DB/代码一致性核对进行中，回包后再补最终结论","当前已基于源码和既有 DB 实测口径补全；不展开任何 secret 原文","不要把自然语言业务说明当成加工步骤；每个加工节点要能落到 SQL/算法/函数/库表字段","等待 DB subagent 回包后补充最终复核行","本轮待 subagent 回包","本轮修改脚本；源码路径；DB subagent"]
["Subagent DB/代码一致性核对","库表字段与技术手段补充","subagent 已只读核对 open_aigc_pattern、下游 demand_content/demand_task、运行时配置来源，并确认 ODPS 本轮未实连；已据此更新技术手段、库表字段和下游真实统计。","open_aigc_pattern 最新成功 execution_id=1922；demand_content 总 24151 行，dt=20260528 为 665 行，迷信祝福当前 20 行；样例 video_count=24。","不要保留旧版样例口径；不要把 content-deconstruction-supply 写成仓库硬编码输出库；不要把 ODPS 未实连写成已实测。","若后续配置 ODPS 客户端或修复 open_aigc 连接，可补 changwen/zengzhang 真实行数和样例。","本轮已复核并修正","DB/代码 subagent；data_query_tools.py；run.py；models.py；mysql/db_config.py"]