6.6 KiB
6.6 KiB
业务需求的服务调用逻辑(详细版)
基于 5 服务架构:
gateway-bff/orchestration-service/agent-center/content-center/delivery-connector-douyin
总体时序图(示例:内容生成与发布)
sequenceDiagram
participant U as 用户/前端
participant G as gateway-bff
participant O as orchestration-service
participant A as agent-center
participant C as content-center
participant D as delivery-connector-douyin
U->>G: 提交内容生成请求
G->>O: 转发并鉴权
O->>A: 生成标题/文案/脚本
A-->>O: 返回生成结果
O->>C: 保存草稿/成品
C-->>O: 返回内容ID
O-->>G: 返回结果
G-->>U: 展示生成内容
U->>G: 发起发布请求
G->>O: 转发发布指令
O->>D: 发布到抖音
D-->>C: 回写发布状态
D-->>O: 发布结果
O-->>G: 返回发布结果
G-->>U: 展示发布状态
1. 爆款标题生成器(P0)
目标
生成标题并保存为草稿,供运营二次编辑。
调用流程
- 前端提交主题与约束 →
gateway-bff gateway-bff鉴权后转发 →orchestration-serviceorchestration-service组装上下文 → 调用agent-centeragent-center根据模板生成标题- 结果回到
orchestration-service orchestration-service将标题写入content-center(状态=草稿)- 返回前端
输出
- 草稿内容 ID
- 标题候选列表
2. 多平台文案生成(P0)
目标
基于不同平台规范生成文案。
调用流程
- 前端选择平台与主题 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service调用agent-center(带平台模板参数)agent-center输出平台适配文案orchestration-service保存到content-center(草稿)- 返回前端
3. AI 图文创作(P0)
目标
生成图文内容并入库。
调用流程
- 前端提交主题 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service→agent-center生成文案/描述- 如有外部生图服务 →
orchestration-service调用生成图片 orchestration-service→content-center保存图文成品- 返回前端
4. 视频脚本生成(P0)
目标
生成结构化脚本,便于后续制作。
调用流程
- 前端提交脚本类型 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service→agent-centeragent-center输出脚本结构(分镜/台词)orchestration-service→content-center保存脚本- 返回前端
5. 智能发布(P1)
目标
将内容发布到抖音并记录状态。
调用流程
- 前端选择内容并发布 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service拉取内容详情 →content-centerorchestration-service→delivery-connector-douyin发起发布delivery-connector-douyin回写发布状态 →content-center- 返回前端
6. 内容日历排期(P1)
目标
按排期定时发布内容。
调用流程
- 前端创建排期 →
gateway-bff gateway-bff→orchestration-service(内嵌调度)- 到达时间点 →
orchestration-service调用delivery-connector-douyin - 发布状态回写 →
content-center
7. 多账号管理(P1)
目标
完成抖音账号授权与可用性管理。
调用流程
- 前端绑定账号 →
gateway-bff gateway-bff→delivery-connector-douyindelivery-connector-douyin完成 OAuth 授权- 账号素材信息 →
content-center存储
8. 数据监控看板(P1)
目标
展示投放效果指标。
调用流程
delivery-connector-douyin定时拉取数据orchestration-service汇总并生成聚合指标- 前端访问 →
gateway-bff→orchestration-service
9. 爆款内容复刻(P0)
目标
发现爆款后自动复刻生成。
调用流程
delivery-connector-douyin发现爆款 → 事件入队orchestration-service消费事件并判断规则orchestration-service→agent-center触发复刻 Workflow- 复刻内容写入
content-center - 返回通知/状态
10. 智能客服(P1)
目标
自动回复客户消息。
调用流程
- 渠道消息进入 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service判断会话状态(自动/人工)- 自动模式下 →
agent-center生成回复 orchestration-service发送回复(通过渠道或 H5)
11. 话术推荐引擎(P1)
目标
为客服提供推荐话术。
调用流程
- 客服请求推荐 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service→agent-center生成话术- 返回推荐话术
12. 客户意向评分(P1)
目标
基于行为给出意向等级。
调用流程
- 行为事件进入 →
orchestration-service(轻量 CDP) - 评分计算与更新
- 对外提供查询接口
13. 自动留资引导(P1)
目标
自动引导客户留资。
调用流程
orchestration-service触发引导agent-center生成引导话术- 通过渠道发送
14. 人工接管(P1)
目标
从机器人切换到人工。
调用流程
- 客服发起接管 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service更新会话状态- 通知
agent-center停止自动回复
15. 客户旅程设计器(P1)
目标
配置客户旅程流程。
调用流程
- 前端配置 →
gateway-bff gateway-bff→orchestration-serviceorchestration-service持久化旅程定义
16. 自动跟进任务(P1)
目标
根据旅程状态自动创建跟进任务。
调用流程
- 旅程触发 →
orchestration-service - 创建跟进任务并通知
17. 成交素材库(P2)
目标
为成交流程提供素材。
调用流程
- 素材管理 →
gateway-bff gateway-bff→content-centerorchestration-service按权限调用
18. 数据复盘看板(P0)
目标
综合展示内容与投放效果。
调用流程
orchestration-service汇总投放/内容/行为数据- 前端查询 →
gateway-bff→orchestration-service
统一交互原则
- 入口统一通过
gateway-bff - 业务流程统一在
orchestration-service - 智能决策统一在
agent-center - 内容与素材统一在
content-center - 渠道接入统一在
delivery-connector-douyin