goal-strategy.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // 投放目标 → 选号策略映射 + 提号 SOP 规则
  2. // 结构化自《01-资源寻找方法(更新版).docx》STEP06(没有参考账号时,按投放目标反推账号类型)
  3. // 以及《AI提号需求列表》SOP 提号规则(默认 1.5 倍提号、前 10 篇 80% 风格匹配、优先响应明确数量)。
  4. // 投放目标 → 账号类型映射。signals 用于从 brief 文本识别投放目标。
  5. const GOAL_STRATEGIES = {
  6. seed_conversion: {
  7. zh: '种草转化',
  8. signals: ['种草', '转化', '带货', 'ROI', '卖货', '成交', '下单', '电商', '销售', '促转化', '转化率', '转化效果'],
  9. accountTypes: ['真实测评账号', '垂类KOC', '素人真实体验'],
  10. tierHint: '偏尾部KOC与素人,重真实体验与转化,不要只看粉丝量',
  11. note: '重转化时优先真实测评、垂类KOC、素人真实体验;转化链路看 CPE/CPV 与评论区购买意图。'
  12. },
  13. brand_exposure: {
  14. zh: '品牌曝光',
  15. signals: ['曝光', '品牌', '声量', '认知', '知名度', '破圈', '泛流量', '打爆', '传播', '话题', '热度', '出圈'],
  16. accountTypes: ['垂类头部腰部KOL', '泛流量账号'],
  17. tierHint: '偏头部腰部KOL,重覆盖与声量,兼顾垂类可信度',
  18. note: '重曝光时优先垂类头部腰部KOL与泛流量账号,兼顾专业背书与覆盖。'
  19. },
  20. search_drain: {
  21. zh: '搜索引流',
  22. signals: ['搜索', '引流', '关键词', '小蓝词', '沉淀', 'SEO', '搜索词', '蓝词', '长尾', '卡位', '收录'],
  23. accountTypes: ['带关键词账号', '可沉淀内容账号', '小蓝词卡位账号'],
  24. tierHint: '内容必须带目标搜索关键词、可长期沉淀,卡搜索词/小蓝词',
  25. note: '搜索引流看重内容能否带目标关键词、能否长期沉淀,优先能卡搜索词/小蓝词的账号。'
  26. },
  27. campaign_volume: {
  28. zh: '活动冲量',
  29. signals: ['冲量', '活动', '铺量', '同城', '本地', '促销', '大促', '节点', '爆发', '批量', '拉新', '引流到店', '到店'],
  30. accountTypes: ['铺量素人', '同城本地账号'],
  31. tierHint: '铺量素人 + 同城本地,重数量与节点节奏',
  32. note: '活动冲量偏铺量素人与同城本地账号,重数量和节点节奏。'
  33. }
  34. };
  35. // 提号 SOP 规则(喂给 AI 提升选中率的硬规则)
  36. const SUGGESTION_RULES = [
  37. {
  38. id: 'suggest-1.5x',
  39. title: '默认提号数量 = 需求数量的 1.5 倍以上',
  40. multiplier: 1.5,
  41. description: '默认提号数量按需求数量的 1.5 倍以上输出,给客户更充分的选择与替换空间。'
  42. },
  43. {
  44. id: 'style-match-80',
  45. title: '前 10 篇笔记至少 80% 风格匹配',
  46. threshold: 0.8,
  47. description: '候选账号最近 10 篇内容至少 80% 匹配 Brief 调性,否则降级为需复核。'
  48. },
  49. {
  50. id: 'respond-explicit-count',
  51. title: '优先响应明确数量与平台分布',
  52. description: 'Brief 明确写了提号数量/平台分布时,严格按数量响应,不自行缩减。'
  53. }
  54. ];
  55. function detectGoal(text) {
  56. const scores = {};
  57. for (const [goal, strategy] of Object.entries(GOAL_STRATEGIES)) {
  58. scores[goal] = strategy.signals.filter(signal => String(text || '').includes(signal)).length;
  59. }
  60. let best = 'brand_exposure';
  61. let bestScore = -1;
  62. for (const [goal, score] of Object.entries(scores)) {
  63. if (score > bestScore) {
  64. best = goal;
  65. bestScore = score;
  66. }
  67. }
  68. return best;
  69. }
  70. function buildGoalStrategy(criteria = {}) {
  71. const text = [
  72. criteria.rawText,
  73. criteria.brand,
  74. criteria.category,
  75. ...(criteria.keywords || [])
  76. ].filter(Boolean).join(' ');
  77. const goal = detectGoal(text);
  78. const strategy = GOAL_STRATEGIES[goal] || GOAL_STRATEGIES.brand_exposure;
  79. const targetCount = Number(criteria.targetCount || 0);
  80. const suggestionCount = targetCount ? Math.ceil(targetCount * 1.5) : 15;
  81. return {
  82. goal,
  83. goalLabel: strategy.zh,
  84. accountTypes: strategy.accountTypes,
  85. tierHint: strategy.tierHint,
  86. note: strategy.note,
  87. suggestionCount,
  88. suggestionRules: SUGGESTION_RULES,
  89. suggestionNote: targetCount
  90. ? `Brief 目标 ${targetCount} 位,按 1.5 倍规则建议默认提号 ${suggestionCount} 位以上。`
  91. : 'Brief 未明确目标人数,建议默认提号 15 位以上供客户选择。'
  92. };
  93. }
  94. module.exports = {
  95. GOAL_STRATEGIES,
  96. SUGGESTION_RULES,
  97. detectGoal,
  98. buildGoalStrategy
  99. };