Multi-agent cooperation method and computing device

By introducing a review module into the multi-agent collaboration framework, real-time review and optimization of agent outputs, the problem of feedback and optimization in the existing technology is solved, and the task execution efficiency is improved.

CN119537587APending Publication Date: 2025-02-28ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411630809.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the multi-agent collaboration framework, feedback and optimization are only performed after the task is over, resulting in failure to correct errors or optimization strategies in a timely manner during the task execution process, reducing the task execution efficiency.

Method used

By introducing a review module in multi-agent collaboration, the output of each agent is reviewed in real time and the process is advanced based on the review results, so that problems in the process can be discovered and optimized in a timely manner.

Benefits of technology

It realizes timely correction of errors and optimization strategies during task execution, and improves the task execution efficiency of multi-agent collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537587A_ABST
    Figure CN119537587A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-agent cooperation method and device and computing equipment. The method comprises the steps that a process text corresponding to a target task is input into a first agent; the first agent outputs a first text used for inputting a second agent according to the process text; based on the process text, reviewing the first text to obtain a first reviewing result; and under the condition that the review is not passed, the first intelligent agent generates a second text for inputting the second intelligent agent based on the process text, the first text and the first review result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of computer technology, and more particularly, to a multi-agent collaboration method and computing device. Background Art

[0002] Agent is a concept in artificial intelligence and computer science, usually referring to an autonomous system or entity that can perceive its environment, make decisions, and take actions to achieve a certain goal. Agents can be software programs, robots, or other intelligent systems. They complete specific tasks or goals by perceiving and interacting with the environment. Agents can obtain environmental information through sensors, cameras, data interfaces, etc. to understand the current situation; make decisions through algorithms or rule systems to decide what actions to take in a specific environment to achieve the goal; and perform corresponding operations through actuators or output interfaces.

[0003] The Multi-Agent Cooperation Framework is a system structure used to coordinate multiple agents to collaborate to complete complex tasks. Under this framework, agents can share information, assign tasks, and achieve common goals through collaborative decision-making and actions. Agents can be implemented based on large language models (LLM), and agents can interact based on modules corresponding to the environment (hereinafter referred to as environment modules). For example, one agent can pass information to another agent through the environment module.

[0004] In a multi-agent collaboration framework, multiple agents are dynamically generated and adjusted according to task requirements, so that roles can be automatically assigned in different tasks and the difference between actual results and expected results can be evaluated after the entire task is completed. However, this design results in feedback and optimization only being performed after the task is completed, which may result in failure to correct errors or optimize strategies in a timely manner during the task execution, reducing the efficiency of task execution. Summary of the invention

[0005] The purpose of the present invention is to provide a multi-agent collaboration solution so that multiple agents can complete tasks with a more optimal process.

[0006] The first aspect of the present specification provides a multi-agent collaboration method, comprising: inputting a process text corresponding to a target task to a first agent, the process text including steps executed by each of a plurality of agents and information indicating the execution order of each step, the plurality of agents including the first agent and a second agent; outputting, by the first agent, a first text for inputting into the second agent according to the process text; reviewing the first text based on the process text to obtain a first review result; and, if the review fails, generating, by the first agent, a second text for inputting into the second agent based on the process text, the first text and the first review result.

[0007] In one embodiment, the reviewing of the first text based on the process text includes: inputting the process text to a third agent, and the third agent reviews the first text based on the process text, and outputting the first review result.

[0008] In one embodiment, the first agent outputs a first text for inputting into a second agent based on the process text, including: the first agent generates the first text based on the process text and an output text of a fourth agent, and the fourth agent is an agent that precedes the second agent in the process corresponding to the process text.

[0009] In one implementation, the first review result includes problems existing in the first text or modification suggestions for the first text.

[0010] In one embodiment, inputting a process text corresponding to the target task to the first agent includes: inputting a process text corresponding to the target task to the first agent, and instructing the first agent to output a first text for inputting into the second agent.

[0011] In one embodiment, the method further includes: if the review is passed, inputting the first text into the second agent.

[0012] In one embodiment, the method also includes: the second agent outputting a first output text based on the first text; inputting the first output text into the third agent; the third agent reviewing the first output text based on the process text and outputting a second review result; if the second review result indicates that the review has failed, inputting the first text, the first output text and the second review result into the second agent.

[0013] In one embodiment, the method further includes: when the second review result indicates that the review has not passed, updating or replacing the second agent.

