Task processing method and device based on multiple agents, equipment and medium

By dynamically disassembling and allocating tasks in a multi-agent system, and using the functions and resources of multi-agents, the problem of low processing efficiency of multi-agent systems in the prior art is solved, and more efficient and flexible task processing is achieved.

CN119149236APending Publication Date: 2024-12-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411312016.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing multi-agent systems have low processing efficiency in complex and changeable task scenarios, making it difficult to cope with diverse task requirements.

Method used

By starting the same number of threads when listening to pending tasks in the root task list, each root task is disassembled, its subtask sequence is determined, and the functions and subtask types of each agent in the agent collection are based on the functions and subtask types of each agent in the agent collection. , dynamically determine the agent used to perform subtasks, and finally release the resources after obtaining the final execution result.

Benefits of technology

It improves the flexibility and efficiency of multi-agent task processing, can better cope with complex and diverse task needs, and improves the accuracy and resource utilization of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149236A_ABST
    Figure CN119149236A_ABST
Patent Text Reader

Abstract

The invention provides a task processing method and device based on multiple agents, equipment and a medium, and relates to the technical field of artificial intelligence such as deep learning, natural language processing and large models. When it is monitored that at least one root task to be processed is contained in a root task list in the information pool, threads with the same number as the root tasks to be processed are started, the threads corresponding to the root tasks are used for disassembling the root tasks, and subtask sequences corresponding to the root tasks are determined; according to the function of each second agent in the agent set and each subtask type in the subtask sequence, determining a second agent for executing each subtask, sending the subtask to the corresponding second agent, and when it is monitored that any second agent returns a first execution result for any subtask, executing the subtask according to the first execution result. And sending an instruction for releasing resources occupied by any subtask to a second agent, and releasing a thread corresponding to any root task under the condition that a second execution result corresponding to any root task is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of artificial intelligence technologies such as deep learning, natural language processing, and large models, and specifically to a multi-agent-based task processing method, device, equipment, and medium. Background Art

[0002] As an important field of artificial intelligence technology, multi-agent is mainly aimed at achieving more complex intelligence through the cooperation between agents with certain autonomous capabilities, which is usually used to solve tasks and simulation scenarios. At present, multi-agent systems usually organize agents together through a single fixed topological structure such as a master-slave structure or a hierarchical structure. However, the multi-agent system obtained in this way is difficult to cope with complex and changing task scenario requirements, and the task processing efficiency is low. Summary of the invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0004] The first aspect of the present disclosure provides a multi-agent based task processing method, which is executed by a first agent and includes:

[0005] When it is monitored that the root task list in the information pool contains at least one root task to be processed, start the same number of threads as the number of the root tasks to be processed;

[0006] For each of the root tasks, use a corresponding thread to decompose the root task to determine the corresponding subtask sequence;

[0007] For each subtask sequence, using its corresponding thread, according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, determine the second agent for executing each subtask, and send the subtask to the corresponding second agent;

[0008] In the case of monitoring that any second agent returns a first execution result for any subtask, sending an instruction to the second agent to release resources occupied by the any subtask;

[0009] When the second execution result corresponding to any one of the tasks is determined, the thread corresponding to the any one of the tasks in the first agent is released.

[0010] The second aspect of the present disclosure provides a multi-agent based task processing method, which is executed by a second agent and includes:

[0011] Determine a target task to be performed, resources for performing the target task, and a target agent for receiving the execution result of the target task;

[0012] Execute the target task based on the resource to obtain a first execution result;

[0013] Sending the first execution result to the target agent;

[0014] Upon receiving a resource release instruction sent by the first agent, the resource is released.

[0015] The third aspect of the present disclosure provides a multi-agent-based task processing device, wherein the device is configured in a first agent and includes:

[0016] A starting module, configured to start the same number of threads as the number of the root tasks to be processed when it is monitored that the root task list in the information pool contains at least one root task to be processed;

[0017] A disassembly module is used to disassemble each of the root tasks using a corresponding thread to determine the corresponding subtask sequence;

[0018] A processing module, for determining, for each subtask sequence, using its corresponding thread, a second agent for executing each subtask according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, and sending the subtask to the corresponding second agent;

[0019] A first sending module is used to send a resource instruction for releasing the resource occupied by any subtask to the second agent when monitoring that any second agent returns a first execution result for any subtask;

[0020] The first release module is used to release the thread corresponding to any task in the first agent when the second execution result corresponding to any task is determined.

[0021] The fourth aspect of the present disclosure provides a multi-agent-based task processing device, wherein the device is configured in a second agent and includes:

[0022] A determination module, used to determine a target task to be executed, resources for executing the target task, and a target agent for receiving an execution result of the target task;

[0023] An acquisition module, configured to execute the target task based on the resource and obtain a first execution result;

[0024] A second sending module, used to send the first execution result to the target agent;

[0025] The second releasing module is used to release the resource upon receiving the resource release instruction sent by the first agent.

[0026] The fifth aspect embodiment of the present disclosure proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the multi-agent based task processing method proposed in the first and second aspects embodiments of the present disclosure.

[0027] The sixth aspect embodiment of the present disclosure proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the multi-agent based task processing method proposed in the first and second aspects embodiments of the present disclosure.

[0028] The seventh aspect embodiment of the present disclosure proposes a computer program product, including a computer program, which, when executed by a processor, implements the multi-agent based task processing method proposed in the first and second aspects embodiments of the present disclosure.

[0029] The multi-agent-based task processing method, device, equipment and medium provided by the present disclosure have the following beneficial effects:

