Multi-agent task execution method and system, electronic equipment and medium

By dynamically allocating subtasks and updating agent information in a multi-agent system, the problem of poor flexibility in existing technologies is solved, and the efficiency and success rate of task execution are improved.

CN121785723APending Publication Date: 2026-04-03CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing multi-agent scheduling schemes suffer from poor flexibility, low task execution success rate, and low efficiency.

Method used

The scheduler breaks down a task into multiple subtasks based on task requirements, dynamically allocates agents based on agent information, and updates agent information after task execution to achieve dynamic scheduling and routing.

Benefits of technology

It improved the accuracy of task allocation and enhanced task execution efficiency and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785723A_ABST
    Figure CN121785723A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-agent task execution method and system, electronic equipment and a medium. The method comprises the following steps: when a scheduler receives task demand information of a task, splitting the task into a plurality of sub-tasks according to the task demand information to obtain multiple pieces of sub-task information; the scheduler allocates the plurality of sub-tasks to the intelligent agents in the intelligent task system according to the information of the plurality of sub-tasks and the intelligent agent information corresponding to the plurality of intelligent agents, and sends the information of the sub-tasks to the corresponding intelligent agents; the agent executes the subtask according to the received subtask information to obtain execution result information of the subtask, and the agent information is updated according to the execution result information. The intelligent agent information has dynamic performance and real-time performance, so that dynamic scheduling and dynamic routing of the intelligent agent are realized, the task allocation accuracy is improved, and the task execution efficiency and the execution success rate are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a multi-agent task execution method, system, electronic device, and medium. Background Technology

[0002] An agent is an intelligent entity capable of sensing its environment, making autonomous decisions, and executing actions. It acquires environmental information through sensors mounted on it, analyzes and plans based on built-in algorithms or models (such as rule systems and machine learning), and ultimately completes the task through executors. An intelligent task system is a system composed of multiple agents that can collaboratively complete complex tasks.

[0003] In existing technologies, the scheduling of multiple agents is based on preset scheduling rules. For example, when a task is received, the task is assigned to the agent with the fewest tasks, or the task is assigned to the agent with the best performance.

[0004] However, the above solutions suffer from poor flexibility, low success rate of task execution, and low efficiency of task execution. Summary of the Invention

[0005] The purpose of this application is to provide a multi-agent task execution method, system, electronic device, and medium to improve the flexibility, success rate, and efficiency of task execution. The specific technical solution is as follows: In a first aspect of this application, a multi-agent task execution method is provided, applied to an intelligent task system, the intelligent task system including a scheduler and multiple agents, the method comprising: When the scheduler receives the task requirement information of a task, it breaks the task down into multiple subtasks according to the task requirement information, thus obtaining multiple subtask information. Based on the multiple subtask information and the agent information corresponding to the multiple agents, the scheduler assigns the multiple subtasks to the agents in the intelligent task system and sends the subtask information to the corresponding agents. The agents execute the subtasks according to the received subtask information, obtain the execution result information of the subtasks, and update the agent information according to the execution result information.

[0006] Optionally, the scheduler splits the task into multiple subtasks according to the task requirement information, obtaining information on multiple subtasks, including: The scheduler extracts the number of subtasks and task execution logic from the task requirement information through a large language model, and then splits the task into multiple subtasks based on the number of subtasks and task execution logic to obtain information on multiple subtasks.

[0007] Optionally, the scheduler assigns multiple subtasks to agents in the intelligent task system based on information about multiple subtasks and agent information corresponding to multiple agents, including: The scheduler creates a task tree consisting of multiple subtasks based on the dependent subtask identifiers included in the information of multiple subtasks. Each node in the task tree corresponds to a subtask, and the subtasks of the child node depend on the subtasks of the parent node. The scheduler assigns an agent to the subtask of each node one by one along the direction from the root node to the leaf node. The assigned agent is related to the subtask information and agent information of the subtask.

[0008] Optionally, the scheduler assigns agents to the subtasks of a node, including: The scheduler extracts the task type of the subtask from the subtask information of the node; the scheduler selects the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system; the scheduler selects the intelligent agent of the subtask from the target intelligent agent based on the intelligent agent information.

[0009] Optionally, the scheduler selects agents for subtasks from the target agents based on agent information, including: The scheduler extracts agent performance parameters and the number of tasks to be executed from the agent information; the scheduler selects the agent with the largest performance parameters and / or the fewest tasks to be executed from the target agents and assigns it to the subtask.

[0010] Optionally, the scheduler sends subtask information to the corresponding agent, including: The scheduler determines the execution dependency information of each subtask based on the dependent subtask identifiers included in the subtask information. The execution dependency information includes dependent subtask identifiers and dependent agent identifiers. The scheduler then sends the execution dependency information and subtask information of the subtask to the assigned agent.

[0011] Optionally, the agent executes the subtask based on the received subtask information and obtains the execution result information of the subtask, including: The first agent among multiple agents obtains the task output of the second subtask from the second agent that the first subtask depends on, based on the execution dependency information of the first subtask. The first agent then executes the first subtask based on the task output of the second subtask and the subtask information of the first subtask, and obtains the execution result information of the first subtask.

[0012] Optionally, the agent executes the subtask based on the received subtask information and obtains the execution result information of the subtask, including: The first agent among multiple agents obtains the task output of the historical subtask from the first agent or the third agent according to the task type of the first subtask, and executes the first subtask according to the task output of the historical subtask and the subtask information of the first subtask. The historical subtask and the first subtask belong to the same task type, and the supported task types of the third agent are the same as those of the first agent.

[0013] Optionally, it also includes: When the fourth agent malfunctions, the scheduler determines a candidate agent corresponding to the fourth agent and sends the subtask information and execution dependency information of the third subtask that the fourth agent has not completed to the candidate agent, so that the candidate agent can execute the third subtask. The fourth agent and the candidate agent correspond to the same supported task type. The scheduler determines a fifth agent corresponding to the fourth subtask that depends on the third subtask. On the fifth agent, the scheduler adjusts the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the candidate agent.

[0014] Optionally, it also includes: The scheduler creates a session class for each task and records task information through the session class. The task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information of each subtask, execution result information of each subtask, agent identifier of each subtask, dependency relationships between agents, agent information of agents, and execution result information of the task. When the task execution ends, the scheduler stores the session class in a distributed database.

[0015] Optionally, the method further includes: The scheduler receives the task outputs of multiple subtasks of a task; the scheduler extracts output rule information from the task requirement information, and integrates the task outputs of multiple subtasks according to the output rule information to obtain the task output.