[0014] In one embodiment, the third agent reviews the first output text based on the process text, including: the third agent reviews the first output text based on the process text and the first text.

[0015] In one embodiment, the method further includes: the first agent outputting a third text for inputting into a fifth agent based on the process text; reviewing the third text based on the process text, and the fifth agent is used to operate in parallel with the second agent.

[0016] In one embodiment, the method also includes: determining a second output text based on a target task text corresponding to the target task, the second output text including description information of the first agent, description information of the second agent, an association relationship between the first agent and the second agent, and the process text; inputting the second output text into the third agent; the third agent reviews the second output text based on the target task text and outputs a third review result; when the third review result indicates that the review is passed, creating and setting the first agent and the second agent based on the description information and the association relationship.

[0017] In one embodiment, inputting the second output text into the third agent comprises:

[0018] The second output text is input into the third agent, instructing the third agent to determine whether the first agent and the second agent can complete the target task by executing the process corresponding to the process text based on the second output text.

[0019] In one embodiment, the target task is used to locate cross-domain message anomalies, and the first agent outputs a first text for inputting into a second agent based on the process text, including: the first agent outputs the first text based on the process text and message error information, and the first text is used to instruct the second agent to reason based on the message error information to determine whether a specific type of anomaly exists.

[0020] In one embodiment, the target task is used to generate an application, and the first agent outputs a first text for inputting into the second agent based on the process text, including: the first agent outputs the first text based on the process text, and the first text is used to instruct the second agent to generate code corresponding to the target function.

[0021] A second aspect of the present specification provides a multi-agent collaboration device, comprising:

[0022] An input unit, configured to input a process text corresponding to a target task to a first agent, wherein the process text includes steps to be performed by each of a plurality of agents and information indicating an execution order of each step, wherein the plurality of agents include the first agent and a second agent;

[0023] An output unit, configured to output, by the first agent, a first text for inputting into a second agent according to the process text;

[0024] A review unit, configured to review the first text based on the process text to obtain a first review result;

[0025] A generating unit is used for generating, by the first agent, a second text for inputting into the second agent based on the process text, the first text and the first review result when the review fails.

[0026] A third aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method described in the first aspect.

[0027] A fourth aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.

[0028] The fifth aspect of this specification provides a computer program product, including a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.

[0029] The embodiments of this specification provide a multi-agent collaboration solution, in which the output of each of the multiple agents collaborating to complete a task is reviewed, and the process is advanced based on the review results, so that problems arising in the process can be discovered and optimized as quickly as possible, allowing the collaboration of multiple agents to better complete the task. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0031] Figure 1 A schematic diagram of the system architecture in the embodiments of this specification;

[0032] Figure 2 A flow chart of a method for creating an agent for a target task in an embodiment of this specification;

[0033] Figure 3 is a schematic diagram of the contents included in the text corresponding to the abnormality location task in the embodiment of this specification;

[0034] Figure 4 A schematic diagram of the contents included in the text corresponding to the application generation task in the embodiment of this specification;

[0035] Figure 5 A flowchart of a multi-agent collaboration method in an embodiment of this specification;

[0036] Figure 6 is a flowchart of another multi-agent collaboration method in an embodiment of this specification;

[0037] Figure 7 Schematic diagram of a multi-agent collaboration device in an embodiment of this specification. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0039] In response to the problems existing in the above-mentioned related technologies, the embodiments of this specification provide a multi-agent collaboration solution, in which the environment module combines with the review module to review the output of each of the multiple agents that collaborate to complete the task, and advance the process based on the review results, so that problems arising in the process can be discovered and optimized as soon as possible, so that the collaboration of multiple agents can complete the task with a better process.

[0040] Figure 1Schematic diagram of the system architecture in the embodiments of this specification. Figure 1 As shown, the system may include an environment module, a creation agent, a multi-agent module and a review module. The environment module interacts with each agent in the creation agent multi-agent module and the review module respectively, so that the environment module can be combined with the review module to promote multiple agents to collaborate to complete the target task. Among them, the system may initially include an environment module, a creation agent and a review module. The environment module can input the target task text to the creation agent, and the creation agent can output the description information of multiple agents (such as Agent1, Agent2, Agent3, Agent4) based on the target task text, the relationship between multiple agents and the process text. The review module may include a review agent. The environment module can use the review module to review the information output by the creation agent. If the review is passed, a multi-agent module is created based on the description information of the multiple agents and the relationship between the multiple agents, which includes, for example, Agent1, Agent2, Agent3, Agent4, etc. The following will be combined with Figure 1 Describe the multi-agent collaboration process in the embodiments of this specification.