[0030] In the disclosed embodiment, first, when it is monitored that the root task list in the information pool contains at least one root task to be processed, the same number of threads as the number of root tasks to be processed are started, and for each root task, the root task is disassembled using a corresponding thread to determine its corresponding subtask sequence, and then for each subtask sequence, the second agent for executing each subtask is determined based on the function of each second agent in the agent set and the type of each subtask in the subtask sequence using its corresponding thread, and the subtask is sent to the corresponding second agent. Then, when it is monitored that any second agent returns the first execution result for any subtask, an instruction to release the resources occupied by any subtask is sent to the second agent. Finally, when the second execution result corresponding to any root task is determined, the thread corresponding to any root task in the first agent is released. Therefore, when the first agent listens to the root task to be processed, it starts the thread corresponding to the root task to disassemble the root task, obtains the subtask corresponding to the root task, determines the second agent to execute the subtask according to the subtask type and the function of the second agent, and obtains the result of the second agent executing the subtask. After determining the final execution result corresponding to the root task, it releases the resources occupied when processing the root task, thereby ensuring that the multi-agent based task processing method can cope with complex and diverse task requirements and scenarios, improving the flexibility of the multi-agent based task processing method, and improving the efficiency and accuracy of task processing.

[0031] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0033] Figure 1 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0034] Figure 2 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0035] Figure 3 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0036] Figure 4 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0037] Figure 5 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0038] Figure 6 A schematic diagram of the data in the information pool provided for this disclosure;

[0039] Figure 7 A flowchart of a multi-agent-based task processing method provided by an embodiment of the present disclosure;

[0040] Figure 8 A schematic diagram of the structure of a multi-agent system provided by the present disclosure;

[0041] Fig. 9 A schematic diagram of the structure of a multi-agent-based task processing device provided in an embodiment of the present disclosure;

[0042] Fig.10 A schematic diagram of the structure of a multi-agent-based task processing device provided in an embodiment of the present disclosure;

[0043] Fig.11 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0044] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0045] The present disclosure relates to artificial intelligence technology fields such as deep learning, natural language processing, and large models.

[0046] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0047] Deep Learning (DL) is the process of learning the inherent laws and representation levels of sample data. The information obtained in the learning process is very helpful for interpreting data such as text, images, and sounds. The ultimate goal of deep learning is to enable machines to have analytical learning capabilities like humans and to recognize data such as text, images, and sounds.

[0048] Natural Language Processing (NLP) is an interdisciplinary subject in the fields of computer science, artificial intelligence and linguistics. It mainly studies how to enable computers to understand, process, generate and simulate human language, so as to achieve the ability to have natural conversations with humans.

[0049] The large model can also be called the Foundation Model. The model extracts knowledge through billions of corpora or images, learns and then produces a large model with billions of parameters.

[0050] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0051] The following describes the multi-agent-based task processing method, apparatus, device and medium of the embodiments of the present disclosure with reference to the accompanying drawings.

[0052] Figure 1 A flowchart of a multi-agent based task processing method provided in an embodiment of the present disclosure.

[0053] like Figure 1 As shown, the multi-agent-based task processing method, performed by the first agent, may include the following steps:

[0054] Step 101 : when it is monitored that the root task list in the information pool contains at least one root task to be processed, start threads whose number is the same as the number of the root tasks to be processed.

[0055] It should be noted that the information pool can be a storage space for storing all information in the task processing process, which may include conversations between users and agents, conversations between agents, historical task information and the corresponding execution results of each agent, etc. This disclosure does not limit this.

[0056] The root task may be a task created according to user needs, or may be a task created according to agent needs, and may be any task. For example, the root task may be "recommending recent high-scoring movies", "traveling to a certain place next week and need a travel guide for that place", etc., and the present disclosure does not limit this.

[0057] In the present disclosure, when the first agent monitors that the root task list in the information pool contains at least one root task to be processed, it can start the same number of threads as the number of root tasks to be processed, so as to process the root tasks.

[0058] Among them, an intelligent agent is a computer system or entity that can act autonomously, perceive the environment, make decisions and interact with the environment. It usually uses a large language model as the core decision-making and processing unit, and has the ability to think independently and call tools to gradually complete given goals. This disclosure does not limit this.

[0059] It should be noted that the first agent has functions similar to a server, and can control the organization, task decomposition, allocation, information management, etc. among multiple agents, which is not limited in the present disclosure.

[0060] It should be noted that the thread started by the first agent can decompose, execute and summarize the execution results of the root task, etc., and the present disclosure does not limit this.

[0061] It should be noted that when the first agent starts at least two threads, each thread is independent of each other, and the present disclosure does not limit this.

[0062] In the present disclosure, when the first intelligent agent monitors that the root task list in the information pool contains multiple root tasks to be processed, the first intelligent agent can process these multiple root tasks to be processed by creating and triggering asynchronous tasks, wherein the asynchronous tasks can determine whether to be triggered periodically or when conditions are met based on the root task requirements, and the present disclosure does not limit this.

[0063] Step 102: for each root task, use a corresponding thread to decompose the root task and determine the corresponding subtask sequence.

[0064] In the present disclosure, after the first agent starts the same number of threads as the number of root tasks to be processed, it can use a corresponding thread to decompose each root task to determine its corresponding subtask sequence. For example, when the root task is "traveling to a certain place next week and need a travel guide for the place", the root task corresponding thread is used to decompose it, and its corresponding subtask sequence can be "the weather conditions of a certain place next week" and "the itinerary of a certain place", etc., and the present disclosure does not limit this.

[0065] It should be noted that, for different root tasks, the corresponding subtask sequences may be different, and this disclosure does not limit this.

[0066] In the present disclosure, when the first intelligent agent disassembles each root task using a corresponding thread, it can disassemble the root task according to the preconfigured task disassembly allocation logic and LLM-based task disassembly allocation, and the present disclosure does not limit this.