[0016] In a second aspect of this application, an intelligent task system is also provided, including a scheduler and multiple intelligent agents. The scheduler is configured to: upon receiving task requirement information for a task, divide the task into multiple subtasks according to the task requirement information, obtain multiple subtask information, and allocate the multiple subtasks to the intelligent agents in the intelligent task system according to the multiple subtask information and the intelligent agent information corresponding to the multiple intelligent agents, so as to send the subtask information to the corresponding intelligent agents; the intelligent agents are configured to: execute the subtasks according to the received subtask information, obtain the execution result information of the subtasks, and update the intelligent agent information according to the execution result information.

[0017] Optionally, the scheduler is also used for: The number of subtasks and task execution logic are extracted from the task requirement information using a large language model. Based on the number of subtasks and task execution logic, the task is split into multiple subtasks, resulting in multiple subtask information.

[0018] Optionally, the scheduler is also used for: Based on the dependent subtask identifiers included in the information of multiple subtasks, a task tree consisting of multiple subtasks of the task is created. Each node in the task tree corresponds to a subtask, and the subtasks of the child node depend on the subtasks of the parent node. Along the direction from the root node to the leaf node of the task tree, an agent is assigned to the subtask of each node one by one. The assigned agent is related to the subtask information and agent information of the subtask.

[0019] Optionally, the scheduler is also used for: Extract the task type of the subtask from the subtask information of the node; select the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system; select the intelligent agent of the subtask from the target intelligent agent based on the intelligent agent information.

[0020] Optionally, the scheduler is also used for: Extract agent performance parameters and the amount of tasks to be executed from agent information; select the agent with the largest performance parameters and / or the fewest tasks to be executed from the target agents and assign it to the subtask.

[0021] Optionally, the scheduler is also used for: Based on the dependent subtask identifiers included in the subtask information of each subtask, the execution dependency information of the subtask is determined. The execution dependency information includes the dependent subtask identifier and the dependent agent identifier. The execution dependency information and the subtask information are then sent to the assigned agent.

[0022] Optionally, the first agent among multiple agents is further used for: Based on the execution dependency information of the first subtask, obtain the task output result of the second subtask that the first subtask depends on from the second agent that the first subtask depends on; based on the task output result of the second subtask and the subtask information of the first subtask, execute the first subtask and obtain the execution result information of the first subtask.

[0023] Optionally, the first agent among multiple agents is further used for: Based on the task type of the first subtask, obtain the task output of the historical subtask from the first agent or the third agent, and execute the first subtask based on the task output of the historical subtask and the subtask information of the first subtask. The historical subtask and the first subtask belong to the same task type, and the supported task types of the third agent are the same as those of the first agent.

[0024] Optionally, the scheduler is further configured to: when the fourth agent malfunctions, determine the candidate agent corresponding to the fourth agent, and send the subtask information and execution dependency information of the third subtask that the fourth agent has not completed to the candidate agent, so that the candidate agent can execute the third subtask, and the fourth agent and the candidate agent correspond to the same supported task type; determine the fifth agent corresponding to the fourth subtask that depends on the third subtask; and on the fifth agent, adjust the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the candidate agent.

[0025] Optionally, the scheduler is also used to: create a session class for the task, and record the task information through the session class. The task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information of each subtask, execution result information of each subtask, agent identifier of each subtask, dependency relationship between agents, agent information of agents, and execution result information of the task; and store the session class in the distributed database when the task execution ends.

[0026] Optionally, the scheduler is also used for: Receive the task outputs of multiple subtasks of the task; extract output rule information from the task requirement information, and integrate the task outputs of multiple subtasks according to the output rule information to obtain the task output.

[0027] In a third aspect of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement the method described in the first aspect when executing the program stored in the memory.

[0028] In a fourth aspect of this application, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0029] In a fifth aspect of this application, a computer program product comprising instructions is also provided, which, when run on a computer, causes the computer to perform the method described in the first aspect above.

[0030] The multi-agent task execution method, system, electronic device, and medium provided in this application embodiment involve a scheduler that, upon receiving task requirement information, divides the task into multiple subtasks according to the task requirement information, obtaining multiple subtask information. The scheduler then allocates the multiple subtasks to agents in the intelligent task system based on the subtask information and the agent information corresponding to each agent, and sends the subtask information to the corresponding agents. The agents execute the subtasks according to the received subtask information, obtain the execution result information of the subtasks, and update their agent information based on the execution result information. This application embodiment combines agent information for task allocation and updates the agent information promptly based on the task execution result information after task execution, making the agent information dynamic and real-time. This achieves dynamic scheduling and dynamic routing of agents, improves the accuracy of task allocation, and ultimately improves task execution efficiency and success rate. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0032] Figure 1 This is a schematic diagram of the structure of an intelligent task system provided in an embodiment of this application; Figure 2 A flowchart illustrating the steps of a multi-agent task execution method provided in this application embodiment; Figure 3 This application provides a schematic diagram of a task tree structure. Figure 4 This is a schematic diagram of another task tree structure provided in an embodiment of this application; Figure 5 This is a flowchart of another multi-agent task execution method in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] The embodiments of this application are applied to an intelligent task system, which is a distributed network composed of multiple intelligent agents that complete complex tasks through unified scheduling and cooperation. Figure 1This is a schematic diagram of the structure of an intelligent task system provided in an embodiment of this application, referring to... Figure 1 As shown, the intelligent task system includes a scheduler and multiple intelligent agents A1, A2, and A3. The scheduler is communicatively connected to each of the intelligent agents, and the agents can also communicate with each other to share information.

[0035] The scheduler can also be understood as the task distribution layer. As the central scheduling unit of the intelligent task system, it is used to verify the permissions of each task request information when it arrives. After the permission verification is successful, the task request information is parsed to split the task into subtasks. Finally, the subtasks are assigned to one or more of the intelligent agents A1, A2 and A3.

[0036] When the scheduler receives task request information, it needs to format the information to conform to a target format for permission verification. Specifically, the task request information corresponds to user information, which the scheduler needs to verify to determine if the user has the necessary access rights. If the user information exists in a pre-defined user database, the user has access rights, and the verification passes; if the user information does not exist in the database, the user does not have access rights, and the verification fails. This ensures the security of the intelligent task system and reduces the risk of malicious attacks.

[0037] Intelligent agents can be deployed independently on devices as microservices, with each intelligent agent corresponding to one microservice.

[0038] Agents can communicate with each other and with the scheduler in the following ways: message queues, service registration, discovery mechanisms, and shared caches.