[0041] Figure 2 This is a flow chart of a method for creating an intelligent agent for a target task in an embodiment of this specification.

[0042] like Figure 2 As shown, in step S201, the environment module inputs the target task text for creating an agent.

[0043] The environment module can be a code module in the system used to interface with users and various agents to advance the task process. Users can input a request for a specific task into the environment module, and the environment module can create the specific task based on the request and generate a task text. After creating the task, the environment module can store information related to the task, including the task request, task text, etc.

[0044] After receiving the task request from the user, the environment module may first determine whether the task request includes process information and agent-specific information. If the task request does not include process information and agent-specific information, the environment module may determine whether the task involved in the task request is a complex task that requires multiple agents to collaborate on processing. For example, the environment module may determine whether the task is a complex task by using a large model. If yes, the task is considered as a target task and the target task is executed. Figure 2 The process of the method shown. When the environment module determines that the task is a simple task, the task can be performed by a single agent.

[0045] In one instance, the target task is, for example, to locate anomalies in a distributed system based on error information. The request for the target task may include, for example, a description of the architecture of the distributed system, a description of anomalies that may occur in the distributed system, and other information. For example, the distributed system may include multiple topic groups, and the distributed system may also include one or more domains, each corresponding to a domain name. At least one of the following anomalies may occur in the distributed system: anomalies in the configuration of the topic group, dirty data stored under the domain name, single-machine anomalies, etc. Among them, the presence of dirty data under the domain name usually refers to the contamination of the domain name server cache, resulting in the domain name resolution result being tampered with or pointing to an incorrect IP address.

[0046] In another example, the target task is, for example, to generate a target application, which is, for example, an application for a library management system. The request for the target task may include, for example, a description of the function of the target application, a description of the interface of the target application, a description of the operating environment of the target application, and other information. The target task text may include the name of the target application and the above-mentioned description information corresponding to the target application.

[0047] The environment module can input the target task text into the creation agent to generate the description information of multiple agents corresponding to the target task, their association relationship and the process information of the target task through the creation agent. The creation agent can be obtained from an existing large model, or can be obtained by fine-tuning the existing large model based on the training sample.

[0048] In step S203, the created agent outputs a text text0 according to the input information, and the text text0 includes the description information of the multiple agents to be created, their association information and process information.

[0049] In one embodiment, the creation of an agent may output a text text0 based on the currently input target task text, and the text text0 may include preliminary process information, description information of multiple agents required to execute the process, and the association relationship between the multiple agents. The process information may include, for example, multiple process steps, the goals that need to be completed in each process step, etc. The description information of the agent may include, for example, at least one of the following: the function of the agent, the applicable field, the needs of the user, etc. The function of the agent may include, for example, at least one of the following: code generation, reasoning, dialogue, recommendation, content generation, etc. Applicable fields include, for example, medical care, finance, education, the Internet, etc. The association relationship between multiple agents may include, for example, dependency relationships and subscription relationships between agents.

[0050] For example, Figure 3Schematic diagram of the contents included in the text text0 corresponding to the above-mentioned abnormality location task in the embodiment of this specification. Figure 3 The description of Agent1, Agent2 and Agent4 in text0, the association relationship between the Agents defined in the text is: the output of Agent1 is used as the input of Agent2, the output of Agent2 and the output of Agent1 are used as the input of Agent4, and Agent1 can use the output of Agent2 as input to output text for inputting Agent4.

[0051] The process information in the text text0 includes, for example: Agent1 generates an input text Text1 for Agent2, and provides the input text Text1 to Agent2, where the input text Text1 instructs Agent2 to determine whether there is an abnormality in the configuration of the subject group based on the error information; Agent2 performs reasoning based on the input text Text1 and the error information to determine whether there is an abnormality in the configuration of the subject group, and provides the output text Text2 including the determination result to Agent1 and Agent4; Agent1 generates an input text Text3 for Agent4 based on the process text and text Text2, and provides the input text Text3 to Agent4, where the input text Text3 instructs Agent4 to determine whether there is dirty data in each domain name based on the error information; Agent4 performs reasoning based on text Text3 and text Text2 to determine whether there is dirty data in each domain name.