[0067] Among them, the pre-configured task decomposition and allocation logic can manually configure the task decomposition and allocation process based on prior knowledge. It can set the process at different levels and granularities, that is, it can be configured as a multi-agent structure of a master-slave model, a multi-agent structure of a hierarchical model, or a multi-agent structure of a decentralized model in general, or it can be configured locally as a topological structure composed of specific agents for a certain type of task or a conditional task trigger, etc., so that the composition structure between multi-agents can be dynamically adjusted according to task requirements, enhancing the adaptability of multi-agent-based task processing to different task requirement scenarios.

[0068] Among them, the task decomposition and allocation based on LLM can be combined with LLM to perform task decomposition under the framework of preconfigured task decomposition and allocation logic, wherein LLM can determine the task decomposition preference through training or prompt adjustment, etc., and the present disclosure does not limit this.

[0069] Among them, LLM is the abbreviation of Large Language Model (LLM).

[0070] It should be noted that the preconfigured task decomposition allocation logic and the LLM-based task decomposition allocation can together constitute a task allocation decision tree. Different specific instances of these two functions (such as programs, processes or threads) can constitute different nodes of the decision tree, and the present disclosure does not limit this.

[0071] Step 103, for each subtask sequence, using its corresponding thread, according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, determine the second agent for executing each subtask, and send the subtask to the corresponding second agent.

[0072] The agent set may include agents of any function and type, which may be pre-set. For example, the agent set may include agents related to travel planning, film and television, weather, and health, etc., which are not limited in the present disclosure.

[0073] It should be noted that the second intelligent agent may be an independent intelligent agent, or may be an intelligent agent system composed of multiple intelligent agents according to functions, etc., and the present disclosure does not limit this.

[0074] It should be noted that different second agents may have different corresponding functions, and the present disclosure does not limit this.

[0075] The type of the subtask may be any type, for example, the subtask may be a travel planning type, a film and television recommendation type, or a weather-related type, etc., which is not limited in the present disclosure.

[0076] It should be noted that the second agent determined to execute the subtask may be different depending on the type of the subtask, and the present disclosure does not limit this.

[0077] In the present disclosure, after the first agent decomposes each root task and obtains the subtask sequence corresponding to each root task, it can use the corresponding thread to determine the second agent for executing the subtask according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence for each subtask sequence, and then send each subtask to the corresponding second agent, thereby realizing dynamic adjustment of task processing based on multiple agents, improving the flexibility of determining the second agent for executing the subtask, and improving the efficiency and accuracy of task processing.

[0078] In the present disclosure, when the first agent determines the second agent for performing a subtask, it can dynamically add or remove specific second agents according to task requirements to expand or optimize the multi-agent based task processing capabilities and efficiency. The present disclosure does not limit this.

[0079] Step 104: When it is detected that any second agent returns the first execution result for any subtask, an instruction to release the resources occupied by any subtask is sent to the second agent.

[0080] The first execution result is the execution result corresponding to the subtask of the root task.

[0081] In the present disclosure, after the first intelligent agent determines the second intelligent agent for executing each subtask and sends the subtask to the corresponding second intelligent agent, when it monitors that any second intelligent agent returns the first execution result of any subtask, in order to avoid resource waste and improve resource utilization, an instruction to release the resources occupied by any subtask can be sent to the second intelligent agent, so that after the second intelligent agent releases the resources, it becomes idle and can execute other tasks again, thereby improving the utilization of the second intelligent agent.

[0082] It should be noted that when the first agent detects the first execution result for any subtask returned by any second agent, the first agent can receive the first execution result returned by any second agent, or the first agent can detect that any second agent sends the first execution result to a third agent, thereby realizing real-time adjustment and management of the task processing process by the first agent and improving the efficiency and reliability of task processing.

[0083] Optionally, when the first agent monitors the first execution result returned by any second agent for any subtask, upon receiving the first execution result returned by any second agent, it can be determined that any second agent has completed the execution of any subtask. At this time, in order to avoid the second agent being occupied by the resources of any subtask, resulting in resource waste, the first agent can send an instruction to the second agent to release the resources occupied by any subtask, so that the second agent can release the resources. The present disclosure does not limit this.

[0084] Optionally, when the first agent monitors that any second agent returns the first execution result for any subtask, and when it monitors that any second agent sends the first execution result to the third agent, it can be determined that any second agent has completed the execution of any subtask. At this time, the first agent can send an instruction to the second agent to release the resources occupied by any subtask, and the present disclosure does not limit this.

[0085] Among them, the third intelligent agent may be an intelligent agent used to execute subtasks, which is different from the second intelligent agent, and the present disclosure does not limit this.

[0086] Step 105, when the second execution result corresponding to any task is determined, release the thread corresponding to any task in the first agent.

[0087] The second execution result may be the final execution result corresponding to the root task.

[0088] In the present disclosure, when the first intelligent agent detects that any second intelligent agent returns the first execution result for any subtask, it sends an instruction to the second intelligent agent to release the resources occupied by any subtask. After all subtasks in the subtask sequence corresponding to the root task are executed and the corresponding first execution result is obtained, the second execution result corresponding to the root task can be determined based on the first execution result corresponding to each subtask. After determining the second execution result corresponding to the root task, the thread corresponding to the root task in the first intelligent agent is released, thereby completing the processing of the root task, improving resource utilization, and improving the efficiency and accuracy of task processing.

[0089] Optionally, after determining the second execution result corresponding to any root task, the first intelligent agent can directly send the second execution result to the source party that submitted any root task, so that the source party can obtain the execution result of the root task, thereby improving the efficiency of task processing. The present disclosure does not limit this.

[0090] Among them, the source of any task can be a user, or an intelligent agent, etc., and this disclosure does not limit this.

