Multi-agent task collaboration method, equipment and medium
By using the MCP protocol and the cooperative bus for dynamic service registration and routing allocation, the problems of high communication costs and poor load adaptability in traditional multi-agent systems are solved, and efficient agent collaboration and task execution are achieved.
Patent Information
- Application Number
- CN202510989807.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-07
AI Technical Summary
In traditional multi-agent systems, communication between agents relies on customized interfaces, which are costly to develop, lack unified encapsulation standards, are difficult to adapt to dynamic load fluctuations, and existing protocols only support one-way communication or simple service discovery, making it difficult to achieve bidirectional collaborative reasoning and multimodal data fusion.
The MCP protocol is used to register the functions of intelligent agents to the dynamic service catalog, decompose tasks into subtasks and match them with capabilities, use the cooperative bus for dynamic routing allocation, and define task dependencies based on a directed acyclic graph to achieve efficient collaboration between intelligent agents.
It reduces development costs, improves task execution efficiency, avoids node overload or idleness, and ensures the correctness of complex task processes and the overall system throughput.
Smart Images

Figure CN120909775A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of artificial intelligence, and in particular to a multi-agent task coordination method, device and medium. BACKGROUND
[0002] With the rapid development of artificial intelligence technology, multi-agent coordination systems have become the core technology architecture in the fields of industrial manufacturing, smart cities, medical health, etc. In the intelligent manufacturing scenario, multi-agents need to coordinate to complete complex tasks such as production scheduling and quality detection; in the field of smart cities, scenarios such as traffic management and emergency response require real-time coordination of multi-agents; the medical health field relies on multi-agent systems to realize remote diagnosis and treatment, medical data analysis and other functions. These application scenarios have higher requirements for task coordination between agents.
[0003] Currently, in the traditional architecture, communication between agents relies on customized interfaces, and each agent needs to be individually adapted to different data sources and tool chains, lacking a unified encapsulation standard, resulting in a high development cycle and maintenance cost. In addition, the current task allocation mechanism or static micro-service architecture for task allocation is difficult to adapt to dynamic load fluctuations. And the existing protocol only supports one-way communication or simple service discovery, and is difficult to support bidirectional collaborative reasoning and multi-modal data fusion. SUMMARY
[0004] To solve the above technical problems, one or more embodiments of the present specification provide a multi-agent task coordination method, device and medium.
[0005] One or more embodiments of the present specification adopt the following technical solutions:
[0006] One or more embodiments of the present specification provide a multi-agent task coordination method, the method comprising:
[0007] registering the functions corresponding to each agent to a dynamic service directory through an MCP protocol;
[0008] disassembling a to-be-executed task to obtain a plurality of to-be-executed sub-tasks, matching each to-be-executed sub-task with the capability range of each agent in the dynamic service directory, and establishing a communication channel between each to-be-executed sub-task and the corresponding agent;
[0009] dynamically routing and distributing the to-be-executed sub-tasks through a coordination bus, and selecting the optimal execution node according to the real-time requirements of the sub-tasks and the node load state of each corresponding agent;
[0010] determining the execution mode of each to-be-executed sub-task according to the sub-task dependency relationship defined by a directed acyclic graph;
[0011] The optimal execution node implements execution of each of the to-be-executed sub-tasks based on the communication channel and the execution mode of each of the to-be-executed sub-tasks.
[0012] Optionally, in one or more embodiments of the present specification, the functions corresponding to each of the agents are registered to the dynamic service directory through the MCP protocol, specifically including:
[0013] Based on the MCP service encapsulation mechanism, the function modules of each of the agents are encapsulated to generate a service description file of the agent.
[0014] According to the service description file of each of the agents, an initial service directory is determined.
[0015] The state of each of the agents is detected through a heartbeat mechanism.
[0016] If it is determined that the agent is started, a tool interface metadata of the agent is registered to dynamically update the initial service directory to obtain a dynamic service directory; wherein the tool interface metadata includes a function interface specification, an input / output data format, and a service quality level.
[0017] Optionally, in one or more embodiments of the present specification, the to-be-executed task is disassembled to obtain a plurality of to-be-executed sub-tasks, specifically including:
[0018] The application field corresponding to the to-be-executed task is determined to perform semantic analysis on the to-be-executed task based on the database corresponding to the application field to identify key elements of the task.
[0019] Based on the key elements, the functional requirements and task dependency information corresponding to the to-be-executed task are determined.
[0020] According to the functional requirements and the task dependency information, the to-be-executed task is disassembled to obtain a plurality of to-be-executed sub-tasks; wherein the to-be-executed sub-tasks correspond to the functions of one or more agents.
[0021] Optionally, in one or more embodiments of the present specification, each of the to-be-executed sub-tasks is matched with the capability range of each of the agents in the dynamic service directory to establish a communication channel between each of the to-be-executed sub-tasks and the corresponding agent, specifically including:
[0022] The functional requirements corresponding to each of the to-be-executed sub-tasks are determined to match the functional requirements with the capability range of the agent, and each of the to-be-executed sub-tasks is mapped to the corresponding agent.
[0023] According to the interface specification of the to-be-executed sub-task and the corresponding agent, a protocol adaptation layer is dynamically generated to convert the interface of the corresponding agent into a standardized format.
[0024] The converted interface of the corresponding agent is based on establishing a communication channel between each to-be-executed subtask and the corresponding agent; wherein, the communication channel enables a preset encryption algorithm.
[0025] Optionally, in one or more embodiments of the present specification, the to-be-executed subtasks are dynamically routed and distributed through the collaborative bus, and before selecting the optimal execution node according to the real-time demand of the subtask and the node load state of each corresponding agent, the method further comprises:
[0026] Based on the preset hierarchical structure, a hierarchical architecture of the collaborative bus is constructed to obtain the collaborative bus, so that the collaborative bus realizes 0-RTT handshake and multiplexing based on the QUIC protocol; wherein, the preset hierarchical structure includes: a transport layer, a routing layer, and a service layer.
[0027] Optionally, in one or more embodiments of the present specification, the to-be-executed subtasks are dynamically routed and distributed through the collaborative bus, and the optimal execution node is selected according to the real-time demand of the subtask and the node load state of each corresponding agent, specifically comprising:
[0028] Real-time collection of dynamic indicators of each of the corresponding agents to determine the availability score corresponding to each of the corresponding agents based on the dynamic indicators; wherein, the dynamic indicators include: CPU utilization, memory occupation, and network delay indicators;
[0029] Analyzing the metadata tags corresponding to the to-be-executed subtasks to determine the key features of each of the to-be-executed subtasks;
[0030] Based on the availability score and the key features, the nodes of the corresponding agent are screened to determine the optimal execution node.
[0031] Optionally, in one or more embodiments of the present specification, the execution mode of each of the to-be-executed subtasks is determined according to the subtask dependency relationship defined by the directed acyclic graph, specifically comprising:
[0032] Based on the directed acyclic graph of the to-be-executed task, the subtask dependency relationship of each of the to-be-executed subtasks is determined;
[0033] Based on the subtask dependency relationship, the execution type of the to-be-executed subtask is determined; wherein, the execution type includes: independent parallel type and associated serial type;
[0034] Based on the execution type and the task response time corresponding to each of the executed subtasks, the execution mode of each of the to-be-executed subtasks is determined; wherein, the execution mode includes: synchronous calling mode and asynchronous calling mode.
[0035] Optionally, in one or more embodiments of the present specification, after the optimal execution node implements execution of each of the to-be-executed sub-tasks based on the execution mode of each of the to-be-executed sub-tasks and the communication channel, the method further comprises:
[0036] monitoring, in real time, the running index of the optimal execution node and each of the corresponding intelligent agents, to dynamically allocate the optimal execution node corresponding to the to-be-executed sub-tasks based on the running index.
[0037] One or more embodiments of the present specification provide a task coordination device of multiple intelligent agents, the device comprising:
[0038] at least one processor; and,
[0039] a memory in communication connection with the at least one processor; wherein,
[0040] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above-mentioned methods.
[0041] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, which are configured to be able to perform any of the above-mentioned methods.
[0042] The above-mentioned at least one technical solution adopted by the embodiments of the present specification can achieve the following beneficial effects:
[0043] By registering the intelligent agent function to the dynamic service directory through the MCP protocol, the capability state of the intelligent agent can be updated in real time. By decomposing the to-be-executed task into sub-tasks, the most suitable intelligent agent can be matched for each sub-task according to the characteristics of the sub-task, and the task execution efficiency is improved. Through the capability mapping of the dynamic service directory, invalid calls and resource waste can be reduced. The collaboration bus dynamically selects the optimal execution node based on the sub-task demand and the load state of the intelligent agent node, avoids node overload or idleness, and improves the overall throughput of the system. By defining the sub-task dependency relationship through the directed acyclic graph, the order of task execution is clear, and the sub-tasks that can be executed in parallel can be automatically identified, which helps to avoid execution errors caused by dependency confusion and ensures the correctness of complex task flows. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and those skilled in the art can also obtain other drawings according to these drawings without creative labor. In the drawings:
[0045] Figure 1 This is a schematic diagram of a multi-agent task collaboration method provided in an embodiment of this specification;
[0046] Figure 2 This is a schematic diagram of the structure of a multi-agent task collaboration device provided in the embodiments of this specification;
[0047] Figure 3 This is a schematic diagram of the structure of a non-volatile storage medium provided in the embodiments of this specification. Detailed Implementation
[0048] This specification provides a multi-agent task collaboration method, device, and medium through its embodiments.
[0049] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0050] like Figure 1 As shown, this specification provides a flowchart illustrating a multi-agent task coordination method. Figure 1 As can be seen, in one or more embodiments of this specification, a multi-agent task cooperation method specifically includes:
[0051] S101: Register the functions corresponding to each intelligent agent to the dynamic service directory through the MCP protocol.
[0052] In existing technologies, communication between intelligent agents relies on diverse protocols, leading to the need for writing customized adaptation code for cross-platform tool integration, resulting in excessively high development costs. For example, in industrial scenarios, equipment control intelligent agents and data analysis intelligent agents need to interface with PLC controllers and PostgreSQL databases respectively, and interface differences lead to low collaboration efficiency. Traditional service-oriented solutions only support single-agent function encapsulation and lack dynamic service discovery and permission management mechanisms for multiple intelligent agents. Therefore, in the embodiments of this specification, to avoid the problem of excessive development costs caused by developers repeatedly writing adaptation code, the embodiments of this specification will register the functions corresponding to each intelligent agent to a dynamic service directory through the MCP protocol. Specifically, in one or more embodiments of this specification, registering the functions corresponding to each intelligent agent to a dynamic service directory through the MCP protocol includes:
[0053] Based on the MCP service encapsulation mechanism such as the JSON-RPC 2.0 protocol, the function modules of each agent are encapsulated to generate a service description file of the agent. Then, based on the service description file of each agent, an initial service directory is determined. Then, the state of each agent is detected through a heartbeat mechanism. If it is determined that the agent is started, the tool interface metadata of the agent is registered to dynamically update the initial service directory to obtain a dynamic service directory. It should be noted that the tool interface metadata includes a function interface specification, an input / output data format, and a service quality level.
[0054] That is, in a certain application scenario, the communication message structure of the MCP protocol is defined based on the protocol format design, the protocol layer definition, and the tool chain standardization. JSON-RPC 2.0 specification is adopted to support synchronous / asynchronous calling modes, and HTTP / 2 long connection and SSE streaming transmission are compatible. The multi-modal data processing capability is extended to support the joint encoding of Protobuf / Base64 hybrid serialization of text, image, and device control instructions. A dynamic service directory is constructed, and the service state is maintained through a heartbeat detection mechanism. When the service node is started, the tool interface metadata including the input / output mode and the authority level are automatically registered. The client obtains the available service list through the discover_services interface, supports fuzzy matching based on semantic similarity, and automatically maps "inventory query" to the MySQL / PostgreSQL driver to realize fine-grained permission control. The role permission information is transmitted by using a JWT token, and the server verifies the calling permission by using OAuth 2.0 Scope. Heterogeneous system adapter development: standardized adapters are developed for databases, IoT devices, and other heterogeneous systems to support automatic protocol conversion: PLC Modbus instructions, REST API, and other protocols are converted into MCP standard format. Service combination and arrangement: a DAG is used to define a complex service process, Apache Airflow is integrated to realize task scheduling, and breakpoint resume and error retry strategies are supported.
[0055] S102: The to-be-executed task is disassembled to obtain a plurality of to-be-executed subtasks, each to-be-executed subtask is matched with the capability range of each agent in the dynamic service directory, and a communication channel between each to-be-executed subtask and the corresponding agent is established.
[0056] In performing complex tasks, the task needs to be systematically disassembled first, and divided into multiple logical clear, clear boundary of the to-be-executed sub-tasks. The disassembly process needs to follow the internal structure and dependency of the task, to ensure that the sub-tasks are relatively independent and can be completed in coordination with the overall goal. Then match the to-be-executed sub-tasks with the agent capabilities in the dynamic service directory, and after successful matching, establish a dedicated communication channel between the to-be-executed sub-tasks and the agent. It needs to be noted that the dynamic service directory is a real-time updated resource pool, which records the function description, service state and performance indicators of each agent, and the matching process needs to be based on the demand of the to-be-executed sub-tasks and the ability of the agent to compare and match.
[0057] Specifically, in one or more embodiments of the present specification, the to-be-executed task is disassembled to obtain multiple to-be-executed sub-tasks, specifically including:
[0058] First, the system needs to identify the application field to which the to-be-executed task belongs, so as to perform semantic analysis on the to-be-executed task according to the database corresponding to the application field, and identify the key elements of the task. Then based on the key elements, determine the functional requirements and task dependency information corresponding to the to-be-executed task. According to the functional requirements and task dependency information, the to-be-executed task is disassembled to obtain multiple to-be-executed sub-tasks. Among them, the to-be-executed sub-tasks correspond to the functions of one or more agents, that is, the to-be-executed task completed by a single agent can not need to be further split, and the function of the sub-task matches the ability of an agent in the dynamic service directory.
[0059] Specifically, in one or more embodiments of the present specification, each to-be-executed sub-task is matched with the ability range of each agent in the dynamic service directory, and a communication channel between each to-be-executed sub-task and the corresponding agent is established, specifically including:
[0060] Each to-be-executed subtask has clear functional requirements, needs to be accurately matched with the agent capabilities registered in the dynamic service directory, so as to map each to-be-executed subtask to the corresponding agent. For example: the agent needs to declare its capability label when registering in the directory, the system matches the subtask requirements and the agent label through a semantic similarity algorithm, preferentially selects the agent with low load, fast response and high historical success rate, and ensures that the agent meets the additional conditions of the subtask to complete the matching. Since different agents may use heterogeneous interfaces, the system needs to dynamically generate a protocol adaptation layer to convert the interface into a standardized format. Therefore, according to the interface specification of the to-be-executed subtask and the corresponding agent, a protocol adaptation layer is dynamically generated to convert the interface of the corresponding agent into a standardized format. The converted interface of the corresponding agent is based on the establishment of a communication channel between each to-be-executed subtask and the corresponding agent; wherein the communication channel enables a preset encryption algorithm. Through the three-layer mechanism of accurate capability matching, protocol dynamic adaptation and secure channel establishment, the seamless integration and reliable communication of heterogeneous agents are realized, and the data security and system flexibility are guaranteed.
[0061] That is, in a certain application scenario, the client obtains a list of available services through the discover_services interface, supports fuzzy matching based on semantic similarity, such as automatically mapping "inventory query" to MySQL / PostgreSQL driver, and in order to realize fine-grained permission control, a JWT token is used to pass role permission information, and the server verifies the calling permission through OAuth2.0 Scope.
[0062] S103: Dynamically routing and distributing the to-be-executed subtask through the collaboration bus, and selecting the optimal execution node according to the real-time requirements of the subtask and the node load state of each corresponding agent.
[0063] In order to realize cross-domain collaboration and reduce transmission delay and improve task execution stability, in the embodiment of the present specification, the to-be-executed subtask is dynamically routed and distributed through the collaboration bus, and the optimal execution node is selected according to the real-time requirements of the subtask and the node load state of each corresponding agent.
[0064] Further, in one or more embodiments of the present specification, before the to-be-executed subtask is dynamically routed and distributed through the collaboration bus, and the optimal execution node is selected according to the real-time requirements of the subtask and the node load state of each corresponding agent, the method further comprises:
[0065] Based on the preset hierarchical structure, a hierarchical architecture of the collaborative bus is constructed to obtain the collaborative bus, so that the collaborative bus realizes 0-RTT handshake and multiplexing based on the QUIC protocol; wherein the preset hierarchical structure includes: a transport layer, a routing layer, and a service layer. That is, in a certain application scenario, the transport layer is based on the QUIC protocol to optimize the transmission efficiency in a high-delay network, and realizes multiplexing and 0-RTT handshake; the routing layer is to distribute requests by using a dynamic weight algorithm: node weight = (CPU utilization -1 × memory remaining × network bandwidth) / response delay; the service layer is to deploy a MCP Server cluster, and realize service state synchronization through Consul. In addition, a lightweight MCP Runtime is deployed on an edge node close to a data source to support local service execution and reduce the load of a central node; edge-cloud collaboration is realized: the context state is updated through a differential synchronization mechanism to reduce network transmission; and an intelligent caching mechanism is used to construct a three-level caching system as shown in Table 1. A load balancing algorithm is also used to realize dynamic weight adjustment based on reinforcement learning to support priority preemption: QoS levels are set for urgent tasks, and computing resources are allocated preferentially.
[0066] Table 1. Three-level caching system
[0067] Cache hierarchy Storage medium Hit scenario Expiration policy L1 Memory High-frequency read-write data LRU (50 ms) L2 Redis cluster Cross-node shared data TTL (5 minutes) L3 Distributed file system Historical data and model parameters Expiration by version number
[0068] Specifically, in one or more embodiments of the present specification, the to-be-executed sub-tasks are dynamically routed and distributed through the collaborative bus, and the optimal execution node is selected according to the real-time demand of the sub-tasks and the node load state of each corresponding agent, specifically including:
[0069] Real-time collection of dynamic indicators of each corresponding agent is performed to determine the availability score corresponding to each corresponding agent based on the dynamic indicators; wherein the dynamic indicators include: CPU utilization, memory occupation, and network delay indicators. Then, the metadata tags corresponding to the to-be-executed sub-tasks are analyzed to determine the key features of each to-be-executed sub-task. According to the obtained availability score and key features, the nodes of the agent corresponding to the to-be-executed sub-tasks are screened to determine the optimal execution node.
[0070] S104: Determine the execution mode of each to-be-executed sub-task according to the sub-task dependency relationship defined by the directed acyclic graph.
[0071] After the task decomposition is completed, the system constructs a directed acyclic graph (DAG) according to the dependency relationship of each subtask, wherein a node represents a subtask to be executed, and a directed edge represents the dependency relationship between tasks. The system performs topological sorting on the DAG to generate a linear subtask execution sequence and determine the execution mode of each subtask to be executed. That is, for a subtask to be executed without dependency, it can be executed in priority, and if multiple subtasks to be executed have no direct or indirect dependency, they can be executed in parallel to improve efficiency, otherwise they are executed in sequence.
[0072] Specifically, in one or more embodiments of the present specification, the execution mode of each subtask to be executed is determined according to the subtask dependency relationship defined by the directed acyclic graph, and specifically includes:
[0073] First, the subtask dependency relationship of each subtask to be executed is determined according to the directed acyclic graph of the task to be executed. Then, the execution type of the subtask to be executed is determined according to the subtask dependency relationship. It should be noted that the execution type includes an independent parallel type and an associated serial type. Then, the execution mode of each subtask to be executed is determined according to the execution type and the task response time corresponding to each executed subtask. It should be noted that the execution mode includes a synchronous call mode and an asynchronous call mode.
[0074] S105: The optimal execution node implements the execution of each subtask to be executed based on the communication channel and the execution mode of each subtask to be executed.
[0075] The system determines the optimal execution node of each subtask by evaluating the state of the agent in the dynamic service directory in real time before task execution, and then implements the execution of each subtask to be executed based on the communication channel and the execution mode of each subtask to be executed. The agent sends a heartbeat packet through the communication channel at regular intervals, and if it is not received within a certain time, the node is marked as abnormal. At this time, the long task reports the progress in stages to dynamically adjust the number of parallel tasks. If the node is disconnected, the system automatically reassigns the task to a backup node and recovers from the breakpoint. When the channel is abnormal, the local cache is used for retransmission, and if the number of retries exceeds a certain number, an alarm is triggered. In addition, the agent cluster can be automatically expanded based on the length of the task queue.
[0076] Further, in one or more embodiments of the present specification, after the optimal execution node implements the execution of each subtask to be executed based on the communication channel and the execution mode of each subtask to be executed, the method further includes:
[0077] The running indicators of the optimal execution node and each corresponding agent are monitored in real time to dynamically allocate the optimal execution node corresponding to the subtask to be executed based on the running indicators.
[0078] In addition, in order to implement the embodiment of the present specification, a tool chain modular design process is also included. Firstly, for the visual development environment, a low-code orchestration platform needs to be built, and drag-and-drop intelligent agent workflow design is supported. For the dynamic tool registry center, the Function Registry service can be developed to support the plug-and-play of third-party tools, and to realize version compatibility management, the optimal tool version can also be automatically selected through semantic version control. Moreover, in order to ensure the security of the task collaboration process, TLS1.3 encryption will be forcibly enabled during data transmission, and the SM4 algorithm of the national standard is supported. When data access control is performed, a fine-grained permission policy is defined based on the attribute access control model to realize two-factor authentication for sensitive operations. By deploying Prometheus+Grafana monitoring cluster, key indicators are monitored, and ELK log analysis system is integrated to support multi-dimensional log retrieval and root cause analysis.
[0079] As shown in Figure 2 , the embodiment of the present specification provides a structural diagram of a multi-agent task collaboration device. It can be known that, in one or more embodiments of the present specification, a multi-agent task collaboration device comprises: Figure 2
[0080] at least one processor; and
[0081] a memory in communication with the at least one processor; wherein
[0082] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above-mentioned methods.
[0083] As shown in Figure 3 , the embodiment of the present specification provides a structural diagram of a non-volatile storage medium. It can be known that, in one or more embodiments of the present specification, a non-volatile storage medium stores computer executable instructions, and the computer executable instructions can perform any of the above-mentioned methods. Figure 3
[0084] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment mainly describes the difference from other embodiments. Especially, since the device, equipment and non-volatile computer storage medium embodiments are basically similar to the method embodiments, the description is relatively simple, and the related parts can be referred to the part of the method embodiment.
[0085] The above-described embodiments of the application have special structure and can achieve the desired results. Other embodiments can have different structures and achieve the same results. The purpose of the above-described embodiments is to illustrate the principles of the application and not to limit the scope of the application. The scope of the application is defined by the claims and their equivalents. Other embodiments are within the scope of the claims.
[0086] The above description is merely illustrative of the embodiments of the present application and is not intended to limit the scope of the present application. Various modifications can be made by those skilled in the art based upon the teachings disclosed herein. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application shall fall within the scope of the claims of the present application.
Claims
1. A multi-agent task coordination method, characterized in that, The method comprises: registering functions corresponding to each agent to a dynamic service directory through an MCP protocol; disassembling a to-be-executed task to obtain a plurality of to-be-executed subtasks, matching each to-be-executed subtask with a capability range of each agent in the dynamic service directory, and establishing a communication channel between each to-be-executed subtask and the corresponding agent; dynamically routing and distributing the to-be-executed subtasks through a collaborative bus, and selecting an optimal execution node according to real-time requirements of the subtasks and a node load state of each corresponding agent; determining an execution mode of each to-be-executed subtask according to a subtask dependency relationship defined by a directed acyclic graph; implementing execution of each to-be-executed subtask based on the communication channel and the execution mode of each to-be-executed subtask at the optimal execution node.
2. The multi-agent task coordination method according to claim 1, characterized in that, The method comprises: based on an MCP service encapsulation mechanism, encapsulating function modules of each agent to generate a service description file of the agent; determining an initial service directory according to the service description file of each agent; detecting a state of each agent through a heartbeat mechanism; if it is determined that the agent is started, registering tool interface metadata of the agent to dynamically update the initial service directory and obtain a dynamic service directory; wherein the tool interface metadata comprises a function interface specification, an input / output data format, and a service quality level.
3. The multi-agent task coordination method of claim 1, wherein, The method comprises: determining an application field corresponding to the to-be-executed task to perform semantic analysis on the to-be-executed task based on a database corresponding to the application field, and identifying key elements of the task; based on the key elements, determining a function requirement and task dependency information corresponding to the to-be-executed task; disassembling the to-be-executed task according to the function requirement and the task dependency information to obtain a plurality of to-be-executed subtasks; wherein each to-be-executed subtask corresponds to a function of one or more agents.
4. The multi-agent task coordination method of claim 1, wherein, The method comprises: determining a function requirement corresponding to each to-be-executed subtask to match the function requirement with a capability range of the agent, and mapping each to-be-executed subtask to the corresponding agent; dynamically generating a protocol adaptation layer according to an interface specification of the to-be-executed subtask and the corresponding agent to convert an interface of the corresponding agent into a standardized format; converting the interface of the corresponding agent into a standardized format, and establishing a communication channel between each to-be-executed subtask and the corresponding agent based on the converted interface; wherein the communication channel enables a preset encryption algorithm.
5. The multi-agent task coordination method according to claim 1, characterized in that, Before dynamically routing and distributing the to-be-executed subtasks through the collaborative bus and selecting an optimal execution node according to real-time requirements of the subtasks and a node load state of each corresponding agent, the method further comprises: The layered architecture of the collaborative bus is constructed based on a preset layered structure to obtain the collaborative bus, so that the collaborative bus implements 0-RTT handshake and multiplexing based on a QUIC protocol; the preset layered structure includes a transport layer, a routing layer, and a service layer.
6. The multi-agent task coordination method according to claim 1, characterized in that, The to-be-executed sub-tasks are dynamically routed and distributed through the collaborative bus, and the optimal execution node is selected according to real-time requirements of the sub-tasks and node load states of the corresponding agents, specifically including: Real-time collection of dynamic indexes of the corresponding agents is performed to determine the availability scores of the corresponding agents based on the dynamic indexes; the dynamic indexes include CPU utilization, memory occupation, and network delay indexes; Metadata tags corresponding to the to-be-executed sub-tasks are analyzed to determine key features of the to-be-executed sub-tasks; Based on the availability scores and the key features, the nodes of the corresponding agents are screened to determine the optimal execution node.
7. The multi-agent task coordination method according to claim 1, characterized in that, According to a sub-task dependency relationship defined by a directed acyclic graph, execution modes of the to-be-executed sub-tasks are determined, specifically including: Based on the directed acyclic graph of the to-be-executed tasks, sub-task dependency relationships of the to-be-executed sub-tasks are determined; Based on the sub-task dependency relationships, execution types of the to-be-executed sub-tasks are determined; the execution types include an independent parallel type and an associated serial type; Based on the execution types and task response times corresponding to the executed sub-tasks, execution modes of the to-be-executed sub-tasks are determined; the execution modes include a synchronous calling mode and an asynchronous calling mode.
8. The multi-agent task coordination method of claim 1, wherein, After the optimal execution node implements execution of the to-be-executed sub-tasks based on the communication channels and the execution modes of the to-be-executed sub-tasks, the method further includes: Real-time monitoring of running indexes of the optimal execution node and the corresponding agents is performed to dynamically allocate the optimal execution node corresponding to the to-be-executed sub-tasks based on the running indexes.
9. A multi-agent task coordination device, comprising: The device includes: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
10. A non-transitory storage medium storing computer-executable instructions, the computer-executable instructions comprising: The computer executable instructions can perform the method of any one of claims 1-8. The computer executable instructions can perform the method of any one of claims 1-8.
Citation Information
Cited By
Distributed industrial group intelligent cooperation system and method based on OPC UA Robotics
CN121239712A
A distributed industrial swarm intelligent collaborative system and method based on OPC UA Robotics
CN121239712B
Multi-agent resource collaborative scheduling management system and method based on MCP protocol
CN121277716A
Multi-device intelligent collaborative interaction system based on distributed soft bus
CN121547738A
Drug virtual screening task scheduling method and device based on intelligent agent and medium
CN121862251A