[0052] Figure 4 Schematic diagram of the contents included in the text Text0 corresponding to the above-mentioned application generation task in the embodiment of this specification. The text text0 includes Figure 4 The description of Agent1, Agent2, Agent3 and Agent4 in text0, the association relationship between Agents defined in text0 is: the output of Agent1 is used as the input of Agent2, Agent3 and Agent4 respectively, Agent4 depends on the input of Agent2 and Agent3, the output of Agent4 is used as the input of Agent2 and Agent3, the output of Agent2 and Agent3 is also used as the input of Agent1, etc.

[0053] The process information in the text text0 includes, for example: Agent1 generates input texts of Agent2 and Agent3 respectively and provides them to Agent1 and Agent2 respectively, for example, the input text of Agent2 is used to instruct Agent2 to generate client code, function f1 that the client code needs to have, etc., and the input text of Agent3 is used to instruct Agent3 to generate server code, function f2 that the server code needs to have, etc.; Agent2 and Agent3 generate corresponding codes based on the text output by Agent1 in parallel, wherein Agent2 generates code corresponding to function f1, and Agent3 generates code corresponding to function f2; after Agent2 and Agent3 generate codes, they provide the codes to Agent4 and Agent1 respectively, and after Agent1 determines that Agent2 and Agent3 have completed the generation of codes, Agent1 generates input text of Agent4 and provides it to Agent4, and the input text is used to instruct Agent4 to test the generated codes; Agent4 tests the codes based on the text input by Agent1, and when the test fails, provides the problems existing in the codes to Agent2 and Agent3 respectively.

[0054] In step S205, the creation agent provides the text text0 to the environment module.

[0055] In one embodiment, the environment module can obtain text text0 by reading the text text0 output by the creation agent. It is understood that in the embodiments of this specification, it is not limited to the environment module reading the output of the creation agent, and the text text0 output by the creation agent can be obtained by other known methods. For example, the environment module can subscribe to the output of the creation agent so that the creation agent pushes its output to the environment module. After obtaining the output of the creation agent, the environment module stores the output and records the status of the output, such as "pending review".

[0056] In step S207, the environment module inputs the text text0 and the target task text into the review module.

[0057] In step S209, the review module reviews the text text0 based on the target task text and outputs the review result.

[0058] The review module can be used to review whether the text text0 can be used to achieve the target task. Specifically, the review module can review whether the multiple agents described in text0 meet the requirements of the target task, whether the multiple agents can achieve the target task by executing multiple steps in the process based on their associations, and whether the output of each agent conforms to the preset structure.

[0059] In one embodiment, the review module may include a preset code module, which reviews the text text0 based on preset review rules and the target task text. In another embodiment, the review module may include an agent for reviewing (hereinafter referred to as the review agent), and the target task text and the text text0 may be input to the review agent, so that the review agent can output the corresponding review result.

[0060] The review result output by the review module indicates whether the review is passed. If the review fails, the review result may also include at least one of the following: the reason for failure of the review, problems existing in the text text0, modification suggestions for the text text0, etc.

[0061] In step S211, the review module provides the review result to the environment module.

[0062] In step S213, the environment module determines whether the review is passed. If the review is passed, the environment module executes step S217 to create multiple agents according to the text text0 and establish (or set) the association relationship between the multiple agents. The environment module can also set the initial value of the state of each agent (e.g., an empty state). In addition, the environment module can also update the state of the output of the created agent to pass the review.

[0063] In the case of failure in the review, in step S215, the environment module inputs the target task text, the current text text0 and the review result to the created agent, so that the created agent can re-execute step S203, and re-output the updated text text0 based on the input target task text, the current text text0 and the review result, so that a more complete text text0 for completing the target task can be output after the review of the review module. After re-executing step S203, steps S205-S213 can be continued in the order in the flowchart, and in step S213, it is determined whether to execute step S215 or step S217 based on the review result. The created agent can repeat the above process until the review is passed or the maximum number of reviews is reached, thereby finally generating a text text0 that has been optimized multiple times. After that, the created agent can provide the text text0 to the environment module, which stores the text text0, records the status of the text text0 as "review passed", and executes step S217 to create multiple Agents (for example) based on the text text0. Figure 3 or Figure 4 Multiple intelligent agents as shown) are established and their association relationships are established.

[0064] It can be understood that, in this embodiment, although it is shown that the text text0 is generated by creating an agent, this embodiment is not limited to this. For example, the text text0 can be generated by other text generation modules (or models). In addition, when the user directly specifies the target task and the process information corresponding to the target task and the information of multiple agents, the environment module can directly create multiple agents based on the information provided by the user.