[0091] Optionally, after determining the second execution result corresponding to any task, if any task is a periodic task, the first intelligent agent can also send the second execution result to the source party that submitted any task within the triggering period of any task, thereby improving the reliability of task processing. The present disclosure does not limit this.

[0092] The trigger period may be a period for triggering the execution of the root task, which may be preset or determined according to actual needs. Different root tasks may have different corresponding trigger periods, which is not limited in the present disclosure.

[0093] In the disclosed embodiment, first, when it is monitored that the root task list in the information pool contains at least one root task to be processed, the same number of threads as the number of root tasks to be processed are started, and for each root task, the root task is disassembled using a corresponding thread to determine its corresponding subtask sequence, and then for each subtask sequence, the second agent for executing each subtask is determined based on the function of each second agent in the agent set and the type of each subtask in the subtask sequence using its corresponding thread, and the subtask is sent to the corresponding second agent. Then, when it is monitored that any second agent returns the first execution result for any subtask, an instruction to release the resources occupied by any subtask is sent to the second agent. Finally, when the second execution result corresponding to any root task is determined, the thread corresponding to any root task in the first agent is released. Therefore, the first agent starts the thread corresponding to the root task to disassemble the root task, obtain the subtasks corresponding to the root task, determine the second agent to execute the subtask according to the subtask type and the function of the second agent, obtain the execution result corresponding to the subtask, determine the final execution result corresponding to the root task, and release the resources occupied when processing the root task, thereby ensuring that the multi-agent based task processing method can cope with complex and diverse task requirements, improving the flexibility of the multi-agent based task processing method, and improving the task processing efficiency and accuracy.

[0094] Figure 2 A flowchart of a multi-agent based task processing method provided in one embodiment of the present disclosure.

[0095] like Figure 2 As shown, the multi-agent-based task processing method, performed by the first agent, may include the following steps:

[0096] Step 201: receiving a task execution request sent by a second agent, wherein the task execution request includes a target task.

[0097] The target task may be a task that the second agent requests to execute.

[0098] In the present disclosure, after receiving a task execution request sent by a second agent, the first agent can determine the target task requested to be executed by the second agent based on the task execution request, and assign the target task to the second agent.

[0099] Step 202: Allocate resources for executing the target task to the second agent based on the type of the target task in the task execution request.

[0100] In the present disclosure, after receiving a task execution request sent by a second agent, the first agent can allocate resources for executing the target task to the second agent based on the type of the target task in the task execution request. Thus, based on the task execution request of the second agent, the first agent allocates tasks and resources to the second agent, thereby realizing the flexibility of task processing based on multiple agents.

[0101] Optionally, after the first agent allocates resources for executing the target task to the second agent, the second agent can execute the target task based on the allocated resources and obtain a third execution result corresponding to the target task. When the task execution request also includes the source of the target task, the first agent can associate the source of the target task, the second agent, the target task and the third execution result corresponding to the target task and store them in a dialogue list, thereby providing a data basis for subsequent task processing and improving the efficiency and reliability of task processing.

[0102] The conversation list may be a list for storing conversation information during task processing, which may be pre-set or set in an information pool. For example, the conversation list may store conversation information between a user and an agent, or conversation information between agents, etc., which is not limited in the present disclosure.

[0103] In the disclosed embodiment, a task execution request sent by a second agent is first received, and then resources for executing the target task are allocated to the second agent based on the type of the target task in the task execution request. Thus, after receiving the task execution request sent by the second agent, the first agent determines the task requested to be executed by the second agent and allocates resources to the second agent, thereby improving the flexibility and reliability of the multi-agent-based task processing method.

[0104] Figure 3 A flowchart of a multi-agent based task processing method provided in one embodiment of the present disclosure.

[0105] like Figure 3 As shown, the multi-agent-based task processing method, performed by the second agent, may include the following steps:

[0106] Step 301, determining the target task to be executed, the resources used to execute the target task, and the target agent to receive the execution result of the target task.

[0107] In the present disclosure, before executing a task, the second agent may first determine the target task to be executed, the resources used to execute the target task, and the target agent to receive the execution result of the target task, thereby improving the reliability of task processing.

[0108] It should be noted that the target task to be executed determined by the second agent may be assigned by the first agent, or may be applied for execution by the second agent to the first agent, and this disclosure does not limit this.

[0109] Step 302: Execute the target task based on the resources to obtain a first execution result.

[0110] In the present disclosure, after determining the target task to be executed and the resources used to execute the target task, the second agent can execute the target task based on the resources, thereby obtaining a first execution result corresponding to the target task.

[0111] Step 303: Send the first execution result to the target agent.

[0112] In the present disclosure, after the second agent determines the target agent that receives the execution result of the target task, after obtaining the first execution result of the target task, the first execution result can be sent to the target agent, so that the target agent can execute its corresponding subtask in combination with the first execution result, thereby improving the accuracy of the target agent's task execution.

[0113] Step 304: upon receiving a resource release instruction sent by the first agent, release the resources.

[0114] In the present disclosure, the second agent can release resources upon receiving a resource release instruction sent by the first agent, thereby improving resource utilization.

[0115] In the disclosed embodiment, the second agent first determines the target task to be executed, the resources used to execute the target task, and the target agent that receives the execution result of the target task, then executes the target task based on the resources to obtain the first execution result, then sends the first execution result to the target agent, and finally releases the resources upon receiving the resource release instruction sent by the first agent. Thus, after the second agent determines the task to be executed, the resources used to execute the task, and the target agent that receives the execution result, the second agent executes the task, sends the execution result to the target agent, and releases the resources, thereby improving the accuracy and reliability of the multi-agent-based task processing method.

[0116] Figure 4 A flowchart of a multi-agent based task processing method provided in one embodiment of the present disclosure.

[0117] like Figure 4 As shown, the multi-agent-based task processing method, performed by the second agent, may include the following steps:

