A content generation method based on hierarchical multi-Agent
By adopting a hierarchical multi-agent management method in the content generation technology, using global Agent and local Agent to layer-by-layer management of content generation status and steps, the problem of high coupling between different generation methods in the prior art is solved, and the content generation ability that is rapidly expanded and flexible is realized.
Patent Information
- Application Number
- CN202510314836.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing content generation technologies have high coupling between different generation methods, lack flexibility and scalability, and it is difficult to quickly adapt to new business needs or changes in generation methods.
The content generation method based on hierarchical multi-agents is adopted, and the content generation status and steps are managed layer by layer by layer by global and local agents, and multiple agents are scheduled in an orderly manner, and the content generation steps and generation methods are generated dynamically.
It reduces the coupling between content generation methods, improves the accuracy and efficiency of task completion, and can quickly realize dynamic amplification of content generation steps and generation methods, meeting different business needs and changes in generation methods.
Smart Images

Figure CN119849613B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to content generation, and particularly to a content generation method based on hierarchical multi-Agent. Background Art
[0002] With the continuous improvement of the capabilities of large language models (LLMs), using a multi-agent framework to complete various complex tasks has proven to be an efficient method. However, in current content generation tasks, multiple generation methods are often involved, such as generating videos, generating copywriting, etc. Different generation methods often involve multiple steps such as material collection, and finally content generation is performed. As the number of content generation methods increases, the corresponding agents also increase continuously, resulting in the following problems when using Multi-Agent to schedule all agents:
[0003] 1. There may be a certain degree of coupling between the step descriptions of different content generation methods. For example, generating videos and generating copywriting, which increases the complexity of using Multi-Agent to select the correct agent to complete the current content generation task, thereby reducing the accuracy of the response.
[0004] 2. Existing content generation methods usually lack flexibility and scalability and are difficult to quickly adapt to new business requirements or changes in generation methods. Therefore, how to quickly and effectively expand content generation methods has become an urgent problem to be solved. Summary of the Invention
[0005] The present invention is to overcome the above-mentioned deficiencies in the prior art and provides a content generation method based on hierarchical multi-Agent that reduces the coupling between content generation methods and realizes dynamic expansion.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A content generation method based on hierarchical multi-Agent uses a global agent and local agents to hierarchically manage the content generation status and steps, realizes the orderly scheduling of multiple agents, and further realizes the rapid expansion of content generation tasks. The specific operation steps are as follows:
[0008] (1) Global Agent: Used to centrally manage the task information, status information, and execution stage information of all current content generation tasks. Each time it obtains user input, it combines the global instantiation information to give a user response;
[0009] (2)Local Agent: The Agent uses various tools to solve sub - problems, and at the same time integrates human feedback into the Agent framework to jointly complete tasks, realizing human intervention in the task completion progress and cooperatively solving the generation task;
[0010] (3)Dynamically amplified content: There are two ways of dynamically amplified content generation, namely: Agent amplification in the content generation step and Agent amplification in the content generation method. Based on the above two ways, Agent calls adapted to different tasks are realized, so as to meet the requirements of the dynamically changing content production method.
[0011] This method uses a hierarchical Agent collaboration method. By the global Agent scheduling tasks and the local Agent managing tasks, the coupling between content generation methods is reduced, and the accuracy and efficiency of task completion are improved. This method also provides a way of dynamically amplified content generation, which can quickly realize the dynamic amplification of the content generation step and the generation method to meet different business requirements and the changes in the generation method.
[0012] Preferably, in step (1), each time the user input is obtained, a user response is given in combination with the global instantiation information. The specific information exchange is as follows:
[0013] (11)Based on the user's question, in combination with the existing task information, the most suitable task for the current problem is selected through GPT - 4o. If the current task status information is 1, no change is made; if the status information is 0, the status information is modified to 1 until the task is completed; if there is no task response for a long time, the current task is closed, and the task status is updated from 1 to 0;
[0014] (12)After the status information of the task is enabled, the data information in the current session is stored in Redis. When the user enters the next input, in combination with the data information stored in Redis for the current task and the execution stage information of the current task, it is decided whether to start a new task session or continue the existing session stage.
[0015] Preferably, the task information is a detailed description of the current task, including the task objective, task stage, and task workflow; the status information is the status control of whether the current task is executed. If the task has been executed, the status is 1; if the task has not been executed, the status is 0; the execution stage information is the process control of multiple stages of the current task, and each stage is divided into: not completed, in progress, completed.
[0016] Preferably, in step (2), a complete task processing flow is as follows:
[0017] (21)Select all the Agents required to complete the content generation task;
[0018] (22) Solving problems through human cooperation: Wait for user input. When receiving the user's message, start the corresponding task stage or terminate the conversation.
[0019] (23) After starting the task, according to the user's message, select the Agent corresponding to the task stage to complete the task. The initial state of all current Agents that have completed subtasks is "uncompleted". When a stage of the task is completed, the corresponding state is modified to "completed".
[0020] (24) When receiving the user input again, if there is an already started task, determine whether the current user needs to solve the problem of the subtask corresponding to this task. If so, continue with this task until it is completed. Otherwise, start a new generation task. By manually controlling the information input to enter different tasks and their corresponding subtasks, multiple tasks can be processed in parallel, greatly improving the execution efficiency of the tasks.
[0021] Preferably, in step (3), for the amplification of the Agent in the content generation step, specifically: A new Agent for the content generation step needs to be added. Since this Agent for the content generation step is only related to the current content generation method, the corresponding Agent for the content generation step can be added in the local Agent of this content generation method.
[0022] Preferably, in step (3), for the amplification of the Agent for the content generation method, specifically: If a new content generation method is added, first hand over the initialization information to the global Agent for management, and then according to the specific behavior process of completing this content generation method, select several related Agents from the existing Agents to form the local Agent corresponding to this task.
[0023] The beneficial effects of the present invention are: By scheduling tasks through the global Agent and managing tasks through the local Agent, the coupling between content generation methods is reduced, and the accuracy and efficiency of task completion are improved; The dynamic amplification of the content generation step and the generation method can be quickly realized to meet the changes in different business requirements and generation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of the information exchange of the global Agent;
[0025] Figure 2 It is a schematic diagram of the decomposition of the video generation task;
[0026] Figure 3 Taking the generation of video as an example, it is a flowchart of the message processing of the local Agent;
[0027] Figure 4It is a schematic diagram of the dynamic amplification content generation method. Detailed implementation manners
[0028] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation manners.
[0029] When using the Multi-Agent method to process content generation tasks, it is often necessary to schedule all Agents to select the correct Agent to reply to the user. This places relatively high requirements on the context understanding ability of the LLM, not only causing waste of resources and reduction of reply efficiency, but even possibly resulting in chaotic Agent scheduling.
[0030] Currently, content generation tasks involve various methods, such as copywriting generation, video generation, etc. The process of copywriting generation includes providing copywriting theme information, configuring picture material information, and then generating copywriting content; video generation requires first providing popular video material information and storyboard material information, and then generating a video after performing screen configuration. It can be seen that the processes of different content generation tasks all depend on a series of orderly information provision, material integration, and content generation steps, and have structural similarities. Therefore, the present invention proposes a content generation method based on hierarchical multi-Agents, which uses global Agents and local Agents to hierarchically manage content generation states and steps, realizes orderly scheduling of multiple Agents, and further realizes rapid amplification of content generation tasks.
[0031] (1) Design a global Agent for centralized management of task information, status information, and execution phase information of all current content generation tasks. In view of the structural similarity of generation tasks, the following will take video generation as an example for detailed description. The instantiation information of video generation is shown in Table 1.
[0032] Table 1. Initial status information table of video generation
[0033]
[0034] a. Task information, that is, environment_prompt, is a detailed description of the current task, including task objectives, task phases, and the work process of the task.
[0035] b. Status information, that is, status, is the status control of whether the current task is executed. If the task has been executed, the status is 1; if the task has not been executed, the status is 0.
[0036] c. Execution phase information, that is, task_phases, is the process control of multiple phases of the current task. For example, in the video generation task, it is divided into multiple task phases, and each phase is divided into: not completed, in progress, and completed.
[0037] Each time the user input is obtained, a response is given to the user in combination with the globally instantiated information. The specific information exchange is as Figure 1 shown.
[0038] Step 1: Based on the user's question, in combination with the currently existing task information, select the most suitable task for the current question through GPT-4o. If the current task status information is 1, no change is made; if the status information is 0, the status information is modified to 1 until the task is completed; if there is no task response for a long time, the current task is closed and the task status is updated from 1 to 0.
[0039] Step 2: After enabling the status information of the task, store the data information in the current session in Redis. When the user enters the next input, based on the data information stored in Redis for the current task and the execution stage information of the current task, decide whether to start a new task session or continue the existing session stage.
[0040] Dynamically manage the session status through Step 1 and Step 2, enabling it to dynamically instantiate different generation task information during the content generation task management process and process multiple generation methods in parallel.
[0041] (2) Local Agent: In the content generation task, each method requires multiple steps to implement. The Agent uses various tools to solve sub-problems. At the same time, human feedback is integrated into the Agent framework to jointly complete the task, realizing human intervention in the task completion progress and cooperating to solve the generation task. A complete task processing flow is as follows:
[0042] Step 1: Select all the Agents required to complete the content generation task. Taking the video generation task as an example, first, disassemble the video generation task into tasks such as imitating video disassembly, material parsing, and video generation, as Figure 2 shown. Then, select the Agents required to complete the video generation task. Select the UserProxyAgent that accepts user input, the video disassembly Agent for video disassembly, the material parsing Agent for material parsing, and the video generation Agent for generating videos. The specific behaviors of each Agent are specified in the system_message of the generation task, as shown in Table 1.
[0043] Step 2: Manually cooperate to solve the problem. As Figure 3 shown, use the UserProxyAgent to wait for user input, and when the user message is received, start the corresponding task stage or terminate the conversation.
[0044] Step 3: After the task is started, the UserProxyAgent is aware of all the subtasks executed by other Agents and the step information of the subtasks, is responsible for the overall task planning, guides other Agents, and tracks the task progress. According to the user's message, it selects the Agent corresponding to the task stage to complete the task. The initial state of all Agents that have completed subtasks currently is "not completed", and when a stage of the task is completed, the corresponding state is modified to "completed".
[0045] Step 4: When the user input is received again, if there is an already started task, it is determined whether the current user needs to solve the problem of the subtask corresponding to this task. If so, the task continues until it is completed; otherwise, a new generation task is started. By manually controlling the information input to enter different tasks and their corresponding subtasks, multiple tasks can be processed in parallel, greatly improving the task execution efficiency.
[0046] By activating only the Agents in the current task scenario each time, and selecting the appropriate task stage Agent according to the user's message, the response efficiency is improved. Also, through human feedback at each step, the transition of subtasks in the scenario is ensured, and errors that occur are promptly reflected on and corrected by humans, improving the accuracy of task completion.
[0047] (3) Dynamic content generation expansion method: In the content generation task, to meet business requirements, there are two ways of dynamic content generation expansion, namely content generation step Agent expansion and content generation method Agent expansion, as Figure 4 shown.
[0048] (31) Content generation step Agent expansion
[0049] The content generation method is implemented by multiple sub-steps. As shown in Figure 4 Video generation method 1, currently video disassembly, material analysis, and video generation are required. To increase the content marketing revenue, the generated video needs to be forwarded to public network platforms such as Douyin for publication. For this purpose, a new Agent for video publication needs to be added. Since this Agent is only related to the current video content generation method, the corresponding video publication Agent can be added to the local Agent of this content generation method, as shown in Figure 4 Video generation method 2. By this method, not only is the impact on other content generation methods avoided, but also rapid local Agent expansion is achieved.
[0050] (32) Content generation method Agent expansion
[0051] If a new video generation method is added, such as only requiring the user to upload video materials for video generation, it is only necessary to first hand over the initialization information such as the task objective, task stage, and work process of the task to the global Agent for management, and then select the material parsing Agent and video generation Agent from the existing Agents according to the specific behavior process of completing this generation method to form the local Agent corresponding to this task, such as Figure 4 As shown in Video Generation Method 3, the dynamic amplification of the content generation method can be quickly realized.
[0052] Based on the above two methods, the Agent call adapted to different tasks can be quickly realized, so as to meet the needs of the dynamically changing content production method.
[0053] In summary, the present invention uses a hierarchical multi-Agent management method. The global Agent schedules different tasks by managing the task information, status information, and execution stage information of all tasks. The local Agent manages the execution steps of the task through human feedback, realizing the reduction of the coupling between different tasks and improving the accuracy and efficiency of task completion. In the present invention, the local Agent includes one or more steps, and each step is processed by an Agent. The ability of the local Agent can be expanded by adding the corresponding step Agent to the local Agent, or a new local Agent can be formed by using the existing step Agents, so as to realize a new content generation method; through the amplification of the local Agent, the generation steps can be added or modified separately, which is convenient for management and maintenance, and can quickly adapt to the needs of different tasks and new generation methods without large-scale modification of the entire system; that is, a method for dynamically amplifying content generation is provided, which can quickly realize the dynamic amplification of content generation steps and generation methods to meet the changes in different business needs and generation methods.
Claims
1. A content generation method based on hierarchical multi-agent, characterized in that: Use global agents and local agents to hierarchically manage content generation status and steps, and schedule multiple agents in an orderly manner, thereby achieving rapid expansion of content generation tasks. The specific steps are as follows: (1) Global Agent: It is used to centrally manage the task information, status information, and execution phase information of all current content generation tasks. It obtains user input each time and gives user responses based on the global instantiation information. (2) Local Agent: The agent uses various tools to solve sub-problems and integrates human feedback into the agent framework to jointly complete tasks, realize the completion progress of human intervention tasks, and cooperate to solve the generated tasks. A complete task processing flow is as follows: (21) Select all agents needed to complete the content generation task; (22) Manual collaborative problem solving: Waiting for user input, starting the corresponding task phase or terminating the conversation when receiving a user message; (23) After the task is started, the Agent of the corresponding task stage is selected to complete the task according to the user message; the initial status of all Agents that have completed subtasks is "unfinished". After completing a stage of the task, the corresponding status is changed to "completed"; (24) When receiving user input again, if there is already an opened task, determine whether the current user needs to solve the problem of the subtask corresponding to the task. If so, continue the task until it is completed, otherwise start a new generated task; by manually controlling the information input to enter different tasks and their corresponding subtasks, ensure the parallel processing of multiple tasks, greatly improving the execution efficiency of tasks; (3) Dynamically augmented content: There are two ways to dynamically augment content generation: Agent augmentation of content generation steps and Agent augmentation of content generation methods. Based on the above two methods, Agent calls adapted to different tasks are implemented to meet the needs of dynamically changing content production methods.
2. The method for generating content based on hierarchical multi-agent according to claim 1, characterized in that: In step (1), each time the user input is obtained, the user response is given in combination with the global instantiation information. The specific information exchange is as follows: (11) Based on the user's question, GPT-4o selects the most appropriate task for the current question in combination with the current task information. If the current task status information is 1, it will not be changed; if the status information is 0, the status information will be changed to 1 until the task is completed; if there is no task response for a long time, the current task will be closed and the task status will be updated from 1 to 0; (12) After the task status information is opened, the data information in the current session is stored in Redis. When the user inputs the next round, the data information of the current task stored in Redis and the execution stage information of the current task are combined to decide whether to open a new task session or continue the existing session stage.
3. A method for generating content based on hierarchical multi-agent according to claim 1 or 2, characterized in that: The task information is a detailed description of the current task, including the task objectives, task stages and task workflow; the status information is a status control of whether the current task has been executed. If the task has been executed, the status is 1; if the task has not been executed, the status is 0; the execution stage information is a process control of multiple stages of the current task, and each stage is divided into: unfinished, in progress, and completed.
4. The method for generating content based on hierarchical multi-agent according to claim 1, characterized in that In step (3), for the expansion of the content generation step Agent, specifically: a new content generation step Agent needs to be added. Since the content generation step Agent is only related to the current content generation method, a corresponding content generation step Agent can be added to the local Agent of the content generation method.
5. The method for generating content based on hierarchical multi-agent according to claim 1, characterized in that In step (3), for the expansion of the content generation method agent, specifically: if a new content generation method is added, it is only necessary to first hand over the initialization information to the global agent for management, and then select several related agents from the existing agents to form the local agent corresponding to the task according to the specific behavior process of completing the content generation method.