Multi-agent cooperation method and system
Through a large language model, task decomposition, sub-task allocation and action planning of multi-agent collaboration systems is solved, and the problem of inefficient computing efficiency and insufficient adaptability of multi-agent collaboration systems in complex scenarios is achieved, and the rapid generation of reasonable task planning solutions is achieved. effect.
Patent Information
- Application Number
- CN202411399440.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Multi-agent collaboration systems are inefficient in computing when dealing with complex scenarios and are difficult to adapt to dynamically changing environments.
Using a large language model for task decomposition, subtask allocation and action planning, obtain input team task instructions, decompose them into subtask lists, and generate alliance strategies and executable code based on the skill set of multi-agents to realize multi-agent collaboration .
Rapidly process and analyze complex task descriptions, generate reasonable task planning schemes in a short time, and improve computing efficiency and adaptability.
Smart Images

Figure CN118917632A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot collaboration technology, and in particular to a multi-agent collaboration method and system. Background Art
[0002] Multi-agent systems consist of homogeneous or heterogeneous robots, which are often deployed to complete tasks that are inefficient or even impossible for a single robot. By allowing robots to move and act simultaneously, the overall efficiency of the team can be significantly improved.
[0003] In the existing technology, one of the main challenges facing multi-agent collaborative systems is the complexity and efficiency of task planning. Traditional methods usually use centralized algorithms, such as mixed integer linear programming or search-based methods, or distributed methods, such as market-based methods and distributed constrained optimization. However, these methods are often computationally inefficient when dealing with complex scenarios and have difficulty adapting to dynamically changing environments. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problem that the existing multi-agent collaboration often has low computational efficiency when processing complex scenes and is difficult to adapt to dynamically changing environments.
[0005] A first aspect of the present invention provides a multi-agent collaboration method, the multi-agent collaboration method comprising: Obtaining a task instruction corresponding to an input team task, and implementing task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes a plurality of subtasks corresponding to the team task; Allocate subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and generate a coalition strategy of the multi-agents corresponding to the allocation results; The large language model is used to perform action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy, and the corresponding executable code is obtained and executed to achieve multi-agent collaboration.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the task instruction corresponding to the input team task is obtained, and the task decomposition of the team task is implemented according to the task instruction by using a preset large language model to obtain a subtask list, including: Obtain the task instructions corresponding to the input team task, and make function calls through the preset API interface to obtain the skill set of the multi-agent; Decomposing the task instructions according to the preset environment information and the skill set to obtain an initial planning list; Performing a feasibility assessment on the initial planning list by using the large language model to obtain an assessment result and corresponding first feedback information, and judging whether the initial planning list meets a preset condition according to the assessment result; If not, the first feedback information is returned to the step of decomposing the task instruction into tasks according to the preset environment information and the skill set until the initial planning list meets the preset conditions; If so, the initial planning list is used as a subtask list of the team task.
[0007] Optionally, in a second implementation of the first aspect of the present invention, decomposing the task instructions according to the preset environment information and the skill set to obtain the initial planning list includes: Performing constraint analysis on the skill set to obtain a skill constraint condition list for each agent in the multi-agent; According to the environmental information and the skill constraint condition list, the task instruction is subjected to task element extraction processing to obtain a set of key task elements; Performing matching calculation on the task key element set and the skill constraint condition list to obtain a task-skill matching matrix; According to the task-skill matching matrix, the task instructions are decomposed and optimized to obtain an initial planning list that meets the skill constraints.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the subtask allocation is performed according to the subtask list and the skill sets corresponding to the multi-agents by using the large language model, and a multi-agent alliance strategy corresponding to the allocation result is generated, including: Perform skill requirement analysis on each subtask in the subtask list to obtain a subtask skill requirement list; According to a preset limited number of task decomposition samples and corresponding coalition formation strategy samples, the large language model is subjected to coalition formation strategy learning processing to obtain a coalition formation model; Using the alliance formation model, matching and analyzing the subtask skill requirement list and the skill set is performed to obtain an initial alliance allocation strategy; Performing skill set verification processing on the initial alliance allocation strategy to obtain a verification result and second feedback information, and judging whether the initial alliance allocation strategy meets a preset condition according to the verification result; If not, the second feedback information is returned to the step of using the alliance formation model to perform matching analysis on the subtask skill requirement list and the skill set until the initial alliance allocation strategy meets the preset conditions; If so, the initial coalition allocation strategy is used as the corresponding multi-agent coalition strategy.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, performing action planning for the multi-agents corresponding to each subtask in the assignment result according to the subtask list and the alliance strategy through the large language model, obtaining and executing corresponding executable codes, and realizing multi-agent collaboration includes: Parsing the subtask list and the alliance strategy to obtain the execution sequence of each subtask and the corresponding agent combination; According to the execution sequence and the combination of agents, the actions of each agent are time-series planned to obtain a preliminary action planning scheme; Performing conflict detection and resource allocation processing on the preliminary action planning scheme to obtain an optimized action planning scheme; The large language model is used to perform code generation processing on the action sequence of each agent according to the optimized action planning scheme, and the corresponding executable code is obtained and executed to achieve multi-agent collaboration.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, performing time sequence planning processing on the actions of each agent according to the execution sequence and the agent combination to obtain a preliminary action planning scheme includes: Perform dependency analysis on the execution sequence to obtain preconditions and influence matrices between subtasks; According to the influence matrix and the agent combination, the subtasks are evaluated for parallelism to obtain a set of tasks that can be executed in parallel and a sequence of tasks that can be executed in series; Performing time window allocation processing on the subtasks in the task set that can be executed in parallel to obtain a parallel task list with timestamps; According to the serially executed task sequence and the parallel task list with timestamps, action sequence generation processing is performed on each intelligent agent to obtain a preliminary action planning scheme.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, after performing action planning for the multi-agents corresponding to each subtask in the assignment result according to the subtask list and the alliance strategy through the large language model, obtaining and executing corresponding executable codes, and realizing multi-agent collaboration, the method further includes: Inputting the subtask list, alliance strategy and executable code into the large language model for consistency check processing to obtain a consistency test result; determining whether there are potential conflicts among the subtask list, the alliance strategy and the executable code according to the consistency check result; If so, a list of potential contradictions is obtained according to the consistency check result, and based on the list of potential contradictions, the large language model is used to perform fact verification processing to obtain a verification report containing verified information and uncertain information; The large language model is adjusted according to the validation report to reduce the hallucination effect of the large language model.
[0012] A second aspect of the present invention provides a multi-agent collaboration system, the multi-agent collaboration system comprising: A task decomposition module is used to obtain a task instruction corresponding to an input team task, and implement task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes multiple subtasks corresponding to the team task; A task assignment module, used to assign subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and generate a multi-agent alliance strategy corresponding to the assignment result; The action planning module is used to perform action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy through the large language model, obtain and execute the corresponding executable code, and realize multi-agent collaboration.
[0013] The above-mentioned multi-agent collaboration method and system obtains the task instructions corresponding to the input team task, and realizes the task decomposition of the team task according to the task instructions through the preset large language model, and obtains a subtask list, wherein the subtask list includes multiple subtasks corresponding to the team task; the subtasks are assigned according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and a multi-agent alliance strategy corresponding to the assignment result is generated; the multi-agent corresponding to each subtask in the assignment result is action planned according to the subtask list and the alliance strategy through the large language model, and the corresponding executable code is obtained and executed to realize multi-agent collaboration. This method uses a large language model for task decomposition, subtask assignment and action planning, and can quickly process and analyze complex task descriptions, and generate a reasonable task planning plan in a relatively short time.
[0014] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0015] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a schematic diagram of a first embodiment of a multi-agent collaboration method in an embodiment of the present invention; Figure 2 It is a schematic diagram of an embodiment of a multi-agent collaboration system in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0019] To facilitate understanding of this embodiment, a multi-agent collaboration method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps: 101. Obtain a task instruction corresponding to the input team task, and implement task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes multiple subtasks corresponding to the team task; In one embodiment of the present invention, the step of obtaining the task instructions corresponding to the input team task, and implementing the task decomposition of the team task according to the task instructions through a preset large language model to obtain a subtask list includes: obtaining the task instructions corresponding to the input team task, and performing a function call through a preset API interface to obtain the skill set of the multi-agent; decomposing the task instructions according to preset environmental information and the skill set to obtain an initial planning list; performing a feasibility assessment on the initial planning list through the large language model to obtain an assessment result and corresponding first feedback information, and judging whether the initial planning list meets preset conditions according to the assessment result; if not, returning the first feedback information to the step of decomposing the task instructions according to the preset environmental information and the skill set until the initial planning list meets the preset conditions; if so, using the initial planning list as a subtask list of the team task.
[0020] Specifically, the system receives a high-level language instruction I as input, which describes a complex team task to be completed. Subsequently, the system makes a function call through a preset API interface to obtain the skill set of the multi-agent. The multi-agent here refers to a group of N heterogeneous embodied robot agents ℝ={R1,R2,...,RN}, each of which has a different skill set S={S1,S2,...,SN}. Among them, Sn represents the skill list of robot Rn, and Sn⊆Δ, Δ is the set of all skills or actions that the agent may be able to perform. These skills have been pre-implemented and can be executed through API calls. After obtaining the skill set, the system combines the preset environmental information E to perform task decomposition. The environmental information E includes objects and other entities in the environment. The system takes the task instruction I, the environmental information E, and the robot skill set Δ as input and provides them to the preset large language model (LLM). LLM uses its built-in world knowledge to analyze the necessary steps to complete the task and dynamically decomposes the complex task I into a series of subtasks to form an initial planning list. Next, the system evaluates the feasibility of the initial planning list through the large language model. This evaluation process uses LLM as an external feedback device to confirm the plan to determine its feasibility. The evaluation results include the evaluation results and the corresponding first feedback information. The system determines whether the initial plan list meets the preset conditions based on the evaluation results. If the evaluation results show that the initial plan list does not meet the preset conditions, the system will return the first feedback information to the task decomposition step. This process embodies an iterative optimization mechanism. The system will revisit the corresponding task plan LLM based on the feedback information and regenerate the task plan based on the suggestions generated by the feedback device. This iterative process will continue until the initial plan list meets the preset conditions. When the initial plan list meets the preset conditions, the system uses the initial plan list as the final subtask list of the team task. This subtask list T contains multiple subtasks corresponding to the team task I, and each subtask has been verified for feasibility. In the whole process, the large language model plays a core role. It is not only used for the initial task decomposition, but also for subsequent feasibility evaluation and optimization. This method utilizes the world knowledge and reasoning ability of LLM, so that the task decomposition process can adapt to open scenarios and has strong generalization ability. At the same time, by introducing an iterative optimization mechanism, the feasibility and quality of the final generated subtask list are ensured. It is worth noting that during the task decomposition process, the system takes into account the environmental information E and the robot skill set Δ. This ensures that the decomposed subtasks can be performed by robots with corresponding skills in a given environment. For example, for picking skills, the system takes into account specific constraints such as the maximum mass that the robot can pick up. In addition, the system also obtains the specific skill sets of multiple agents through API calls, which lays the foundation for subsequent task allocation and execution. By combining task decomposition with specific execution capabilities, the system is able to generate more feasible task plans.
[0021] Furthermore, the task instructions are decomposed according to the preset environmental information and the skill set to obtain an initial planning list, including: performing constraint analysis on the skill set to obtain a skill constraint list for each agent in the multi-agents; performing task element extraction on the task instructions according to the environmental information and the skill constraint list to obtain a set of task key elements; performing matching calculation on the set of task key elements and the skill constraint list to obtain a task-skill matching matrix; and performing decomposition and optimization on the task instructions according to the task-skill matching matrix to obtain an initial planning list that satisfies the skill constraints.
[0022] Specifically, in the process of constraint analysis of skill sets, the system considers a set of N heterogeneous embodied robot agents ℝ={R1,R2,...,RN}, each of which has a different skill set S={S1,S2,...,SN}. The constraint analysis of skill sets aims to clarify the specific capabilities and limitations of each agent. For example, for the picking skill, the system analyzes the maximum mass that the robot can pick up. Through this process, the system obtains a list of skill constraints for each agent in the multi-agent, which describes the capability boundaries of each agent in detail. Next, the system extracts task elements from the task instruction I based on the preset environment information E and the skill constraint list just obtained. The environment information E includes objects and other entities in the environment, which, together with the skill constraints, provide important context for task element extraction. The system extracts the key elements of the task by analyzing the specific requirements of the task instruction I under the given environment and capability constraints. This process utilizes the semantic understanding ability of the preset large language model (LLM) to identify core action items and goals from complex task descriptions. Through this process, the system obtains a set of key elements of the task, which contains the key actions and goals required to complete the task. Then, the system calculates the matching degree between the set of key elements of the task and the list of skill constraints. The purpose of this step is to evaluate the suitability of each agent to perform each task element. The system considers the specific requirements of each task element, such as the required strength, accuracy, speed, etc., and compares these requirements with the skill constraints of each agent. Through this process, the system generates a task-skill matching matrix. This matrix characterizes the ability of each agent to perform each task element, providing an important basis for subsequent task decomposition and allocation. Finally, the system decomposes and optimizes the task instructions according to the task-skill matching matrix. In this step, the system considers the dependencies between task elements, the execution order, and the capabilities of each agent. The system tries to decompose the task into a series of subtasks, each of which is matched with one or more competent agents. This process not only ensures that each subtask has a suitable executor, but also considers the overall execution efficiency and resource utilization. Through this process, the system finally obtains an initial planning list that meets the skill constraints. This initial planning list contains a series of detailed subtasks, each of which has clear execution conditions and requirements, and has corresponding suitable executors. This list takes into account both the overall goal of the task and the specific capabilities of each agent, and is an optimization result that balances task requirements and execution capabilities.
[0023] 102. Use the large language model to assign subtasks according to the subtask list and the skill sets corresponding to the multi-agents, and generate a coalition strategy for the multi-agents corresponding to the assignment results; In one embodiment of the present invention, the method of allocating subtasks according to the subtask list and the corresponding skill sets of the multi-agents through the large language model and generating a multi-agent alliance strategy corresponding to the allocation result includes: performing skill requirement analysis on each subtask in the subtask list to obtain a subtask skill requirement list; performing alliance formation strategy learning on the large language model according to a preset limited number of task decomposition samples and corresponding alliance formation strategy samples to obtain an alliance formation model; using the alliance formation model, performing matching analysis on the subtask skill requirement list and the skill set to obtain an initial alliance allocation strategy; performing skill set verification on the initial alliance allocation strategy to obtain a verification result and second feedback information, and judging whether the initial alliance allocation strategy meets the preset conditions based on the verification result; if not, returning the second feedback information to the step of performing matching analysis on the subtask skill requirement list and the skill set using the alliance formation model until the initial alliance allocation strategy meets the preset conditions; if so, using the initial alliance allocation strategy as the corresponding multi-agent alliance strategy.
[0024] Specifically, in the process of analyzing the skill requirements of each subtask in the subtask list, the system conducts an in-depth analysis of each subtask to determine the specific skills and capabilities required to complete the subtask. This analysis process takes into account factors such as the nature, complexity, and execution environment of the subtask, and ultimately obtains a detailed subtask skill requirement list. This list clearly describes the skill requirements of each subtask, laying the foundation for the subsequent agent allocation. Next, the system uses a preset limited number of task decomposition samples and corresponding coalition formation strategy samples to learn the coalition formation strategy for the large language model. This step uses the Few-shot learning technology, which provides the large language model with some typical task decomposition examples and corresponding coalition formation strategies to enable the model to learn how to form an effective coalition based on task characteristics and agent capabilities. This learning method enables the large language model to understand the principles and strategies of task allocation, so that it can make reasonable decisions when facing new tasks. Through this learning process, the system obtains a trained coalition formation model that encapsulates the knowledge and strategies of task allocation and coalition formation. Then, the system uses the coalition formation model just obtained to match the subtask skill requirement list and skill set. In this step, the system compares and matches the skill requirements of each subtask with the available agent skill sets. The coalition formation model considers multiple factors, such as the complexity of the task, the ability range of the agent, and the dependencies between tasks, to determine how to optimally allocate tasks. The goal of this process is to find an allocation scheme that can meet the skill requirements of all subtasks and maximize the ability of each agent. Through this process, the system obtains an initial coalition allocation strategy, which specifies one or more suitable agents for each subtask. Next, the system performs skill set verification on the initial coalition allocation strategy. This verification process is designed to ensure that the allocation results meet all necessary conditions and constraints. The system checks whether each subtask is assigned to at least one agent, verifies whether the overall skill set of the agent team assigned to each subtask meets the skill requirements of the subtask, and ensures that no agent is assigned to multiple subtasks that are executed in parallel at the same time. Through this process, the system obtains the verification result and the second feedback information. Based on the verification result, the system determines whether the initial coalition allocation strategy meets the preset conditions. If the verification result shows that the strategy does not meet the preset conditions, the system returns the second feedback information to the step of matching analysis using the coalition formation model. This feedback loop reflects an iterative optimization process. The system will adjust the allocation strategy based on the feedback information and re-analyze the matching until an allocation strategy that meets all the preset conditions is obtained. When the initial alliance allocation strategy meets the preset conditions, the system will use this strategy as the final multi-agent alliance strategy.This alliance strategy clarifies the executors of each subtask, ensures that all tasks have suitable agents to complete, and optimizes the overall resource allocation. The large language model plays a core role in the whole process. It is not only used to learn the alliance formation strategy, but also for skill requirement analysis of subtasks and matching allocation of agents. This method utilizes the semantic understanding and reasoning capabilities of the large language model, enabling the task allocation process to handle more complex and diverse scenarios. At the same time, by introducing Few-shot learning and iterative optimization mechanisms, the system can continuously improve and adapt to new task types and agent combinations.
[0025] 103. Through the large language model, the multi-agent corresponding to each sub-task in the allocation result is action-planned according to the sub-task list and alliance strategy, and the corresponding executable code is obtained and executed to realize multi-agent collaboration.
[0026] In one embodiment of the present invention, the large language model is used to perform action planning for multiple agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy, and the corresponding executable code is obtained and executed to realize multi-agent collaboration, including: parsing the subtask list and the alliance strategy to obtain the execution sequence of each subtask and the corresponding agent combination; according to the execution sequence and the agent combination, the action of each agent is time-planned to obtain a preliminary action planning scheme; conflict detection and resource allocation are performed on the preliminary action planning scheme to obtain an optimized action planning scheme; according to the optimized action planning scheme, the large language model is used to perform code generation processing on the action sequence of each agent, and the corresponding executable code is obtained and executed to realize multi-agent collaboration.
[0027] Specifically, during the action planning and code execution process, the system first parses the subtask list and the coalition strategy. This step involves analyzing the specific requirements of each subtask Ti and the corresponding robot team Ci. The system considers the characteristics of N heterogeneous embodied robot agents ℝ={R1,R2,...,RN}, and each robot Rn has its own specific skill set Sn⊆Δ. During the parsing process, the system determines the dependencies between subtasks, possible parallel execution opportunities, and the specific skills required for each subtask. Next, the system performs sequential planning to obtain a preliminary action plan. This step leverages the power of the large language model and considers the environmental information E (including objects and entities in the environment) and the specific skill constraints of each robot. For example, for the picking skill, the system considers the maximum mass limit that the robot can pick up. The system then performs conflict detection and resource allocation on the preliminary action plan. This step involves checking whether there are conflicts in time or space between the actions of different robots. The system verifies whether the overall skill set of the robot team assigned to each subtask meets the skill requirements of the subtask and ensures that no robot is assigned to multiple subtasks that are executed in parallel at the same time. This process may involve multiple iterations, and each time a conflict or insufficient resources is detected, the system adjusts the action sequence or resource allocation. Finally, the system uses the large language model to generate code for each robot's action sequence based on the optimized action plan. This step makes use of pre-implemented skills Δ, which can be executed through API calls. The large language model converts abstract action descriptions into specific API call sequences. For example, if a subtask involves object manipulation, the system generates code to call the corresponding robot's picking skill API, while considering the robot's maximum load capacity. The code generation process takes into account the specific skill set Sn of each robot Rn, ensuring that the generated code only calls the skills that the robot actually possesses. This process also includes generating code for error handling and exceptions to enhance the robustness of the system. The generated executable code is then executed to achieve multi-agent collaboration. During execution, the system monitors the status and task progress of each robot in real time. If unexpected situations are encountered during execution, such as a robot failing to complete a task, the system will call the large language model again to make real-time code adjustments. This may involve reallocating tasks or modifying the execution order.
[0028] Furthermore, the actions of each agent are time-planned according to the execution sequence and the agent combination to obtain a preliminary action planning scheme, including: performing dependency analysis on the execution sequence to obtain preconditions and influence matrices between subtasks; performing parallelism evaluation on the subtasks according to the influence matrix and the agent combination to obtain a set of tasks that can be executed in parallel and a sequence of tasks that can be executed serially; performing time window allocation on the subtasks in the set of tasks that can be executed in parallel to obtain a list of parallel tasks with timestamps; and performing action sequence generation on each agent according to the sequence of tasks that can be executed serially and the list of parallel tasks with timestamps to obtain a preliminary action planning scheme.
[0029] Specifically, the system first performs dependency analysis on the execution sequence. This process starts with the subtask list T={T1,T2,...,Tm}, and the system analyzes the specific requirements of each subtask Ti one by one. For each Ti, the system checks its required input conditions and the output results produced. For example, assuming that T1 is "pick up object A" and T2 is "place object A at location B", the system will recognize that T2 depends on the completion of T1. The system uses an n×n matrix (n is the number of subtasks) to represent these dependencies. The elements Mij in the matrix represent the impact of task Ti on Tj. If Mij = 1, it means that Ti is a prerequisite for Tj; if Mij = -1, it means that Ti and Tj conflict; if Mij = 0, it means that Ti and Tj have no direct relationship. For example, in the above example, M12 = 1, which means that T1 is a prerequisite for T2. Next, the system performs parallelism evaluation based on this influence matrix and the combination of agents. The system checks each row in the matrix, and if all elements in a row are 0, then the corresponding task can be executed in parallel with other tasks. At the same time, the system also considers the skill set Sn of each agent Rn. If two tasks that have no dependencies require different skills and can be performed by different agents, then the two tasks can be executed in parallel. For example, suppose T3 is "monitoring area C", which has no dependencies with T1 and T2 and requires visual recognition skills, while T1 and T2 require grasping and moving skills. If there is an agent R1 with grasping and moving skills and another agent R2 with visual recognition skills, then T3 can be executed in parallel with T1 and T2. For the set of tasks that can be executed in parallel, the system performs time window allocation. The system estimates the execution time ei of each task Ti, and this estimate is based on the complexity of the task and the ability of the agent performing the task. For example, if T1 is expected to take 5 minutes, T2 takes 3 minutes, and T3 takes 10 minutes, the system will allocate a time window of 0-5 minutes for T1, a time window of 5-8 minutes for T2, and a time window of 0-10 minutes for T3. Finally, the system generates an action sequence for each agent based on the task sequence executed serially and the parallel task list with timestamps. For each agent Rn, the system creates a timeline that arranges the tasks assigned to it in chronological order.
[0030] Furthermore, after performing action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy through the large language model, obtaining and executing the corresponding executable code, and realizing multi-agent collaboration, it also includes: inputting the subtask list, the alliance strategy and the executable code into the large language model for consistency check processing to obtain a consistency test result; judging whether there are potential contradictions between the subtask list, the alliance strategy and the executable code according to the consistency check result; if so, obtaining a potential contradiction list according to the consistency check result, and based on the potential contradiction list, using the large language model to perform fact verification processing to obtain a verification report containing verified information and uncertain information; adjusting the large language model according to the verification report to reduce the hallucination effect of the large language model.
[0031] Specifically, after completing the action planning and code execution of multi-agent collaboration, the system enters an important reflection and verification phase. This phase first inputs the subtask list, coalition strategy, and executable code into the large language model for consistency checking. In this process, the large language model analyzes the relationship between these three elements and checks whether they match and support each other. For example, the system verifies whether each subtask Ti has a corresponding coalition strategy Ci, and whether the generated executable code correctly reflects these assignments. At the same time, the system also checks whether the dependencies between subtasks are correctly reflected in the code. The results of the consistency check point out potential contradictions or inconsistencies. For example, if a subtask Ti is assigned to an agent Rn that does not have the required skill Sn, or if the execution order in the code does not match the dependencies defined in the subtask list, these will be marked as potential contradictions. The system generates a detailed consistency check result, which lists all the problems and doubts found. Next, the system determines whether there are potential contradictions between the subtask list, coalition strategy, and executable code based on the consistency check results. If so, the system generates a list of potential contradictions. This list not only contains the description of the contradictions, but also includes relevant contextual information for subsequent analysis and verification. Based on this list of potential contradictions, the system uses the large language model to perform fact verification processing. In this step, the large language model will deeply analyze each contradiction and try to verify its authenticity. For example, for a suspected skill mismatch, the large language model will recheck the skill set Sn of the agent Rn and the requirements of the subtask Ti to determine whether there is really a mismatch. For execution order issues, the model will reanalyze the task dependencies to confirm whether the order in the code actually violates these dependencies. The results of fact verification are organized into a verification report. This report contains two parts of information: verified information and uncertain information. Verified information is those problems that have been confirmed to exist after in-depth analysis, such as a real skill mismatch or order error. Uncertain information is those problems that the large language model cannot determine its authenticity even after in-depth analysis. These uncertain information usually involve complex context judgments or situations that require additional information to be determined. Finally, the system adjusts the large language model based on this verification report to reduce the model's hallucination effect. This adjustment process includes several aspects: First, for verified problems, the system will update the model's knowledge base to ensure that the model can make correct judgments when faced with similar situations in the future. Second, for uncertain information, the system will mark these areas as areas that require special attention. In future tasks, the model will behave more cautiously in these areas and seek additional information or manual confirmation when necessary. In addition, the system will analyze the causes of these problems, such as whether it is due to the model's insufficient understanding of certain concepts or due to certain deviations in the reasoning process.Based on these analyses, the system will make corresponding adjustments to the model's training data, reasoning mechanism, or decision threshold. This may involve adding training data for specific fields, adjusting certain parameters of the model, or modifying certain rules in the reasoning algorithm. Through this series of inspection, verification, and adjustment processes, the system can not only discover and correct potential problems in the current task, but also continuously improve the performance of large language models and reduce the occurrence of hallucinations. This process forms a closed-loop learning and optimization mechanism, which enables the system to continuously improve its accuracy and reliability when dealing with complex multi-agent collaborative tasks.
[0032] In this embodiment, by obtaining the task instructions corresponding to the input team task, and implementing the task decomposition of the team task according to the task instructions through the preset large language model, a subtask list is obtained, wherein the subtask list includes multiple subtasks corresponding to the team task; the subtasks are assigned according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and a coalition strategy of the multi-agents corresponding to the assignment result is generated; the multi-agents corresponding to each subtask in the assignment result are action-planned according to the subtask list and the coalition strategy through the large language model, and the corresponding executable code is obtained and executed to realize multi-agent collaboration. This method uses a large language model for task decomposition, subtask assignment and action planning, can quickly process and analyze complex task descriptions, and generate a reasonable task planning solution in a relatively short time.
[0033] The above describes the multi-agent collaboration method in the embodiment of the present invention. The following describes the multi-agent collaboration system in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a multi-agent collaboration system includes: The task decomposition module 201 is used to obtain a task instruction corresponding to an input team task, and implement task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes a plurality of subtasks corresponding to the team task; The task assignment module 202 is used to assign subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and generate a coalition strategy of the multi-agents corresponding to the assignment results; The action planning module 203 is used to perform action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy through the large language model, obtain and execute the corresponding executable code, and realize multi-agent collaboration.
[0034] In an embodiment of the present invention, the multi-agent collaboration system runs the multi-agent collaboration method described above. The multi-agent collaboration system obtains the task instructions corresponding to the input team task, and implements the task decomposition of the team task according to the task instructions through a preset large language model, and obtains a subtask list, wherein the subtask list includes multiple subtasks corresponding to the team task; the subtasks are assigned according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and a coalition strategy of the multi-agents corresponding to the assignment result is generated; the multi-agents corresponding to each subtask in the assignment result are action-planned according to the subtask list and the coalition strategy through the large language model, and the corresponding executable code is obtained and executed to realize multi-agent collaboration. This method uses a large language model for task decomposition, subtask assignment, and action planning, and can quickly process and analyze complex task descriptions, and generate a reasonable task planning solution in a relatively short time.
[0035] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system or system or unit described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0036] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0037] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-agent collaboration method, It is characterized in that The multi-agent collaboration method comprises: Obtaining a task instruction corresponding to an input team task, and implementing task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes a plurality of subtasks corresponding to the team task; Allocate subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and generate a coalition strategy of the multi-agents corresponding to the allocation results; The large language model is used to perform action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy, and the corresponding executable code is obtained and executed to achieve multi-agent collaboration.
2. The multi-agent collaboration method according to claim 1, It is characterized in that The task instructions corresponding to the input team task are obtained, and the task decomposition of the team task is realized according to the task instructions by using a preset large language model to obtain a subtask list including: Obtain the task instructions corresponding to the input team task, and make function calls through the preset API interface to obtain the skill set of the multi-agent; Decomposing the task instructions according to the preset environment information and the skill set to obtain an initial planning list; Performing a feasibility assessment on the initial planning list by using the large language model to obtain an assessment result and corresponding first feedback information, and judging whether the initial planning list meets a preset condition according to the assessment result; If not, the first feedback information is returned to the step of decomposing the task instruction into tasks according to the preset environment information and the skill set until the initial planning list meets the preset conditions; If so, the initial planning list is used as a subtask list of the team task.
3. The multi-agent collaboration method according to claim 2, It is characterized in that Decomposing the task instructions according to the preset environment information and the skill set to obtain the initial planning list includes: Performing constraint analysis on the skill set to obtain a skill constraint condition list for each agent in the multi-agent; According to the environmental information and the skill constraint condition list, the task instruction is subjected to task element extraction processing to obtain a set of key task elements; Performing matching calculation on the task key element set and the skill constraint condition list to obtain a task-skill matching matrix; According to the task-skill matching matrix, the task instructions are decomposed and optimized to obtain an initial planning list that meets the skill constraints.
4. The multi-agent collaboration method according to claim 1, It is characterized in that The method of allocating subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model and generating a multi-agent alliance strategy corresponding to the allocation result includes: Perform skill requirement analysis on each subtask in the subtask list to obtain a subtask skill requirement list; According to a preset limited number of task decomposition samples and corresponding coalition formation strategy samples, the large language model is subjected to coalition formation strategy learning processing to obtain a coalition formation model; Using the alliance formation model, matching and analyzing the subtask skill requirement list and the skill set is performed to obtain an initial alliance allocation strategy; Performing skill set verification processing on the initial alliance allocation strategy to obtain a verification result and second feedback information, and judging whether the initial alliance allocation strategy meets a preset condition according to the verification result; If not, the second feedback information is returned to the step of using the alliance formation model to perform matching analysis on the subtask skill requirement list and the skill set until the initial alliance allocation strategy meets the preset conditions; If so, the initial coalition allocation strategy is used as the corresponding multi-agent coalition strategy.
5. The multi-agent collaboration method according to claim 1, It is characterized in that The step of performing action planning for the multi-agents corresponding to each sub-task in the assignment result according to the sub-task list and the alliance strategy through the large language model, obtaining and executing the corresponding executable code, and realizing multi-agent collaboration includes: Parsing the subtask list and the alliance strategy to obtain the execution sequence of each subtask and the corresponding agent combination; According to the execution sequence and the combination of agents, the actions of each agent are time-series planned to obtain a preliminary action planning scheme; Performing conflict detection and resource allocation processing on the preliminary action planning scheme to obtain an optimized action planning scheme; The large language model is used to perform code generation processing on the action sequence of each agent according to the optimized action planning scheme, and the corresponding executable code is obtained and executed to achieve multi-agent collaboration.
6. The multi-agent collaboration method according to claim 5, It is characterized in that The step of performing time sequence planning on the actions of each agent according to the execution sequence and the agent combination to obtain a preliminary action planning scheme includes: Perform dependency analysis on the execution sequence to obtain preconditions and influence matrices between subtasks; According to the influence matrix and the agent combination, the subtasks are evaluated for parallelism to obtain a set of tasks that can be executed in parallel and a sequence of tasks that can be executed in series; Performing time window allocation processing on the subtasks in the task set that can be executed in parallel to obtain a parallel task list with timestamps; According to the serially executed task sequence and the parallel task list with timestamps, action sequence generation processing is performed on each intelligent agent to obtain a preliminary action planning scheme.
7. The multi-agent collaboration method according to claim 1, It is characterized in that After performing action planning for the multi-agents corresponding to each subtask in the assignment result according to the subtask list and the alliance strategy through the large language model, obtaining and executing the corresponding executable code, and realizing multi-agent collaboration, the method further includes: Inputting the subtask list, alliance strategy and executable code into the large language model for consistency check processing to obtain a consistency test result; determining whether there are potential conflicts among the subtask list, the alliance strategy and the executable code according to the consistency check result; If so, a list of potential contradictions is obtained according to the consistency check result, and based on the list of potential contradictions, the large language model is used to perform fact verification processing to obtain a verification report containing verified information and uncertain information; The large language model is adjusted according to the validation report to reduce the hallucination effect of the large language model.
8. A multi-agent collaborative system, It is characterized in that The multi-agent collaboration system comprises: A task decomposition module is used to obtain a task instruction corresponding to an input team task, and implement task decomposition of the team task according to the task instruction through a preset large language model to obtain a subtask list, wherein the subtask list includes multiple subtasks corresponding to the team task; A task assignment module, used to assign subtasks according to the subtask list and the skill sets corresponding to the multi-agents through the large language model, and generate a multi-agent alliance strategy corresponding to the assignment result; The action planning module is used to perform action planning for the multi-agents corresponding to each subtask in the allocation result according to the subtask list and the alliance strategy through the large language model, obtain and execute the corresponding executable code, and realize multi-agent collaboration.
Citation Information
Patent Citations
Multi-robot dynamic alliance task allocation method and related device
CN113657718A
Heterogeneous multi-agent task allocation method under complex constraint conditions
CN117474276A
Task planning method and equipment for heterogeneous multi-robot system driven by large language model
CN118567222A
Task allocation mechanisms and markets for acquiring and harnessing sets of human and computational resources for sensing, effecting, and problem solving
US20100332281A1
Cited By
Large model agent parallel scheduling and control method in vehicle-mounted dialogue system
CN119049465A
A parallel scheduling and control method for large model agents in vehicle-mounted dialogue systems
CN119049465B
Data analysis method and device, electronic equipment and computer program product
CN119179866A
Task matching method and system
CN119272070A
Multi-agent cooperation-based explicit result acquisition class task processing method and related device
CN119558340A