[0118] Step 401, receiving a scheduling instruction sent by a first agent.

[0119] The scheduling instruction may be an instruction for the first agent to assign a task to the second agent.

[0120] In the present disclosure, the second agent can determine the task assigned by the first agent by receiving the scheduling instruction sent by the first agent.

[0121] Step 402, based on the scheduling instruction, determine the target task, the resources for executing the target task, and the target agent.

[0122] In the present disclosure, after receiving the scheduling instruction sent by the first agent, the second agent can determine the target task to be executed, the resources used to execute the target task, and the target agent to receive the execution result of the target task based on the scheduling instruction, thereby allocating the task to the second agent through the first agent, thereby improving the reliability and efficiency of multi-agent based task processing.

[0123] It should be noted that when a target agent for receiving the execution result of a target task is indicated in a scheduling instruction, the second agent may determine the target agent indicated in the scheduling instruction as the target agent for receiving the target task, and the present disclosure does not limit this.

[0124] It should be noted that when the target agent for receiving the execution result of the target task is not indicated in the scheduling instruction, the second agent can determine the first agent as the target agent for receiving the execution result of the target task, and the present disclosure does not limit this.

[0125] Step 403: Execute the target task based on the resources to obtain a first execution result.

[0126] Step 404: Send the first execution result to the target agent.

[0127] Step 405: upon receiving a resource release instruction sent by the first agent, release the resources.

[0128] The specific implementation forms of steps 403 to 405 can refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.

[0129] In the disclosed embodiment, the second agent first receives the scheduling instruction sent by the first agent, and based on the scheduling instruction, determines the target task, the resources for executing the target task, and the target agent, and then executes the target task based on the resources to obtain the first execution result, and then sends the first execution result to the target agent, and finally releases the resources when receiving the resource release instruction sent by the first agent. Thus, the second agent determines the task to be executed, the resources, and the target agent for receiving the execution result based on the scheduling instruction sent by the first agent, and executes the task based on the resources, sends the execution result to the target agent, and releases the resources, thereby improving the reliability and accuracy of the multi-agent-based task processing method.

[0130] Figure 5 A flowchart of a multi-agent based task processing method provided in one embodiment of the present disclosure.

[0131] like Figure 5 As shown, the multi-agent-based task processing method, performed by the second agent, may include the following steps:

[0132] Step 501 , monitoring the data in the information pool, and determining the task indicated by any dialogue as a target task when it is monitored that the task type indicated by any dialogue matches the task type associated with itself.

[0133] In the present disclosure, the second agent can monitor the data in the information pool. When the task type indicated by any dialogue matches the task type associated with itself, it can determine that it can handle the task. At this time, the task indicated by any dialogue can be determined as the target task. The data in the information pool can be Figure 6 As shown, Figure 6 A schematic diagram of the data in the information pool provided for this disclosure, by Figure 6 It can be seen that the data in the information pool includes not only the root task list, but also the execution results of historical figures and corresponding agents. The information of the execution results of historical tasks can be injected by the first agent into the process of the associated agent, and the information generated by each agent can be processed at the task process (or thread) granularity (such as Figure 6 The task process 0, task process 1...task process N) shown in the figure are stored in the storage space in the information pool, which may include task information, execution results, and information about the agent that executes the task, etc., wherein: Figure 6 This is only an example and the present disclosure is not limited thereto.

[0134] It should be noted that when the second agent monitors the data in the information pool, it can monitor the conversation list in the information pool, and the present disclosure does not limit this.

[0135] Step 502: Send a task assignment request to the first agent, wherein the assignment request includes an identifier of any dialogue and the type of the target task.

[0136] Among them, the identifier of any conversation can be used to characterize any conversation, and it can be a pre-set identifier, which is not limited in the present disclosure.

[0137] In the present disclosure, after the second agent determines that the task indicated by any dialogue is the target task, it can send a task assignment request to the first agent, and indicate to the first agent the target task it is applying to perform through the dialogue identifier and the type of target task in the task assignment request.

[0138] Step 503: Determine the resources and target agent required for executing the target task based on the instruction of the first agent.

[0139] In the present disclosure, after sending a task assignment request to the first agent, the second agent can receive instructions from the first agent and, based on the instructions from the first agent, determine the resources and target agent required to perform the target task. The second agent can improve the flexibility of multi-agent based task processing by monitoring the data in the information pool and applying to the first agent to perform the task.

[0140] Step 504: Execute the target task based on the resources to obtain a first execution result.

[0141] Step 505: Send the first execution result to the target agent.

[0142] Step 506: upon receiving the resource release instruction sent by the first agent, release the resources.

[0143] The specific implementation forms of steps 504 to 506 may refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.

[0144] In the disclosed embodiment, the second agent first monitors the data in the information pool, and when it monitors that the task type indicated by any dialogue matches the task type associated with itself, it determines that the task indicated by any dialogue is the target task, and then sends a task allocation request to the first agent, and based on the instructions of the first agent, determines the resources and target agent required for executing the target task, and then executes the target task based on the resources to obtain the first execution result, and sends the first execution result to the target agent, and finally releases the resources when receiving the resource release instruction sent by the first agent. Thus, the second agent actively monitors the data in the information pool, and when it monitors that the task type indicated by any dialogue matches the task type associated with itself, it actively applies to the first agent to execute the task, thereby realizing dynamic scheduling based on the multi-agent task processing method and improving the flexibility of task processing.

[0145] Figure 7 A flowchart of a multi-agent based task processing method provided in one embodiment of the present disclosure.

[0146] like Figure 7 As shown, the multi-agent-based task processing method, performed by the second agent, may include the following steps:

[0147] Step 701: receiving a task execution request sent by a third agent, wherein the task execution request includes a target task.

[0148] The third agent may be another agent used to perform the task except the second agent.

