CN-121979637-A - Multi-agent task scheduling method, device and equipment
Abstract
The application provides a multi-agent task scheduling method, a device and equipment, which relate to the technical field of artificial intelligence and comprise the steps of receiving a natural language request input by a user; the method comprises the steps of carrying out structured task decomposition on a natural language request to generate a task graph containing a plurality of task nodes and dependency relations thereof, matching target execution agents corresponding to each task node from a preset agent registration center according to a required capacity label of each task node in the task graph, scheduling each target execution agent to execute corresponding subtasks to obtain a structured execution result of each task node, and generating task execution response corresponding to the natural language request according to the structured execution results of all task nodes. The application can improve the adaptability and reliability of the multi-agent cooperative processing of complex tasks.
Inventors
- LI SHUAI
Assignees
- 杭州互向科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260123
Claims (10)
- 1. A multi-agent task scheduling method, the method comprising: Receiving a natural language request input by a user; carrying out structured task decomposition on the natural language request to generate a task graph comprising a plurality of task nodes and dependency relations thereof, wherein each task node carries a required capacity label; according to the required capacity label of each task node in the task graph, matching a target execution agent corresponding to each task node from a preset agent registration center; scheduling each target execution agent to execute a corresponding subtask, and obtaining a structured execution result of each task node; And generating task execution response corresponding to the natural language request according to the structured execution results of all the task nodes.
- 2. The method of claim 1, wherein the performing a structured task decomposition on the natural language request to generate a task graph comprising a plurality of task nodes and their dependencies comprises: A plurality of subtasks are output by adopting a preset large language model according to the natural language request, wherein the subtasks comprise task description, the required capacity label, a dependent task identifier and an expected output data structure; Constructing a corresponding task node for each subtask; Establishing a corresponding inter-task dependency relationship according to the dependent task identification of each subtask; and generating the task graph according to each task node and the dependency relationship among the tasks.
- 3. The method according to claim 2, wherein the method further comprises: performing loop-free detection on the task graph; performing executable verification on subtasks corresponding to the task nodes according to the agent registry and the required capacity labels corresponding to the task nodes; And if the loop-free detection of the task graph fails and/or the executable verification fails, judging that the task graph is illegal.
- 4. The method of claim 1, wherein the agent registry stores registration information of each executing agent, the registration information including an agent identifier, a capability tag, an operation performance index, and an operation state, and the matching, from a preset agent registry, a target executing agent corresponding to each task node according to a required capability tag of each task node in the task graph, includes: For each task node, screening out an execution agent with the capability label completely covering the required capability label of the task node and active running state from the agent registry, and taking the execution agent as a candidate execution agent of the task node; And comprehensively scoring the candidate execution agent based on the operation performance index, and taking the candidate execution agent with the highest score as the target execution agent of the task node.
- 5. The method of claim 4, wherein the registration information further includes a compatibility capability tag indicating a type of capability that the execution agent may alternatively support, the method further comprising: If any task node cannot be screened out of candidate execution agents of which the capability label completely covers the required capability label of the task node, performing degradation matching on the task node to obtain candidate execution agents of the task node; If no corresponding candidate execution agent exists after the degradation matching is executed for any task node, splitting the task node into a plurality of single-capability task nodes by adopting a preset large language model, and updating the task graph to obtain an updated task graph; and matching the target execution agent corresponding to each single-capability task node from the agent registration center according to the required capability label of each single-capability task node in the updated task graph.
- 6. The method according to claim 1, wherein the scheduling each target execution agent to execute a corresponding subtask, and obtaining a structured execution result of each task node, includes: Generating a task instruction of the target execution agent, wherein the task instruction at least comprises task description, input parameters, the required capacity label and an expected output data structure; And calling the target execution agent to execute task operation according to the task instruction to obtain the structured execution result.
- 7. The method of claim 6, wherein after the obtaining the structured execution result of each task node, the method further comprises: updating the execution state of the corresponding task node to be a completion state according to the structured execution result; Extracting all downstream task nodes of the task nodes with the execution state being the completion state according to the task dependency relationship prestored in the task graph; Checking whether the execution states of all corresponding upstream task nodes are the completion states one by one for each downstream task node; and if the execution states of all the upstream task nodes corresponding to the downstream task nodes are the completion states, the downstream task nodes are put into a ready queue, and the target execution agent is waited for matching.
- 8. The method of claim 6, wherein after the obtaining the structured execution result of each task node, the method further comprises: if the structured execution result shows that the context information is missing, calling a preset large language model to generate a matched remedy task node according to the context information and the natural language request, and updating the task graph according to the remedy task node; If the structured execution result shows that the task node fails to execute and the corresponding task node belongs to a non-critical path node, marking the execution state of the task node as skipped and releasing the dependence of all downstream task nodes of the task node.
- 9. A multi-agent task scheduling device, the device comprising: The receiving module is used for receiving a natural language request input by a user; The system comprises a decomposition module, a task graph, a task processing module and a task processing module, wherein the decomposition module is used for carrying out structured task decomposition on the natural language request to generate a task graph comprising a plurality of task nodes and dependency relations thereof, wherein each task node carries a required capacity label; The matching module is used for matching the target execution agent corresponding to each task node from a preset agent registration center according to the required capacity label of each task node in the task graph; the scheduling module is used for scheduling each target execution agent to execute the corresponding subtasks and obtaining the structured execution result of each task node; And the generating module is used for generating task execution response corresponding to the natural language request according to the structured execution results of all the task nodes.
- 10. An electronic device comprising a processor, a memory and a bus, the memory storing program instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is in operation, the processor executing the program instructions to perform the steps of the multi-agent task scheduling method of any one of claims 1 to 8.
Description
Multi-agent task scheduling method, device and equipment Technical Field The application relates to the technical field of artificial intelligence, in particular to a multi-agent task scheduling method, device and equipment. Background As large language model technologies mature, intelligent-based automated systems have become a research hotspot. The current mainstream schemes are mainly divided into two types, namely, a single agent architecture is adopted, and a large language model instance directly responds to a user request and invokes a tool to complete a task. In the scheme, when facing complex multi-step tasks, the problems of insufficient reasoning depth, confusion of tool call, overload of context and the like often occur. And secondly, adopting a multi-agent cooperation mechanism of a predefined process to package different functional modules into independent agents and calling the independent agents according to a fixed sequence. However, this solution lacks the ability to dynamically understand the user's intent and adaptively generate task structures, and when anomalies or user request changes occur during execution, the system is difficult to flexibly adjust, resulting in task interruption. In addition, the existing ReAct (Reasoning AND ACTING, reasoning and action) framework can implement reasoning and action circulation in a single agent, but a unified scheduling and context sharing mechanism is lacking among a plurality of agents, so that a collaborative reasoning closed loop cannot be formed. And the large language model is partially utilized to conduct task planning research, the output of the large language model is mostly in a free text form, the structured task dependency expression is lacked, and the multi-agent system is difficult to drive to automatically execute. Meanwhile, the existing system generally lacks a matching mechanism between the capability of an intelligent agent and the task demand, so that task allocation is blind, and the resource utilization rate is low. Therefore, a multi-agent collaborative architecture capable of achieving automatic task decomposition and intelligent allocation is needed. Disclosure of Invention The embodiment of the application provides a multi-agent task scheduling method, device and equipment, which can improve the suitability and reliability of multi-agent cooperative processing of complex tasks. In a first aspect, an embodiment of the present application provides a multi-agent task scheduling method, where the method includes: Receiving a natural language request input by a user; carrying out structured task decomposition on the natural language request to generate a task graph comprising a plurality of task nodes and dependency relations thereof, wherein each task node carries a required capacity label; according to the required capacity label of each task node in the task graph, matching a target execution agent corresponding to each task node from a preset agent registration center; scheduling each target execution agent to execute a corresponding subtask, and obtaining a structured execution result of each task node; And generating task execution response corresponding to the natural language request according to the structured execution results of all the task nodes. Optionally, the performing structural task decomposition on the natural language request to generate a task graph including a plurality of task nodes and their dependencies, including: A plurality of subtasks are output by adopting a preset large language model according to the natural language request, wherein the subtasks comprise task description, the required capacity label, a dependent task identifier and an expected output data structure; Constructing a corresponding task node for each subtask; Establishing a corresponding inter-task dependency relationship according to the dependent task identification of each subtask; and generating the task graph according to each task node and the dependency relationship among the tasks. Optionally, the method further comprises: performing loop-free detection on the task graph; performing executable verification on subtasks corresponding to the task nodes according to the agent registry and the required capacity labels corresponding to the task nodes; And if the loop-free detection of the task graph fails and/or the executable verification fails, judging that the task graph is illegal. Optionally, the agent registration center stores registration information of each execution agent, where the registration information includes an agent identifier, a capability tag, an operation performance index and an operation state, and the matching, according to a required capability tag of each task node in the task graph, a target execution agent corresponding to each task node from a preset agent registration center includes: For each task node, screening out an execution agent with the capability label completely covering the required cap