[0039] In this context, a message queue refers to a system where the sender writes messages to be sent into the message queue, and the receiver retrieves messages from the message queue, thus achieving communication. The sender can be an agent or a scheduler, and the receiver can be another agent or a scheduler. For example, when an agent needs to send a message to the scheduler, the agent is the sender and the scheduler is the receiver; when an agent needs to send a message to another agent, both the sender and receiver are agents; and when the scheduler needs to send a message to an agent, the scheduler is the sender and the agent is the receiver.

[0040] Service registration refers to the process by which an intelligent agent reports a message to the scheduler during the registration process.

[0041] The discovery mechanism refers to the process by which an agent, after registering, proactively reports its access status to the scheduler or other agents.

[0042] A shared buffer refers to a buffer shared by the sender and receiver. The sender writes data into the buffer, and the receiver reads data from the buffer, thus enabling communication.

[0043] In some related technologies, the scheduler assigns arriving tasks to agents based on fixed rules. However, this results in poor flexibility, as it cannot dynamically adjust according to actual conditions, ultimately leading to low task execution efficiency and success rate.

[0044] To address the aforementioned technical issues, this application embodiment combines agent information for task allocation and updates the agent information promptly based on the task execution results after task execution. This makes the agent information dynamic and real-time, thereby achieving dynamic scheduling and routing of agents, improving the accuracy of task allocation, and ultimately increasing task execution efficiency and success rate.

[0045] The task execution method of this application for multi-agent systems will be described in detail below through specific embodiments.

[0046] Figure 2 This is a flowchart illustrating the steps of a multi-agent task execution method provided in an embodiment of this application. Applied to... Figure 1 The intelligent task system shown includes a scheduler and multiple intelligent agents, such as... Figure 2 As shown, the method may include: S101. When the scheduler receives the task requirement information of a task, it splits the task into multiple subtasks according to the task requirement information and obtains multiple subtask information.

[0047] S102. The scheduler assigns multiple subtasks to the agents in the intelligent task system based on the information of multiple subtasks and the information of the agents corresponding to the multiple agents, and sends the subtask information to the corresponding agents.

[0048] S103. The agent executes the subtask according to the received subtask information, obtains the execution result information of the subtask, and updates the agent information according to the execution result information.

[0049] Understandably, each task corresponds to a task requirement, which describes all the information needed to execute the task. This task requirement is typically information entered by the user on the client side, usually described in natural language, and can include, but is not limited to, text, images, audio, and video. When a user enters task requirement information on the client side, it can be understood as initiating a task execution request based on that specific requirement.

[0050] After the task requirements information of each task enters the intelligent task system, it is first broken down and assigned to intelligent agents by the scheduler of the intelligent task system. The scheduler can break down a task into multiple subtasks according to the task requirements information, and each subtask corresponds to a subtask information. The subtask information includes all the information needed to execute the subtask, such as subtask identifier, task type, execution content, and dependent subtask identifiers.

[0051] A single task may require multiple steps to complete, and one or more steps can correspond to a subtask. The scheduler can analyze task requirements to break down the task according to its execution logic, dividing one or more steps into a subtask. The same subtask corresponds to steps of the same type and / or related steps.

[0052] In some possible implementations, the user can specify splitting requirement information in the task requirement information, so that the scheduler can split the task into multiple subtasks according to the splitting requirement information. The aforementioned splitting requirement information can be described from the characteristics of the subtasks, including but not limited to: the number of subtasks. Therefore, the scheduler splits the task into multiple subtasks according to the task requirement information, obtaining multiple subtask information, including: The scheduler extracts the number of subtasks and task execution logic from the task requirement information through a large language model, and then splits the task into multiple subtasks based on the number of subtasks and task execution logic to obtain information on multiple subtasks.

[0053] The task execution logic is used to indicate the steps for executing a task and the order of those steps. In addition to its automatic task splitting function, this embodiment can also flexibly split tasks based on the number of subtasks and the task execution logic; that is, it splits tasks according to user needs rather than according to pre-defined splitting rules.

[0054] After splitting the task, the scheduler needs to assign the resulting subtasks to agents in the intelligent task system. Each subtask corresponds to one agent, and each agent can correspond to one or more subtasks. In some possible implementations, the scheduler assigns the subtasks to agents in the intelligent task system based on the subtask information and the agent information corresponding to each agent, including: The scheduler creates a task tree consisting of multiple subtasks based on the dependent subtask identifiers included in the information of multiple subtasks. Each node in the task tree corresponds to a subtask, and the subtasks of the child node depend on the subtasks of the parent node. The scheduler assigns an agent to the subtask of each node one by one along the direction from the root node to the leaf node. The assigned agent is related to the subtask information and agent information of the subtask.

[0055] In this context, the dependent subtask identifier identifies the subtasks that depend on the subtask. Each subtask's subtask information may include one or more dependent subtask identifiers. Subtasks must execute after their dependent subtasks have successfully completed, and they have a specific execution order. The dependencies between subtasks are identified by the scheduler from the task execution logic; the input of a subtask is typically the output of its dependent subtask. For example, in a sequence of subtasks—text preprocessing, semantic parsing, knowledge retrieval, and decision output—the semantic parsing subtask depends on the text preprocessing subtask, the knowledge retrieval subtask depends on the semantic parsing subtask, and the decision output subtask depends on the knowledge retrieval subtask.

[0056] Understandably, when a subtask's subtask information does not include dependent subtask identifiers, the subtask can be called an independent subtask, meaning that the subtask does not depend on other subtasks. In this case, the independent subtask is not affected by the execution of other subtasks and can be executed independently.

[0057] Specifically, each of the above tasks comprises multiple subtasks that form one or more task trees, and the number of task trees for each task is the same as the number of independent subtasks for each task. When there are at least two independent subtasks among the multiple subtasks of a task, the task corresponds to at least two task trees; when there is one independent subtask among the multiple subtasks of a task, the task corresponds to one task tree.

[0058] Figure 3 This is a schematic diagram of the task tree structure of a task provided in an embodiment of this application. (Refer to...) Figure 3 As shown, the task is broken down into eight subtasks CT1 to CT8. Subtasks CT1 and CT2 are independent; therefore, node N1 (containing subtask CT1) and node N2 (containing subtask CT2) are the root nodes of their respective task trees. Subtasks CT3, CT4, and CT5 depend on subtask CT1; therefore, node N3 (containing subtask CT3), node N4 (containing subtask CT4), and node N5 (containing subtask CT5) are all children of node N1. Subtask CT6 depends on subtask CT2; therefore, node N6 (containing subtask CT6) is a child of node N2. Subtask CT7 depends on subtask CT5; therefore, node N7 (containing subtask CT7) is a child of node N5. Subtask CT8 depends on subtask CT7; therefore, node N8 (containing subtask CT8) is a child of node N7.