[0149] Among them, the target task included in the task execution request can be used to indicate the execution result of the target task requested by the third agent, thereby executing its corresponding task.

[0150] In the present disclosure, the second agent receives the task execution request sent by the third agent and can determine, based on the target task included in the task execution request, that the third agent needs to apply for and obtain the execution result of the target task before executing the task.

[0151] Step 702: Send a resource allocation request to the first agent, wherein the allocation request includes the type of the target task.

[0152] In the present disclosure, after receiving the task execution request sent by the third agent, the second agent can send a resource allocation request to the first agent, thereby providing a resource basis for executing the target task.

[0153] Step 703, based on the instruction of the first agent, determine the resources required for performing the target task.

[0154] In the present disclosure, after sending a resource allocation request to the first agent, the second agent can receive instructions from the first agent and determine the resources required to perform the target task based on the instructions of the first agent, so that the second agent can perform the target task according to the resources.

[0155] Step 704, determining the third agent as the target agent.

[0156] In the present disclosure, after determining the resources required for executing the target, the second agent can determine the third agent as the target agent based on the task execution request of the third agent. Thus, through the dialogue between agents, the second agent determines the task to be executed and requests resource allocation from the first agent, thereby improving the accuracy of multi-agent-based task processing.

[0157] Step 705: Execute the target task based on the resources to obtain a first execution result.

[0158] Step 706, sending the first execution result to the target agent.

[0159] Step 707: upon receiving a resource release instruction sent by the first agent, release the resources.

[0160] The specific implementation forms of steps 705 to 707 can refer to the detailed descriptions in other embodiments of the present disclosure and will not be described in detail here.

[0161] In the disclosed embodiment, the second agent first receives the task execution request sent by the third agent, sends a resource allocation request to the first agent, and determines the resources required for executing the target task based on the instructions of the first agent, then determines the third agent as the target agent, then executes the target task based on the resources, obtains the first execution result, and sends the first execution result to the target agent, and finally releases the resources when receiving the resource release instruction sent by the first agent. Thus, after receiving the task execution request sent by the third agent, the second agent sends a resource allocation request to the first agent, determines the resources for executing the target task, executes the target task, sends the execution result of the target task to the third agent, and releases the resources, thereby realizing dynamic adjustment of task processing based on multi-agents through direct dialogue between agents, and improving the flexibility and accuracy of the task processing method.

[0162] Combine the following Figure 8 , an example is given of a multi-agent system that executes the multi-agent-based task processing method provided by the present disclosure, Figure 8 A schematic diagram of the structure of the multi-agent system provided in the present invention.

[0163] like Figure 8As shown, the multi-agent system provided by the present disclosure may include a first agent, an information pool, and at least one second agent.

[0164] First, a root task can be created in the information pool according to the needs of the user or the task requirements of the agent. When the first agent monitors that there is a root task to be processed in the information pool, it can start the thread corresponding to the root task to be processed according to the root task requirements, disassemble the root task, and obtain the sub-task sequence corresponding to the root task. Then, based on each sub-task type and the function of each second agent, determine the second agent for executing the sub-task, and assign the sub-task to the second agent. Alternatively, when the second agent monitors that the type of any sub-task matches the task type associated with it, it can actively apply to the first agent to execute the sub-task. After executing the corresponding sub-task, the second agent can return the sub-task and the execution result to the information pool. After each sub-task is executed, the first agent can integrate the execution result of each sub-task and store it in the information pool, and return the integrated result to the user or agent, thereby completing the processing of the root task. The present disclosure does not limit this.

[0165] It should be noted that the data in the information pool can be monitored, written and read by the first agent and the second agent, and can be managed by the first agent.

[0166] It should be noted that the second agent can be an agent that provides functions, which can be an agent (it can be a heterogeneous agent), or it can also be a multi-agent system, such as the multi-agent system provided in the present disclosure, and it can also be nested, such as connecting the multi-agent system provided in the present disclosure to another multi-agent system, or it can also have a topological structure, a workflow with internal agents fixed in a certain order, etc. The present disclosure does not limit this.

[0167] It should be noted that the first agent can be the hub of the multi-agent system provided by the present disclosure, and is the core module of the multi-agent system. It can control the organization, information transmission, task triggering, disassembly and allocation, etc. of the second agent, and the present disclosure does not limit this.

[0168] In order to implement the above embodiments, the present disclosure also proposes a multi-agent based task processing device.

[0169] Fig. 9 A schematic diagram of the structure of a multi-agent based task processing device provided in an embodiment of the present disclosure.

[0170] like Fig. 9As shown, the multi-agent-based task processing device 900 is configured in the first agent, and includes: a starting module 901, a disassembly module 902, a processing module 903, a first sending module 904, and a first releasing module 905.

[0171] A starting module 901 is used to start threads of the same number as the number of root tasks to be processed when it is monitored that the root task list in the information pool contains at least one root task to be processed;

[0172] The disassembly module 902 is used to disassemble each root task using a corresponding thread to determine the corresponding subtask sequence;

[0173] Processing module 903, for each subtask sequence, using its corresponding thread, according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, determining the second agent for executing each subtask, and sending the subtask to the corresponding second agent;

[0174] The first sending module 904 is used to send a resource release instruction to the second agent for releasing any subtask when monitoring that any second agent returns a first execution result for any subtask;

[0175] The first releasing module 905 is used to release the thread corresponding to any task in the first agent when the second execution result corresponding to any task is determined.

[0176] In a possible implementation of the present disclosure, the above-mentioned device further includes:

[0177] A receiving module (not shown in the figure), configured to receive a task execution request sent by a second agent, wherein the task execution request includes a target task;

[0178] An allocation module (not shown in the figure) is used to allocate resources for executing the target task to the second agent based on the type of the target task in the task execution request.

