Multi-agent dynamic collaborative planning method and device
The tasks are disassembled and planned through the information and scores of the agent registration center, forming a task execution chain, solving the problem of dynamic adjustment and planning of complex tasks in multi-agent collaboration, and improving the collaboration effect and automation level.
Patent Information
- Application Number
- CN202411788491.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, multiple agents cannot dynamically adjust and plan complex tasks when collaborating, resulting in poor collaboration.
By receiving pending tasks, the task is disassembled based on the registration information and scores of the agent registration center, a task execution diagram is generated, and the task execution method is matched according to the diagram and agent planning, a task execution chain is formed, and tasks are dynamically adjusted and planned.
Dynamic adjustment and planning of complex tasks are achieved, the collaboration between the agents is improved, and the degree of automation of task execution is enhanced.
Smart Images

Figure CN119783718A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-agent dynamic collaborative planning method, device, electronic device, computer storage medium and computer program product. Background Art
[0002] An agent is an agent that can perceive the environment and take actions to achieve specific goals. Specifically, it can refer to a system or entity with perception, decision-making, learning and execution capabilities. In the current field of artificial intelligence technology, the research and development of single agents is rapidly progressing and developing in the direction of larger scale in order to further improve the applicability of single agents. However, in the scenario of dealing with complex tasks, relying solely on a single agent often seems to be inadequate. Therefore, the mainstream direction generally recognized by the industry is to accurately decompose complex tasks and hand them over to multiple agents to collaborate and complete them, which is also the current hot development trend.
[0003] In the existing technology, although there are a lot of theoretical research results in the field of multi-agent collaboration, such as Nash equilibrium strategy and game theory application, in actual operation, these theories are often difficult to fully cope with the dynamics and uncertainty of complex tasks. Therefore, there is an urgent need for a multi-agent dynamic collaboration planning method that can dynamically adjust and plan complex tasks and improve the collaboration effect between agents. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problems in the prior art that complex tasks cannot be dynamically adjusted and planned when multiple agents collaborate, and the collaboration effect between the agents is poor.
[0005] The first aspect of the present invention provides a multi-agent dynamic collaborative planning method, comprising:
[0006] Receiving tasks to be processed, and decomposing and dividing the tasks to be processed based on the registration information and agent scores of each agent recorded by the agent registration center to obtain multiple target task units;
[0007] Generate a task execution graph of the task to be processed based on the target task unit;
[0008] According to the task execution graph and the execution mode of the agent planning matching task corresponding to the target task unit, a task execution chain of the task to be processed is obtained, wherein the number of the task execution chain is at least one;
[0009] The to-be-processed tasks are executed based on each of the task execution chains, and the execution status of each of the task execution chains is evaluated, and the score of the agent is updated based on the evaluation result of the execution status.
[0010] Optionally, in a first implementation of the first aspect of the present invention, the multi-agent dynamic collaborative planning method according to claim 1 is characterized in that the task to be processed is decomposed and divided based on the registration information and agent scores of each agent recorded by the agent registration center to obtain multiple target task units including:
[0011] Decomposing and dividing the task to be processed to obtain a plurality of task units;
[0012] Based on the registration information and scores of each agent recorded in the agent registration center, find the agent corresponding to each task unit;
[0013] If there is a task unit without a corresponding intelligent agent, the to-be-processed task is re-divided until each task unit has a corresponding intelligent agent, thereby obtaining a target task unit.
[0014] Optionally, in a second implementation of the first aspect of the present invention, before receiving the task to be processed, the method further includes:
[0015] Construct multiple agents and obtain registration information of the constructed agents, wherein the registration information includes domain classification, agent responsibilities, agent detailed description, agent input, agent output, and agent tool chain definition;
[0016] Performing an initial evaluation on each of the agents according to the agent registration information to obtain an initial agent score;
[0017] Based on the registration information and the initial agent score, the agent is registered in an agent registration center.
[0018] Optionally, in a third implementation of the first aspect of the present invention, performing an initial evaluation on each of the agents according to the agent registration information to obtain an initial agent score includes:
[0019] For the tool chains held by each intelligent agent, determine the business areas and functions of each intelligent agent, and obtain subjective evaluations of each intelligent agent;
[0020] Search the agent registration center for historical tasks that contain historical agents of the same type as the agent, simulate the execution of the historical tasks and evaluate the results of the simulated execution to obtain an initial agent score.
[0021] Optionally, in a fourth implementation of the first aspect of the present invention, the evaluating the execution status of each of the task execution chains and updating the score of the agent based on the evaluation result of the execution status includes:
[0022] Obtaining user satisfaction feedback on the output of each task step in each of the task execution chains, and obtaining a local initial evaluation score for each task chain;
[0023] Summarize the local initial evaluation of each task chain, perform cluster analysis on the execution process of each task execution chain, select similar local initial evaluations and calculate the mean to obtain a global evaluation score;
[0024] Selecting an agent similar to the agent corresponding to each task step in the task execution chain, simulating the response of the similar agent with the same target task unit, recording the execution steps and execution status, and obtaining a similarity evaluation score;
[0025] An evaluation result is calculated based on the local initial evaluation score, the global evaluation score and the similarity evaluation score, and a score adjustment reason is generated based on the evaluation result, and the agent score is updated.
[0026] Optionally, in a fifth implementation of the first aspect of the present invention, after generating a score adjustment reason based on the evaluation result and updating the agent score, the method further includes:
[0027] When the re-evaluation cycle requirements are met and the number of task samples meets the evaluation requirements, extract the historical agent scores and the reasons for the score adjustment output each time to re-evaluate each agent in the service list and obtain regular evaluation results;
[0028] The agent score of each agent is updated according to the periodic evaluation results of each agent.
[0029] A second aspect of the present invention provides a multi-agent dynamic collaborative planning device, comprising:
[0030] The task decomposition module is used to receive the task to be processed and decompose and divide the task to be processed to obtain multiple target task units;
[0031] A first planning module, used for generating a task execution graph of the task to be processed based on the re-divided second task units;
[0032] A second planning module is used to plan the execution mode of the matching task according to the task execution graph and the agent corresponding to the target task unit, and obtain the task execution chain of the task to be processed, wherein the number of the task execution chain is at least one;
[0033] A task execution module, used for executing the tasks to be processed based on each of the task execution chains;
[0034] An evaluation module is used to evaluate the execution status of each of the task execution chains and update the score of the agent based on the evaluation result of the execution status.
[0035] The third aspect of the present invention provides a multi-agent dynamic collaborative planning device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the multi-agent dynamic collaborative planning device executes the steps of the above-mentioned multi-agent dynamic collaborative planning method.
[0036] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to execute the steps of the above-mentioned multi-agent dynamic collaborative planning method.
[0037] The fifth aspect of the present invention provides a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the multi-agent dynamic collaborative planning method as described above are implemented.
[0038] In the technical solution provided by the present invention, a task to be processed is received, and the task to be processed is decomposed and divided based on the registration information of each agent and the agent score recorded by the agent registration center to obtain multiple target task units; a task execution graph of the task to be processed is generated based on the target task unit; the task execution chain of the task to be processed is obtained according to the execution mode of the agent planning matching task corresponding to the task execution graph and the target task unit, wherein the number of the task execution chains is at least one; the task to be processed is executed based on each of the task execution chains, and the execution status of each of the task execution chains is evaluated, and the score of the agent is updated based on the evaluation result of the execution status. This method can dynamically adjust and plan complex tasks and improve the effect of collaboration between agents. In addition, a device, an electronic device, a computer-readable storage medium and a computer program product provided by the present invention also solve corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0040] Figure 1 A schematic diagram of a first embodiment of a multi-agent dynamic collaborative planning method according to an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a second embodiment of a multi-agent dynamic collaborative planning method according to an embodiment of the present invention;
[0042] Figure 3 It is a schematic diagram of the overall architecture of the second embodiment of the multi-agent dynamic collaborative planning method in an embodiment of the present invention;
[0043] Figure 4 A schematic flow chart of the first agent scoring step of the second embodiment of the multi-agent dynamic collaborative planning method in an embodiment of the present invention;
[0044] Figure 5 A schematic flow chart of the first agent scoring step of the second embodiment of the multi-agent dynamic collaborative planning method in an embodiment of the present invention;
[0045] Figure 6 It is a flowchart of a dynamic collaborative planning method including a QoS evaluation system in a second embodiment of a multi-agent dynamic collaborative planning method in an embodiment of the present invention;
[0046] Figure 7 A schematic diagram of an embodiment of a multi-agent dynamic collaborative planning device in an embodiment of the present invention;
[0047] Figure 8 A schematic diagram of an embodiment of a multi-agent dynamic collaborative planning device in an embodiment of the present invention;
[0048] Fig. 9 The figure is a schematic diagram of a computer-readable medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in a variety of forms, and should not be construed as limiting the present invention to the embodiments set forth herein. On the contrary, providing these exemplary embodiments enables the present invention to be more comprehensive and complete, and is more convenient for fully conveying the inventive concept to those skilled in the art. The same reference numerals in the figures represent the same or similar elements, components or parts, and thus their repeated description will be omitted.
[0050] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.
[0051] In the description of specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.
[0052] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0053] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0054] The term "and / or" or "and / or" includes all combinations of any one or more of the associated listed items.
[0055] See also Figure 1 The first embodiment of the multi-agent dynamic collaboration planning method in the embodiment of the present invention includes:
[0056] S101, receiving tasks to be processed, and dividing the tasks to be processed based on the registration information and agent scores of each agent recorded by the agent registration center to obtain multiple target task units;
[0057] It is understandable that the execution subject of the present invention can be a multi-agent dynamic collaborative planning device, or a terminal or a server, which is not limited here.
[0058] This embodiment uses the server as an example to illustrate. In this embodiment, when receiving a pending task and needing to decompose the pending task, and planning the dynamic collaboration of multiple agents to complete the task, the pre-configured LLM (Large Language Model) in the server can be called for decomposition; and after decomposition, based on the LLM's understanding of the task, the specific task decomposition and planning can be performed in combination with the existing service description contained in the preset multi-agent registration center. Among them, LLM is a language model composed of an artificial neural network with many parameters (usually billions of weights or more), which uses self-supervised learning or semi-supervised learning to train a large amount of unlabeled text; it is a general model that is not limited to specific tasks and can perform well in a wide range of tasks.
[0059] In a specific implementation, after receiving an agent call request based on the pending task, the task processing function of the LLM is first called to perform an initial decomposition and division of the pending task. Specifically, the LLM model first decomposes and divides the pending task according to the model understanding to obtain multiple task units, wherein the multiple task units are the minimum executable units considered by the current LLM model; then, based on the registration information and agent scores of each agent recorded in the agent registration center, the agent corresponding to each task unit is searched; if there is a task unit without a corresponding agent, the pending task is re-decomposed and divided until each task unit has a corresponding agent, and the target task unit is obtained.
[0060] Specifically, when performing specific decomposition and division, the following steps can be used: first, the task to be processed is decomposed and divided according to the model understanding to obtain multiple first task units after the initial decomposition and division. After the initial decomposition, according to the specific information of each first task unit, the first target agent that can process each first task unit is searched according to the registration information of each agent and the agent score recorded in the agent registration center. If the first target agent corresponding to some first task units is not found in the agent registration center during the search process of the first target agent, it is necessary to re-decompose and divide the task to be processed, and obtain multiple second task units after re-decomposition and division; or the first task unit is further decomposed and divided again to obtain multiple second task units after decomposition and division. After the second task unit is re-decomposed and divided, according to the specific information of each second task unit, the second target agent that can process each second task unit is searched according to the registration information of each agent and the agent score recorded in the agent registration center, until each task unit has a corresponding second target agent, and the task unit corresponding to each second target agent is the target task unit.
[0061] S102, generating a task execution graph of the task to be processed based on the target task unit;
[0062] After all the task units that have been disassembled and divided can find the corresponding agents in the agent registration center, a task execution graph of the task to be processed is generated based on the target task units that have been re-disassembled and divided. The task execution graph can be a DAG (Directed Acyclic Graph), which is the basis for the execution of specific tasks.
[0063] S103, according to the task execution diagram and the agent corresponding to the target task unit, the execution mode of the matching task is planned to obtain the task execution chain of the task to be processed;
[0064] In a specific implementation, the LLM model in the above steps decomposes and divides the task to obtain an agent suitable for processing each target task unit after the decomposition, and generates a task execution graph corresponding to each target task unit; however, there is no dependency between some target task units, and because different target tasks may call different agents, some target task units can be executed in parallel, which makes the same task execution graph have a variety of different specific execution methods due to the choice of agents. Therefore, the task execution graph and the obtained second agents are combined for a second time, and the execution method is planned and matched to determine which tasks can be executed in parallel by agents and which tasks have dependencies with each other; planning and matching are performed with this information to obtain multiple task execution chains corresponding to the tasks to be processed.
[0065] S104, executing pending tasks based on each task execution chain;
[0066] S105: Evaluate the execution status of each task execution chain, and update the score of the agent based on the evaluation results of the execution status.
[0067] Based on the task execution chain, each agent is called to execute the pending task, wherein the execution of the pending task can be a trial execution, that is, a pre-execution process before formal execution; specifically, this step attempts to execute each task execution chain, and records the output of each task step in each task execution chain during the trial execution process, as well as the execution result of each task execution chain. The trial execution process of each task execution chain is evaluated based on the output of each task step and the execution result, and the agent score is updated according to the evaluation result. Among them, the score of the agent updated according to the evaluation result of the execution situation in this step can be used as a reference for splitting the target task unit and selecting the agent when the pending task is formally executed later.
[0068] In a specific implementation, after updating the score of the agent based on the evaluation result of the execution situation, it also includes: decomposing and dividing the task to be processed based on the registration information of each agent recorded by the agent registration center and the updated agent score to obtain multiple target task units; generating a task execution graph of the task to be processed based on the target task unit; obtaining a task execution chain of the task to be processed according to the task execution graph and the execution mode of the agent planning matching task corresponding to the target task unit, wherein the number of the task execution chains is at least one; executing the task to be processed based on the optimal task execution chain in each of the task execution chains. The specific implementation method of each step can refer to the corresponding content of each step in this embodiment, which will not be repeated here.
[0069] The method in the embodiment of the present invention can realize the collaboration of multiple agents when processing complex tasks, and can dynamically adjust and plan complex tasks based on the registration information and scores of different agents, thereby improving the effect of collaboration among the agents.
[0070] Please see Figure 2-6 The second embodiment of the multi-agent dynamic collaboration planning method in the embodiment of the present invention includes:
[0071] S201, registering each agent in the agent registration center;
[0072] Please refer to the attached Figure 3 This embodiment is explained by taking the server as the execution entity as an example. The server can be configured with a low-code platform and a registration center. Users can define different processes and forms through the low-code platform to complete the construction of applications and generate different businesses; the registration center can register the information of each intelligent entity.
[0073] In a specific implementation, before performing specific dynamic collaborative planning for multiple agents, various available agents need to be registered in the agent registration center. Specifically, multiple agents are constructed, and registration information of the constructed agents is obtained, wherein the registration information includes domain classification, agent responsibilities, agent detailed description, agent input, agent output, and agent tool chain definition; each agent is initially evaluated according to the agent registration information to obtain an initial agent score; based on the registration information and the initial agent score, the agent is registered in the agent registration center. The agent detailed description includes instructions, system prompts, and user prompts; the agent input can be data in JSON (JavaScript Object Notation) format, and the agent output can be data in JSON format and natural language.
[0074] In addition, the input and output of each single agent described in this embodiment have a unified interface, use the same session concept as the server, and store historical records in Redis (Remote Dictionary Server). When a single agent is needed, the required content is queried through a unique session code to complete the recognition of context and background knowledge, thereby constructing the input and output channels of a single agent. The interaction channels between agents are standardized, providing support for the collaboration of multiple agents.
[0075] In this embodiment, a multi-agent collaborative evaluation system based on SLA (Service Level Agreement) is specifically proposed. The system can dynamically adjust and plan the execution mode of complex tasks to make the collaboration between agents more efficient. In a specific implementation, after various available agents are registered in the agent registration center, it also includes calling LLM to perform preliminary evaluation on each agent, generate service description information of the agent, and record the service description information in the agent registration center. Specifically, it includes subjective evaluation and simulated execution evaluation. The subjective evaluation specifically includes judging the business field and function of the tool chain held by the agent to obtain a subjective evaluation; the simulated execution evaluation includes searching the agent registration center for historical tasks containing historical agents of the same type as the agent, and performing simulated execution based on the historical tasks, evaluating the simulated execution results, and obtaining relevant information of the service description; the initial agent score is obtained based on the subjective evaluation and the relevant information of the service description.
[0076] S202, receiving a task to be processed, and breaking down and dividing the task to be processed into multiple task units;
[0077] S203, searching for the agent corresponding to each task unit based on the agent registration information and agent scores recorded in the agent registration center;
[0078] S204, if there is a task unit without a corresponding agent, the task to be processed is re-divided until each task unit has a corresponding agent, and the target task unit is obtained;
[0079] Please continue to refer to the attached Figure 3 , the low-code platform in this embodiment also includes an LLM function. The LLM function is similar to the commander-soldier mode when executed. When using the low-code platform, the user uses the LLM commander as the entrance to call the intelligent agent, that is, the user hands over the task to be processed to the LLM commander, and then the LLM commander goes to the LLM soldier center to find a suitable intelligent agent, and disassembles and executes the task. Among them, when the LLM commander disassembles the task, he not only relies on the reasoning of the model to disassemble and divide, but also disassembles and divides according to various relevant information of the intelligent agent recorded in the registered intelligent agent registration center and the initial intelligent agent score.
[0080] The specific disassembly and division steps to be processed in S202-S204 in this embodiment are basically similar to the relevant description of the disassembly and division steps in step S101 in the above embodiment, so they are not repeated here.
[0081] S205, generating a task execution graph of the task to be processed based on the target task unit;
[0082] S206, according to the task execution graph and the agent corresponding to the target task unit, the execution mode of the matching task is planned to obtain the task execution chain of the task to be processed;
[0083] The contents of S205-S206 in this embodiment are substantially similar to the contents of S102-S103 in the aforementioned embodiment, and thus will not be described in detail here.
[0084] S207, executing pending tasks based on each task execution chain;
[0085] S208: Evaluate the execution status of each task execution chain, and update the score of the agent based on the evaluation results of the execution status.
[0086] In this embodiment, each agent is called based on the task execution chain obtained above to execute the pending task, wherein the execution of the pending task can be a trial execution, i.e., a pre-execution process before formal execution; the trial execution can be a synchronous trial execution of the multiple task chains, specifically, when the multiple task chains are synchronously tried, the output of the intermediate process of each step will be recorded. Obtain user satisfaction feedback on the output of each task step in each task execution chain to obtain a local initial evaluation score for each task chain; summarize the local initial evaluation of each task chain, perform cluster analysis on the execution process of each task execution chain, select similar local initial evaluations and calculate the mean to obtain a global evaluation score; select an agent similar to the agent corresponding to each task step in the task execution chain, simulate the response of similar agents with the same target task unit, record the execution steps and execution status, and obtain a similar evaluation score; calculate the evaluation result based on the local initial evaluation score, the global evaluation score and the similar evaluation score, and generate a score adjustment reason based on the evaluation result, and update the agent score.
[0087] In a specific embodiment, see Figure 4, when evaluating specifically, we first call LLM to perform local and global evaluations on a single task chain: for each interaction between the user and LLM, we will perform sentiment analysis, including sentiment polarity detection, sentiment intensity assessment, and sentiment fine-grained analysis, so as to judge the user's sentiment trend for the current answer of LLM, and obtain the relevant score (i.e., the satisfaction of the selected agent), and complete the local initial evaluation of the single task chain of LLM through immediate satisfaction feedback. Moreover, during the execution of the task chain, the overall sentiment analysis selects the most likely positive evaluation. When the task chain is finally executed (including the two dimensions of user abandonment and user satisfaction), the local evaluation of the entire task chain will be summarized and sentiment analyzed. At the same time, the task will be clustered, and the relevant local evaluations of similar tasks will be selected for comparison to obtain the Bayesian average as the score of the local task in the global evaluation.
[0088] In a specific implementation, this step also includes considering the degree of interaction of similar tasks (i.e., considering the number of steps to solve similar problems). That is, select an agent with a similar "service information" description as the current agent, so as to use the same task input as the trigger point, simulate the response of different agents, record the number of steps and whether there is a response related to the user's local negative evaluation, and complete the agent evaluation for the task. Calculate the relevant weighted average based on the above scores to determine its global evaluation.
[0089] Please continue reading Figure 4 After LLM has made local and global evaluations on a single task chain, LLM will obtain the user's adjustment information and make an evaluation, which mainly includes the description difference between the agent and the adjusted agent, and combines the nature of the current task to generate a reason and score for the adjustment. Finally, LLM's own evaluation and the user's adjustment evaluation are combined to give each agent in the service a score in the field. In a specific implementation, the agent score can be a QoS (Quality of Service) score.
[0090] Regarding the agent score, the updated agent score can affect the agent selection step when processing the task to be processed. Figure 5 When QoS score is used as the agent score, the steps of searching and selecting the agent through the LLM commander in S203 include: firstly selecting the agents with task scores of TopK (i.e., the top K ranked from high to low) in the historical step score table based on the single-step similarity matching method to perform a global QoS score search, and the LLM commander selects the agent according to the QoS score.
[0091] In a specific implementation, the agent scores generated by LLM will be recorded, and we will periodically re-evaluate after multiple scoring. Figure 6 , specifically including: when the re-evaluation cycle requirements are met and the number of samples meets the evaluation requirements, extract the historical agent scores and the reasons for each output score adjustment to re-evaluate each agent in the service list to obtain a regular evaluation result; update the agent score of each agent according to the regular evaluation results of each agent. In this way, the QoS evaluation system is integrated into the agent selection and the selection of the auxiliary tool chain for the task, and through the two different QoS evaluation dimensions of single step and global, more accurate dynamic adjustment and recording are achieved, and the manually adjusted records are combined to obtain a higher weight of influence, thereby completing the joint work of the agents.
[0092] An embodiment of the present invention provides a multi-agent dynamic collaboration planning method, which can dynamically adjust and plan complex tasks based on the registration information and scores of different agents, significantly improve the effect of collaboration between agents, improve the degree of automation of task execution, and provide reliable guarantees for task execution in complex scenarios.
[0093] The above describes the multi-agent dynamic collaborative planning method in the embodiment of the present invention. The following describes the multi-agent dynamic collaborative planning device in the embodiment of the present invention. Figure 7 , an embodiment of the intelligent agent dynamic collaboration planning device in the embodiment of the present invention includes:
[0094] The task decomposition module 701 is used to receive the task to be processed and decompose and divide the task to be processed to obtain multiple target task units;
[0095] A first planning module 702, configured to generate a task execution graph of the task to be processed based on the re-divided second task units;
[0096] The second planning module 703 is used to plan the execution mode of the matching task according to the task execution diagram and the agent corresponding to the target task unit, and obtain the task execution chain of the task to be processed, wherein the number of the task execution chain is at least one;
[0097] A task execution module 704, configured to execute the to-be-processed tasks based on each of the task execution chains;
[0098] The evaluation module 705 is used to evaluate the execution status of each of the task execution chains and update the score of the agent based on the evaluation result of the execution status.
[0099] The device in the embodiment of the present invention can realize the collaboration of multiple agents when processing complex tasks, and can dynamically adjust and plan complex tasks based on the registration information and scores of different agents, thereby improving the effect of collaboration among the agents.
[0100] In another embodiment of the present application, the task decomposition module 701 is specifically used to:
[0101] Decomposing and dividing the task to be processed to obtain a plurality of task units;
[0102] Based on the registration information and scores of each agent recorded in the agent registration center, find the agent corresponding to each task unit;
[0103] If there is a task unit without a corresponding intelligent agent, the to-be-processed task is re-divided until each task unit has a corresponding intelligent agent, thereby obtaining a target task unit.
[0104] In another embodiment of the present application, the multi-agent dynamic collaboration planning device further includes an agent registration module, specifically including:
[0105] An information definition unit, specifically used to construct multiple agents and obtain registration information of the constructed agents, wherein the registration information includes domain classification, agent responsibilities, agent detailed description, agent input, agent output, and agent tool chain definition;
[0106] An initial evaluation unit, used to perform an initial evaluation on each of the agents according to the agent registration information to obtain an initial agent score;
[0107] A registration execution unit is used to register the agent in an agent registration center based on the registration information and the initial agent score.
[0108] In another embodiment of the present application, the initial evaluation unit is specifically used for:
[0109] For the tool chains held by each intelligent agent, determine the business areas and functions of each intelligent agent, and obtain subjective evaluations of each intelligent agent;
[0110] Search the agent registration center for historical tasks that contain historical agents of the same type as the agent, simulate the execution of the historical tasks and evaluate the results of the simulated execution to obtain an initial agent score.
[0111] In another embodiment of the present application, the evaluation module is specifically used for:
[0112] Obtaining user satisfaction feedback on the output of each task step in each of the task execution chains, and obtaining a local initial evaluation score for each task chain;
[0113] Summarize the local initial evaluation of each task chain, perform cluster analysis on the execution process of each task execution chain, select similar local initial evaluations and calculate the mean to obtain a global evaluation score;
[0114] Selecting an agent similar to the agent corresponding to each task step in the task execution chain, simulating the response of the similar agent with the same target task unit, recording the execution steps and execution status, and obtaining a similarity evaluation score;
[0115] An evaluation result is calculated based on the local initial evaluation score, the global evaluation score and the similarity evaluation score, and a score adjustment reason is generated based on the evaluation result, and the agent score is updated.
[0116] In another embodiment of the present application, the evaluation module is further used to:
[0117] When the re-evaluation cycle requirements are met and the number of task samples meets the evaluation requirements, extract the historical agent scores and the reasons for the score adjustment output each time to re-evaluate each agent in the service list and obtain regular evaluation results;
[0118] The agent score of each agent is updated according to the periodic evaluation results of each agent.
[0119] In another embodiment of the present application, the specific details of the method that the multi-agent dynamic collaborative planning device can execute during the working process are as described in the aforementioned method embodiment, so they will not be repeated here.
[0120] The device in the embodiment of the present invention can dynamically adjust and plan complex tasks based on the registration information and scores of different intelligent agents, significantly improve the effect of collaboration between intelligent agents, increase the degree of automation of task execution, and provide reliable guarantees for task execution in complex scenarios.
[0121] Based on the same inventive concept, an embodiment of this specification also provides an electronic device for multi-agent dynamic collaborative planning. The electronic device for multi-agent dynamic collaborative planning in an embodiment of the present invention is described in detail below from the perspective of hardware processing.
[0122] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Figure 8 The electronic device 800 according to this embodiment of the present invention is described. Figure 8 The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0123] like Figure 8As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), a display unit 840, etc.
[0124] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 or Figure 2 Steps shown.
[0125] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0126] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0127] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0128] The electronic device 800 may also communicate with one or more external devices 100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 800, and / or any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 860. The network adapter 860 may communicate with other modules of the electronic device 800 through the bus 830. It should be understood that although Figure 8Not shown, other hardware and / or software modules may be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0129] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, server, or network device, etc.) to execute the above method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium can implement the above method of the present invention, that is: Figure 1 or Figure 2 The method shown.
[0130] Figure 1 or Figure 2 A schematic diagram of a computer-readable medium provided in accordance with an embodiment of the present specification.
[0131] accomplish Figure 1 or Figure 2 The computer program of the method shown can be stored on one or more computer readable media. The computer readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0132] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0133] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0134] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0135] In addition, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the multi-agent dynamic collaborative planning method described in any of the above embodiments.
[0136] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0137] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0138] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A multi-agent dynamic collaborative planning method, characterized in that: include: Receiving tasks to be processed, and decomposing and dividing the tasks to be processed based on the registration information and agent scores of each agent recorded by the agent registration center to obtain multiple target task units; Generate a task execution graph of the task to be processed based on the target task unit; According to the task execution graph and the execution mode of the agent planning matching task corresponding to the target task unit, a task execution chain of the task to be processed is obtained, wherein the number of the task execution chain is at least one; Execute the tasks to be processed based on each of the task execution chains; The execution status of each of the task execution chains is evaluated, and the score of the agent is updated based on the evaluation result of the execution status.
2. The multi-agent dynamic collaborative planning method according to claim 1, characterized in that: The task to be processed is decomposed and divided based on the registration information and the agent score of each agent recorded by the agent registration center to obtain multiple target task units including: Decomposing and dividing the task to be processed to obtain a plurality of task units; Based on the registration information and scores of each agent recorded in the agent registration center, find the agent corresponding to each task unit; If there is a task unit without a corresponding intelligent agent, the to-be-processed task is re-divided until each task unit has a corresponding intelligent agent, thereby obtaining a target task unit.
3. The multi-agent dynamic collaborative planning method according to claim 2, characterized in that: Before receiving the task to be processed, the method further includes: Construct multiple agents and obtain registration information of the constructed agents, wherein the registration information includes domain classification, agent responsibilities, agent detailed description, agent input, agent output, and agent tool chain definition; Performing an initial evaluation on each of the agents according to the agent registration information to obtain an initial agent score; Based on the registration information and the initial agent score, the agent is registered in an agent registration center.
4. The multi-agent dynamic collaborative planning method according to claim 3, characterized in that: The initial evaluation of each agent according to the agent registration information to obtain an initial agent score includes: For the tool chains held by each intelligent agent, determine the business areas and functions of each intelligent agent, and obtain subjective evaluations of each intelligent agent; Search the agent registration center for historical tasks that contain historical agents of the same type as the agent, simulate the execution of the historical tasks and evaluate the results of the simulated execution to obtain an initial agent score.
5. The multi-agent dynamic collaborative planning method according to claim 4, characterized in that: The step of evaluating the execution status of each of the task execution chains and updating the score of the agent based on the evaluation result of the execution status includes: Obtaining user satisfaction feedback on the output of each task step in each of the task execution chains, and obtaining a local initial evaluation score for each task chain; Summarize the local initial evaluation of each task chain, perform cluster analysis on the execution process of each task execution chain, select similar local initial evaluations and calculate the mean to obtain a global evaluation score; Selecting an agent similar to the agent corresponding to each task step in the task execution chain, simulating the response of the similar agent with the same target task unit, recording the execution steps and execution status, and obtaining a similarity evaluation score; An evaluation result is calculated based on the local initial evaluation score, the global evaluation score and the similarity evaluation score, and a score adjustment reason is generated based on the evaluation result, and the agent score is updated.
6. The multi-agent dynamic collaborative planning method according to claim 5, characterized in that: After generating the score adjustment reason based on the evaluation result and updating the agent score, the method further includes: When the re-evaluation cycle requirements are met and the number of task samples meets the evaluation requirements, extract the historical agent scores and the reasons for the score adjustment output each time to re-evaluate each agent in the service list and obtain regular evaluation results; The agent score of each agent is updated according to the periodic evaluation results of each agent.
7. A multi-agent dynamic collaborative planning device, characterized in that: include: The task decomposition module is used to receive the task to be processed and decompose and divide the task to be processed to obtain multiple target task units; A first planning module is used to generate a task execution graph of the task to be processed based on the re-divided second task units; A second planning module is used to plan the execution mode of the matching task according to the task execution graph and the agent corresponding to the target task unit, and obtain the task execution chain of the task to be processed, wherein the number of the task execution chain is at least one; A task execution module, used for executing the tasks to be processed based on each of the task execution chains; An evaluation module is used to evaluate the execution status of each of the task execution chains and update the score of the agent based on the evaluation result of the execution status.
8. A multi-agent dynamic collaborative planning device, characterized in that: The multi-agent dynamic collaborative planning device comprises: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory so that the multi-agent dynamic collaborative planning device executes the steps of the multi-agent dynamic collaborative planning method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the program / instructions are executed by a processor, the steps of the multi-agent dynamic collaborative planning method as described in any one of claims 1-6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the multi-agent dynamic collaborative planning method as described in any one of claims 1-6 are implemented.
Citation Information
Cited By
Multi-dimensional knowledge management method and system based on multi-agent collaboration
CN120494071A
Complex event analysis processing method and device for multi-agent cooperative game
CN120509413A
Multi-agent collaborative management method and system
CN120542463A
Multi-agent system construction method and equipment based on servitization agent architecture
CN120750753A
Trusted industrial agent task distribution method and system
CN120893794A