[0059] Figure 4 This is a schematic diagram of the task tree structure for another task provided in an embodiment of this application. (Refer to...) Figure 4As shown, the task is split into four subtasks CT9 to CT12. Subtask CT9 is an independent subtask; therefore, node N9, containing subtask CT9, is the root node of the task tree. Subtasks CT10 and CT11 depend on subtask CT9; therefore, nodes N10 (containing subtask CT10) and N11 (containing subtask CT11) are children of node N9, respectively. Subtask CT12 depends on subtask CT10; therefore, node N12, containing subtask CT12, is a child of node N10.

[0060] After obtaining one or more task trees for a given task, agents can be independently assigned between different task trees; within each task tree, agents are assigned sequentially from the root node to the leaf node. For example, refer to... Figure 3 As shown, the task tree corresponding to root node N1 and the task tree corresponding to root node N2 can perform agent allocation in parallel. In the task tree corresponding to root node N1, agents are first allocated to subtask CT1 corresponding to root node N1, then agents are allocated to subtasks CT3, CT4, and CT5 in parallel. After allocating agents to subtask CT5, agents can be allocated to subtask CT7, and finally agents are allocated to CT8. In the task tree corresponding to root node N2, agents are first allocated to subtask CT2 corresponding to root node N2, then agents are allocated to subtask CT6.

[0061] This application embodiment can assign agents to subtasks according to a task tree. Since the task tree accurately and clearly describes the dependencies between subtasks, it can guide the scheduler to quickly allocate agents. Furthermore, prioritizing the allocation of agents to dependent subtasks allows them to execute subtasks first, which helps improve task execution efficiency.

[0062] When assigning agents to each subtask, not only the subtask information is considered, but also the agent information is combined with the agent information, which is dynamically updated.

[0063] The agent information can include the agent's supported task types, that is, the types of tasks the agent can perform. Different agents are used to perform subtasks of different task types. Therefore, agents are divided into different types according to the types of tasks they support, such as intelligent writing agents, article correction agents, intelligent question-and-answer agents, paper retrieval agents, schedule planning agents, intelligent question-generating agents, email processing agents, and paper polishing agents.

[0064] Therefore, it is necessary to extract the agent's supported task types from each agent's agent information and match the task types of subtasks with the agent's supported task types to assign subtasks to agents whose supported task types match the agent's task type. Specifically, when the task type of a subtask is at least one of the agent's supported task types, it means that the subtask's task type matches the agent's supported task type successfully; when the task type of a subtask is not any of the agent's supported task types, it means that the subtask's task type does not match the agent's supported task type successfully.

[0065] In addition to the supported task types mentioned above, the agent information may also include agent performance parameters and the number of tasks to be executed. Agent performance parameters include, but are not limited to, task execution efficiency and task success rate. Higher agent performance parameters indicate better agent performance, and vice versa. Therefore, the agent with the highest performance and the smallest number of tasks to be executed can be selected as the agent for the subtask. It is understood that the agent performance parameters can be dynamically updated in real time based on the execution results of the subtask to improve the accuracy of the agent performance parameters and thus improve task execution efficiency.

[0066] Understandably, the agent assigned to a subtask is typically the one whose task type matches the subtask's task type, has the highest performance parameters, and the smallest number of tasks to be executed. These tasks include subtasks of other tasks and subtasks of the current task. The number of tasks to be executed for an agent is dynamically updated. Specifically, the scheduler increments the agent's number of tasks to be executed by 1 each time it assigns a subtask to an agent; when the agent successfully executes a subtask, it can decrement its number of tasks to be executed by 1 through the scheduler; when the agent fails to execute a subtask and the scheduler reassigns it to a candidate agent, the scheduler decrements the agent's number of tasks to be executed by 1. It can be seen that a communication connection is needed between the agent and the scheduler so that the agent can report the execution results of the subtask to the scheduler, and the scheduler needs to send subtask information to the agent.

[0067] In some possible implementations, the scheduler assigns agents to the subtasks of a node, including: The scheduler extracts the task type of the subtask from the subtask information of the node; the scheduler selects the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system; the scheduler selects the intelligent agent of the subtask from the target intelligent agent based on the intelligent agent information.

[0068] The aforementioned target agents are specific to each subtask. Each subtask's target agent includes one or more agents that support a task type matching the subtask's task type. Agents with task type matching typically have the highest execution efficiency and success rate when executing the task. When a subtask lacks a target agent, it can be assigned to an agent whose task type is most similar to the target agent's, thus maximizing the agent's success rate and efficiency in executing the subtask.

[0069] The similarity between the supported task types of an agent and the task types can be evaluated from multiple dimensions such as the number of execution steps and the execution goal. The closer the number of execution steps and the closer the execution goals, the higher the similarity between the two.

[0070] After obtaining the target agent, a suitable agent can be selected for the subtask from the target agents based on the agent information. The agent for the subtask can include agents whose information meets preset conditions, such as having the fewest tasks to be executed and the highest agent performance parameters. In one implementation, the scheduler selects the agent for the subtask from the target agents based on the agent information, including: The scheduler extracts agent performance parameters and the number of tasks to be executed from the agent information; the scheduler selects the agent with the largest performance parameters and / or the fewest tasks to be executed from the target agents and assigns it to the subtask.

[0071] In one embodiment, the scheduler can use a weighted sum of the agent's performance parameters and the amount of tasks to be executed as a comprehensive evaluation parameter for the agent. Both the agent's performance parameters and the amount of tasks to be executed are positively correlated with the comprehensive evaluation parameter. The weights corresponding to the agent's performance parameters and the amount of tasks to be executed can be flexibly set according to actual needs to adjust the degree of influence of the agent's performance parameters and the amount of tasks to be executed on the selection of the agent. When it is necessary to focus on agent performance, the weight of the agent's performance parameters can be greater than the weight of the amount of tasks to be executed; when it is necessary to focus on execution waiting time, the weight of the agent's performance parameters can be less than the weight of the amount of tasks to be executed.

[0072] In other implementations, the scheduler can sort multiple target agents according to the amount of tasks to be executed and the agent performance parameters, and use the target agent ranked first as the agent of the subtask.

[0073] After assigning an agent to a subtask, the scheduler can send the subtask information to the agent so that the agent can execute the subtask as quickly as possible.

[0074] In some possible implementations, the scheduler sends subtask information of a subtask to the corresponding agent, including: The scheduler determines the execution dependency information of each subtask based on the dependent subtask identifiers included in the subtask information. The execution dependency information includes dependent subtask identifiers and dependent agent identifiers. The scheduler then sends the execution dependency information and subtask information of the subtask to the assigned agent.