[0179] In a possible implementation of the present disclosure, the above-mentioned receiving module (not shown in the figure) is further used for:

[0180] The source party of the target task, the second agent, the target task and the third execution result of the target task are associated and stored in the dialogue list.

[0181] In a possible implementation of the present disclosure, the first sending module 904 is further configured to:

[0182] Receiving a first execution result returned by any second agent; or,

[0183] It is detected that any second agent sends the first execution result to the third agent.

[0184] In a possible implementation of the present disclosure, the first sending module 904 is further configured to:

[0185] Send the second execution result to the source party that submitted any task; or,

[0186] In the case that any task is a periodic task, within the triggering period of any task, the second execution result is sent to the source party that submits any task.

[0187] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0188] In the disclosed embodiment, first, when it is monitored that the root task list in the information pool contains at least one root task to be processed, the same number of threads as the number of root tasks to be processed are started, and for each root task, the root task is disassembled using a corresponding thread to determine its corresponding subtask sequence, and then for each subtask sequence, the second agent for executing each subtask is determined based on the function of each second agent in the agent set and the type of each subtask in the subtask sequence using its corresponding thread, and the subtask is sent to the corresponding second agent. Then, when it is monitored that any second agent returns the first execution result for any subtask, an instruction to release the resources occupied by any subtask is sent to the second agent. Finally, when the second execution result corresponding to any root task is determined, the thread corresponding to any root task in the first agent is released. Therefore, the first agent starts the thread corresponding to the root task to disassemble the root task, obtain the subtasks corresponding to the root task, determine the second agent to execute the subtask according to the subtask type and the function of the second agent, obtain the execution result corresponding to the subtask, determine the final execution result corresponding to the root task, and release the resources occupied when processing the root task, thereby ensuring that the multi-agent based task processing method can cope with complex and diverse task requirements, improving the flexibility of the multi-agent based task processing method, and improving the task processing efficiency and accuracy.

[0189] In order to implement the above embodiments, the present disclosure also proposes a multi-agent based task processing device.

[0190] Fig.10 A schematic diagram of the structure of a multi-agent based task processing device provided in an embodiment of the present disclosure.

[0191] like Fig.10As shown, the multi-agent based task processing device 1000 is configured in the second agent, and includes: a determination module 1001, an acquisition module 1002, a second sending module 1003, and a second releasing module 1004.

[0192] Determination module 1001, used to determine the target task to be executed, the resources used to execute the target task, and the target agent to receive the execution result of the target task;

[0193] An acquisition module 1002 is used to execute a target task based on resources and obtain a first execution result;

[0194] The second sending module 1003 is used to send the first execution result to the target agent;

[0195] The second releasing module 1004 is used to release resources upon receiving a resource release instruction sent by the first agent.

[0196] In a possible implementation of the present disclosure, the determination module 1001 is specifically configured to:

[0197] Receiving a scheduling instruction sent by the first agent;

[0198] Based on the scheduling instructions, the target task, the resources used to perform the target task, and the target agent are determined.

[0199] In a possible implementation of the present disclosure, the determination module 1001 is specifically configured to:

[0200] Monitor the data in the information pool, and if it is monitored that the task type of any dialogue indication matches the task type associated with itself, determine the task indicated by any dialogue as the target task;

[0201] Sending a task assignment request to the first agent, wherein the assignment request includes an identifier of any dialogue and a type of target task;

[0202] Based on the instruction of the first agent, resources and a target agent required for executing the target task are determined.

[0203] In a possible implementation of the present disclosure, the determination module 1001 is specifically configured to:

[0204] Receiving a task execution request sent by a third agent, wherein the task execution request includes a target task;

[0205] Sending a resource allocation request to the first agent, wherein the allocation request includes the type of the target task;

[0206] Determining resources required to perform a target task based on an instruction from the first agent;

[0207] The third agent is determined as the target agent.

[0208] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0209] In the disclosed embodiment, the second agent first determines the target task to be executed, the resources used to execute the target task, and the target agent that receives the execution result of the target task, then executes the target task based on the resources to obtain the first execution result, then sends the first execution result to the target agent, and finally releases the resources upon receiving the resource release instruction sent by the first agent. Thus, after the second agent determines the task to be executed, the resources used to execute the task, and the target agent that receives the execution result, the second agent executes the task, sends the execution result to the target agent, and releases the resources, thereby improving the accuracy and reliability of the multi-agent-based task processing method.

[0210] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0211] like Fig.11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0212] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0213] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as a multi-agent-based task processing method. For example, in some embodiments, the multi-agent-based task processing method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the multi-agent-based task processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute a multi-agent-based task processing method in any other suitable manner (eg, by means of firmware).

[0214] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0215] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a general-purpose computer, a special-purpose computer, or other programmable processor or controller, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0216] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0217] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0218] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0219] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0220] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0221] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the description of the present disclosure, the words "if" and "if" used can be interpreted as "at the time of" or "when" or "in response to determination" or "under the circumstances of".

[0222] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A multi-agent based task processing method, the method being performed by a first agent, the method comprising: When it is monitored that the root task list in the information pool contains at least one root task to be processed, start the same number of threads as the number of the root tasks to be processed; For each of the root tasks, use a corresponding thread to decompose the root task to determine the corresponding subtask sequence; For each subtask sequence, using its corresponding thread, according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, determine the second agent for executing each subtask, and send the subtask to the corresponding second agent; In the case of monitoring that any second agent returns a first execution result for any subtask, sending an instruction to the second agent to release resources occupied by the any subtask; When the second execution result corresponding to any one of the tasks is determined, the thread corresponding to the any one of the tasks in the first agent is released.