[0065] After creating multiple agents, the environment module can promote the process through the collaboration of multiple agents until the target task is completed.

[0066] Figure 5 This is a flow chart of a method for multi-agent collaboration in an embodiment of this specification.

[0067] like Figure 5 As shown, in step S501, the environment module inputs a process text to Agent1, and instructs Agent1 to generate an input text Text1 of Agent2 according to the process text.

[0068] The environment module can obtain the process information from the above text Text0 and input the process information into Agent1 as process text. The process text corresponds to Figure 3 or Figure 4 In the process shown, Agent 1 is, for example, Figure 3 or Figure 4 Agent1 in .

[0069] In one implementation, the environment module may input the process text and the identifier of Agent2 to Agent1 to instruct Agent1 to output the text for inputting into Agent2.

[0070] After inputting the process text to Agent1, the environment module can record the operation as the state of the process.

[0071] In step S503, Agent1 outputs text Text1 for input to Agent2 according to the input information.

[0072] In one embodiment, for the above-mentioned abnormality location task, Agent 1 generates a text Text1 according to the process text. The text Text1 is used to instruct Agent 2 to determine whether there is an abnormality in the configuration of the subject group based on the error information.

[0073] In another embodiment, for the above application generation task, Agent1 generates text Text1 and text Text1′ corresponding to Agent2 and Agent3 respectively according to the process text. The text Text1 is used to instruct Agent2 to generate code code1 corresponding to function f1 on the client side, and the text Text1′ is used to instruct Agent3 to generate code code2 corresponding to function f2 on the server side. The following description only takes the text Text1 as an example.

[0074] In step S505, Agent1 provides the text Text1 to the environment module.

[0075] The environment module may read the text Text1 by reading the output text from Agent1, store the text Text1 in association with Agent1, and record the status of the text Text1 as "pending review".

[0076] In step S507, the environment module inputs the process text, the text Text1, the identifier of Agent1 and the identifier of Agent2 to the review module, and instructs the review module to review the text Text1.

[0077] The environment module can input the process text, text Text1, the identifier of Agent1 and the identifier of Agent2 to the review module in a predetermined format to indicate that the text Text1 is generated by Agent1 based on the process text and is used to input Agent2, and to instruct the review module to review the text Text1. The environment module can also indicate in a natural language that the text Text1 is generated by Agent1 based on the process text and is used to input Agent2, and to instruct the review module to review the text Text1.

[0078] In step S509, the review module reviews the text Text1 based on the process text, the identifier of Agent1 and the identifier of Agent2, and outputs the review result.

[0079] As described above, the review module can perform review based on preset rules, or can perform review based on a review agent.

[0080] The review module can review whether the text Text1 complies with the corresponding process in the process text, the description of Agent2, whether the text Text1 corresponds to the instructions in the input information of Agent1, etc., and output the review result.

[0081] For example, in the exception location task, the review module can review whether the instructions to Agent2 in the text Text1 correspond to the function of Agent2 described in the process text (i.e., determine whether there is an exception in the configuration of the subject group based on the error message). In the application generation task, the review module can review whether the instructions in the text Text1 correspond to the function of Agent2 described in the process text (i.e., generate the client code code1 corresponding to function f1).

[0082] In the case where the review is passed, the review result indicates that the text Text1 has passed the review; in the case where the review is not passed, the review module can also generate problems existing in the text Text1.

[0083] In step S511, the review module provides the review result to the environment module.

[0084] In step S513, the environment module determines whether the review is passed.

[0085] In the case of failure in the review, the review module executes step S515, inputs the process text, the current text Text1 and the review result to Agent1, so that Agent1 can re-execute step S503, and regenerate the text Text1 according to the input process text, the current text Text1 and the review result. The updated text Text1 takes into account the problems existing in the text Text1 before the update included in the review result, so as to be a more optimized text. Then, steps S505-S513 can be executed again to determine whether the updated text Text1 has passed the review. By repeating the above steps multiple times, a better text Text1 can be finally obtained.

[0086] In one embodiment, when the text Text1 still fails to pass the review after multiple cycles, the environment module can re-input the input and output data of Agent1 in multiple cycles into the creation agent so that the creation agent can re-determine a more optimized Agent1.