[0075] In this context, a subtask's dependent subtask identifier indicates its dependent subtasks. A subtask may have one or more dependent subtasks, or it may have no dependent subtasks. A subtask's dependent agent identifier is the agent identifier corresponding to its dependent subtask. A subtask may have one or more agent identifiers, and one or more dependent subtasks may correspond to the same dependent agent. For example, when... Figure 3 Subtask CT1 is assigned to agent A1. Figure 3 When subtask CT4 is assigned to agent A2, since subtask CT4 depends on subtask CT1, the identifier of the dependent subtask of subtask CT4 is the identifier of subtask CT1, and the identifier of the dependent agent of subtask CT4 is the identifier of agent A1.

[0076] In embodiments of this application, when a subtask has dependent subtasks, the dependent subtask identifier and the dependent agent identifier are sent to the agent along with the subtask information to enable communication between the agent and the dependent agent. For example, as... Figure 3 Subtask CT1, as shown, has no dependent subtasks or dependent agents. Specifically, the agent obtains the task output of the dependent subtask from the dependent agent based on the dependent agent identifier and the dependent subtask identifier, and then executes the subtask based on the task output of the dependent subtask and the subtask information. The task output includes whether the execution was successful, the execution time, and the task output result. For example, when the dependent subtask is an intelligent writing task, the task output is the written article. The task output of the dependent subtask of a subtask can be used as the input of that subtask. For example, the subtask can be an article correction task, whose dependent subtask is the aforementioned intelligent writing task, to correct the article output by the intelligent writing task.

[0077] Understandably, if a subtask does not depend on a subtask identifier, it also does not depend on an agent identifier. In this case, the scheduler only needs to send the subtask information to the agent.

[0078] As can be seen from the above, the embodiments of this application can realize the interconnection between intelligent agents of different subtasks of the same task by executing dependency information, thus accurately realizing complex tasks.

[0079] Based on the above execution dependency information, the agent executes the corresponding sub-tasks, including: The first agent among multiple agents obtains the task output of the second subtask, which the first subtask depends on, from the second agent on which the first subtask depends, based on the execution dependency information of the first subtask. The first agent then executes the first subtask based on the task output of the second subtask and the subtask information of the first subtask, obtaining the execution result information of the first subtask. The execution result information of each subtask includes not only its task output but also other relevant information, such as start time, end time, and whether execution was successful. Correspondingly, the task output is obtained by integrating the task outputs of the subtasks, and the task execution result information includes not only the task output but also other relevant information, such as start time, end time, and whether execution was successful.

[0080] In this system, the first intelligent agent is any intelligent agent in the intelligent task system, and the first subtask is any subtask to be executed by the first intelligent agent. The second subtask is a dependent subtask of the first subtask, determined by the dependent subtask identifier included in the execution dependency information of the first subtask. The second intelligent agent is the intelligent agent corresponding to the second subtask, determined by the dependent intelligent agent identifier included in the execution dependency information of the first subtask.

[0081] As can be seen, the embodiments of this application realize the associated execution of different subtasks of the same task through execution dependency information, and their execution has a sequential order in terms of time; while the independent subtasks of the same task can be executed in parallel, and their execution has horizontal independence in terms of time.

[0082] In some possible implementations, the first agent among multiple agents obtains the task output results of historical subtasks from the first agent or the third agent according to the task type of the first subtask, and executes the first subtask according to the task output results of historical subtasks and the subtask information of the first subtask. The historical subtasks and the first subtask belong to the same task type, and the supported task types of the third agent are the same as those of the first agent.

[0083] Here, historical subtasks are executed subtasks of the same task type as the first subtask. Historical subtasks can be executed by either the first or third agent, with the third agent supporting the same task types as the first agent. For example, ... Figure 3 The subtask CT3 shown can obtain the task output results of historical subtasks from agent A3, where CT3 resides, and can also obtain the task output results of historical subtasks of the same type from agent A4, where CT4 resides. Agent A4 supports the same task types as agent A3.

[0084] When executing the first subtask, the first agent can refer to the task output of the previous subtask. If the subtask information of the previous subtask is exactly the same as that of the first subtask, including the same task content and task type, then the first agent can use the task output of the previous subtask as the task output of the first subtask. If the subtask information of the previous subtask is not exactly the same as that of the first subtask, then the first agent can adjust the task output of the previous subtask based on the differences between the subtask information of the first subtask and use it as the task output of the first subtask.

[0085] In addition, the task output can also include user preferences, error feedback, etc., so as to better generate the task output of the first subtask.

[0086] Thus, the embodiments of this application have historical memory capabilities, which allow the first subtask to be executed by referring to historical subtasks in terms of time sequence. This can minimize the execution complexity of the first subtask and improve its execution efficiency.

[0087] In some implementations, when the first subtask has dependent subtasks, the first subtask can be executed based on the task outputs of the dependent subtasks, the task outputs of historical subtasks, and the subtask information of the first subtask. Specifically, the task outputs are used as inputs to the first subtask, and the task output of the first subtask is generated with reference to the task outputs of historical subtasks. The dependency information of the first subtask can be represented in JSON format, including: task identifier, subtask identifier, agent identifier, dependent agent identifier, historical task identifier, historical subtask identifier, and the agent identifier of the historical subtask.

[0088] In the aforementioned intelligent task system, each agent may encounter anomalies while executing subtasks. To ensure the success rate of task execution, the unfinished subtasks on the malfunctioning agent need to be switched to a backup agent for execution, thus providing a fallback for the malfunctioning agent. In some possible implementations, when the fourth agent malfunctions, the scheduler determines a backup agent corresponding to the fourth agent and sends the subtask information and execution dependency information of the unfinished third subtask from the fourth agent to the backup agent, enabling the backup agent to execute the third subtask. The fourth agent and the backup agent correspond to the same supported task type. The scheduler then determines a fifth agent corresponding to the fourth subtask that depends on the third subtask. On the fifth agent, the scheduler adjusts the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the backup agent.

[0089] Whether each agent is abnormal can be determined by the reports sent by the agent to the scheduler. For example, an agent can send periodic keep-alive messages to the scheduler. When the scheduler receives such a message, it determines that the agent is normal, and / or, when an agent is abnormal, it sends an exception message to the scheduler. In this way, the scheduler can monitor the status of each agent in real time to determine whether it has become abnormal.

[0090] The fourth agent is any agent that malfunctions in the intelligent task system. In this embodiment, a backup agent can be assigned to one or more agents. The backup agent is used to execute any unfinished subtasks when the corresponding agent malfunctions. Unfinished subtasks include both unexecuted and currently executing subtasks.