2. The method of claim 1, wherein: The method further comprises: Receiving a task execution request sent by a second agent, wherein the task execution request includes a target task; Based on the type of the target task in the task execution request, resources for executing the target task are allocated to the second agent.

3. The method of claim 2, wherein: The task execution request also includes the source of the target task, and after receiving the task execution request sent by the second agent, further includes: The source party of the target task, the second agent, the target task and the third execution result of the target task are associated and stored in a dialogue list.

4. The method according to any one of claims 1 to 3, wherein: The monitoring that any second agent returns a first execution result for any subtask includes: receiving a first execution result returned by any second agent; or, It is monitored that any second agent sends the first execution result to a third agent.

5. The method of claim 4, wherein: After determining the second execution result corresponding to any one of the root tasks, the method further includes: Sending the second execution result to the source party that submitted any one of the root tasks; or, In the case that any one of the tasks is a periodic task, within a triggering period of the any one of the tasks, the second execution result is sent to a source party that submits the any one of the tasks.

6. A multi-agent based task processing method, the method being performed by a second agent, the method comprising: Determine a target task to be performed, resources for performing the target task, and a target agent for receiving the execution result of the target task; Execute the target task based on the resource to obtain a first execution result; Sending the first execution result to the target agent; Upon receiving a resource release instruction sent by the first agent, the resource is released.

7. The method of claim 6, wherein: The target agent for determining the target task to be executed, the resources for executing the target task, and receiving the execution result of the target task includes: Receiving a scheduling instruction sent by the first agent; Based on the scheduling instruction, the target task, the resources for executing the target task and the target agent are determined.

8. The method of claim 6, wherein: The target agent for determining the target task to be executed, the resources for executing the target task, and receiving the execution result of the target task includes: Monitor the data in the information pool, and when it is monitored that the task type of any dialogue indication matches the task type associated with itself, determine the task of any dialogue indication as the target task; Sending a task assignment request to the first agent, wherein the assignment request includes an identifier of any one of the dialogues and a type of target task; Based on the instruction of the first agent, resources required for executing the target task and the target agent are determined.

9. The method of claim 6, wherein: The target agent for determining the target task to be executed, the resources for executing the target task, and receiving the execution result of the target task includes: Receiving a task execution request sent by a third agent, wherein the task execution request includes the target task; Sending a resource allocation request to the first agent, wherein the allocation request includes the type of the target task; Determining, based on the instructions of the first agent, resources required for performing the target task; The third agent is determined as the target agent.

10. A multi-agent-based task processing device, the device being configured in a first agent, the device comprising: A starting module, configured to start the same number of threads as the number of the root tasks to be processed when it is monitored that the root task list in the information pool contains at least one root task to be processed; A disassembly module is used to disassemble each of the root tasks using a corresponding thread to determine the corresponding subtask sequence; A processing module, for determining, for each subtask sequence, using its corresponding thread, a second agent for executing each subtask according to the function of each second agent in the agent set and the type of each subtask in the subtask sequence, and sending the subtask to the corresponding second agent; A first sending module is used to send a resource instruction for releasing the resource occupied by any subtask to the second agent when monitoring that any second agent returns a first execution result for any subtask; The first release module is used to release the thread corresponding to any task in the first agent when the second execution result corresponding to any task is determined.

11. The device of claim 10, wherein: The device also includes: A receiving module, configured to receive a task execution request sent by a second agent, wherein the task execution request includes a target task; An allocation module is used to allocate resources for executing the target task to the second agent based on the type of the target task in the task execution request.

12. The device of claim 11, wherein: The receiving module is further used for: The source party of the target task, the second agent, the target task and the third execution result of the target task are associated and stored in a dialogue list.

13. The device according to any one of claims 10 to 12, wherein: The first sending module is further used for: receiving a first execution result returned by any second agent; or, It is monitored that any second agent sends the first execution result to a third agent.

14. The device of claim 13, wherein: The first sending module is further used for: Sending the second execution result to the source party that submitted any one of the root tasks; or, In the case that any one of the tasks is a periodic task, within a triggering period of the any one of the tasks, the second execution result is sent to a source party that submits the any one of the tasks.

15. A multi-agent-based task processing device, the device being configured in a second agent, the device comprising: A determination module, used to determine a target task to be executed, resources for executing the target task, and a target agent for receiving an execution result of the target task; An acquisition module, configured to execute the target task based on the resource and obtain a first execution result; A second sending module, used to send the first execution result to the target agent; The second releasing module is used to release the resource upon receiving the resource release instruction sent by the first agent.

16. The device of claim 15, wherein: The determination module is specifically used for: Receiving a scheduling instruction sent by the first agent; Based on the scheduling instruction, the target task, the resources for executing the target task and the target agent are determined.

17. The device of claim 15, wherein: The determination module is specifically used for: Monitor the data in the information pool, and when it is monitored that the task type of any dialogue indication matches the task type associated with itself, determine the task of any dialogue indication as the target task; Sending a task assignment request to the first agent, wherein the assignment request includes an identifier of any one of the dialogues and a type of target task; Based on the instruction of the first agent, resources required for executing the target task and the target agent are determined.

18. The device of claim 15, wherein: The determination module is specifically used for: Receiving a task execution request sent by a third agent, wherein the task execution request includes the target task; Sending a resource allocation request to the first agent, wherein the allocation request includes the type of the target task; Determining, based on the instructions of the first agent, resources required for performing the target task; The third agent is determined as the target agent.

19. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions that may be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the multi-agent based task processing method described in any one of claims 1-9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the multi-agent based task processing method according to any one of claims 1-9.

21. A computer program product, comprising a computer program, which, when executed by a processor, implements the multi-agent-based task processing method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Intelligent water supply decision-making system of big language model based on thinking chain

    CN120278442A

  • Task processing method and device, equipment and storage medium

    CN120610823A