创建时间: 2026-07-02 15:03 | 步骤: 11 个
根据用户输入的主题和年龄段,自动生成适龄儿童有声绘本。工作流深度解析意图与适龄标准,创作故事文本并进行安全审查,随后并行合成朗读音频与生成配图插画(配图经提示词锁定一致性并严格鉴黄鉴暴恐审核),最终融合音画文输出标准化归档包。
{
"workflow_id": "daily_children_audio_picture_book",
"input": {
"target_age_group": {
"field_name": "target_age_group",
"default": "5-6岁",
"description": "目标年龄段,枚举值:3-4岁, 5-6岁, 7-8岁",
"example": "5-6岁",
"type": "string",
"required": true
},
"user_request": {
"field_name": "user_request",
"default": "",
"description": "用户的原始绘本需求描述",
"example": "为5-6岁儿童生成睡前安抚主题的有声绘本",
"type": "string",
"required": true
},
"art_style": {
"field_name": "art_style",
"default": "温馨水彩绘本风,色彩柔和,适合睡前阅读",
"description": "绘本插画风格设定",
"example": "温馨水彩绘本风,色彩柔和,适合睡前阅读",
"type": "string",
"required": false
},
"aspect_ratio": {
"field_name": "aspect_ratio",
"default": "3:4",
"description": "插画图片宽高比,可选值:1:1, 3:4, 4:3, 16:9, 9:16",
"example": "3:4",
"type": "string",
"required": false
},
"theme_preference": {
"field_name": "theme_preference",
"default": "",
"description": "故事主题偏好(如性格培养、科普认知、睡前安抚、奇幻冒险)",
"example": "睡前安抚",
"type": "string",
"required": false
}
},
"steps": [
{
"point_code": "",
"id": "step_1_intent_analyzer",
"result": [],
"api_code": "intent_analyzer",
"backend_type": "prompt_api",
"status": "PENDING",
"name": "解析绘本生产意图与适龄标准",
"action": "run",
"params": {
"target_age_group": "{{@input.target_age_group}}",
"user_request": "{{@input.user_request}}",
"theme_preference": "{{@input.theme_preference}}"
}
},
{
"id": "step_2_story_writer",
"point_code": "",
"result": [],
"api_code": "story_writer",
"backend_type": "prompt_api",
"status": "PENDING",
"name": "创作适龄儿童故事文本并拆页",
"action": "run",
"params": {
"theme": "{{@step_1_intent_analyzer.result.data.age_standards.core_theme}}",
"age_standards": "{{@step_1_intent_analyzer.result.data.age_standards}}",
"story_setting": "{{@input.theme_preference}}"
},
"depends_on": [
"step_1_intent_analyzer"
]
},
{
"id": "step_3_content_safety_check",
"point_code": "",
"result": [],
"api_code": "content_safety_check",
"backend_type": "prompt_api",
"status": "PENDING",
"name": "儿童故事文本安全审查",
"action": "run",
"params": {
"story_text": "{{@step_2_story_writer.result.data.story_text}}",
"safety_criteria": "{{@step_1_intent_analyzer.result.data.safety_criteria}}",
"strict_mode": true
},
"depends_on": [
"step_2_story_writer"
]
},
{
"id": "step_4_audio_generation",
"point_code": "1",
"result": [],
"api_code": "3322",
"backend_type": "sys_api",
"status": "PENDING",
"name": "合成绘本朗读音频",
"action": "run",
"params": {
"input": "{{@step_3_content_safety_check.result.data.sanitized_text}}",
"model": "glm-tts",
"voice": "tongtong",
"speed": 0.8,
"response_format": "wav"
},
"depends_on": [
"step_3_content_safety_check"
]
},
{
"id": "step_5_poll_audio_status",
"point_code": "",
"result": [],
"api_code": "polling",
"backend_type": "sys_api",
"status": "PENDING",
"name": "轮询音频合成状态",
"action": "run",
"params": {
"result_url": "{{@step_4_audio_generation.result.data.result_url}}"
},
"depends_on": [
"step_4_audio_generation"
],
"polling": {
"interval_seconds": 5,
"timeout_seconds": 600,
"success_condition": "{{@step_5_poll_audio_status.result.data.task_status}} === 'SUCCEEDED'"
}
},
{
"id": "step_6_illustration_prompt_gen",
"point_code": "",
"result": [],
"api_code": "illustration_prompt_gen",
"backend_type": "prompt_api",
"status": "PENDING",
"name": "生成一致性约束的配图提示词",
"action": "run",
"params": {
"sanitized_text": "{{@step_3_content_safety_check.result.data.sanitized_text}}",
"page_segments": "{{@step_2_story_writer.result.data.page_segments}}",
"art_style": "{{@input.art_style}}"
},
"depends_on": [
"step_3_content_safety_check"
]
},
{
"result": [],
"iterator": "{{@step_6_illustration_prompt_gen.result.data.page_prompts}}",
"status": "PENDING",
"aggregates": [
{
"field": "data.result_url",
"into": "illustration_urls"
},
{
"field": "data.task_id",
"into": "illustration_task_ids"
}
],
"params": {
"prompt": "{{@page_prompt.positive_prompt}}",
"aspect_ratio": "{{@input.aspect_ratio}}"
},
"depends_on": [
"step_6_illustration_prompt_gen"
],
"point_code": "1",
"id": "step_7_batch_generate_illustrations",
"backend_type": "sys_api",
"api_code": "3373",
"item_name": "page_prompt",
"name": "循环生成各页插画(异步启动)",
"action": "foreach"
},
{
"result": [],
"iterator": "{{@step_7_batch_generate_illustrations.result.data.aggregated.illustration_urls}}",
"status": "PENDING",
"aggregates": [
{
"field": "data.result_url",
"into": "final_illustration_urls"
}
],
"params": {
"result_url": "{{@illustration_url}}"
},
"depends_on": [
"step_7_batch_generate_illustrations"
],
"polling": {
"interval_seconds": 5,
"timeout_seconds": 600,
"success_condition": "{{@step_8_poll_illustrations_status.result.data.task_status}} === 'SUCCEEDED'"
},
"point_code": "",
"id": "step_8_poll_illustrations_status",
"backend_type": "sys_api",
"api_code": "polling",
"item_name": "illustration_url",
"name": "轮询各页插画生成状态",
"action": "foreach"
},
{
"result": [],
"iterator": "{{@step_8_poll_illustrations_status.result.data.aggregated.final_illustration_urls}}",
"status": "PENDING",
"aggregates": [
{
"field": "data.code",
"into": "image_safety_codes"
}
],
"params": {
"imgUrl": "{{@illustration_url}}"
},
"depends_on": [
"step_8_poll_illustrations_status"
],
"point_code": "1",
"id": "step_9_batch_image_safety_check",
"backend_type": "sys_api",
"api_code": "1201",
"item_name": "illustration_url",
"name": "循环审核各页插画安全性(鉴黄鉴暴恐)",
"action": "foreach"
},
{
"result": [],
"iterator": "{{@step_8_poll_illustrations_status.result.data.aggregated.final_illustration_urls}}",
"status": "PENDING",
"aggregates": [
{
"field": "data.final_picture_book_package.pages",
"into": "assembled_pages"
}
],
"params": {
"sanitized_text": "{{@step_3_content_safety_check.result.data.sanitized_text}}",
"illustration_urls": "{{@step_8_poll_illustrations_status.result.data.aggregated.final_illustration_urls}}",
"structured_intent": "{{@step_1_intent_analyzer.result.data}}",
"audio_url": "{{@step_5_poll_audio_status.result.data.result_url}}"
},
"depends_on": [
"step_8_poll_illustrations_status",
"step_9_batch_image_safety_check"
],
"point_code": "",
"id": "step_10_construct_illustration_objects",
"backend_type": "prompt_api",
"api_code": "content_merge",
"item_name": "url",
"name": "组装带页码的插画URL对象数组",
"action": "foreach"
},
{
"id": "step_11_content_merge",
"point_code": "",
"result": [],
"api_code": "content_merge",
"backend_type": "prompt_api",
"status": "PENDING",
"name": "融合多模态绘本内容并归档",
"action": "run",
"params": {
"sanitized_text": "{{@step_3_content_safety_check.result.data.sanitized_text}}",
"illustration_urls": "{{@step_8_poll_illustrations_status.result.data.aggregated.final_illustration_urls}}",
"structured_intent": "{{@step_1_intent_analyzer.result.data}}",
"audio_url": "{{@step_5_poll_audio_status.result.data.result_url}}"
},
"depends_on": [
"step_5_poll_audio_status",
"step_10_construct_illustration_objects"
]
}
],
"output": {
"final_picture_book_package": {
"field_name": "final_picture_book_package",
"description": "融合后的完整绘本归档包,包含页面对齐的音画文及全局元数据",
"value": "{{@step_11_content_merge.result.data.final_picture_book_package}}",
"type": "object"
},
"image_safety_codes": {
"field_name": "image_safety_codes",
"description": "各页插画的安全审查结果代码(normal/sex/illegal/needManualReview)",
"value": "{{@step_9_batch_image_safety_check.result.data.aggregated.image_safety_codes}}",
"type": "array"
},
"safety_result": {
"field_name": "safety_result",
"description": "文本安全审查结果详情",
"value": "{{@step_3_content_safety_check.result.data.safety_result}}",
"type": "object"
}
}
}