[0091] When assigning agents to subtasks of a task, agents are selected only from non-candidate agents, and no subtasks are assigned to candidate agents. This ensures the performance of candidate agents, allowing them to execute the switched-in third subtask as quickly as possible when needed, thus guaranteeing the execution efficiency and success rate of the third subtask.

[0092] In this embodiment, when the fourth agent malfunctions, not only can the smooth execution of the third subtask be guaranteed, but the dependent agent identifiers of the fourth subtask are also adjusted in a timely manner. This ensures that the fifth agent containing the fourth subtask can successfully obtain the task output of the third subtask from the candidate agents, preventing the fourth subtask from failing due to lack of input and thus improving its execution success rate. In other words, the intelligent task system of this embodiment has a certain degree of fault tolerance.

[0093] In this embodiment, to manage task execution, tasks need to be stored according to certain rules. Specifically, the scheduler creates a session class for each task and records task information through the session class. This task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information for each subtask, execution result information for each subtask, agent identifier for each subtask, dependencies between agents, agent information, and execution result information. When task execution ends, the scheduler stores the session class in a distributed database, such as NoSQL (Not Only SQL), through its memory unit. SQL (Structured Query Language) is a relational database system. Furthermore, frequently accessed session class records from recent periods can be stored in a Redis (Remote Dictionary Server) database to further improve access efficiency.

[0094] The task identifier is used to uniquely identify a task.

[0095] User information refers to the information of the user who initiated the task, including but not limited to: username, account, etc.

[0096] A subtask identifier is used to uniquely identify a subtask within a task. Subtask identifiers may be the same between different tasks. Therefore, each subtask is uniquely identified by both the task identifier and the subtask identifier.

[0097] The information on subtasks can be found in the previous description and will not be repeated here.

[0098] The execution result information of a subtask includes, but is not limited to: whether the subtask was executed successfully, the task output of the subtask, the execution duration of the subtask, the start time of execution, and the end time of execution.

[0099] The agent identifier for a subtask is the identifier of the agent that performs the subtask.

[0100] The dependencies of an agent are consistent with the dependencies between the subtasks performed by the agent. For example, if agent A3's subtask CT3 depends on agent A1's subtask CT1, then agent A3 depends on agent A1.

[0101] The information about the intelligent agent can be found in the foregoing description and will not be repeated here.

[0102] The task execution result information is the integrated result of the execution results of each subtask of the task, and may include, but is not limited to: whether the task was executed successfully, the task execution duration, the task output results, the start execution time, and the end execution time. Whether the task was executed successfully is determined by whether each subtask was executed successfully. The task is considered successful when all subtasks are executed successfully, and unsuccessful when at least one subtask fails. The task execution duration is the time from the start of the first subtask to the end of the last subtask, where the start time of the first subtask corresponds to the start execution time of the task, and the end time of the last subtask corresponds to the end execution time of the task. The task output results are the output results of some or all of its subtasks.

[0103] It should be noted that each task corresponds to a session class, which stores all relevant task information for that task. This facilitates subsequent querying of task-related information for monitoring and optimization of the intelligent task system. Furthermore, the task output results of historical subtasks obtained by the first agent when executing the first subtask can also be retrieved from the storage unit. Specifically, the first agent can traverse each session class in the storage unit to match the task type in each subtask information within that session class with the task type of the first subtask. The subtasks corresponding to the successfully matched subtask information are then used as historical subtasks, and the execution result information of these historical subtasks is obtained to extract their task output results.

[0104] Of course, after storing the aforementioned session classes, users can flexibly query task information from multiple dimensions. For example, they can query task information corresponding to target user information, or execution result information corresponding to target task types, etc.

[0105] In some possible implementations, the method further includes: the scheduler receiving the task output results of multiple subtasks of the task; the scheduler extracting output rule information from the task requirement information, and integrating the task output results of multiple subtasks according to the output rule information to obtain the task output result of the task.

[0106] The output rule information indicates the rules for integrating the task outputs of each subtask, and can be user-specified. When the task requirement information does not contain output rule information, the task outputs of each subtask can be integrated using the default output rules.

[0107] This application embodiment allows users to specify output rule information to improve the flexibility and dynamism of task output results, ensuring that the task output results meet user needs. For example, the task output rule can be to integrate the task output results of each subtask in JSON (JavaScript Object Notation) format, and arrange the task output results of different subtasks according to the dependency relationship of the subtasks.

[0108] After each subtask is executed and / or after the entire task is completed, the agent can update its agent information based on the execution results of the subtasks it executed. This includes updating the agent's supported task types and / or performance parameters and / or the number of tasks to be executed. The agent can report this information to the scheduler, allowing the scheduler to use the updated agent information when assigning agents to subtasks in subsequent assignments. This real-time agent information allocation effectively improves the accuracy of the allocation results, contributing to higher task execution success rates and efficiency.

[0109] For the above-mentioned supported task types, the execution result information of the subtasks also includes whether the subtask was executed successfully and its execution time. If the agent fails to execute the same task type consecutively a number of times, greater than or equal to a preset threshold, and / or the agent's execution time for the task type is greater than or equal to a preset time threshold, then the task type will be removed from the agent's supported task types. The agent will no longer execute subtasks of that task type subsequently.

[0110] Regarding the aforementioned agent performance parameters, the execution result information for subtasks includes whether the subtask was successfully executed and its execution duration. The agent can update its performance parameters based on the execution duration of the subtask, including updating the execution duration and success rate for that task type. Specifically, the average execution duration of the agent for that task type can be calculated with the execution duration of the recently completed subtask, resulting in the updated execution duration for that task type. For the success rate, the agent first increments the execution count for that task type by 1. Then, it updates the success count based on whether the subtask was successfully executed; if the subtask was successful, the success count is incremented by 1. Finally, the ratio of the success count to the total execution count is used as the success rate for that task type.

[0111] For the above-mentioned number of tasks to be executed, after the agent executes the sub-task, the number of tasks to be executed for that agent can be reduced by 1.

[0112] In summary, the embodiments of this application can dynamically adjust agent information based on the execution results of subtasks, enabling the scheduler to combine dynamic and real-time agent information for subsequent agent allocation. This helps improve the rationality of agent allocation and increase task execution success rate and efficiency. Furthermore, when executing subtasks, agents can consider not only the dependencies between different subtasks within the same task but also historical subtasks, further improving execution success rate and efficiency. Finally, task information is recorded based on the task to facilitate subsequent viewing, backtracking, and optimization.