[0087] In the case of passing the review, the environment module can update the status of the text Text1 to passed the review, and input the text Text1 into Agent2, thereby promoting the progress of the process.

[0088] Figure 6 This is a flowchart of another multi-agent collaboration method in an embodiment of this specification.

[0089] like Figure 6 As shown, in step S601, the environment module inputs the text Text1 into Agent2.

[0090] In the anomaly localization task, this step corresponds to Figure 3 The arrow from Agent1 to Agent2 in the figure indicates that the environment module inputs the text Text1 to Agent2 according to the description of the text Text1 in the process information (or process text) (that is, Agent1 provides the text Text1 to Agent2). Similarly, in the application generation task, the environment module inputs the text Text1 to Agent2 according to the description of the text Text1 in the process information.

[0091] In step S603, Agent2 outputs text Text2 according to the input information.

[0092] Specifically, in the abnormality location task, Agent2 reads multiple error messages in the distributed system through a preset interface according to the instructions in the text Text1, analyzes the multiple error messages, and determines whether the multiple error messages are concentrated on a single subject group. If the multiple error messages are concentrated on a single subject group, it determines whether the configuration of the single subject group is abnormal based on the configuration of the subject group; if the multiple error messages are not concentrated on a single subject group, it determines that there is no abnormality in the configuration of each subject group. After completing the above reasoning, Agent2 outputs the text Text2, which indicates whether the configuration of each subject group is abnormal.

[0093] In the application generation task, Agent2 outputs text Text2 according to the instructions in text Text1, and the text Text1 includes the code corresponding to function f1.

[0094] In step S605, Agent2 provides the text Text2 to the environment module.

[0095] In step S607, the environment module inputs the process text, the identifier of Agent2 and the text Text2 to the review module, and instructs the review module to review the text Text2.

[0096] The environment module can input the process text, the identifier of Agent2 and the text Text2 to the review module in a predetermined order (or format) to indicate that the text Text2 is output by Agent2, and to instruct the review module to review the text Text2 based on the process text. The environment module can also indicate that the text Text2 is output by Agent2 in a natural language, and to instruct the review module to review the text Text2 based on the process text.

[0097] In one implementation, the environment module may input the process text, the identifier of Agent2, the text Text1 and the text Text2 into the review module, and instruct the review module to review the text Text2 based on the process text and the text Text1.

[0098] In step S609, the review module reviews the text Text2 based on the process text and outputs the review result.

[0099] The review module can review whether the text Text2 complies with the corresponding process in the process text, the description of Agent2, whether the text Text2 corresponds to the instructions in the input information (text Text1) of Agent2, etc., and output the review result.

[0100] For example, in an abnormality location task, the review module may review whether the text Text2 includes a determination result of “there is or is not an abnormality in the configuration of the subject group.” In an application generation task, the review module may review whether the text Text2 includes a code code1 corresponding to the function f1.

[0101] In the case where the review is passed, the review result indicates that the text Text2 has passed the review; in the case where the review is not passed, the review module can also generate problems existing in the text Text2.

[0102] In step S611, the review module provides the review result to the environment module.

[0103] In step S613, the environment module determines whether the review is passed.

[0104] In the case of failure to pass the review, the review module executes step S615, inputs text Text1, current text Text2 and the review result to Agent2, so that Agent2 can re-execute step S603, and regenerate text Text2 based on the input text Text1, current text Text2 and the review result. The updated text Text2 takes into account the problems existing in the text Text2 before the update included in the review result, so it is a more optimized text. Then, steps S605-S613 can be executed again to determine whether the updated text Text2 has passed the review. By repeating the above steps multiple times, a better text Text2 can be finally obtained.

[0105] In one embodiment, when the text Text2 still fails to pass the review after multiple cycles, the environment module can re-input the input and output data of Agent2 in multiple cycles into the creation agent so that the creation agent can re-determine a more optimized Agent2.

[0106] If the review is passed, the environment module can record the status of the text Text2 as passed, and execute step S617 to input the process text, the text Text2 and the identifier of Agent2 into Agent1, indicating that Text2 is output by Agent2, and instructing Agent1 to generate the text Text3 for input into Agent4.

[0107] Specifically, in Figure 4 In the application generation task shown, after the environment module determines that the output text Text2 of Agent2 and the output text Text2′ of Agent3 are both reviewed and passed, the process text, text Text2, the identifier of Agent2, the text Text2′ and the identifier of Agent3 are input into Agent1, indicating that Text2 is output by Agent2 and Text2′ is output by Agent2′, and instructs Agent1 to generate text Text3 for input into Agent4 based on the process text, text Text2 and text Text2′.

