Task processing method and device, equipment and computer readable storage medium
By converting user needs into multiple tasks and assigning them to multiple agents for processing, the problem of a single agent being unable to handle complex requirements is solved, improving the efficiency and accuracy of task processing and scalability of the system.
Patent Information
- Application Number
- CN202410850753.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-10
AI Technical Summary
Existing agents have limited functions when dealing with complex and diverse user needs, making it difficult to collaborate across domains. Direct use of all registered skills by a single agent may lead to skill conflicts or overlaps, making it impossible to effectively handle user tasks.
By receiving user input, multiple tasks that meet user needs are determined, and these tasks are assigned to multiple agents for execution according to relevant fields. Each agent is configured with skills in a specific field to handle tasks in the corresponding field, utilizing multi-intelligence Collaborate to improve task processing efficiency and accuracy.
Through careful task allocation and multi-agent collaboration, the efficiency and accuracy of task processing are improved, skill conflicts are avoided, the maintainability and stability of the system are enhanced, and the scalability of system functions is provided.
Smart Images

Figure CN118626690A
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a method, an apparatus, a device, and a computer-readable storage medium for task processing. Background Art
[0002] In current agent application scenarios, the user demands and task environments faced by agents are becoming increasingly complex. In the prior art, user demands are mainly fulfilled by a single agent, but a single agent may not cover all fields or tasks, resulting in limited functionality when handling complex and diverse user demands. Moreover, since a single agent directly uses all registered skills, there may be conflicts or overlaps between skills, resulting in the inability of the agent to make good use of these skills to handle user tasks. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for task processing is provided. The method includes: receiving user input, the user input indicating user needs; based on the user needs, determining multiple tasks that meet the user needs; based on the domains associated with the multiple tasks, assigning the multiple tasks to multiple agents for execution, each agent is configured with skills in the corresponding domain for performing tasks in the corresponding domain, and each agent is assigned at least one of the multiple tasks; and determining a user response to the user input based on the execution results of the multiple agents on the multiple tasks.
[0004] In a second aspect of the present disclosure, a device for task processing is provided. The device includes: a receiving module configured to receive user input, the user input indicating user needs; a determining module configured to determine multiple tasks that meet the user needs based on the user needs; an executing module configured to assign multiple tasks to multiple agents for execution based on the fields associated with the multiple tasks, each agent is configured with skills in the corresponding field for executing tasks in the corresponding field, and each agent is assigned at least one of the multiple tasks; and a responding module configured to determine a user response to the user input based on the execution results of the multiple agents on the multiple tasks.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to perform the method according to the first aspect of the present disclosure.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer executable instructions, which, when executed by a device, cause the device to perform a method according to the first aspect of the present disclosure. It should be understood that the content described in the Summary of the Invention section is not intended to limit the key features 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 easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A flowchart showing a process for task processing according to some embodiments of the present disclosure is shown;
[0011] Figure 3A A schematic diagram showing a process of performing a determination of multiple tasks that meet user needs according to some embodiments of the present disclosure;
[0012] Figure 3B A schematic diagram showing a process 300B for performing task allocation according to some embodiments of the present disclosure is shown;
[0013] Figure 3C A schematic diagram showing a process of executing a task at a single agent according to some embodiments of the present disclosure;
[0014] Figure 4 A block diagram showing an apparatus for task processing according to some embodiments of the present disclosure; and
[0015] Figure 5 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0018] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0019] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0020] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0021] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0022] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0023] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0024] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained through training to determine the corresponding model output.
[0025] An agent is an intelligent entity, which can be a computer program or system with the ability to autonomously perceive, make decisions and perform tasks. An agent can autonomously perceive information in its environment and make decisions based on this information to achieve specific goals or tasks. In current agent application scenarios, the user needs and task environments faced by agents are becoming increasingly complex. In the prior art, the execution process of an agent is mainly concentrated on a single agent, which identifies the user's query, preliminarily screens out a list of skills that may match, and then determines the skills or skill combinations that need to be called in the end through the scheduler module. This process is completed within the scope of a single agent, and the entire process involves the operation and decision-making of only one agent.
[0026] However, a single agent may not be able to cover all fields or tasks, resulting in difficulty in handling cross-domain or multi-task collaboration requirements when dealing with complex and diverse user needs, resulting in an inability to effectively respond to complex user scenarios.
[0027] Secondly, directly calling all registered skills by a single agent may lead to conflicts or overlaps between skills. In addition, the scalability of a single agent is poor and it is difficult to meet the expansion requirements of system functions and performance.
[0028] In view of this, an improved scheme for task processing is proposed in an embodiment of the present disclosure. According to an embodiment of the present disclosure, an electronic device receives user input, the user input indicates user needs; based on the user needs, multiple tasks that meet the user needs are determined; based on the fields associated with the multiple tasks, the multiple tasks are assigned to multiple agents for execution, each agent is configured with skills in the corresponding field for performing tasks in the corresponding field, and each agent is assigned at least one of the multiple tasks; and based on the execution results of the multiple agents on the multiple tasks, a user response to the user input is determined.
[0029] Therefore, by converting user needs into tasks in different fields, user needs can be analyzed and processed more carefully, so as to understand and process user needs more effectively, thereby improving the efficiency and accuracy of task processing. And each agent is responsible for processing tasks in a specific field. In this way, conflicts and confusions between different skills can be effectively avoided, and the maintainability and stability of the task processing system can be improved.
[0030] Furthermore, since skills are organized and managed in different agents, when the system's functionality needs to be expanded, specific agents can be modified in a targeted manner without affecting other parts.
[0031] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0032] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 In the environment 100, the electronic device 110 can accept user input 120 indicating user needs. Based on the user input 120, the electronic device 110 can determine multiple tasks that meet the user needs. Further, based on the fields associated with the multiple tasks, the multiple tasks are assigned to multiple agents 130-1, 130-2...130-N (collectively or individually referred to as agents 130) for execution, and each agent is configured with skills in the corresponding field for performing tasks in the corresponding field. And each agent is assigned at least one of the multiple tasks to process. The electronic device 110 determines a user response to the user input based on the execution results of the multiple tasks by the multiple agents.
[0033] exist Figure 1In the embodiment, the electronic device 110 may include any computing system with computing capabilities, such as various computing 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. The server includes but is not limited to a mainframe, an edge computing node, a computing device in a cloud environment, and the like.
[0034] It should be understood that Figure 1 The components and arrangements in the environment 100 shown are merely examples, and a computing system suitable for implementing the exemplary implementation described in the present disclosure may include one or more different components, other components, and / or different arrangements. The implementation of the present disclosure is not limited in this respect.
[0035] Figure 2 A flowchart of a process 200 for task processing according to some embodiments of the present disclosure is shown. The process 200 may be implemented in the environment 100, for example, the process 200 may be implemented at the electronic device 110.
[0036] At block 210 , the electronic device 110 receives a user input, the user input indicating a user desire.
[0037] In some embodiments, user input may also be referred to as a user query or user instruction. For example, the electronic device 110 receives query information input by the user in the form of text, voice, image, etc. For another example, the electronic device 110 receives instruction information input by the user in a structured form.
[0038] In block 220 , the electronic device 110 determines a plurality of tasks that meet the user's needs based on the user's needs.
[0039] In some embodiments, after receiving user input, the electronic device 110 performs an operation of identifying user needs. In addition, the electronic device 110 analyzes and extracts specific details and requirements of the task, such as the goal, content, conditions, constraints, etc. of the task, based on the user needs. After identifying specific user needs from the user input, the electronic device 110 converts the user needs into multiple tasks that are easier to understand, so that the electronic device 110 can better process and execute tasks to solve the user needs. In addition, these tasks can be steps executed sequentially, operations executed in parallel, or links that require interaction and feedback.
[0040] In some embodiments, the electronic device 110 provides the user input to a large language model (LLM) to perform intent understanding of the user input, and the result of the intent understanding may indicate the user's needs.
[0041] For example, please refer to Figure 3A , Figure 3A A schematic diagram of a process 300A for performing determination of multiple tasks that satisfy user needs according to some embodiments of the present disclosure is shown.
[0042] The electronic device 110 may obtain user input from the user 311 and provide the user input to the large language model 312 to understand and identify the intent of the user's needs.
[0043] In some embodiments, the electronic device 110 can combine the needs of the user 311 with the industry knowledge (KnowHow) 313 and the historical template based on the large language model 312 to better understand the user's intention. The industry knowledge can include the understanding of a specific field, common tasks and processes, such as marketing field expertise. The historical template can be the experience summary and pattern recognition of handling similar user needs.
[0044] In some embodiments, the electronic device 110 can also register existing agents and input the registration information 315 into the large language model 312 so that they can be identified and called to perform tasks based on the specific areas or tasks that each agent is responsible for, as well as the specific skills and abilities it possesses.
[0045] In some embodiments, based on the industry knowledge 313, the historical template 314, and the agent registration information 315, the electronic device 110 may generate an initial task queue 316. The initial task queue may include a task queue that decomposes user requirements into preliminary execution processes.
[0046] In some embodiments, the large language model 312 can interact with the user 311 for at least one round to further understand and refine the user's needs and ensure that the generated task queue can accurately reflect the user's intentions. Further, the electronic device 110 can adjust the initial task queue 316 based on at least one round of interaction between the large language model 312 and the user 311 until receiving the user's confirmation of the generated multiple tasks 317 in the initial task queue. For example, in each round of interaction, the electronic device 110 can ask questions to the user 311 to clarify the needs and adjust the generated task queue 316 based on the feedback of the user 311. This interaction process can continue until the user 311 confirms that the generated multiple tasks 317 meet their needs.
[0047] In the disclosed embodiment, the electronic device 110 can convert user needs into multiple tasks based on a large language model, combined with industry knowledge, historical templates and other information. By breaking down user needs into detailed tasks, the electronic device 110 can more accurately understand the user's intentions and assign tasks to corresponding agents for execution in a targeted manner, thereby improving the accuracy of task execution. Secondly, after converting user needs into multiple tasks, each task becomes more specific and clear, so that the execution process of the task can be better controlled and managed.
[0048] Continue to refer Figure 2 In block 230 , the electronic device 110 assigns the plurality of tasks to the plurality of agents for execution based on the domains associated with the plurality of tasks.
[0049] In some embodiments, a specific domain can be divided for each agent, and skills in the corresponding domain can be configured to perform tasks in the corresponding domain, such as a customer data platform (CDP) agent responsible for managing and analyzing customer data.
[0050] In some embodiments, the electronic device 110 can divide specific domain spaces for different agents and have them manage the skills in the corresponding fields. Then, the electronic device 110 assigns the determined multiple tasks to multiple agents to execute, and each agent is assigned at least one of the multiple tasks.
[0051] In some embodiments, the electronic device 110 may input task descriptions of multiple tasks and capability descriptions of multiple agents into a large language model to obtain an output of the large language model, wherein the output indicates the distribution of the multiple tasks among the multiple agents.
[0052] Furthermore, the electronic device 110 may assign multiple tasks to multiple agents based on the output of the large language model.
[0053] In the disclosed embodiment, based on the large language model, the task description and the capability description of the agent, the user's needs and the agent's capabilities can be learned, and the task can be intelligently assigned to the agent that is most suitable for execution. This ensures that each task is performed by an agent with corresponding capabilities, improving the accuracy and efficiency of task execution. In addition, the agents can communicate and collaborate with each other according to the distribution of tasks, and jointly complete complex tasks, thereby improving the overall processing capability of tasks.
[0054] For example, please refer to Figure 3B , Figure 3BFIG. 3 is a schematic diagram of a process 300B for performing task allocation according to some embodiments of the present disclosure. The process 300B may be implemented at the electronic device 110. The process 300B may be considered as a collaborative process of multiple agents in processing tasks. Figure 3B In the description, for the purpose of explanation, the collaboration between agents 130-1 and 130-2 is used as an example, but it should be understood that more agents can also perform collaborative task processing in a similar manner.
[0055] In block 321 , the electronic device 110 assigns a first task to a corresponding agent 130 - 1 among a plurality of agents for execution.
[0056] In block 322 , when the agent 130 - 1 among the plurality of agents executes the first task, the electronic device may receive information returned by the agent 130 - 1 and determine that continued execution of the first task requires at least the execution result of the second task.
[0057] As an example, when the first task involves multiple fields or requires cooperation of multiple agents, the electronic device 110 determines that continued execution of the first task requires the execution result of at least the second task.
[0058] As another example, the first task may require multiple rounds of interaction to complete, and a round of interaction processed by the current agent 130-1 may require the participation of other agents. The electronic device 110 determines that continued execution of the first task requires the execution result of at least the second task.
[0059] In block 323 , the electronic device 110 determines that the execution of the first task requires at least the execution result of the second task, and suspends the agent 130 - 1 (ie, pauses the execution of the first task at the agent 130 - 1 ).
[0060] In some embodiments, when the first task needs to rely on the execution result of the second task, the electronic device 110 can suspend (pause) the execution of the agent 130-1 to wait for the completion of the second task.
[0061] In block 324 , the electronic device 110 forwards the second task to the agent 130 - 2 corresponding to the second task for execution.
[0062] In some embodiments, the electronic device 110 may, after suspending the agent 130 - 1 , assign the second task to the corresponding agent 130 - 2 to execute, to ensure that the second task is completed.
[0063] In block 325 , the agent 130 - 2 returns the execution result of the second task to the electronic device.
[0064] In block 326 , the electronic device 110 resumes the suspended agent 130 - 1 after the agent 130 - 2 completes the execution of the second task.
[0065] In some embodiments, the electronic device 110 may transmit the execution result of the second task to the agent 130 - 1 to continue to execute the first task.
[0066] In some embodiments, the electronic device 110 can resume the previously suspended agent 130-1 after the second task is completed, so as to continue to execute the first task. In some embodiments, if the execution of the first task requires the execution results of more other tasks, the agent 130-1 can continue to wait for the execution results of other dependent tasks until the execution results of all dependent tasks can be obtained.
[0067] In block 327 , the agent 130 - 1 returns the execution result of the first task to the electronic device 110 .
[0068] As an example, the agent 130-1 corresponding to the marketing domain is responsible for executing the first task of formulating a marketing strategy. During the execution of the first task, the electronic device 110 identifies the second task that requires analyzing user attribute information based on the large language model, and then suspends the agent 130-1 and transfers the second task to the agent 130-2 corresponding to the customer data platform domain for execution. After receiving the execution result of the second task, the electronic device 110 resumes the agent 130-1 and continues to execute the first task until the user's needs are met.
[0069] In the disclosed embodiment, when agent 130-1 performs a task, if it relies on the assistance of agent 130-2, electronic device 110 can suspend agent 130-1, make agent 130-2 perform a second task, and after obtaining the execution result of the second task, resume the execution of the first task by agent 130-1. Through this collaborative approach, different tasks can be reasonably allocated, and the collaborative execution capabilities of multiple agents can be effectively utilized. In addition, through the management of different domain spaces by each agent, complex cross-domain tasks can be handled more effectively, improving the ability and efficiency of task processing.
[0070] For example, the process of a single agent performing a task can be referred to Figure 3C , Figure 3C A schematic diagram of a process 300C of performing a task at a single agent 130 according to some embodiments of the present disclosure is shown.
[0071] In some embodiments, the agent 130 can iteratively use three types of elements to perform corresponding tasks, including: Thought 331: Based on the large language model, combined with memory and tool pool, reasoning (Reasoning) on user input, and selecting appropriate tools (skills) for processing based on the results of reasoning. Action 332: Sending instructions for selecting tools to the tool pool, such as calling a knowledge base, an external application programming interface (Application Programming Interface, API), etc. Observation 333: Observing the results of the action and feeding it back to Thinking 331 to continue reasoning. In this process, multiple rounds of interaction with the user can be carried out until the current agent 130 completes the execution of the assigned task.
[0072] In some embodiments, the electronic device 110 can receive an agent specification and register a new agent in the agent library based on the agent specification. The new agent is configured with skills in the corresponding field to perform tasks in the corresponding field to handle new user needs.
[0073] When the currently registered agent of the electronic device 110 cannot meet the new user needs, a new agent can be registered according to the characteristics of the user needs to meet the new user needs. These new agents can use corresponding skills for tasks in specific fields, or they can work together with existing agents to jointly meet user needs.
[0074] In some embodiments, the newly added agent needs to be registered and implemented according to certain agent specifications to ensure that it can work with existing agents and maintain the stability and scalability of the electronic device 110. For example, the agent specification may include interface design, data format requirements, task processing flow, etc.
[0075] In the disclosed embodiment, the electronic device 110 can meet new user needs by receiving agent specifications and registering new agents based on the agent specifications. This highly scalable and flexible approach enables the electronic device 110 to provide users with richer and more personalized services. Secondly, by registering new agents for tasks in specific fields and using corresponding skills, the skills covering various functions and operations can be separated from the domain space. Each agent is responsible for handling a specific function or task area, effectively avoiding conflicts and confusion between different skills. And because skills are organized and managed in different agents, when skills need to be added, updated or replaced, specific agents can be modified in a targeted manner without affecting other parts.
[0076] Continue to refer Figure 2In block 240 , the electronic device 110 determines a user response to the user input based on the execution results of the multiple tasks by the multiple agents.
[0077] In some embodiments, the electronic device 110 deploys the agents according to the execution status of the tasks, and finally obtains the execution results of multiple agents on multiple tasks. And determines the user response to the user input according to the execution results. For example, the user response to the user input can be the task result completed according to the user's needs, or the generated report, provided service, triggered subsequent process, or the returned interaction result.
[0078] In some embodiments, the electronic device 110 can determine a user response to a user input based on the execution results of multiple tasks through a large language model. First, the electronic device 110 can use a large language model to analyze and synthesize the task execution results. The large language model can understand and process the semantic information of the task execution results, and can also determine the final user response based on pre-set rules and conditions. Based on the analysis and synthesis of the task execution results, the electronic device 110 can generate a complete user reply with the help of a large language model.
[0079] In the disclosed embodiment, the electronic device 110 can understand and process the user's needs more accurately and intelligently by converting the user's needs into detailed tasks, thereby more accurately assigning tasks to corresponding agents, thereby improving the intelligence level of the system and the accuracy of task processing. The responsiveness of task processing and user experience are improved, and more efficient and intelligent interactions and services are achieved. In addition, by introducing a multi-agent mechanism, a specific domain space is allocated to each agent to manage skills in different fields and handle tasks in different fields. By processing in a multi-agent collaborative manner, complex cross-domain tasks can be handled more effectively, improving the ability and efficiency of task processing.
[0080] Figure 4 FIG. 4 is a block diagram of an apparatus 400 for task processing according to some embodiments of the present disclosure. The apparatus 400 may be implemented as or include the electronic device 110.
[0081] The device 400 includes a receiving module 410, which is configured to receive user input, wherein the user input indicates a user demand; a determining module 420, which is configured to determine a plurality of tasks that meet the user demand based on the user demand; an executing module 430, which is configured to assign a plurality of tasks to a plurality of agents for execution based on domains associated with the plurality of tasks, wherein each agent is configured with skills in a corresponding domain for executing tasks within the corresponding domain, and each agent is assigned at least one of the plurality of tasks; and a responding module 440, which is configured to determine a user response to the user input based on the execution results of the plurality of tasks by the plurality of agents.
[0082] In some embodiments, the electronic device 110 provides the user input to a large language model to perform intent understanding of the user input, and the result of the intent understanding indicates the user's needs.
[0083] In some embodiments, the determination module 420 is further configured to generate an initial task queue corresponding to the user needs based on industry knowledge and historical templates related to the user needs; and adjust the initial task queue based on at least one round of interaction between the large language model and the user until receiving confirmation generated by the user for multiple tasks in the initial task queue.
[0084] In some embodiments, the execution module 430 is further configured to input task descriptions of multiple tasks and capability descriptions of multiple agents into the large language model to obtain an output of the large language model, the output indicating the distribution of the multiple tasks among the multiple agents; and based on the output of the large language model, distribute the multiple tasks to the multiple agents.
[0085] In some embodiments, the execution module 430 is further configured to, if a first agent among multiple agents executes a first task, determine that continued execution of the first task requires at least the execution result of a second task; if it is determined that execution of the first task requires at least the execution result of the second task, suspend the first agent; forward the second task to a second agent corresponding to the second task for execution; after the second agent completes the execution operation of the second task, resume the suspended first agent; and pass the execution result of the second task to the first agent to continue executing the first task.
[0086] In some embodiments, the device 400 also includes an expansion module 450, which is configured to receive an agent specification; and based on the agent specification, register a new agent in the agent library, and the new agent is configured with skills in the corresponding field to perform tasks in the corresponding field to handle new user needs.
[0087] The modules included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0088] Figure 51 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.
[0089] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.
[0090] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 500.
[0091] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0092] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0093] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0094] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0095] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0096] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0097] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0098] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0099] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the implementations disclosed herein.
Claims
1. A method for task processing, comprising: receiving a user input, the user input indicating a user demand; Based on the user needs, determining a plurality of tasks that meet the user needs; Based on the fields associated with the multiple tasks, the multiple tasks are assigned to multiple agents for execution, each of the agents is configured with skills in a corresponding field for executing tasks in the corresponding field, and each of the agents is assigned at least one of the multiple tasks; as well as Based on the execution results of the plurality of tasks by the plurality of agents, a user response to the user input is determined.
2. The method according to claim 1, further comprising: The user input is provided to a large language model to perform intention understanding on the user input, and a result of the intention understanding indicates the user demand.
3. The method according to claim 1, wherein determining a plurality of tasks that meet the user needs based on the user needs comprises: Based on the industry knowledge and historical templates related to the user demand, generate an initial task queue corresponding to the user demand; as well as The initial task queue is adjusted based on at least one round of interaction between the large language model and the user until a confirmation of the plurality of tasks in the initial task queue generated by the user is received.
4. The method of claim 1, wherein assigning the plurality of tasks to a plurality of agents comprises: Inputting the task descriptions of the plurality of tasks and the capability descriptions of the plurality of agents into a large language model to obtain an output of the large language model, wherein the output indicates the distribution of the plurality of tasks among the plurality of agents; as well as Based on the output of the large language model, the plurality of tasks are assigned to a plurality of agents.
5. The method according to claim 1, wherein the method further comprises: If, when a first agent among the plurality of agents is performing a first task, it is determined that continued performance of the first task requires at least the performance result of a second task; If it is determined that the execution of the first task requires at least the execution result of the second task, suspending the first agent; forwarding the second task to a second agent corresponding to the second task for execution; After the second agent completes the execution operation of the second task, resuming the suspended first agent; as well as The execution result of the second task is transmitted to the first agent to continue to execute the first task.
6. The method according to claim 1, wherein the plurality of agents are registered in an agent library, and wherein the method further comprises: receiving agent specifications; as well as Based on the agent specification, a new agent is registered in the agent library, and the new agent is configured with skills in the corresponding field for performing tasks within the corresponding field to handle new user needs.
7. A device for task processing, comprising: A receiving module is configured to receive a user input, wherein the user input indicates a user demand; A determination module, configured to determine, based on the user demand, a plurality of tasks that meet the user demand; an execution module, configured to assign the plurality of tasks to a plurality of agents for execution based on the fields associated with the plurality of tasks, each of the agents being configured with skills in a corresponding field for executing tasks in the corresponding field, and each of the agents being assigned at least one of the plurality of tasks; as well as The response module is configured to determine a user response to the user input based on the execution results of the multiple agents on the multiple tasks.
8. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 6 when executed by the at least one processing unit.
9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 6.
10. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Task synchronization and execution method for distributed platform
CN111124697A
Multi-agent task processing method and device, computer equipment and storage medium
CN117992231A
Intelligent agent scheduling method, system and equipment based on large language model and medium
CN118132227A
Method and system for performing a task based on user input
US10304455B1
Cited By
Interaction method and device and computer readable storage medium
CN118964688A
Interaction method and device, and computer-readable storage medium
CN118964688B
Prompt word generation method and device and intelligent agent
CN119294518A
Intelligent agent interaction method and device, medium, equipment and computer program product
CN120066353A
Remote sensing intelligent interpretation proxy method and device based on multi-agent cooperation and medium
CN120164094A