[0113] Figure 5 This is a flowchart illustrating the steps of another multi-agent task execution method in this application embodiment, referring to... Figure 5 As shown, the above multi-agent task execution method includes the following steps: S201. The scheduler extracts the number of subtasks and task execution logic from the task requirement information through the large language model, so as to split the task into multiple subtasks according to the number of subtasks and task execution logic, and obtain multiple subtask information.

[0114] S202. The scheduler creates a task tree consisting of multiple subtasks of a task based on the dependent subtask identifiers included in the information of multiple subtasks. Each node in the task tree corresponds to a subtask, and the subtasks of the child node depend on the subtasks of the parent node.

[0115] S203. The scheduler traverses the nodes from the root node to the leaf node in the task tree to extract the task type of the subtask from the subtask information of the node.

[0116] S204. The scheduler selects the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system, and extracts the intelligent agent performance parameters and the number of tasks to be executed from the intelligent agent information.

[0117] S205. The scheduler selects the agent with the highest performance parameters and / or the fewest tasks from the target agents and assigns it to the subtask.

[0118] S206. The scheduler determines the execution dependency information of each subtask based on the dependent subtask identifier included in the subtask information, and sends the execution dependency information and subtask information to the assigned agent. The execution dependency information includes the dependent subtask identifier and the dependent agent identifier.

[0119] S207. The first intelligent agent among multiple intelligent agents obtains the task output result of the second subtask that the first subtask depends on from the second intelligent agent that the first subtask depends on, based on the execution dependency information of the first subtask. It also obtains the task output result of the historical subtask from the first intelligent agent or the third intelligent agent based on the task type of the first subtask. The historical subtask and the first subtask belong to the same task type. The supported task type of the third intelligent agent is the same as the supported task type of the first intelligent agent.

[0120] S208. The first agent executes the first subtask based on the task output of the second subtask, the task output of the historical subtasks, and the subtask information of the first subtask, obtains the execution result information of the first subtask, and updates the agent information based on the execution result information.

[0121] S209. The scheduler receives the task output results of multiple subtasks of the task and extracts the output rule information from the task requirement information to integrate the task output results of multiple subtasks according to the output rule information to obtain the task output result of the task.

[0122] S210. The scheduler creates a session class for each task and records the task information through the session class. The task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information of each subtask, execution result information of each subtask, agent identifier of each subtask, dependency relationship between agents, agent information of agents, and execution result information of the task.

[0123] S211. When the task execution ends, the scheduler stores the session class in the distributed database.

[0124] S212. When the fourth agent malfunctions, the scheduler determines the candidate agent corresponding to the fourth agent and sends the subtask information and execution dependency information of the third subtask that the fourth agent has not completed to the candidate agent, so that the candidate agent can execute the third subtask. The fourth agent and the candidate agent correspond to the same supported task type.

[0125] S213. The scheduler determines the fifth agent corresponding to the fourth subtask that depends on the third subtask, and on the fifth agent, adjusts the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the candidate agent.

[0126] It is understandable that S212 and S213 above refer to the process of any agent executing a subtask after an agent has been assigned to it. The execution process of the third and fourth subtasks refers to the process of executing the first subtask in S207 to S208.

[0127] It should be noted that S201 to S213 described above can be referred to the foregoing embodiments for explanation, and will not be repeated here. In addition, the order of S201 to S213 can be flexibly adjusted on the basis of mutual independence, and the embodiments of this application do not limit the order of them.

[0128] Figure 1 This is a schematic diagram of the structure of an intelligent task system according to an embodiment of this application, such as... Figure 1 As shown, the intelligent task system may include a scheduler and multiple intelligent agents.

[0129] The scheduler is used to: upon receiving task requirement information for a task, split the task into multiple subtasks according to the task requirement information, obtain multiple subtask information, and allocate the multiple subtasks to the agents in the intelligent task system according to the multiple subtask information and the agent information corresponding to the multiple agents, so as to send the subtask information to the corresponding agents.

[0130] The intelligent agent is used to: execute subtasks based on received subtask information, obtain subtask execution result information, and update the intelligent agent information based on the execution result information.

[0131] Optionally, the scheduler is also used for: The number of subtasks and task execution logic are extracted from the task requirement information using a large language model. Based on the number of subtasks and task execution logic, the task is split into multiple subtasks, resulting in multiple subtask information.

[0132] Optionally, the scheduler is also used for: Based on the dependent subtask identifiers included in the information of multiple subtasks, a task tree consisting of multiple subtasks of the task is created. Each node in the task tree corresponds to a subtask, and the subtasks of the child node depend on the subtasks of the parent node. Along the direction from the root node to the leaf node of the task tree, an agent is assigned to the subtask of each node one by one. The assigned agent is related to the subtask information and agent information of the subtask.

[0133] Optionally, the scheduler is also used for: Extract the task type of the subtask from the subtask information of the node; select the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system; select the intelligent agent of the subtask from the target intelligent agent based on the intelligent agent information.

[0134] Optionally, the scheduler is also used for: Extract agent performance parameters and the amount of tasks to be executed from agent information; select the agent with the largest performance parameters and / or the fewest tasks to be executed from the target agents and assign it to the subtask.

[0135] Optionally, the scheduler is also used for: Based on the dependent subtask identifiers included in the subtask information of each subtask, the execution dependency information of the subtask is determined. The execution dependency information includes the dependent subtask identifier and the dependent agent identifier. The execution dependency information and the subtask information are then sent to the assigned agent.

[0136] Optionally, the first agent among multiple agents is further used for: Based on the execution dependency information of the first subtask, obtain the task output result of the second subtask that the first subtask depends on from the second agent that the first subtask depends on; based on the task output result of the second subtask and the subtask information of the first subtask, execute the first subtask and obtain the execution result information of the first subtask.

[0137] Optionally, the first agent among multiple agents is further used for: Based on the task type of the first subtask, obtain the task output of the historical subtask from the first agent or the third agent, and execute the first subtask based on the task output of the historical subtask and the subtask information of the first subtask. The historical subtask and the first subtask belong to the same task type, and the supported task types of the third agent are the same as those of the first agent.

[0138] Optionally, the scheduler is further configured to: when the fourth agent malfunctions, determine the candidate agent corresponding to the fourth agent, and send the subtask information and execution dependency information of the third subtask that the fourth agent has not completed to the candidate agent, so that the candidate agent can execute the third subtask, and the fourth agent and the candidate agent correspond to the same supported task type; determine the fifth agent corresponding to the fourth subtask that depends on the third subtask; and on the fifth agent, adjust the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the candidate agent.

[0139] Optionally, the scheduler is also used to: create a session class for the task, and record the task information through the session class. The task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information of each subtask, execution result information of each subtask, agent identifier of each subtask, dependency relationship between agents, agent information of agents, and execution result information of the task; and store the session class in the distributed database when the task execution ends.