[0108] In step S619, Agent1 outputs text Text3 for input to Agent4 according to the input information.

[0109] Specifically, in the exception location task, Agent 1 can generate text Text3 according to the input process text, text Text2 and the identifier of Agent 2, and the text Text3 is used to instruct Agent 4 to determine whether each domain name has dirty data based on the error information.

[0110] In the application generation task, Agent1 can generate text Text3 according to the input process text, text Text2 and the identifier of Agent2, text Text2′ and the identifier of Agent3. The text Text3 is used to instruct Agent3 to test the code included in the text Text2 and the code included in Text2′.

[0111] After Agent4 generates output based on the input information, it can be similar to Figure 6 The process shown is processed, that is, the environment module reviews the text output by Agent4 through the review module, and promotes the process when the review is passed.

[0112] In one embodiment, reference Figure 4In the application generation task, the output text Text4 of Agent4 may include feedback information to Agent2 and Agent3 (i.e., problems in the code). After the environment module has reviewed and approved the output text Text4 of Agent4, it may re-input the text Text1 and the text Text4 into Agent2, so that Agent2 can re-execute Figure 6 In step S603, output is performed according to the input information, so that the process can be promoted by executing steps S605-S619 again.

[0113] Figure 7 The following is an architecture diagram of a multi-agent collaboration device in an embodiment of the present specification, including:

[0114] An input unit 71, used to input a process text corresponding to a target task to the first agent;

[0115] An output unit 72, configured for the first agent to output a first text for inputting into a second agent according to the process text;

[0116] A review unit 73, configured to review the first text based on the process text to obtain a first review result;

[0117] The generating unit 74 is used for generating, by the first agent, a second text for inputting into the second agent based on the process text, the first text and the first review result when the review fails.

[0118] In one embodiment, the review unit 73 is further used to: input the process text to a third agent, and the third agent reviews the first text based on the process text, and outputs the first review result.

[0119] In one implementation, the output unit 72 is further configured to:

[0120] The first agent generates the first text according to the process text and the output text of a fourth agent, and the fourth agent is an agent that precedes the second agent in the process corresponding to the process text.

[0121] In one implementation, the first review result includes problems existing in the first text or modification suggestions for the first text.

[0122] In one embodiment, the input unit is further used to: input a process text corresponding to the target task to the first agent, and instruct the first agent to output a first text for inputting into the second agent.

[0123] In one embodiment, the input unit is further used to: input the first text into the second agent when the review is passed.

[0124] In one embodiment, the output unit is also used for the second agent to output a first output text based on the first text; the input unit is also used to input the first output text into the third agent; the review unit is also used for the third agent to review the first output text based on the process text and output a second review result; the input unit is also used to input the first text, the first output text and the second review result into the second agent when the second review result indicates that the review has failed.

[0125] In one embodiment, the device further includes: an updating unit, configured to update or replace the second agent when the second review result indicates that the review has not passed.

[0126] In one embodiment, the review unit is further configured to: have the third agent review the first output text based on the process text and the first text.

[0127] In one embodiment, the output unit is also used for the first agent to output a third text for input into a fifth agent based on the process text; the review unit is also used to review the third text based on the process text, and the fifth agent is used to operate in parallel with the second agent.

[0128] In one embodiment, the output unit is further configured to output a second output text by the creation agent according to the target task text corresponding to the target task, wherein the second output text includes description information of the first agent, description information of the second agent, an association relationship between the first agent and the second agent, and the process text;

[0129] The input unit is also used to input the second output text into the third agent;

[0130] The review unit is also used for the third agent to review the second output text based on the target task text and output a third review result; the device also includes a creation unit, which is used to create and set the first agent and the second agent according to the description information and the association relationship when the third review result indicates that the review is passed.

[0131] In one embodiment, the input unit is also used to: input the second output text into the third agent, instructing the third agent to determine: based on the second output text, whether the first agent and the second agent can complete the target task by executing the process corresponding to the process text.

[0132] In one embodiment, the target task is used to locate cross-domain message anomalies, and the output unit is also used to: the first agent outputs the first text based on the process text and the message error information, and the first text is used to instruct the second agent to reason based on the message error information to determine whether a specific type of anomaly exists.

