Multi-agent cooperative processing method and device
By disassembling complex tasks into subtasks and using greedy algorithms to select agent processing, the limitations of generative large models in complex task processing and communication barriers and task allocation problems in multiagent collaboration are solved, and more efficient and accurate processing results.
Patent Information
- Application Number
- CN202411504209.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, generative large models are limited by the depth of expertise and resource consumption when handling complex tasks, and agents have communication barriers and improper task allocation problems when multi-agents collaborate.
By disassembling the pending tasks into several subtasks based on the big model, the candidate agent corresponding to each subtask is determined from the preset agent library, and the evaluation and greedy algorithm selection are performed. Finally, the agent processes the subtasks to obtain the task. result.
Improve processing efficiency and accuracy of processing results, while continuously optimizing processing results to make them more accurate.
Smart Images

Figure CN119441808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more particularly to a multi-agent collaborative processing method and device. Background Art
[0002] With the emergence of generative big models, due to their powerful generation capabilities, they can quickly process complex tasks. However, due to the limitations of the depth of professional knowledge and resource consumption of generative big models, generative big models are restricted in processing complex tasks.
[0003] Although intelligent agents have certain advantages in terms of the depth of professional knowledge and perform well in handling tasks in specific fields, there are problems of communication barriers and improper task allocation when multiple agents collaborate.
[0004] Based on this, this specification provides a multi-agent collaborative processing method and device. Summary of the invention
[0005] The embodiments of this specification provide a multi-agent collaborative processing method and device for solving the following technical problems: In the prior art, although the generative large model can realize the rapid processing of complex tasks, the generative large model has certain limitations in the depth of professional knowledge and resource consumption, which restricts the generative large model in processing complex tasks. Although the agent has certain advantages in the depth of professional knowledge and performs well in processing tasks in specific fields. However, when multiple agents collaborate, there are problems of communication barriers and improper task allocation.
[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0007] The embodiment of this specification provides a multi-agent collaborative processing method, including:
[0008] Decompose the task to be processed into several subtasks based on the big model;
[0009] Determine a candidate agent corresponding to each of the plurality of subtasks from a preset agent library;
[0010] Evaluate the candidate agents corresponding to each of the plurality of subtasks to determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks;
[0011] Based on the comprehensive scores of the candidate agents corresponding to each of the plurality of subtasks and the real-time status of the candidate agents corresponding to each of the plurality of subtasks, a greedy algorithm is used to determine the agent corresponding to each of the plurality of subtasks;
[0012] Based on the intelligent agent corresponding to each of the plurality of subtasks, the plurality of subtasks are processed to obtain the processing result of the task to be processed.
[0013] The embodiment of this specification also provides a multi-agent collaborative processing device, including:
[0014] The disassembly module disassembles the task to be processed into several subtasks based on the large model;
[0015] A first determination module determines a candidate agent corresponding to each of the plurality of subtasks from a preset agent library;
[0016] A scoring module is used to evaluate the candidate agents corresponding to each of the plurality of subtasks and determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks;
[0017] The second determination module adopts a greedy algorithm to determine the agent corresponding to each of the plurality of subtasks based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks and the real-time status of the candidate agent corresponding to each of the plurality of subtasks;
[0018] The processing module processes the plurality of subtasks based on the intelligent agent corresponding to each of the plurality of subtasks to obtain the processing result of the task to be processed.
[0019] The multi-agent collaborative processing method provided in the embodiments of the present specification decomposes the task to be processed into several subtasks based on a large model; determines the candidate agent corresponding to each of the several subtasks from a preset agent library; evaluates the candidate agent corresponding to each of the several subtasks to determine the comprehensive score of the candidate agent corresponding to each of the several subtasks; based on the comprehensive score of the candidate agent corresponding to each of the several subtasks and the real-time status of the candidate agent corresponding to each of the several subtasks, a greedy algorithm is used to determine the agent corresponding to each of the several subtasks; based on the agent corresponding to each of the several subtasks, the several subtasks are processed to obtain the processing result of the task to be processed, which can improve the processing efficiency and the accuracy of the processing results, and can continuously optimize to make the processing results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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.
[0021] Figure 1 A schematic diagram of a multi-agent collaborative processing method provided in an embodiment of this specification;
[0022] Figure 2 A framework diagram of a multi-agent collaborative processing method provided in an embodiment of this specification;
[0023] Figure 3 A schematic diagram of an application scenario of a multi-agent collaborative processing method provided in an embodiment of this specification;
[0024] Figure 4 A schematic diagram of an example environment for implementing embodiments of this specification;
[0025] Figure 5 A schematic diagram of a multi-agent collaborative processing device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0026] 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 application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0027] Figure 1 The following is a flowchart of a multi-agent collaborative processing method provided in an embodiment of this specification. From a program perspective, the execution subject of the process can be a program installed on an application server or an application terminal. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 1 As shown, the method includes:
[0028] Step S101: Decompose the task to be processed into several subtasks based on the large model.
[0029] In the embodiments of this specification, the big model is a generative big model, and the big model can be ChatGPT, OpenAI, GATO, etc. The specific type of the big model does not constitute a limitation on this application.
[0030] In the embodiments of the present specification, the pending task is a complex task. Specifically, the pending task is a task that can be decomposed into several subtasks, or the pending task requires multiple steps to complete. In short, the pending task is a task that cannot be executed independently.
[0031] In the embodiments of this specification, the specific method of decomposing the task to be processed into several subtasks based on the large model is not specifically limited here.
[0032] In a specific embodiment, the task to be processed may be a multi-person chat task, or a task that needs to be completed in multiple steps based on an execution order. In one embodiment of the present specification, the task to be processed is a task in a chat system or a chat scene, specifically, it may be a task consisting of a question and an answer from multiple users, the answer to the first question may be the basis for asking the second question, and similarly, the answer to the second question may be the basis for asking the third question, and so on.
[0033] In the embodiment of this specification, the number of the plurality of subtasks is at least 2.
[0034] In the embodiments of this specification, the types of subtasks include: domain identification, user intent detection, slot filling, dialogue state tracking, and dialogue strategy. Among them, domain identification is to determine the domain or category to which the task to be processed belongs. The domain or category to which the task to be processed belongs is predefined, and specifically, it can include: movies, music, weather, daily life, life, food, entertainment, etc. User intent detection is used to identify the purpose or intention of the user. Specifically, the purpose or intention of the user includes: inquiry, reservation, query, etc., for example, asking for movie information, booking a hotel, querying weather conditions, etc. Slot filling is key information, that is, extracting specific information from the user dialogue according to the user's intent. For example, if the user's intention is to ask for movie information, when filling the slot, extract movie-related information from the user dialogue, such as: movie type, date, time, etc. Dialogue state tracking refers to maintaining the current state of the dialogue while tracking the dialogue history and information provided by the user. Dialogue strategy refers to deciding the best action for the next step based on the current state of the dialogue and past interactions.
[0035] In the embodiment of the present specification, each of the plurality of subtasks corresponds to one of the above subtask types.
[0036] Step S103: determining a candidate agent corresponding to each of the plurality of subtasks from a preset agent library.
[0037] An intelligent agent is an entity that can think independently and interact with the environment. It is a computational entity that resides in a certain environment, can function continuously and autonomously, and has characteristics such as residency, responsiveness, sociality, and initiative. Since an intelligent agent has its own knowledge base and reasoning engine, it is intelligent.
[0038] In the embodiment of the present specification, the step of determining a candidate agent corresponding to each of the plurality of subtasks from a preset agent library specifically includes:
[0039] The large model performs agent matching with a preset agent library based on the keywords of the plurality of subtasks to obtain a matching agent corresponding to each of the plurality of subtasks;
[0040] From the matching intelligent agents corresponding to each of the plurality of subtasks, an intelligent agent with a value greater than a preset threshold is determined as a candidate intelligent agent corresponding to each of the plurality of subtasks.
[0041] In the embodiments of the present specification, in order to quickly match the candidate agents corresponding to the subtasks, the preset agent library is further classified. Specifically, the types of the preset agent library include: domain identification agent library, user intention detection agent library, slot filling agent library, dialogue state tracking agent library, and dialogue strategy agent library.
[0042] Before the large model performs agent matching with a preset agent library based on the keywords of the plurality of subtasks to obtain a matching agent corresponding to each of the plurality of subtasks, the following steps are also included:
[0043] The large model is matched with the preset agent library based on the types of subtasks to which the plurality of subtasks belong, so as to obtain the category agent corresponding to each of the plurality of subtasks.
[0044] In the embodiments of the present specification, the category agent refers to an agent corresponding to each of several subtasks obtained by matching according to the types of a preset agent library.
[0045] In the embodiment of the present specification, the step of determining a candidate agent corresponding to each of the plurality of subtasks from a preset agent library specifically includes:
[0046] The large model is matched with the preset agent library based on the types of subtasks to which the plurality of subtasks belong, to obtain a category agent corresponding to each of the plurality of subtasks;
[0047] Based on the keywords of the plurality of subtasks, matching with the category agent corresponding to each of the plurality of subtasks, and obtaining a matching agent corresponding to each of the plurality of subtasks;
[0048] From the matching intelligent agents corresponding to each of the plurality of subtasks, an intelligent agent with a value greater than a preset threshold is determined as a candidate intelligent agent corresponding to each of the plurality of subtasks.
[0049] In the embodiments of this specification, the preset agent library is a pre-set database composed of different agents. The preset agent library is a collection of agents, and the preset agent library can be updated in real time. Each agent included in the preset agent library has a unified naming rule and a unique ID, so that the functions that each agent can achieve can be determined based on the unique ID and / or name of each agent in the preset agent library. Since there is a corresponding relationship between the name of each agent and the unique ID, the preset agent library can be matched according to the name when actually used. Specifically, the large model matches the names of each agent in the preset agent library according to the keywords of several subtasks to determine the matching agent corresponding to each of the several subtasks.
[0050] In the embodiments of this specification, the preset intelligent agent library can be obtained through a deep learning algorithm or based on a reinforcement learning algorithm. The method of obtaining the preset intelligent agent library does not constitute a limitation to the present application.
[0051] Continuing with the previous example, if the task to be processed is a multi-person chat task, the intelligent agent is an intelligent agent that can handle chat tasks, or an intelligent agent with language processing capabilities.
[0052] In order to ensure the accuracy and efficiency of the collaborative processing results, after obtaining the candidate agents corresponding to each of the several subtasks, the candidate agents with a value greater than a preset threshold are screened as the candidate agents corresponding to each of the several subtasks.
[0053] In a specific embodiment, the preset threshold is 80.
[0054] Step S105: Evaluate the candidate agents corresponding to each of the plurality of subtasks to determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks.
[0055] In the embodiment of the present specification, the evaluating of the candidate agents corresponding to each of the plurality of subtasks to determine the comprehensive score of the candidate agents corresponding to each of the plurality of subtasks specifically includes:
[0056] The skill level, experience, historical success rate, response speed and resource usage of the candidate intelligent agents corresponding to each of the plurality of subtasks are evaluated to determine a comprehensive score for the candidate intelligent agents corresponding to each of the plurality of subtasks.
[0057] In the embodiment of this specification, the candidate agents corresponding to each of the plurality of subtasks are evaluated in terms of skill level, experience, historical success rate, response speed and resource usage, and the comprehensive score of the candidate agents corresponding to each of the plurality of subtasks is determined, specifically including:
[0058] Evaluate the skill level, experience, historical success rate, response speed and resource usage of the candidate agents corresponding to each of the plurality of subtasks to obtain a first score, a second score, a third score, a fourth score and a fifth score;
[0059] Determine a comprehensive score of the candidate agent corresponding to each of the plurality of subtasks based on the first score and the first weight coefficient, the second score and the second weight coefficient, the third score and the third weight coefficient, the fourth score and the fourth weight coefficient, and the fifth score and the fifth weight coefficient.
[0060] In the embodiments of the present specification, skill level, experience, historical success rate, response speed and resource usage are indicators for evaluation based on the intelligent agent evaluation system. The intelligent agent evaluation system is a preset system, which can be a system based on artificial intelligence or a system based on a large model. The method for obtaining the intelligent agent evaluation system does not constitute a limitation on the present application.
[0061] In the embodiment of this specification, the calculation formula for the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks is:
[0062] i = first score * first weight coefficient + second score * second weight coefficient + third score * third weight coefficient + fourth score * fourth weight coefficient + fifth score * fifth weight coefficient;
[0063] in,
[0064] i is the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks;
[0065] The first weight coefficient+the second weight coefficient+the third weight coefficient+the fourth weight coefficient+the fifth weight coefficient=1.
[0066] In the embodiments of this specification, the weight coefficient is used to indicate the importance of the evaluation index. In this embodiment, the evaluation index includes: skill level, experience, historical success rate, response speed and resource use. In a specific embodiment, the first weight coefficient is 0.3, the second weight coefficient is 0.2, the third weight coefficient is 0.3, the fourth weight coefficient is 0.1, and the fifth weight coefficient is 0.1.
[0067] Generally speaking, the first weight coefficient, the second weight coefficient, the third weight coefficient, the fourth weight coefficient and the fifth weight coefficient are all default values. Of course, as the business scenarios change, the first weight coefficient, the second weight coefficient, the third weight coefficient, the fourth weight coefficient and the fifth weight coefficient can also be adjusted.
[0068] Step S107: Based on the comprehensive scores of the candidate agents corresponding to each of the subtasks and the real-time status of the candidate agents corresponding to each of the subtasks, a greedy algorithm is used to determine the agent corresponding to each of the subtasks.
[0069] Greedy algorithm, also known as greedy algorithm, means that when solving a problem, it always makes the best choice at the moment. In other words, without considering the overall optimal solution, the algorithm obtains a local optimal solution in a certain sense. Greedy algorithm does not get the overall optimal solution for all problems. The key is the choice of greedy strategy. In the embodiment of this specification, based on the greedy algorithm, the candidate agents corresponding to each of the several subtasks of the task to be processed can be selected to be the best, so that each processing result of the several subtasks is the best.
[0070] In the embodiments of the present specification, the real-time status of the candidate agent corresponding to each of the plurality of subtasks includes at least: the current load performance and availability of the candidate agent corresponding to each of the plurality of subtasks. Among them, the current load performance of the candidate agent corresponding to each of the plurality of subtasks, that is, the current load performance of the candidate agent corresponding to each of the plurality of subtasks, based on which the response speed of the candidate agent can be known. The availability of the candidate agent corresponding to each of the plurality of subtasks, that is, whether the candidate agent corresponding to each of the plurality of subtasks is available.
[0071] In the embodiment of this specification, based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks and the real-time status of the candidate agent corresponding to each of the plurality of subtasks, a greedy algorithm is used to determine the agent corresponding to each of the plurality of subtasks, specifically including:
[0072] Based on the comprehensive scores of the candidate agents corresponding to each of the subtasks, the current load performance and availability of the candidate agents corresponding to each of the subtasks, the agent corresponding to each of the subtasks is determined.
[0073] In the embodiment of the present specification, determining the agent corresponding to each of the plurality of subtasks based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks, the current load performance and availability of the candidate agent corresponding to each of the plurality of subtasks, specifically includes:
[0074] Sorting the comprehensive scores of the candidate agents corresponding to each of the plurality of subtasks in descending order to obtain sorted candidate agents;
[0075] Selecting available agents from the ranked candidate agents as selected candidate agents;
[0076] Based on the current load performance of the screened candidate agents, the agent corresponding to each of the plurality of subtasks is determined.
[0077] In the embodiment of the present specification, available agents are screened from the ranked candidate agents as the screened candidate agents, and agents with a status of "available" can be screened out based on the status of the ranked candidate agents as the screened candidate agents. Specifically, the status of "available" can be marked as status = 1, and the status of "unavailable" can be marked as status = 2. Based on status = 1 or status = 2, it is determined whether the ranked candidate agents are available for screening.
[0078] In a specific embodiment, based on the current load performance of the screened candidate agents, determining the agent corresponding to each of the plurality of subtasks specifically includes:
[0079] Based on the current load performance of the screened candidate agents, the agent with the fastest response is selected as the agent corresponding to each of the plurality of subtasks.
[0080] In this embodiment, since the current load performance of the candidate agents is taken into consideration when determining the agent, the agent with the fastest response is determined as the agent corresponding to each of the several subtasks, the problems of communication barriers and improper task allocation can be solved.
[0081] Load performance is a measure of the current agent's CPU workload, defined as the average number of threads in the run queue during a specific time interval. The lower the load performance, the better.
[0082] In the embodiments of the present specification, the fastest responding agent is selected based on the current load performance of the screened candidate agents. Specifically, the current load performance of the screened candidate agents can be used as an indicator to judge the response performance according to the size of the current load performance of the screened candidate agents. The response performance can also be judged based on the current load performance and load balancing of the screened candidate agents. The response performance can also be judged based on the current performance, historical performance data and historical response performance of the screened candidate agents.
[0083] Step S109: Processing the plurality of subtasks based on the intelligent agent corresponding to each of the plurality of subtasks to obtain processing results of the tasks to be processed.
[0084] In the embodiment of the present specification, the agent corresponding to each of the plurality of subtasks processes the plurality of subtasks to obtain the processing result of the task to be processed, specifically including:
[0085] Based on the intelligent agent corresponding to each of the plurality of subtasks and the sequence of each of the plurality of subtasks, the plurality of subtasks are processed to obtain the processing result of the task to be processed.
[0086] In the embodiment of the present specification, the processing of the plurality of subtasks based on the agent corresponding to each of the plurality of subtasks and the sequence of each of the plurality of subtasks to obtain the processing result of the task to be processed specifically includes:
[0087] Based on the intelligent agent corresponding to each of the several subtasks and the order of each of the several subtasks, the output result of the previous subtask and the next subtask are used together as the input of the intelligent agent corresponding to the next subtask, and the knowledge base of the intelligent agent corresponding to the next subtask is used to process the several subtasks to obtain the processing result of the task to be processed.
[0088] Because in the embodiments of this specification, based on the greedy algorithm, the candidate agents corresponding to each of the several subtasks of the task to be processed can be selected as the best, and the output result of the previous subtask is used together with the next subtask as the input of the agent corresponding to the next subtask, and the knowledge base of the agent corresponding to the next subtask is used to process the several next subtasks, thereby ensuring that the processing result corresponding to each of the several subtasks is optimal, and finally ensuring that the processing result of the task to be processed is optimal.
[0089] In the embodiments of this specification, the output of the agent corresponding to the last subtask of several subtasks is aggregated and integrated in a preset manner to be output as the processing result of the task to be processed. Specifically, the preset manner can be a preset template or a preset format, and the specific form of the preset manner does not constitute a limitation of this application.
[0090] In order to further understand the embodiments of this specification, the output result of the previous subtask is used together with the next subtask as the input of the agent corresponding to the next subtask, which will be explained with a specific example below. For example, the task to be processed is broken down into subtask 1, subtask 2, subtask 3 and subtask 4. After the first result is output by the agent corresponding to subtask 1, subtask 2 and the first result are used as the input of the agent corresponding to subtask 2, thereby outputting the second result. Similarly, subtask 3 and the second result are used as the input of the agent corresponding to subtask 3, thereby outputting the third result; subtask 4 and the third result are used as the input of the agent corresponding to subtask 4, thereby outputting the fourth result. The fourth result is summarized and integrated in a preset manner and output to the user as the processing result of the task to be processed. In this embodiment, the number of subtasks is 4. Of course, the number of subtasks can also be 5, 6... The number of subtasks is determined by the task to be processed and does not constitute a limitation on this application.
[0091] The multi-agent collaborative processing method provided in the embodiments of this specification can be implemented through Python pseudocode in a specific embodiment.
[0092] Here is an example of the algorithm in Python pseudocode:
[0093] def evaluate_agents(agents,task):
[0094] for agent in agents:
[0095]
[0096] The embodiments of this specification use multi-person chat as an example to illustrate the multi-agent collaborative processing method. It should be particularly noted that in addition to being applicable to business scenarios of multi-person chat, similar ideas can be applied to specific business scenarios such as smart homes and smart medical care.
[0097] In order to further understand the multi-agent collaborative processing method provided by this illustrative embodiment, the framework of the multi-agent collaborative processing method will be described below.
[0098] Figure 2This is a framework diagram of a multi-agent collaborative processing method provided in the embodiments of this specification. Figure 2 As shown in the figure, after the large model receives the task to be processed, it breaks down the task to be processed into several subtasks and screens out candidate agents. The candidate agents are further scored based on the agent evaluation system to obtain a comprehensive score; based on the comprehensive score, dynamic matching (based on the current load and availability, the fastest responding agent is selected) is used to determine the agent corresponding to each of the several subtasks, so as to process each of the several subtasks (taking four subtasks as an example) and obtain the processing result of the task to be processed.
[0099] In order to further understand the multi-agent collaborative processing method provided in the embodiments of this specification, it will now be described in detail in conjunction with specific application scenarios. Figure 3 This is a schematic diagram of an application scenario of a multi-agent collaborative processing method provided in an embodiment of this specification. Figure 3 As shown, the group chat system user sends the pending task to the server 302 through the terminal device 301. After receiving the pending task, the server first splits the pending task into several subtasks based on the large model by the disassembly module 303, and then the first determination module 304 determines the candidate agent corresponding to each of the several subtasks from the preset agent library; then, the scoring module 305 evaluates the candidate agent corresponding to each of the several subtasks to determine the comprehensive score of the candidate agent; based on the score of the candidate agent, the second determination module 306 adopts a greedy algorithm to determine the agent corresponding to each of the several subtasks through a dynamic matching method; finally, the processing module 307 processes the several subtasks based on the agent corresponding to each of the several subtasks to obtain the processing results of the several subtasks, and the processing results of the several subtasks are summarized and output as the processing results of the pending task, so as to be output to the group chat system user.
[0100] In order to further understand the multi-intelligent collaborative processing method provided by the embodiments of this specification, it will now be explained in conjunction with the implementation environment. Figure 4 A schematic diagram of an example environment for implementing embodiments of the present specification. Figure 4 In the environment 400 in FIG. 4 , the electronic device 410 can receive a task to be processed 420 input by a user. Based on the task to be processed 420 input by the user, the electronic device 410 processes the task to be processed 420 through a collaborative processing method provided in an embodiment of the specification, and obtains a processing result of the task to be processed through multiple agents in a preset agent library. The electronic device 420 outputs and displays the processing result of the task to be processed to the user for the user to respond.
[0101] The electronic device 410 may include any computing system with computing capabilities, such as various computer devices / systems, terminal devices, servers, etc. The terminal device may involve any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. Servers include but are not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0102] It should be understood that Figure 4 The components and arrangements in the environment 400 are merely examples, and a computing system suitable for implementing the exemplary implementation of the embodiments of the present specification may include one or more different components, other components, and / or different arrangements. The implementation of the embodiments of the present specification is not limited in this respect.
[0103] The multi-agent collaborative processing method provided in the embodiments of the present specification decomposes the task to be processed into several subtasks based on a large model; determines the candidate agent corresponding to each of the several subtasks from a preset agent library; evaluates the candidate agent corresponding to each of the several subtasks to determine the comprehensive score of the candidate agent corresponding to each of the several subtasks; based on the comprehensive score of the candidate agent corresponding to each of the several subtasks and the real-time status of the candidate agent corresponding to each of the several subtasks, a greedy algorithm is used to determine the agent corresponding to each of the several subtasks; based on the agent corresponding to each of the several subtasks, the several subtasks are processed to obtain the processing result of the task to be processed, which can improve the processing efficiency and the accuracy of the processing results, and can continuously optimize to make the processing results more accurate.
[0104] The above content describes in detail a multi-agent collaborative processing method. Correspondingly, this specification also provides a multi-agent collaborative processing device, such as Figure 5 shown. Figure 5 A schematic diagram of a multi-agent collaborative processing device provided in an embodiment of this specification, the device comprising:
[0105] A decomposition module 501 decomposes the task to be processed into several subtasks based on the large model;
[0106] A first determination module 503 determines a candidate agent corresponding to each of the plurality of subtasks from a preset agent library;
[0107] A scoring module 505 is used to evaluate the candidate agents corresponding to each of the plurality of subtasks, and determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks;
[0108] The second determination module 507 uses a greedy algorithm to determine the agent corresponding to each of the plurality of subtasks based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks and the real-time status of the candidate agent corresponding to each of the plurality of subtasks;
[0109] The processing module 509 processes the plurality of subtasks based on the intelligent agent corresponding to each of the plurality of subtasks to obtain the processing result of the task to be processed.
[0110] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0111] Each embodiment in this specification is described in a progressive manner, and the same or 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 device, electronic device, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0112] The apparatus, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, electronic device and non-volatile computer storage medium also have beneficial technical effects similar to those of the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device and non-volatile computer storage medium will not be repeated here.
[0113] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0114] The 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. The 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.
[0115] Each embodiment in this specification is described in a progressive manner, and the same or 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.
[0116] The above is only an embodiment of this specification 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-based task collaborative processing method, characterized in that: The method comprises: Decompose the task to be processed into several subtasks based on the big model; Determine a candidate agent corresponding to each of the plurality of subtasks from a preset agent library; Evaluate the candidate agents corresponding to each of the plurality of subtasks to determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks; Based on the comprehensive scores of the candidate agents corresponding to each of the plurality of subtasks and the real-time status of the candidate agents corresponding to each of the plurality of subtasks, a greedy algorithm is used to determine the agent corresponding to each of the plurality of subtasks; Based on the intelligent agent corresponding to each of the plurality of subtasks, the plurality of subtasks are processed to obtain the processing result of the task to be processed.
2. The method according to claim 1, characterized in that The step of determining a candidate agent corresponding to each of the plurality of subtasks from a preset agent library specifically includes: The large model performs agent matching with a preset agent library based on the keywords of the plurality of subtasks to obtain a matching agent corresponding to each of the plurality of subtasks; From the matching intelligent agents corresponding to each of the plurality of subtasks, an intelligent agent with a value greater than a preset threshold is determined as a candidate intelligent agent corresponding to each of the plurality of subtasks.
3. The method according to claim 1, characterized in that The step of evaluating the candidate agents corresponding to each of the plurality of subtasks to determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks specifically includes: The skill level, experience, historical success rate, response speed and resource usage of the candidate intelligent agents corresponding to each of the plurality of subtasks are evaluated to determine a comprehensive score for the candidate intelligent agents corresponding to each of the plurality of subtasks.
4. The method according to claim 3, characterized in that The step of evaluating the skill level, experience, historical success rate, response speed and resource usage of the candidate agents corresponding to each of the plurality of subtasks to determine the comprehensive score of the candidate agents corresponding to each of the plurality of subtasks specifically includes: Evaluate the skill level, experience, historical success rate, response speed and resource usage of the candidate agents corresponding to each of the plurality of subtasks to obtain a first score, a second score, a third score, a fourth score and a fifth score; Determine a comprehensive score of the candidate agent corresponding to each of the plurality of subtasks based on the first score and the first weight coefficient, the second score and the second weight coefficient, the third score and the third weight coefficient, the fourth score and the fourth weight coefficient, and the fifth score and the fifth weight coefficient.
5. The method according to claim 4, characterized in that The calculation formula for the comprehensive score of the candidate agent corresponding to each of the several subtasks is: i = first score * first weight coefficient + second score * second weight coefficient + third score * third weight coefficient + fourth score * fourth weight coefficient + fifth score * fifth weight coefficient; in, i is the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks; The first weight coefficient+the second weight coefficient+the third weight coefficient+the fourth weight coefficient+the fifth weight coefficient=1.
6. The method according to claim 1, characterized in that The method of determining the agent corresponding to each of the plurality of subtasks by using a greedy algorithm based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks and the real-time status of the candidate agent corresponding to each of the plurality of subtasks specifically includes: Based on the comprehensive scores of the candidate agents corresponding to each of the subtasks, the current load performance and availability of the candidate agents corresponding to each of the subtasks, the agent corresponding to each of the subtasks is determined.
7. The method according to claim 6, characterized in that The determining the agent corresponding to each of the plurality of subtasks based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks, the current load performance and availability of the candidate agent corresponding to each of the plurality of subtasks, specifically includes: Sorting the comprehensive scores of the candidate agents corresponding to each of the plurality of subtasks in descending order to obtain sorted candidate agents; Selecting available agents from the ranked candidate agents as selected candidate agents; Based on the current load performance of the screened candidate agents, the agent corresponding to each of the plurality of subtasks is determined.
8. The method according to claim 1, characterized in that The intelligent agent corresponding to each of the plurality of subtasks processes the plurality of subtasks to obtain the processing result of the task to be processed, specifically including: Based on the intelligent agent corresponding to each of the plurality of subtasks and the sequence of each of the plurality of subtasks, the plurality of subtasks are processed to obtain the processing result of the task to be processed.
9. The method according to claim 8, characterized in that The step of processing the plurality of subtasks based on the agent corresponding to each of the plurality of subtasks and the sequence of each of the plurality of subtasks to obtain the processing result of the task to be processed specifically includes: Based on the intelligent agent corresponding to each of the several subtasks and the order of each of the several subtasks, the output result of the previous subtask and the next subtask are used together as the input of the intelligent agent corresponding to the next subtask, and the knowledge base of the intelligent agent corresponding to the next subtask is used to process the several subtasks to obtain the processing result of the task to be processed.
10. A multi-agent collaborative processing device, characterized in that: The device comprises: The disassembly module disassembles the task to be processed into several subtasks based on the large model; A first determination module determines a candidate agent corresponding to each of the plurality of subtasks from a preset agent library; A scoring module is used to evaluate the candidate agents corresponding to each of the plurality of subtasks and determine a comprehensive score of the candidate agents corresponding to each of the plurality of subtasks; The second determination module adopts a greedy algorithm to determine the agent corresponding to each of the plurality of subtasks based on the comprehensive score of the candidate agent corresponding to each of the plurality of subtasks and the real-time status of the candidate agent corresponding to each of the plurality of subtasks; The processing module processes the plurality of subtasks based on the intelligent agent corresponding to each of the plurality of subtasks to obtain the processing result of the task to be processed.
Citation Information
Patent Citations
Multi-task processing method and system based on large model and computing equipment
CN116976467A
Multi-agent task processing method and device, computer equipment and storage medium
CN117992231A
Multi-agent cooperative task allocation strategy and implementation method and system thereof
CN118396337A
Information processing method and device, electronic equipment and storage medium
CN118796472A
Federated learning method, electronic device, and storage medium
US20230162087A1
Cited By
Multi-agent cooperation method and device, electronic equipment and storage medium
CN120540820A
Multi-agent collaborative management method and system
CN120542463A
Cooperative method and system for enhancing interoperability of AI agents
CN120780488A
Cooperative control method and device for multi-agent system
CN120849057A
A method and device for cooperative control of a multi-agent system
CN120849057B