[0140] Optionally, the scheduler is also used for: Receive the task outputs of multiple subtasks of the task; extract output rule information from the task requirement information, and integrate the task outputs of multiple subtasks according to the output rule information to obtain the task output.

[0141] The above embodiments are device embodiments corresponding to the aforementioned method embodiments, and have the same implementation scheme and beneficial effects as the method embodiments, which will not be repeated here.

[0142] This application also provides an electronic device 900, such as... Figure 6 As shown, it includes a processor 9001, a communication interface 9002, a memory 9003, and a communication bus 9004, wherein the processor 9001, the communication interface 9002, and the memory 9003 communicate with each other through the communication bus 9004.

[0143] The memory 9003 is used to store computer programs; the processor 9001 is used to execute the program stored in the memory 9003 to implement the multi-agent task execution method provided in the above embodiments.

[0144] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0145] The communication interface is used for communication between the aforementioned terminal and other devices.

[0146] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0147] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0148] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the multi-agent task execution methods described in the above embodiments.

[0149] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the multi-agent task execution methods described in the above embodiments.

[0150] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0151] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0152] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.

[0153] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0154] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A multi-agent task execution method, characterized in that, Applied to an intelligent task system, the intelligent task system comprising: a scheduler and multiple intelligent agents, the method comprising: When the scheduler receives the task requirement information of a task, it splits the task into multiple sub-tasks according to the task requirement information to obtain multiple sub-task information. The scheduler assigns the multiple subtasks to the intelligent agents in the intelligent task system based on the multiple subtask information and the intelligent agent information corresponding to the multiple intelligent agents, and sends the subtask information to the corresponding intelligent agents. The agent executes the subtask according to the received subtask information, obtains the execution result information of the subtask, and updates the agent information according to the execution result information.

2. The method according to claim 1, characterized in that, The scheduler divides the task into multiple subtasks according to the task requirement information, obtaining information on multiple subtasks, including: The scheduler extracts the number of subtasks and task execution logic from the task requirement information using a large language model, and then splits the task into multiple subtasks based on the number of subtasks and the task execution logic to obtain information about the multiple subtasks.

3. The method according to claim 1, characterized in that, The scheduler assigns the multiple subtasks to the agents in the intelligent task system based on the multiple subtask information and the agent information corresponding to the multiple agents, including: The scheduler creates a task tree consisting of multiple subtasks of the task based on the dependent subtask identifiers included in the multiple subtask information. Each node in the task tree corresponds to a subtask, and the subtask of the sub-node depends on the subtask of the parent node. The scheduler assigns an agent to each subtask of the task tree from the root node to the leaf node, and the assigned agent is related to the subtask information and the agent information of the subtask.

4. The method according to claim 3, characterized in that, The scheduler assigns agents to the subtasks of the node, including: The scheduler extracts the task type of the subtask from the subtask information of the node; The scheduler selects the target intelligent agent corresponding to the task type from multiple intelligent agents in the intelligent task system; The scheduler selects the agent for the subtask from the target agents based on the agent information.

5. The method according to claim 4, characterized in that, The scheduler selects the agent for the subtask from the target agents based on the agent information, including: The scheduler extracts agent performance parameters and the number of tasks to be executed from the agent information; The scheduler selects the agent with the highest performance parameters and / or the fewest tasks from the target agents and assigns it to the subtask.

6. The method according to claim 1, characterized in that, The scheduler sends the subtask information to the corresponding intelligent agent, including: The scheduler determines the execution dependency information of the subtask based on the dependent subtask identifier included in the subtask information of each subtask. The execution dependency information includes the dependent subtask identifier and the dependent agent identifier. The scheduler sends the execution dependency information of the subtask and the subtask information to the assigned agent.

7. The method according to claim 6, characterized in that, The intelligent agent executes the subtask according to the received subtask information and obtains the execution result information of the subtask, including: The first intelligent agent among the plurality of intelligent agents obtains the task output result of the second subtask that the first subtask depends on from the second intelligent agent that the first subtask depends on, based on the execution dependency information of the first subtask; The first intelligent agent executes the first subtask based on the task output result of the second subtask and the subtask information of the first subtask, and obtains the execution result information of the first subtask.

8. The method according to claim 6, characterized in that, The intelligent agent executes the subtask according to the received subtask information and obtains the execution result information of the subtask, including: The first agent among the plurality of agents obtains the task output result of the historical subtask from the first agent or the third agent according to the task type of the first subtask, and executes the first subtask according to the task output result of the historical subtask and the subtask information of the first subtask. The historical subtask and the first subtask belong to the same task type, and the supported task type of the third agent is the same as that of the first agent.

9. The method according to any one of claims 1 to 8, characterized in that, Also includes: When the fourth agent malfunctions, the scheduler determines the candidate agent corresponding to the fourth agent and sends the subtask information and execution dependency information of the third subtask that the fourth agent has not completed to the candidate agent, so that the candidate agent can execute the third subtask. The fourth agent and the candidate agent correspond to the same supported task type. The scheduler determines the fifth agent corresponding to the fourth subtask that depends on the third subtask; The scheduler, on the fifth agent, adjusts the dependent agent identifier included in the execution dependency information of the fourth subtask to the identifier of the candidate agent.

10. The method according to claim 9, characterized in that, Also includes: The scheduler creates a session class for the task and records the task information through the session class. The task information includes: task identifier, user information corresponding to the task, subtask identifier, subtask information of each subtask, execution result information of each subtask, agent identifier of each subtask, dependency relationship between agents, agent information of the agents, and execution result information of the task. When the task execution ends, the scheduler stores the session class in a distributed database.

11. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The scheduler receives the task output results of multiple subtasks of the task; The scheduler extracts output rule information from the task requirement information and integrates the task output results of the multiple subtasks according to the output rule information to obtain the task output result.

12. An intelligent task system, characterized in that, Includes a scheduler and multiple agents; The scheduler is configured to: upon receiving task requirement information for a task, divide the task into multiple subtasks according to the task requirement information to obtain multiple subtask information, and allocate the multiple subtasks to the intelligent agents in the intelligent task system according to the multiple subtask information and the intelligent agent information corresponding to the multiple intelligent agents respectively, so as to send the subtask information to the corresponding intelligent agents. The intelligent agent is used to: execute the subtask according to the received subtask information, obtain the execution result information of the subtask, and update the intelligent agent information according to the execution result information.

13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 11.

15. A computer program, characterized in that, The computer program is executed by a computer to implement the method as described in any one of claims 1 to 11.