[0133] In one embodiment, the target task is used to generate an application, and the output unit is further used to: the first agent outputs the first text according to the process text, and the first text is used to instruct the second agent to generate code corresponding to the target function.

[0134] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0135] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0136] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0137] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0138] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0139] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0143] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0144] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0145] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0147] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0148] The above description is only an example of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. For those skilled in the art, one or more embodiments of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims.

Claims

1. A multi-agent collaboration method, comprising: Inputting a process text corresponding to a target task to a first agent, wherein the process text includes steps to be performed by each agent in a plurality of agents and information indicating an execution order of each step, wherein the plurality of agents include the first agent and a second agent; The first agent outputs a first text for inputting into the second agent according to the process text; Based on the process text, review the first text to obtain a first review result; In the case where the review fails, the first agent generates a second text for inputting into the second agent based on the process text, the first text and the first review result.

2. According to the method of claim 1, the step of reviewing the first text based on the process text comprises: The process text is input to the third agent, and the third agent reviews the first text based on the process text, and outputs the first review result.

3. The method according to claim 1, wherein the first agent outputs the first text for inputting into the second agent according to the process text, comprising: The first agent generates the first text according to the process text and the output text of a fourth agent, and the fourth agent is an agent that precedes the second agent in the process corresponding to the process text.

4. The method according to claim 1, wherein: The first review result includes problems existing in the first text or suggestions for modifying the first text.

5. According to the method of claim 1, the step of inputting a process text corresponding to the target task to the first agent comprises: A process text corresponding to a target task is input to a first agent, and the first agent is instructed to output a first text for inputting into a second agent.

6. The method according to claim 2, further comprising: When the review is passed, the first text is input into the second agent.

7. The method according to claim 6, further comprising: Outputting a first output text by the second agent based on the first text; Inputting the first output text into the third agent; The third agent reviews the first output text based on the process text and outputs a second review result; When the second review result indicates that the review has not passed, the first text, the first output text and the second review result are input into the second agent.

8. The method according to claim 7, further comprising: When the second review result indicates that the review has not passed, the second agent is updated or replaced.

9. The method according to claim 7, wherein the third agent reviews the first output text based on the process text, comprising: The first output text is reviewed by the third agent based on the process text and the first text.

10. The method according to claim 1, further comprising: The first agent outputs a third text for inputting into a fifth agent according to the process text; The third text is reviewed based on the process text, and the fifth agent is used to operate in parallel with the second agent.

11. The method according to claim 2, further comprising: Determining a second output text according to the target task text corresponding to the target task, wherein the second output text includes description information of the first agent, description information of the second agent, an association relationship between the first agent and the second agent, and the process text; inputting the second output text into the third agent; The third agent reviews the second output text based on the target task text and outputs a third review result; When the third review result indicates that the review is passed, the first agent and the second agent are created and set according to the description information and the association relationship.

12. The method according to claim 11, wherein inputting the second output text into the third agent comprises: The second output text is input into the third agent, instructing the third agent to determine whether the first agent and the second agent can complete the target task by executing the process corresponding to the process text based on the second output text.

13. The method according to claim 1, wherein the target task is used to locate cross-domain message anomalies. The first agent outputting a first text for inputting into a second agent according to the process text comprises: The first agent outputs the first text according to the process text and the message error information, and the first text is used to instruct the second agent to perform reasoning based on the message error information to determine whether a specific type of exception exists.

14. The method according to claim 1, wherein the target task is used to generate an application. The first agent outputting a first text for inputting into a second agent according to the process text comprises: The first agent outputs the first text according to the process text, and the first text is used to instruct the second agent to generate a code corresponding to a target function.

15. A multi-agent collaboration device, comprising: An input unit, configured to input a process text corresponding to a target task to a first agent, wherein the process text includes steps to be performed by each of a plurality of agents and information indicating an execution order of each step, wherein the plurality of agents include the first agent and a second agent; An output unit, configured to output, by the first agent, a first text for inputting into a second agent according to the process text; A review unit, configured to review the first text based on the process text to obtain a first review result; A generating unit is used for generating, by the first agent, a second text for inputting into the second agent based on the process text, the first text and the first review result when the review fails.

16. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Cited By

  • Method and device for processing data by using intelligent agent, equipment, medium and product

    CN120181126A

  • PBL teaching auxiliary system and method based on double-agent system

    CN121117149A

  • Multi-agent cooperation method and computing device

    WO2026103525A1