A task execution method and apparatus

By establishing an experience pool in computing devices and directly reusing the execution strategies of historical tasks, the problem of high complexity in determining execution strategies in agent collaborative tasks is solved, thereby improving task execution efficiency and success rate, reducing costs, and expanding application scenarios.

CN123114642APending Publication Date: 2026-11-17SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611000401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

When computing devices employ multiple agents to collaboratively execute tasks, the method of determining which agent to handle sub-tasks is complex, affecting the execution efficiency of the target task.

Method used

By establishing an experience pool in the computing device to record the execution strategies of multiple historical tasks, the execution strategies of successfully executed historical tasks can be directly reused to determine the execution strategy of the target task. This reduces the complexity and time of determining the execution strategy and saves training data and model pre-training processes.

Benefits of technology

It improves the efficiency and success rate of task execution, expands the application scenarios, reduces costs, avoids model interference, and simplifies the strategy determination process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114642A_ABST
    Figure CN123114642A_ABST
Patent Text Reader

Abstract

A task execution method and apparatus are disclosed, relating to the field of computer technology. An experience pool records the execution strategies of each historical task from multiple historical tasks. These historical task execution strategies instruct the agents executing the historical tasks, and describe the processes by which each agent executes the historical tasks. The computing device determines the execution strategy for the target task based on the experience pool. This determination of the execution strategy has low complexity, shortens the time required for strategy determination, and improves efficiency. Compared to pre-trained models and using trained models to generate the execution strategy for the target task, this method eliminates the need for pre-training, saving the model pre-training process and further shortening the time required to obtain the execution strategy. No training data needs to be constructed, saving costs. The execution strategies of successfully executed historical tasks can be directly reused, ensuring that the fit between the execution strategy and the task is not affected by the model, thus improving the task execution success rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task execution method and apparatus. Background Technology

[0002] Computing devices can employ multiple intelligent agents to collaboratively execute a target task. Specifically, the computing device uses multiple intelligent agents to interact with each other, and assigns intelligent agents to each of the multiple subtasks corresponding to the target task based on the interaction results. The computing device uses the intelligent agents to process the corresponding subtasks and obtain the processing results of the subtasks. Based on the processing results of each of the multiple subtasks, the computing device obtains the processing result of the target task.

[0003] In the above process, the computing device uses the interaction results of multiple agents to determine the agent that processes the sub-task. The method of confirming the agent that processes the sub-task is complicated and affects the execution efficiency of the target task. Summary of the Invention

[0004] This application provides a task execution method and apparatus for improving task execution efficiency.

[0005] Firstly, this application provides a task execution method. This method can be executed by a computing device, by a cluster of computing devices comprising multiple computing devices, by a component of the computing device such as its processor, chip, or chip system, or by a logic module or software capable of implementing all or part of the functions of the computing device.

[0006] Taking execution by a computing device as an example, the method provided in the first aspect includes: the computing device acquiring a user request. The user request is used to request the execution of a target task. The computing device, in response to the user request, determines a first target execution strategy for executing the target task based on an experience pool. The experience pool records the execution strategy of each historical task among multiple historical tasks. The execution strategy of a historical task includes: information indicating multiple first agents executing the historical task, the execution order of the multiple first agents for the corresponding historical task, and the data dependencies between each first agent during the execution of the corresponding historical task. The first target execution strategy is the execution strategy of the first task in the experience pool, and the first task is one of the multiple historical tasks whose fit with the target task is greater than or equal to a fit threshold. The computing device executes the target task using the first target execution strategy to obtain the execution result of the target task.

[0007] In the first aspect provided by this application, an experience pool records the execution strategies of each historical task across multiple historical tasks. These historical task execution strategies instruct the agents executing the historical tasks, and describe the processes by which each agent executes the historical tasks. The computing device determines the execution strategy for the target task based on the experience pool. This determination of the execution strategy has low complexity, shortens the time required for strategy determination, and improves efficiency. Compared to pre-trained models and using trained models to generate execution strategies for the target task, pre-training a model is unnecessary, saving the model pre-training process and further shortening the time required to obtain the execution strategy. No training data needs to be constructed, saving costs. Execution strategies from successfully executed historical tasks can be directly reused, ensuring that the fit between the execution strategy and the task is not affected by the model, thus improving the task execution success rate.

[0008] In one possible implementation, the experience pool includes multiple structured routing experiences. Each routing experience includes the execution strategy of a historical task. This structured routing experience improves the efficiency of routing experience retrieval.

[0009] In another possible implementation, a routing experience also includes: task features corresponding to the historical task, verification tags, and extended information. The extended information includes at least one of the following: an output summary or context information. The task features describe the corresponding historical task, the verification tags indicate the confidence level of the execution strategy in the routing experience, the output summary is a general description of the agent's execution of the corresponding historical task, and the context information indicates the execution environment of the corresponding historical task. The task features included in the routing experiences in the experience pool, and at least one of the output summary or context information, are used to determine the fit between the historical task and the target task. Thus, the computing device determines a first target execution strategy based on the task features, execution strategy, and verification tags. This reduces the efficiency of determining the first target execution strategy based on the experience pool. The computing device determines the first target execution strategy based on the task features, execution strategy, verification tags, and extended information, balancing retrieval efficiency and the fit between the first target execution strategy and the target task.

[0010] In another possible implementation, the computing device identifies candidate experiences among multiple routing experiences whose adaptation between the corresponding historical task and the target task is greater than or equal to an adaptation threshold. If a candidate experience contains routing experiences that meet reuse conditions, the computing device determines a first target execution strategy based on the execution strategies included in those candidate experiences. The reuse conditions include at least one of the following: the applicability score of the execution strategy included in the candidate experience is greater than or equal to an upper limit of the applicability score; the verification marker included in the candidate experience is a pre-set confidence level; the first agent indicated by the execution strategy included in the candidate experience supports executing the target task; and the applicability score indicates the degree of adaptation of the execution strategy included in the candidate experience to solving the target task. In this way, the computing device first determines candidate experiences and then determines the first target execution strategy based on the candidate experiences. This reduces the number of routing experiences requiring fine-grained matching, shortens the time required to determine the first target execution strategy, and improves the efficiency of determining the execution strategy for the target task.

[0011] In another possible implementation, the fit is determined based on similarity and applicability scores, where similarity is the semantic similarity between the target task and historical tasks. This ensures that the historical tasks corresponding to the selected candidate experiences are semantically similar to the target task, and that the included execution strategies can be used to solve the target task, thereby ensuring that the execution strategies for the determined target task are suitable for the target task.

[0012] In another possible implementation, the method further includes: the computing device determining a first target execution strategy for executing the target task based on an experience pool; and, if no routing experience in the candidate experiences meets the reuse conditions, adjusting the execution strategy included in the target routing experience whose applicability score is between the upper and lower limits of the applicability score, to obtain the first target execution strategy. The adjustment includes performing one of the following: adjusting the agent indicated by the execution strategy included in the target routing experience; and adjusting the probability of the agent indicated by the execution strategy included in the target routing experience being selected to execute the target task based on the degree of fit. The degree of fit indicates the degree of matching between the service processed by the agent indicated by the execution strategy included in the target routing experience and the target service. Thus, the computing device adjusts the execution strategy included in the routing experience, improving the fit between the execution strategy determined based on the experience pool and the target task, thereby ensuring the successful execution of the target task.

[0013] In another possible implementation, the routing experience further includes: a performance score corresponding to the agent performing the historical task. The performance score indicates the agent's performance on the corresponding historical task and its contribution to the execution of that task. The computing device adjusts the agents implementing the execution strategy instructions included in the target routing experience, including: the computing device adjusting the agents implementing the execution strategy instructions included in the target routing experience based on the performance scores of the agents implementing the execution strategy instructions in multiple routing experiences. The adjustment includes at least one of the following: adding, reducing, or replacing agents. Thus, adjusting the agents implementing the execution strategy instructions included in the target routing experience according to their performance scores ensures that the adjusted agents implementing the execution strategy instructions can complete the target task.

[0014] In another possible implementation, when the execution strategy for the target task cannot be determined based on the experience pool, the method further includes: the computing device determining the probability that each third agent will be selected to execute the target task based on the business adaptability of each of the multiple third agents. The business adaptability of the third agent indicates its competence in different tasks. Based on the probability, a target agent is selected from the multiple third agents to execute the target task. The computing device then determines a second target execution strategy for the target task based on the target agent. This second target execution strategy includes: information indicating the target agent executing the target task, the execution order of the target agents on the target task, and the data dependencies between the target agents during the execution of the target task. Finally, the computing device executes the target task using the second target execution strategy to obtain the execution result. Thus, when the computing device cannot determine the execution strategy for the target task based on the experience pool, it determines a second target execution strategy based on the business adaptability of the agents, balancing efficiency and adaptability, and expanding the application scenarios.

[0015] In another possible implementation, the computing device determines the probability of each third agent being selected to execute the target task based on the business adaptability of each of the multiple third agents. This includes: the computing device using a second agent to determine the probability of each third agent being selected to execute the target task based on the business adaptability of each of the multiple third agents. The second agent is trained based on a first execution result, which is obtained by executing the task according to a first execution strategy. The first execution strategy is determined based on the probability obtained from the agent's business adaptability. Thus, the first execution strategy is determined based on the probability obtained from the agent's business adaptability, and the second agent is trained using the first execution result obtained by executing the task according to the first execution strategy. The probability is continuously differentiable, ensuring that the gradient can be backpropagated to the network parameters of the second agent, thus improving the efficiency of training the second agent.

[0016] In another possible implementation, business adaptability includes at least one of the following: comprehensive score, current load, historical success rate, and area of ​​expertise. The comprehensive score indicates the degree to which a third agent supports the execution of historical tasks by associated third agents, where the associated third agent is the one that receives the computational results from multiple third agents. The current load indicates the resource consumption of the third agent. The historical success rate characterizes the probability that the third agent successfully executes historical tasks. The area of ​​expertise indicates the business that the third agent is adapted to handle. Thus, by determining business adaptability based on multiple dimensions, a guarantee is provided that the selected agent can adapt to the target task, thereby ensuring the successful execution of the target task.

[0017] In another possible implementation, the comprehensive score determines the usefulness of the associated third agent in performing historical tasks based on the computational results of the third agent. Thus, by acquiring the usefulness of the agent in the execution of the target task, the usefulness of the agent in the execution of the associated agent ensures that the agents included in the generated execution strategy are cooperative agents, thereby guaranteeing the successful execution of the target task.

[0018] In another possible implementation, the computing device updates the experience pool using the target task and the second target execution strategy, resulting in an updated experience pool. The updated experience pool includes the task characteristics of the target task and the second target execution strategy. This update acquires more routing experience, ensuring that the second agent can directly determine the task's execution strategy based on the experience pool, thus shortening the time required to determine the execution strategy and improving its efficiency.

[0019] Secondly, this application provides a task execution apparatus. The apparatus includes modules for performing the method described in the first aspect or any possible design of the first aspect.

[0020] Thirdly, this application provides a processor. The processor includes an interface circuit and a control circuit, wherein the interface circuit is used to acquire user requests and cooperate with the control circuit to implement the operation steps of the method in the first aspect or any possible design in the first aspect.

[0021] Fourthly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the at least one memory, causing the computing device cluster to perform operational steps of the task execution method in the first aspect or any possible design of the first aspect.

[0022] Fifthly, this application provides a computer-readable storage medium, comprising: computer software instructions; which, when executed in a computing device, cause the computing device to perform operational steps of the method as described in the first aspect or any possible implementation thereof.

[0023] Sixthly, this application provides a computer program product. When the computer program product is run on a computer cluster, it causes the computing device cluster to perform the operational steps of the method as described in the first aspect or any possible implementation of the first aspect.

[0024] The beneficial effects of aspects two through six above can be described with reference to the first aspect or any implementation thereof, and will not be repeated here. Based on the implementations provided in the above aspects, this application can be further combined to provide more implementations. Attached Figure Description

[0025] Figure 1 A flowchart illustrating the process of multiple intelligent agents collaborating to execute a target task; Figure 2 A schematic diagram of the structure of a task execution system provided in this application; Figure 3 A flowchart illustrating a task execution method provided in this application; Figure 4 A flowchart illustrating how an execution strategy is determined based on an experience pool, as provided in this application; Figure 5 A flowchart illustrating the process of determining the probability of an agent being selected, as provided in this application; Figure 6 A flowchart illustrating a task execution method provided in this application; Figure 7 A schematic diagram of the structure of a task execution device provided in this application; Figure 8 A schematic diagram of the structure of a computing device provided in this application; Figure 9 This application provides a schematic diagram of the structure of a chip; Figure 10 This application provides a schematic diagram of the structure of a computing device cluster; Figure 11 This is a schematic diagram of the connection between computing devices provided in this application. Detailed Implementation

[0026] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the terminology used in this application will be provided first.

[0027] (1) Intelligent agent.

[0028] An intelligent agent can refer to an intelligent entity capable of autonomously perceiving its environment, processing information, making decisions, and executing actions. An intelligent entity can refer to a physical entity or a software entity without a physical form; this application does not limit this. A software entity can refer to intelligent software units, software programs, etc. In some possible examples, an intelligent agent can also be called an Artificial Intelligence Agent (AI Agent). The following example, assuming the intelligent agent refers to a software entity, will be used to illustrate this application.

[0029] Computing devices can employ multiple agents to collaborate in executing a target task. Typically, computing devices can employ multiple agents to collaborate in executing a target task using any of the following methods 1 to 3.

[0030] Method 1 Figure 1 A flowchart illustrating the process of multiple intelligent agents collaborating to execute a target task, such as... Figure 1 As shown in (a), the computing device can use agents 1 to 3 to execute the target task. Specifically, the computing device uses agents 1 to 3 to interact with each other and obtain interaction results. The computing device splits the target task into subtask 1 and subtask 2. Based on the interaction results, agent 3 determines whether to use agent 1 to execute subtask 1 and agent 2 to execute subtask 2. After agent 1 obtains the execution result 1 of subtask 1 and agent 2 obtains the execution result 2 of subtask 2, the computing device uses agent 3 to obtain the execution result of the target task based on execution result 1 and execution result 2.

[0031] In the above process, the computing device determines the agent to handle the sub-task based on the interaction results of multiple agents. The method of determining the agent is complicated and affects the execution efficiency of the target task.

[0032] Method 2 In this method, please continue to refer to Figure 1 ,like Figure 1 As shown in (b), the computing device trains multiple agents, including a question setter agent, multiple answerer agents, and a referee agent, and uses the trained agents to perform the target task.

[0033] Specifically, the computing device uses a question-setting agent to break down the task into multiple sub-tasks and assigns each sub-task to a answering agent. The answering agent executes the corresponding sub-task and obtains the execution result. A referee agent scores the rationality of the question-setting agent's task breakdown and the rationality of the answering agent's execution of the sub-tasks based on the content and execution result of each sub-task. Based on the scores from both the question-setting and answering agents, the computing device adjusts the parameters of both agents to obtain the adjusted question-setting and answering agents. This process is repeated until the termination condition is met, outputting a target question-setting agent and a target answering agent that can be used to execute the target task. The computing device then uses the target question-setting agent and the target answering agent to execute the target task and obtain the execution result.

[0034] In the above process, the computing device needs to use training data to perform training to obtain the target question setter agent and the target question responder agent. The cost of obtaining training data and performing training is high, and the application scenarios are limited.

[0035] Method 3 Please continue reading Figure 1 ,like Figure 1 As shown in (c), based on the state value function v(s) and the action-state value function Q(s, a), it can be determined that the computational complexity of training an agent increases with the number of agents. And as... Figure 1 As shown in Figure (d), during agent training using six agent reinforcement learning algorithms—Multi-Agent Proximal Policy Optimization (MAPPO), Multi-Agent Advantage Actor-Critic (MAA2C), Value Decomposition Networks (VDN), Q-value Mixing (QMIX), Multi-Agent Twin Delayed Deep Deterministic Policy Gradient (MATD3), and Multi-Agent Deep Deterministic Policy Gradient (MADDPG)—the normalized reward decreases with the increase of the number of agents.

[0036] Therefore, in method 3, please refer to [link / reference]. Figure 1 ,like Figure 1 As shown in (e), the computing device no longer precisely calculates the normalized reward. Instead, it estimates the value using a model that estimates the value, and uses the estimated value instead of the precisely calculated normalized reward for training. The computing device uses training data agents. During training, it uses the model used to estimate the value to estimate the value, and uses the estimated value to update the agent parameters, thus obtaining the target agent. The computing device uses the target agent to execute the target task and obtains the execution result of the target task.

[0037] In the above process, the computing device trains the target intelligent agent to perform the target task. However, the cost of training is high and the application scenarios are limited.

[0038] Based on this, this application provides a task execution method. In this method, an experience pool records the execution strategies of each historical task from multiple historical tasks. These historical task execution strategies instruct the agents executing the historical tasks, and describe the process of each agent executing the historical tasks. The computing device determines the execution strategy of the target task based on the experience pool. This method has low complexity in determining the execution strategy, shortens the time required for strategy determination, and improves efficiency. Compared to pre-trained models and using trained models to generate the execution strategy of the target task, this method eliminates the need for pre-training models, saving the model pre-training process and further shortening the time required to obtain the execution strategy. It also eliminates the need to construct training data, saving costs. By directly reusing the execution strategies of successfully executed historical tasks, the fit between the execution strategy and the task is not affected by the model, improving the task execution success rate. Furthermore, by directly determining the execution strategy of the target task based on the experience pool recording the execution strategies of multiple historical tasks, it eliminates the need to pre-train models using training data matched to the application scenario, expanding the application scenarios.

[0039] The method provided in this application can be applied to task execution systems. Figure 2 A schematic diagram of the structure of a task execution system provided in this application is shown below. Figure 2 As shown, the task execution system 200 includes multiple intelligent agents 210.

[0040] In some possible scenarios, multiple intelligent agents may be deployed on one device or multiple devices; this application does not limit this. Devices deploying multiple intelligent agents may include cloud platform devices or user client devices; this application does not limit this. Devices deploying intelligent agents may or may not have physical entities; this application does not limit this. For example, task execution system 200 includes intelligent agents 1 to 5. Intelligent agent 1 is deployed on computing device 11, intelligent agents 2 and 3 are deployed on computing device 12, intelligent agent 4 is deployed on computing device 13, and intelligent agent 5 is deployed on computing device 2. Intelligent agent 5, in response to a user request to execute a target task, determines an execution strategy 1 for the target task, wherein execution strategy 1 instructs intelligent agents 1 to 4 to execute the target task. Intelligent agents 1 to 4 execute the target task according to the execution strategy to obtain the execution result of the target task.

[0041] In some possible scenarios, the types of multiple intelligent agents may be the same or different, and this application does not limit this. For example, multiple intelligent agents may all be intelligent agents built based on a large language model. The sources of multiple intelligent agents may be the same or different, and this application does not limit this. For example, multiple intelligent agents may all be provided by a first provider. The capabilities of multiple intelligent agents may be the same or different, and this application does not limit this. For example, intelligent agents 1 to 4 are expert intelligent agents used to execute the target task according to the execution strategy of the target task, and intelligent agent 5 is a second intelligent agent used to obtain the execution strategy of the target task.

[0042] The task execution system 200 has been described above as an example. Depending on the needs of the actual application, the task execution system 200 may include more or fewer components, which is not limited in this application.

[0043] The following is based on Figure 2 Taking the task execution system shown as an example, the method provided in this application will be described exemplarily.

[0044] Before describing the method provided in this application in detail, a general description of the method provided in this application will be given first.

[0045] In the method provided in this application, in response to a user request, the computing device first determines a first target execution strategy for the target task from an experience pool, and then uses the first target execution strategy to obtain the execution result of the target task. If the computing device cannot determine an execution strategy for the target task based on the experience pool, it determines a second target execution strategy for the target task based on the agent's business adaptability, and then uses the second target execution strategy to obtain the execution result of the target task.

[0046] The method provided in this application has been described in general above. The following section describes the application... Figure 3The method provided in this application is described in detail. Figure 3 A flowchart illustrating a task execution method provided in this application is shown below. Figure 3 As shown, the method provided in this application includes the following steps S310 to S330.

[0047] S310, The computing device obtains the user request.

[0048] The user request is used to request the execution of the target task.

[0049] The target task can refer to any task to be executed, input according to the needs of the business scenario. The target task may vary depending on the application scenario; the following is an example description of a target task.

[0050] Example 1 In this example, the application scenario is a large-scale intelligent dialogue system. In this scenario, the target task can be a variety of query tasks, including but not limited to: common sense question answering, professional domain consultation, code generation, mathematical reasoning, creative collaboration, etc.

[0051] Example 2 In this example, the application scenario is distributed task planning and execution. In this scenario, the target task can be a complex business process, including but not limited to: workflows, enterprise resource planning, etc.

[0052] Example 3 In this example, the application scenario is a multi-expert collaborative decision-making scenario. In this scenario, the target task may include, but is not limited to: medical diagnostic assistance, financial risk assessment, legal consultation, etc.

[0053] The target task has been described above as an example. The following describes how computing devices obtain user requests.

[0054] Computing devices can obtain user requests in a variety of ways, which are described below using Examples 1 and 2.

[0055] Example 1 In this approach, the computing device can provide a first interface, and the computing device responds to the user's operation on the first interface by obtaining the user's request.

[0056] Example 2 In this method, the computing device receives user requests sent by other devices.

[0057] The process of a computing device acquiring a user request has been described above. After acquiring the user request, the computing device can execute S320 to determine the target execution strategy for the target task.

[0058] S320, the computing device responds to the user request and determines the target execution strategy for the target task.

[0059] The target execution strategy includes: information instructing the agents to execute the target task, the order in which the agents execute the target task, and the data dependencies between the agents during the execution of the target task. The information instructing the agents to execute the target task may include, but is not limited to, agent identifiers. The target execution strategy may include: a first target execution strategy or a second target execution strategy. The first target execution strategy is the execution strategy for the target task determined based on an experience pool. The second target execution strategy is the execution strategy for the target task determined based on the business adaptability of the agents.

[0060] The computing device can have an agent (such as a second agent) deployed on it determine the target execution strategy for the target task based on an experience pool or the agent's business adaptability. Specifically, in response to a user request, the computing device can have the second agent first determine a first target execution strategy for the target task based on the experience pool, and then execute the target task using the first target execution strategy to obtain the execution result. Thus, compared to using model inference to obtain the execution strategy for the target task, in this application, the computing device can determine the first target execution strategy for the target task without complex computation, resulting in lower complexity and increased determination speed. It also eliminates the need to use training data to train a model that generates the execution strategy for the target task, reducing dependence on training data and saving costs. Furthermore, it allows for the reuse of experience from executing historical tasks, increasing the likelihood of successful target task execution.

[0061] When the second agent cannot determine the execution strategy of the target task based on the experience pool, the computing device determines a second target execution strategy for the target task based on the agent's business adaptability, and executes the target task using the second target execution strategy to obtain the execution result of the target task. In this way, even when the execution strategy of the target task cannot be determined based on the experience pool, the execution strategy of the target task can still be determined based on the agent's business adaptability, thus ensuring the sequential execution of the target task.

[0062] In some possible scenarios, after obtaining a user request, the computing device may also generate a system prompt and determine the execution strategy of the target task based on the user request and the system prompt, which is not limited in this application.

[0063] The following describes the process of determining the execution strategy of the target task based on the service adaptability of the computing device based on the experience pool and the intelligent agent, using scenarios 1 and 2 respectively.

[0064] Scenario 1: The computing device is determined by a second intelligent agent based on an experience pool to determine the first objective execution strategy for the target task.

[0065] Before describing the first objective execution strategy of the computing device, which is determined by the second agent based on the experience pool, the experience pool is described first.

[0066] The experience pool can include multiple routing experiences. Each routing experience includes the execution strategy of a historical task. These multiple routing experiences can be structured or unstructured; this application does not limit this. The following description uses a structured routing experience as an example to illustrate the method provided in this application. The construction process of the experience pool is described in the relevant description below and will not be repeated here.

[0067] Routing experience may include at least one of the following: task features, execution policy, verification flags, output summary, performance score, or contextual information. Task features describe the corresponding historical task. Verification flags indicate the confidence level of the execution policy in the routing experience. The output summary is a general description of the agent's performance on the corresponding historical task. The performance score indicates the agent's performance on the corresponding historical task and its contribution to the execution. Contextual information indicates the execution environment of the corresponding historical task. For further details on the possible components of routing experience, please refer to the relevant descriptions below; they will not be elaborated upon here.

[0068] The experience pool has been described above. The process of determining the first target execution strategy based on the experience pool is described below.

[0069] The computing device can directly reuse the execution strategies included in the routing experience in the experience pool, reuse the adjusted execution strategies, or directly discard the execution strategies included in the routing experience in the experience pool.

[0070] Figure 4 This application provides a flowchart illustrating how an execution strategy is determined based on an experience pool. Figure 4 As shown, the computing device, through a second intelligent agent, selects candidate experiences from an experience pool based on user requests and system prompts. The computing device, through the second intelligent agent, determines whether any routing experiences among the candidate experiences meet the reuse conditions. If such routing experiences exist, the computing device, through the second intelligent agent, selects the routing experiences that meet the reuse conditions from the candidate experiences, and determines the execution strategy included in the aforementioned routing experiences as the execution strategy for the target task.

[0071] When the second agent cannot select a route experience that meets the reuse condition from the candidate experiences, that is, there is no route experience that meets the reuse condition in the candidate experiences, the computing device determines whether there is a target route experience in the candidate experience pool whose applicability score is between the upper limit and the lower limit of the applicability score.

[0072] If the computing device finds target routing experience among the candidate experiences, it adjusts the execution strategy included in the target routing experience and determines the adjusted execution strategy as the execution strategy for the target task (i.e., the first target execution strategy). If the computing device does not find target routing experience among the candidate experiences, it discards routing experience in the experience pool.

[0073] Depending on whether there is routing experience that satisfies the reuse conditions, the process by which the computing device obtains the first target execution strategy differs. The following uses (1) and (2) to describe them respectively.

[0074] (1) The computing device directly uses the execution strategy included in the routing experience as the first target execution strategy.

[0075] In this way, computing devices can directly reuse the execution strategies of historical tasks, skip the route exploration process, shorten the time required to determine the first target execution strategy of the target task, improve the efficiency of obtaining the execution results of the target task, and save computing resources by directly reusing the execution strategies of historical tasks.

[0076] Specifically, the computing device can execute the following (1A) and (1B) to obtain the first target execution strategy.

[0077] (1A) The computing device, through the second intelligent agent, identifies the routing experiences in which the fit between the historical task and the target task corresponding to each routing experience is greater than or equal to the fit threshold as candidate experiences.

[0078] The fit is determined based on similarity and applicability scores. Similarity is the semantic similarity between the target task and historical tasks. Similarity can be determined based on the task features included in the routing experience in the experience pool and the target task features of the target task. For details on how similarity is calculated, please refer to the relevant description below; it will not be repeated here.

[0079] The computing device obtains the similarity and applicability scores of historical tasks corresponding to each of the multiple routing experiences, and selects candidate experiences from the multiple routing experiences based on the similarity and applicability scores.

[0080] Specifically, the computing device can perform the following ① and ② to determine candidate experiences.

[0081] ① The computing device selects initial candidate experiences from multiple routing experiences based on similarity.

[0082] The computing device inputs the target task into a task encoder to obtain the target task features. It then calculates the similarity between the task features and target task features in each of its multiple routing experiences, resulting in multiple similarity scores. Each similarity score corresponds to the similarity between the target task and historical tasks. The computing device then selects the K routing experiences corresponding to the K historical tasks with the highest similarity scores, and determines them as initial candidate experiences. Here, K is a positive integer. K can be determined based on retrieval quality and computational cost, such as setting K to 10-50.

[0083] In some possible scenarios, the computing device can also determine initial candidate experiences based on at least two factors: the similarity of routing experiences, the output summary, and context information including similarity. For example, the computing device calculates the information similarity between context information and target task features. The computing device obtains the matching degree between the output summary and the specified output summary of the target task. The computing device performs a weighted summation of the similarity, information similarity, and matching degree to obtain the summation result. The computing device selects the K routing experiences with the largest summation results as initial candidate experiences.

[0084] ②The computing device selects candidate experiences from the initial candidate experiences based on similarity and applicability scores.

[0085] The computing device obtains applicability scores for multiple routing experiences on the target task, resulting in multiple applicability scores. Each applicability score corresponds to the applicability score of one routing experience on the target task. The calculation process for the applicability scores is described in detail below and will not be repeated here.

[0086] The computing device combines similarity and applicability scores to rank the initial candidate experiences, obtaining the M most relevant routing experiences. For example, the computing device weights the similarity and applicability scores of a single routing experience to obtain an experience score. The computing device then ranks the candidate experiences in descending order of experience score, and determines the M routing experiences with the highest experience scores as the candidate experiences.

[0087] In some possible cases, the computing device may also use other methods to obtain empirical scores based on similarity and applicability scores, which is not limited in this application.

[0088] The above example illustrates the process of determining candidate experiences by using a computing device to select candidate experiences from multiple routing experiences based on similarity and applicability scores. In some possible examples, the computing device may also select candidate experiences from multiple routing experiences based on either similarity or applicability scores, and this application does not limit this. Depending on the needs of the actual business scenario, the computing device may also use other methods to select candidate experiences from multiple routing experiences, etc.

[0089] After the computing device determines the candidate experience, it can execute (1B) to determine the first target execution strategy.

[0090] (1B) The computing device determines the execution strategy of the target task by the second intelligent agent, which includes the routing experience that meets the reuse conditions in the candidate experience.

[0091] The reuse conditions include at least one of the following: the applicability score of the execution strategy included in the candidate experience is greater than or equal to the upper limit of the applicability score; the verification label is a pre-set confidence level; and the first agent included in the execution strategy of the candidate experience supports the execution of the target task. The applicability score is used to indicate the degree of suitability of the execution strategy included in the candidate experience for solving the target task. The first task includes: the historical task corresponding to the routing experience in the candidate experience that meets the reuse conditions. The pre-set confidence level may include, but is not limited to: high confidence level.

[0092] The method provided in this application will be described exemplarily below, taking the reuse conditions including all of the above as an example.

[0093] The computing device acquires the applicability scores of the execution strategies of each routing experience from K candidate experiences, and selects a first routing experience from the K candidate experiences whose applicability score is greater than or equal to the upper limit of the applicability score. The computing device then determines a second routing experience from the first routing experience with a pre-set confidence level for verification, and from the second routing experience determines a third routing experience whose corresponding execution strategy indicates that the first agent supports the execution of the target task, and determines the execution strategy included in the third routing experience as the first target execution strategy. The upper limit of the applicability score can be preset or set according to the needs of the actual application; this application does not limit this, for example, the upper limit of the applicability score can be 0.85 preset based on expert experience.

[0094] Specifically, the computing device can perform the following steps ① to ③ to determine the first objective execution strategy.

[0095] ① The computing device determines the first routing experience from the candidate experiences by the second intelligent agent, whose applicability score is greater than or equal to the upper limit of the applicability score.

[0096] The computing device calculates the applicability score of the execution policy included in each candidate route experience, obtaining M applicability scores. The computing device compares each of the M applicability scores with an upper limit for applicability scores. The computing device determines the target applicability score among the M candidate experiences that is greater than or equal to the upper limit. The computing device then designates the route experience corresponding to the target applicability score from the M candidate experiences as the first route experience.

[0097] ②The computing device uses the second agent to determine the second route experience with a pre-set confidence level (such as high confidence level) from the first route experience.

[0098] The computing device selects the second route experience marked with high confidence from the second route experience.

[0099] ③ The computing device determines the execution strategy for the first target based on the experience of the second route.

[0100] The computing device selects a third route experience from the second route experience that is available to the agent and is not overloaded, and determines the execution strategy included in the third route experience as the first target execution strategy.

[0101] For a single routing experience (such as routing experience 1) in the second routing experience, the computing device obtains the execution policy 1 corresponding to routing experience 1. If the agents indicated by execution policy 1 are available and not overloaded, the computing device determines the execution policy 1 corresponding to routing experience 1 as the first target execution policy. Similarly, the computing device can use the method described above to determine whether the execution policies included in other routing experiences in the second routing experience besides routing experience 1 can be used as the first target execution policy.

[0102] For example, K is 13, M is 10, and the experience pool includes routing experience 1 to routing experience 15. Routing experience 1 to routing experience 15 are the routing experiences of historical tasks 1 to historical tasks 15, respectively. The default confidence level is high confidence.

[0103] In this scenario, the computing device calculates the similarity between the target task and each of the historical tasks from historical task 1 to historical task 15, obtaining similarity scores from 1 to 15, which decrease sequentially. The computing device then identifies the routing experiences (i.e., routing experiences 1 to 13) corresponding to the 13 largest similarities (i.e., similarity scores 1 to 13) as initial candidate experiences.

[0104] The computing device calculates the applicability scores 1 to 15 for each of the routing experiences 1 to 15. The applicability scores decrease sequentially from 1 to 15. The computing device then weights and calculates the similarity and applicability scores for each of the routing experiences 1 to 13, resulting in experience scores 1 to 13. Again, experience scores decrease sequentially from 1 to 13. Finally, the computing device selects routing experiences 1 to 10 from these three experiences as candidate experiences.

[0105] The computing device determines the execution policies included in the routing experiences 1 to 10 that meet the reuse conditions as the first target execution policy. Specifically, the computing device selects applicability scores 1 to 7 from routing experiences 1 to 10 that are greater than or equal to the upper limit of the applicability score. The computing device determines the routing experiences 1 to 7 corresponding to applicability scores 1 to 7 as the first routing experiences. The computing device selects routing experiences 1 and 2 with verification marks marked as high confidence from routing experiences 1 to 7. The computing device determines routing experiences 1 and 2 as the second routing experiences. The computing device obtains execution policy 1 for routing experience 1. The computing device determines that each agent 11 to 14 indicated by execution policy 1 is available and not overloaded. The computing device determines the execution policy 1 corresponding to routing experience 1 as the first target execution policy. Similarly, the computing device obtains execution policy 2 for routing experience 2. The computing device determines that each agent 21 to 26 indicated by execution policy 2 is available and not overloaded. The computing device determines the execution strategy 2 corresponding to routing experience 2 as the first target execution strategy. That is, the first target execution strategy includes: execution strategy 1 and execution strategy 2.

[0106] The above describes the process by which the computing device directly determines the execution strategy included in the routing experience as the first target execution strategy. In some possible cases, the execution strategy included in the routing experience in the experience pool cannot be directly adapted to the target task. In this case, the execution strategy included in the routing experience in the experience pool can be adjusted to obtain the first target execution strategy.

[0107] Specifically, the computing device can perform the following (2) adjustment of the routing experience including the execution strategy to obtain the first target execution strategy.

[0108] (2) The computing device adjusts the execution strategy including the routing experience to obtain the first target execution strategy.

[0109] Compared to computing devices determining the execution strategy of the target task based on the agent's business adaptability, computing devices adjust the execution strategy including routing experience to obtain the first target task execution strategy. This has low complexity, low computational load, improves the efficiency of determining the execution strategy of the target task, makes full use of the execution experience of historical tasks, and balances efficiency and quality.

[0110] Similarly, the computing device can execute the following (2A) and (2B) to obtain the first target execution strategy.

[0111] (2A) The computing device, through the second intelligent agent, identifies the routing experiences in which the fit between the historical task and the target task corresponding to each routing experience is greater than or equal to the fit threshold as candidate experiences.

[0112] Please refer to the description in (1A) above for details on this part, which will not be repeated here.

[0113] (2B) If there is no route experience in the candidate experience that meets the reuse condition, the computing device adjusts the execution strategy included in the target route experience in the candidate experience whose applicability score is between the upper limit and the lower limit of the applicability score to obtain the first target execution strategy.

[0114] If no routing experience that meets the reuse criteria exists among the candidate experiences, the computing device selects a target routing experience from the candidate experiences whose applicability score falls between the upper and lower limits of the applicability score. The computing device adjusts the execution strategy included in the target routing experience to obtain an adjusted execution strategy. The computing device uses the adjusted execution strategy as the first target execution strategy. Similarly, the lower limit of the applicability score can be preset or set according to the needs of the actual application; this application does not limit this, such as setting the lower limit of the applicability score to 0.6 based on expert experience. In some possible examples, the execution strategy included in the target routing experience can also be referred to as the execution strategy to be adjusted.

[0115] In some possible scenarios, the adjustment includes performing one of the following: adjusting the agent indicated by the execution policy included in the target routing experience; and adjusting the probability of the agent indicated by the execution policy included in the target routing experience being selected to execute the target task based on the degree of fit, where the degree of fit indicates the degree of matching between the service processed by the agent indicated by the execution policy included in the target routing experience and the target service. For the process by which the computing device adjusts the execution policy to be adjusted to obtain the first target execution policy, please refer to the relevant description below, which will not be repeated here.

[0116] In some possible scenarios, adjusting the agent that executes the policy instructions included in the target routing experience may include at least one of the following: replacing the agent that executes the policy instructions included in the target routing experience, reducing the number of agents that execute the policy instructions included in the target routing experience, or adding an agent to the execution policy included in the target routing experience.

[0117] In some possible scenarios, the computing device can adjust the agent implementing the policy instructions for the target route based on the performance score of the agent implementing the policy instructions included in the multiple route experiences.

[0118] For example, K is 13, M is 10, and the experience pool includes: routing experience 1 to routing experience 15. Routing experience 1 to routing experience 15 are the routing experiences of historical tasks 1 to historical tasks 15, respectively.

[0119] In this scenario, if no routing experience from routing experience 1 to routing experience 15 meets the reuse condition, the computing device determines candidate experiences from these five sources. These candidate experiences include routing experiences 1 to 10. Please refer to the example above for a description of this process; it will not be repeated here.

[0120] The computing device selects routing experiences 8 to 10 from routing experiences 1 to 10 whose applicability scores fall between the upper and lower limits of their applicability scores. The computing device adjusts the execution policies 8 to 10 corresponding to routing experiences 8 to 10, and determines the adjusted execution policies 8 to 10 as the first target execution policies. That is, the first target execution policies include: the adjusted execution policies 8 to 10.

[0121] The preceding text described the process by which a computing device determines the first execution strategy for a target task using an experience pool. In some possible scenarios, if the computing device cannot determine the execution strategy for the target task based on the experience pool, it can determine the execution strategy based on the agent's business adaptability. For example, if the applicability scores of the execution strategies for historical tasks recorded in the experience pool are all below the lower limit of applicability scores, the computing device can determine the execution strategy for the target task based on the agent's business adaptability. Similarly, if the similarity between multiple historical tasks corresponding to multiple routing experiences in the experience pool and the target task is all below a similarity threshold, the computing device can also determine the execution strategy for the target task based on the agent's business adaptability. That is, if the historical tasks corresponding to multiple routing experiences in the experience pool are all different from the target task, the computing device discards the experiences and determines the execution strategy for the target task based on the agent's business adaptability.

[0122] Specifically, the computing device can execute scenario 2 to determine the execution strategy for the target task.

[0123] Scenario 2: The computing device determines the second target execution strategy for the target task based on the business adaptation capability of the intelligent agent.

[0124] In this scenario, the computing device does not refer to the execution strategies of historical tasks recorded in the experience pool, but determines the execution strategy of the target task based on the agent's business adaptability. Even when there are no historical tasks similar to the target task in the experience pool, and / or the execution strategies included in the routing experience in the experience pool cannot be reused, the computing device can still determine the execution strategy of the target task, thus ensuring that the computing device can execute new types of tasks.

[0125] Specifically, the computing device can execute the following (1) to (3) to obtain the second objective execution strategy for the objective task.

[0126] (1) The computing device determines the probability that each third agent will be selected to execute the target task based on the business adaptability of each third agent among multiple third agents.

[0127] The business adaptability of the third agent is used to indicate its competence in different tasks. The third agent can be an expert agent possessing specific capabilities to handle specific tasks. Multiple third agents are considered as candidate expert agents.

[0128] In some possible scenarios, business adaptability includes at least one of the following: comprehensive score, current load, historical success rate, and area of ​​expertise. The comprehensive score indicates the degree to which a third agent supports the execution of historical tasks by associated third agents. The associated third agent is the agent among multiple third agents that receives the computational results from the third agent. The current load indicates the resource consumption of the third agent. The historical success rate characterizes the probability that the third agent successfully executes historical tasks. The area of ​​expertise indicates the business that the third agent is adapted to handle.

[0129] In some possible scenarios, the overall score is determined based on the usefulness of the third agent's computational results to the associated third agent's performance of historical tasks. The process for obtaining the overall score of the third agent is described in detail below and will not be repeated here.

[0130] In some possible scenarios, the computing device can employ a second agent to determine the probability that each third agent will be selected to execute the target task. The second agent is trained based on a first execution result. The first execution result is obtained by executing the task according to a first execution strategy. The first execution strategy is determined based on probabilities derived from the agents' business adaptability. In this case, the business adaptability of each of the multiple third agents can be carried in the network parameters of the second agent; that is, the competence of each third agent for different tasks is carried in the network parameters of the second agent. The computing device inputs the target task into the second agent, which, based on the competence of each third agent for different tasks carried in its network parameters, determines the probability that each third agent will be selected to execute the target task. For details on the process of training the second agent, please refer to the relevant explanation below; it will not be elaborated upon here. In some possible examples, the second agent may also be called a planning agent.

[0131] (2) The computing device selects the target intelligent agent to perform the target task from multiple third intelligent agents based on the probability.

[0132] The target agent includes at least one of multiple third agents.

[0133] The computing device can select at least one third agent from a plurality of third agents, and determine the at least one third agent as the target agent to execute the target task. The probability of at least one third agent is greater than the probability of any other third agent among the plurality of third agents. The number of at least one third agent is determined based on the number of sub-tasks obtained by the second agent in decomposing the target task. Specifically, the computing device can use the second agent to decompose the target task to obtain at least one sub-task. The computing device obtains the probability of each third agent being selected to execute each sub-task. The computing device determines the third agent with the highest probability as the target agent to execute the corresponding sub-task.

[0134] (3) The computing device determines the second target execution strategy of the target task by the second intelligent agent based on the target intelligent agent.

[0135] The second target execution strategy includes: information indicating the target agent to perform the target task, the execution order of the target agent for the target task, and the data dependencies of each target agent in the process of performing the target task. The second target execution strategy is used to execute the target task.

[0136] The computing device obtains the second target execution strategy for the target task based on the target intelligent agent, the execution order of each third intelligent agent in the target intelligent agent for the target task, and the data dependencies of each third intelligent agent in the target intelligent agent during the execution of the target task.

[0137] In some possible scenarios, after determining the second objective execution strategy for the target task based on the agent's business adaptability, the computing device can also update the experience pool using the target task and the second objective execution strategy to obtain an updated experience pool. The updated experience pool includes the task characteristics of the target task and the second objective execution strategy.

[0138] In some possible scenarios, the computing device can also employ a second objective execution strategy to execute the objective task and obtain the execution result. The computing device can also acquire the verification tags, output summary, performance score, and contextual information corresponding to the objective task, and use this information to update the experience pool.

[0139] In some possible scenarios, the computing device can generate routing experience for the target task based on the characteristics of the target task, the second target execution strategy, the target task's verification markers, the target task's output summary, the target task's performance score, and the target task's contextual information. It can then update the experience pool using this routing experience, resulting in an updated experience pool. The updated experience pool includes the target task's routing experience.

[0140] The process by which the computing device obtains the execution strategy of the target task has been described above. In some possible cases, after determining the execution strategy of the target task, the computing device can also execute S330 to obtain the execution result of the target task.

[0141] S330, the computing device uses a target execution strategy to execute the target task and obtain the execution result of the target task.

[0142] Depending on the execution strategy of the target task, the execution results will be different. The following describes the cases (1) and (2) respectively.

[0143] In scenario (1), the execution strategy for the target task is the first target execution strategy.

[0144] Depending on the number of execution strategies included in the first objective execution strategy, the process by which the computing device executes the first objective execution strategy to obtain the execution result of the objective task will be different. These will be described below using ① and ② respectively.

[0145] ①The first objective execution strategy includes one execution strategy.

[0146] In this scenario, the computing device executes the execution strategy included in the first target execution strategy, and uses the execution result of the execution strategy as the execution result of the target task. Specifically, the computing device inputs the target task into the agent indicated by the first target execution strategy, and the agent indicated by the first target execution strategy executes the target task according to the execution order and data dependencies of the target task in the first target execution strategy, thereby obtaining the execution result of the target task.

[0147] For example, the first target execution strategy includes: the identification of each agent among agents 1 to 4, agent 1 starting to execute the target task, agent 2 relying on the output of agent 1, agent 3 relying on the output of agent 1 and agent 2, and agent 4 relying on the output of agent 3.

[0148] In this scenario, the computing device inputs the target task into Agent 1, which executes the target task to obtain intermediate result 1. Agent 1 then passes intermediate result 1 to Agents 2 and 3. Based on intermediate result 1, Agent 2 executes the target task to obtain intermediate result 2 and passes intermediate result 2 to Agent 3. Based on intermediate results 1 and 2, Agent 3 executes the target task to obtain intermediate result 3. Agent 3 then passes intermediate result 3 to Agent 4. Based on intermediate result 3, Agent 4 executes the target task to obtain the execution result.

[0149] ②The first objective execution strategy includes multiple execution strategies.

[0150] In this scenario, the computing device executes each of the multiple execution strategies included in the first target execution strategy, obtaining multiple execution results corresponding to each strategy. Each execution strategy corresponds to one execution result. The computing device compares the multiple execution results of the multiple execution strategies and selects the optimal result as the execution result of the target task. The optimal execution result may refer to the one with the highest degree of fit to the target task. The execution result with the highest degree of fit to the target task may be the one that best meets the task requirements, best matches the task's preset goals, has the highest completion rate, and the smallest deviation. The degree of fit between the execution result and the target task may be determined based on expert experience.

[0151] In scenario (2), the execution strategy for the target task is the second target execution strategy.

[0152] Depending on the number of second-objective execution strategies, the process by which the computing device executes these strategies to obtain the execution result of the target task varies. When the second-objective execution strategy includes one strategy, the computing device can obtain the execution result of the target task using the method described in ① above. When the second-objective execution strategy includes multiple strategies, the computing device can obtain the execution result of the target task using the method described in ② above. Please refer to the above descriptions for further details, which will not be repeated here.

[0153] In some possible scenarios, the computing device executing S310 and S320 may refer to the computing device that deploys the second intelligent agent, and the computing device executing S330 may refer to the computing device that deploys the intelligent agent that is instructed by the execution strategy of the target task.

[0154] The method provided in this application has been described above; the experience pool will be described below.

[0155] The following sections use Aspect 1 and Aspect 2 to describe the experience of a single route in the experience pool, as well as the construction, use, and updating of the experience pool.

[0156] Aspect 1: Experience of a single route in the experience pool.

[0157] As described in the foregoing embodiments, routing experience may include at least one of the following: task characteristics, execution strategy, verification flag, output summary, performance score or context information. The following uses (1) to (6) to describe each of the contents of routing experience.

[0158] (1) Task characteristics.

[0159] Task features are used to describe the corresponding historical task. Task features may include, but are not limited to: task type, task description embedding vector, task difficulty score, task keywords, etc. Task types may include, but are not limited to: code generation, mathematical reasoning tasks, dialogue generation tasks, etc. The task description embedding vector can be obtained using a task encoder based on the task description.

[0160] (2) Implementation strategy.

[0161] The execution policy is used to indicate the execution method of the corresponding historical task. The execution policy includes, but is not limited to: the agent identifier of the agent executing the task, the order in which the agents execute the task, and the data dependencies between agents during the execution of the task.

[0162] In some possible scenarios, the execution strategy may also include the probability of an agent being selected to execute a historical task. For example, execution strategy 1 includes: the description of each agent from agent 1 to agent 4, agent 1 starting to execute a historical task, agent 2 relying on the intermediate results output by agent 1, agent 3 relying on the intermediate results output by agents 1 and 2, agent 4 relying on the intermediate results output by agent 3, and the probabilities of agents 1 to 4 being selected to execute a historical task being 0.8, 0.5, 0.7, and 0.3, respectively. The execution strategies described below are similar to this strategy and will not be elaborated upon further.

[0163] (3) Verification mark.

[0164] Validation flags are used to indicate the confidence level of the execution strategy.

[0165] (4) Output summary.

[0166] The output summary is a concise description of the agent's performance of the corresponding historical task. The output summary can refer to the output summary of each agent performing the corresponding historical task. The output summary can include, but is not limited to, metadata. Meta-information can include, but is not limited to, output type (the way output information is carried), output length, key features, etc. Output type can refer to the output format, including but not limited to: structured machine-readable data (such as JSON), text files (such as TXT), formatted documents (such as Word), etc.

[0167] (5) Performance rating.

[0168] Performance scores are used to indicate the effectiveness of an agent in executing a corresponding historical task and its contribution to the task. Performance scores include: overall score, fine-grained score, efficiency metrics, and stability metrics. The overall score includes: whether the historical task was successfully executed, user satisfaction, and output quality score. The fine-grained score includes: the agent's contribution to the historical task and the agent's support for related agents in executing the historical task. Efficiency metrics include: the total execution time of the historical task, the execution time of each stage, and resource consumption. Stability metrics indicate whether any abnormal situations exist during the execution of the historical task, including but not limited to: errors, retries, and rollbacks.

[0169] (6) Contextual information.

[0170] Context information is used to indicate the execution environment of the corresponding historical task. It records the context information at the time of the historical task's execution, including but not limited to: the agent's business adaptability, system load, timestamps, etc. Context information is used to determine the similarity between the execution environment of the historical task and the execution environment of the target task.

[0171] The foregoing has provided an exemplary description of the possible contents of routing experience. Depending on the needs of the actual application, routing experience may also include other contents, which are not limited in this application.

[0172] In some possible scenarios, computing devices can store multiple routing experiences in various ways.

[0173] For example, a computing device stores the most recently accessed and frequently accessed routing experiences as hot data in memory. This enables millisecond-level retrieval of these recently accessed and frequently accessed routing experiences. "Recently accessed" can mean that the interval between the access time of the routing experience and the current time is less than or equal to a lower interval limit, and "frequently accessed" can mean that the routing experience has been accessed more than or equal to a higher access limit within a specified time period.

[0174] For example, a computing device stores recently accessed, frequently accessed routing experiences as warm data on a solid-state drive (SSD). This enables millisecond-level retrieval of recently accessed, frequently accessed routing experiences. "Recent" can refer to the interval between the access time and the current time being between the lower and upper limits of the interval, while "frequent" can refer to the number of times the routing experience has been accessed within a specified time period being between the upper and lower limits of the access count.

[0175] For example, computing devices can store routing experiences with long intervals and low access frequency among multiple routing experiences on a hard disk drive (HDD), or use object storage to store these routing experiences. This allows for millisecond-level retrieval of historical, low-access routing experiences. The interval length can refer to the time between the accessed routing experience and the current time being greater than or equal to an upper limit of the interval length, and low frequency can refer to the number of times the routing experience is accessed within a specified time period being less than or equal to a lower limit of the number of accesses.

[0176] In the above, "recent" can refer to a time interval less than the lower limit of the interval duration. The foregoing has provided an exemplary description of how to store multiple routing experiences. Depending on the needs of the actual application, the computing device may also use other methods to store multiple routing experiences, and this application does not limit this.

[0177] The process of generating routing experience is described below.

[0178] The computing device can create routing experience based on the task execution results after the task is completed, and include the routing experience in an experience pool. Specifically, after the task is completed, it can generate at least one of the following: task characteristics, execution strategy, verification flag, output summary, performance score, or contextual information corresponding to the task; generate routing experience based on the above information; and add the generated routing experience to the experience pool.

[0179] The following uses (1) to (6) to describe the task characteristics, execution strategy, verification markers, output summary, performance score and context information of the task generated by the computing device.

[0180] (1) Generate task features.

[0181] The computing device can acquire task type, task embedding efficiency, task difficulty score, and task keywords based on the task, and generate task features based on the acquired information. Task embedding efficiency can refer to the efficiency of generating task embedding vectors.

[0182] (2) Generate execution strategy.

[0183] In this scenario, the computing device can generate a task execution strategy based on the agent performing the task, the order in which the agents execute the task, and the data dependencies between agents during the task execution process.

[0184] (3) Generate verification markers.

[0185] Verification tags can be generated in various ways, including but not limited to: manual verification, automatic verification, and statistical verification.

[0186] When verification tags are generated manually, the computing device receives quality tags set by operators based on experience for the task's execution strategy. If the quality tag is high-quality, the computing device determines the verification tag as high-confidence. When verification tags are generated automatically, the computing device determines the probability that a similar task will be successfully executed when the task's execution strategy is used for similar tasks. If the probability is greater than or equal to a probability threshold, the computing device determines the verification tag as high-confidence. When verification tags are generated statistically, the computing device determines the number of times the reused execution strategy successfully executes the corresponding task when the task's execution strategy is reused. If the number of successful executions is greater than or equal to a number of successful executions threshold, the computing device determines the verification tag as high-confidence.

[0187] (4) Generate output summary.

[0188] The computing device can generate an output summary based on the output of the agent performing the task. For example, if agent 1 performs task 1, the computing device obtains the output 1 of agent 1 performing task 1. The computing device obtains the data transmission method 1 of output 1 (such as JSON format), the length 1 of output 1, and the keywords 1 used to describe the content of output 1. The computing device generates the output summary 1 of agent 1 based on the data transmission method 1, the length 1, and the keywords 1.

[0189] (5) Generate performance score.

[0190] The computing device derives a performance score based on an overall task score, a fine-grained score, efficiency metrics, and stability metrics. Specifically, the computing device obtains information such as whether the task was successfully executed, user satisfaction with the execution result, and the quality score of the output for task processing, and derives an overall score based on these. The computing device obtains the agent's contribution score to the task and the agent's support score for the associated agent's task execution, and derives a fine-grained score based on these scores. The computing device can obtain the total execution time of the task, the execution time of each stage of the task, and the resource consumption of the task execution, and derives efficiency metrics based on this information. The computing device can derive stability metrics based on whether there are any abnormal situations during task execution. The computing device can use a weighted approach to derive the performance score based on the overall score, fine-grained score, efficiency metrics, and stability metrics; this application does not limit this approach. Similarly, the computing device can also use a weighted approach to derive the agent score, fine-grained score, efficiency metrics, and stability metrics.

[0191] (6) Generate context information.

[0192] The computing device acquires the execution environment of the task, such as the business adaptability of the candidate expert agents, system load, timestamps, etc., and determines the execution environment of the task based on the above information. The candidate expert agents may include: multiple first agents and multiple third agents.

[0193] The process of generating a single routing experience has been explained above. The computing device can obtain multiple routing experiences in the manner described above, and can also store multiple routing experiences in an experience pool.

[0194] The above section, in conjunction with aspect 1, describes the content of a single route experience in the experience pool. The following section, using aspect 2, describes the construction, use, and updating of the experience pool.

[0195] Aspect 2: The construction, use and updating of the experience pool.

[0196] Specifically, the computing device can perform the following (1) through (6) to build, use and update the experience pool.

[0197] (1) Initialize the experience pool of the computing device.

[0198] Specifically, the computing device can perform the following steps ① to ④ to initialize the experience pool.

[0199] ① The computing device is configured with a storage medium for storing the experience pool.

[0200] The computing device can be configured with storage media and storage strategies for storing the experience pool. For example, the computing device can configure the storage capacity for storing the experience pool on memory, SSDs, and HDDs. It can also configure a tiered storage strategy for routing experiences in the experience pool on the aforementioned storage media, such as configuring hot data storage capacity for the 1000 most recently generated routing experiences, configuring warm data storage capacity for the 10000 most recently generated routing experiences, and configuring cold data storage capacity for all routing experiences.

[0201] ② The index structure used by the computing device to establish the routing experience in the experience pool.

[0202] The computing device can determine and build the index used for the task embedding vector to support fast similarity retrieval. The index includes, but is not limited to: K-Dimensional Tree (KD-Tree), Locality Sensitive Hashing (LSH), and Inverted File (IVF).

[0203] In some possible scenarios, computing devices can also update indexes, such as periodically rebuilding them, to maintain retrieval efficiency.

[0204] ③ The computing device pre-sets routing experience in the experience pool.

[0205] The computing device can pre-configure multiple common routing experiences in the experience pool to accelerate cold starts, and generate indexes for multiple routing experiences, such as pre-configuring code generation routing experiences and dialogue generation routing experiences in the experience pool. Specifically, the code generation routing experiences include the standard execution strategy for code generation tasks, and the dialogue generation routing experiences include the standard execution strategy for dialogue generation tasks.

[0206] ④ Calculate the statistical information of the preset routing experience in the initialization experience pool of the computing device.

[0207] The computing device can initialize the statistical information of routing experience in the experience pool and manage the experience pool based on the statistical information. For example, the computing device can collect statistics on multiple routing experiences in the experience pool and obtain the reuse rate, performance score, and health status of routing experiences for various tasks.

[0208] (2) The computing device acquires the experience of the M routes that are most relevant to the target task.

[0209] The computing device can perform the following steps ① through ④ to determine the M routes.

[0210] ① The computing device obtains the embedding vector of the target task.

[0211] The computing device can calculate the embedding vector t of the target task through the task encoder.

[0212] ② The computing device obtains the K routing experiences with the highest similarity to the target task from the experience pool, and uses them as initial candidate experiences.

[0213] The computing device retrieves the K routing experiences with the highest similarity to the embedding vector t based on the index of the experience pool, and uses them as initial candidate experiences.

[0214] In some possible scenarios, the computing device can perform hierarchical retrieval according to the order of hot data, warm data, and cold data to obtain K route experiences.

[0215] ③Calculate the applicability score of each route experience among the K route experiences obtained by the calculation device.

[0216] The computing device calculates the execution strategy included in each routing experience, and its applicability score in the target task and the current system state, to obtain K applicability scores corresponding to K routing experiences.

[0217] ④ The computing device determines M routing experiences from K routing experiences based on the applicability score.

[0218] The computing device selects the M most relevant routing experiences from the K routing experiences based on similarity and applicability scores. Specifically, the computing device calculates the applicability score of each of the K routing experiences, obtaining K applicability scores. Based on the similarity and applicability scores of each of the K routing experiences, the computing device obtains the experience scores for each of the K routing experiences, i.e., K experience scores. The computing device selects the M highest experience scores from the K experience scores and determines the routing experiences corresponding to these M experience scores as the M routing experiences.

[0219] (3) The computing device determines the execution strategy of the target task based on the experience of M routes.

[0220] Computing devices can employ a three-level decision-making process to determine the execution strategy for a target task.

[0221] Specifically, if the computing device has routing experience that meets the reuse condition among the M routing experiences, it determines the execution policy included in the routing experience that meets the reuse condition as the first target execution policy. If the computing device does not have routing experience that meets the reuse condition among the M routing experiences, it selects a target routing experience from the M routing experiences whose applicability score is between the upper and lower limits of the applicability score, adjusts the execution policy included in the target routing experience, and uses the adjusted execution policy as the first target execution policy. If the computing device does not have routing experience that meets the reuse condition among the M routing experiences, and does not have a target routing experience whose applicability score is between the upper and lower limits of the applicability score, it discards the execution policy for the target task determined based on the experience pool.

[0222] In some possible scenarios, if the computing device abandons determining the execution strategy for the target task based on an experience pool, it may employ other methods to determine the execution strategy for the target task. These other methods include, but are not limited to, determining the execution strategy for the target task based on the agent's business adaptability (i.e., a second target execution strategy). The process by which the computing device determines the execution strategy for the target task based on the agent's business adaptability is described above and will not be repeated here.

[0223] The computing device selects routing experiences that meet the reuse conditions from M routing experiences, and uses the execution policies included in these routing experiences as the execution policy for the target task. If no routing experience meets the reuse conditions among the M routing experiences, the computing device selects a target routing experience from the M routing experiences whose applicability score is between the upper and lower limits of the applicability score, and adjusts the execution policies included in the target routing experience to obtain the execution policy for the target task. If neither the computing device nor any target routing experience meets the reuse conditions among the M routing experiences, and neither has an applicability score between the upper and lower limits of the applicability score, the computing device discards the execution policy for the target task determined based on the experience pool, and adopts other methods to determine the execution policy for the target task (such as determining the execution policy for the target task based on the agent's service adaptability). For a more detailed description of the above process, please refer to the relevant descriptions of Situations 1 and 2 above, which will not be repeated here.

[0224] (4) The computing device executes the target task according to the execution strategy of the target task and obtains the execution result of the target task.

[0225] The computing device executes the target task according to the execution strategy of the target task, and the intelligent agent instructed by the execution strategy executes the target task to obtain the execution result of the target task.

[0226] In some possible scenarios, after the computing device executes the target task and obtains the execution result of the target task, it can also perform performance scoring on the agent that executes the policy instruction, such as obtaining the overall score, fine-grained score, efficiency index and stability index of the agent that executes the policy instruction. For more details on this part, please refer to the above text, and it will not be repeated here.

[0227] In some possible scenarios, during the execution of the target task by the agent following the policy instructions, a comprehensive score of the agent can be determined. For details on this process, please refer to the relevant description below, which will not be repeated here.

[0228] (5) The routing experience of the computing device in generating target tasks.

[0229] The computing device can also generate routing experience for a target task based on the target task, its execution strategy, execution results, performance score, the execution process of the agent instructed by the execution strategy, and the execution environment. In other words, the computing device can generate routing experience corresponding to the task after its execution is complete, and write the routing experience of that task into an experience pool.

[0230] (6) The computing device updates the experience pool using the routing experience of the target task to obtain the updated experience pool.

[0231] The computing device can write the routing experience of the target task into the experience pool, resulting in an updated experience pool. The updated experience pool includes the routing experience of the target task.

[0232] In some possible scenarios, during the process of writing the routing experience of the target task into the experience pool, the computing device can determine whether to classify the routing experience as hot data, warm data, or cold data based on its importance. For example, if the routing experience of the target task is of high importance, it will be classified as hot data. If the computing device successfully executes the target task according to the execution strategy included in the routing experience, the routing experience of the target task can be considered to be of high importance. If the performance score of the agent indicated by the execution strategy included in the routing experience is greater than or equal to a performance score threshold, the routing experience of the target task can be considered to be of high importance. Depending on the needs of the actual application, other methods can also be used to determine whether the routing experience of the target task is of high importance; this application does not limit this to such methods.

[0233] In some possible scenarios, where the execution strategy of the target task is determined directly based on the execution strategies included in the routing experience in the experience pool, if the computing device successfully executes the target task according to its execution strategy, the number of verifications of the routing experience corresponding to the target task's execution strategy in the experience pool is increased. In some possible examples, if the number of verifications is greater than or equal to a threshold, the verification flag is set to a preset confidence level (e.g., high confidence).

[0234] In some possible scenarios, before writing the routing experience of the target task into the experience pool, the computing device can also determine whether there is a conflict between the routing experience of the target task and the existing routing experience in the experience pool. The computing device can determine conflicts in various ways, including but not limited to: determining conflicts based on execution policies and determining conflicts based on performance scores. Specifically, determining conflicts based on execution policies can mean that a conflict exists between the routing experience of the target task and the routing experience of historical tasks when the fit between the target task and historical tasks is greater than or equal to a fit threshold, and when the execution policies of the target task and historical tasks are different. Determining conflicts based on performance scores can mean that a conflict exists between the routing experience of the target task and the routing experience of historical tasks when the fit between the target task and historical tasks is greater than or equal to a fit threshold, and when the difference in performance scores between the target task and historical tasks is greater than or equal to a difference threshold.

[0235] In some possible scenarios, when a computing device determines a conflict between the routing experience of a target task and existing routing experience in the experience pool, it can identify the cause of the conflict and determine whether to add the target task's routing experience to the experience pool based on the cause. For example, if the routing experience of the target task conflicts with the routing experience of historical task 1, the computing device might determine that the conflict is caused by a change in the agent's service adaptability. If the change in service adaptability is reasonable, the computing device will add the target task's routing experience to the experience pool and reduce the likelihood of historical task 1's routing experience being selected for a new task. If the change in service adaptability is unreasonable, the computing device will not add the target task's routing experience to the experience pool.

[0236] In some possible scenarios, the computing device can update the index after writing the routing experience of the target task into the experience pool. Depending on the needs of the actual application, the computing device can also update the index in other ways, such as updating the index according to a preset period (e.g., weekly).

[0237] In some possible scenarios, the computing device can also acquire the size, growth rate, obsolescence rate, and verification rate of the experience pool, and assess the health of the experience pool based on the acquired information (such as assessing whether the experience pool is growing healthily, whether it is over-expanded, and whether it contains enough high-quality routing experience). If the health of the experience pool does not meet the health conditions (such as unhealthy growth, over-expansion, or lack of sufficient high-quality routing experience), the computing device updates the experience pool.

[0238] In some possible scenarios, computing devices can update the experience pool in various ways, including but not limited to: updating the experience pool based on statistical information, update conditions, fusion conditions, and elimination conditions. Methods for updating the experience pool include, but are not limited to: adjusting the similarity threshold and adjusting the applicable scoring threshold. In this way, updating the routing experience in the experience pool ensures that the routing experience included in the experience pool is adapted to the target task, thereby ensuring that the execution strategy for the target task can be determined based on the experience pool.

[0239] The following uses ① to ④ as examples to describe the methods for updating the experience pool.

[0240] ① The computing device updates the experience pool based on statistical information.

[0241] For example, the computing device acquires the direct reuse rate, reference optimization rate, and drop exploration rate, and updates the experience pool based on the acquired probabilities, increasing the direct reuse rate to a specified level (e.g., 60%) or higher. The direct reuse rate can be the percentage of tasks executed using the execution strategy included in the routing experience in the direct reuse experience pool, relative to the total number of tasks executed. The reference optimization rate can be the percentage of tasks executed using the adjusted execution strategy, relative to the total number of tasks executed. The drop exploration rate can be the percentage of tasks executed using the execution strategy determined based on the agent's business adaptability, relative to the total number of tasks executed.

[0242] For example, the computing device obtains the average performance of tasks executed using routing experience from the reused experience pool, thus obtaining the reused average performance. The computing device also obtains the average performance of tasks supported by execution strategies determined based on the agent's business adaptability, thus obtaining the exploration average performance. The computing device compares the reused average performance with the exploration average performance; if the reused average performance is less than or equal to the exploration average performance, it updates the experience pool. When directly reusing routing experience from the experience pool to execute tasks, or when using an adjusted execution strategy to execute tasks, the routing experience in the experience pool can be considered reused.

[0243] ②The computing device updates the experience pool according to the update conditions.

[0244] The update conditions include, but are not limited to: changes in the business adaptability of the agent, including the execution policy indication, and changes in the system environment, such as when agent 1 performs well in multiple tasks. The computing device generates the routing experience corresponding to each task in these multiple tasks and writes this routing experience into the experience pool. The routing experience corresponding to each task includes the execution policy indication for agent 1.

[0245] ③ The computing device updates the experience pool based on the fusion conditions.

[0246] The computing device can merge routing experiences that meet the merging conditions in the experience pool to obtain merged routing experiences, and write the merged routing experiences into the experience pool. Merging conditions include, but are not limited to: routing experience conflicts, multiple routing experiences that have successfully executed the corresponding tasks, etc.

[0247] For example, execution strategy 1 included in the experience pool of routing experience 1 achieves the specified effect when executing task 1. Execution strategy 2 included in the experience pool of routing experience 2 also achieves the specified effect when executing task 1. In this case, the computing device can merge execution strategy 1 and execution strategy 2 to obtain a merged execution strategy. The computing device generates routing experience 3 based on the merged execution strategy and writes routing experience 3 into the experience pool.

[0248] For example, the computing device retrieves routing experiences 1 to 100 from the experience pool. These experiences include execution strategies 1 to 100, respectively. All three experiences represent successful executions of the code generation task. In this scenario, the computing device can merge execution strategies 1 to 100 to obtain the optimal execution strategy for the code generation task (e.g., first selecting the algorithm design agent, then the code implementation agent, and finally the testing agent). Based on the optimal execution strategy, the computing device generates routing experience 101 (the merged routing experience) and writes it into the experience pool.

[0249] ④ The computing device updates the experience pool according to the elimination criteria.

[0250] The computing device can remove routing experiences that meet the elimination criteria from the experience pool. The elimination criteria include, but are not limited to: at least one agent indicated by the execution policy included in the routing experience is overloaded and / or unavailable; the performance score of at least one agent indicated by the execution policy included in the routing experience is less than a performance score threshold; the number of times the execution policy included in the routing experience is reused within a specified time is less than or equal to a second time threshold; and the interval between the execution time of the task corresponding to the routing experience and the current time is greater than or equal to an interval duration threshold.

[0251] The experience pool was described above using aspects 1 and 2. The calculation process of similarity is described below.

[0252] The computing device can use cosine similarity, negative exponent of Euclidean distance, and learned similarity to determine the similarity between the target embedding vector and the historical embedding vector, which are described below using (1) to (3). Among them, the target embedding vector is used to describe the task features of the target task, and the historical embedding vector is used to describe the task features of the historical task.

[0253] (1) The computing device uses cosine similarity to determine the similarity between the target embedding vector and the historical embedding vector.

[0254] In this case, the computing device can use the following formula 1 to calculate the similarity.

[0255] Formula 1 in, The similarity between the target embedding vector and the historical embedding vector. Embed the target vector. This is the historical embedding vector of the i-th historical task among multiple historical tasks.

[0256] (2) The computing device uses the negative exponent of Euclidean distance to determine the similarity between the target embedding vector and the historical embedding vector.

[0257] In this case, the computing device can use the following formula 2 to calculate the similarity.

[0258] Formula 2 in, The similarity between the target embedding vector and the historical embedding vector. Embed the target vector. This is the historical embedding vector of the i-th historical task among multiple historical tasks.

[0259] (3) The computing device uses the learned similarity to determine the similarity between the target embedding vector and the historical embedding vector.

[0260] In this scenario, the computing device can train an initial AI model using multiple sets of second training data to obtain a trained AI model. One set of second training data includes the similarity between embedding vectors for one task and embedding vectors for another task. The computing device then uses the trained AI model to obtain the similarity between the target embedding vector and historical embedding vectors.

[0261] The method for obtaining similarity has been described above. The process of obtaining the applicability score for historical tasks is described below.

[0262] Computing devices can calculate the suitability score of historical tasks from multiple dimensions, including but not limited to: task similarity, agent availability, capability matching, and timeliness. Task similarity indicates the degree of similarity between the historical task and the target task. Agent availability indicates whether the agent is currently available, such as determining availability if the agent is not offline or overloaded. Capability matching indicates the difference between the agent's business adaptability when executing historical tasks and its current business adaptability. Timeliness indicates the duration between the execution time of the historical task and the current time.

[0263] In some possible scenarios, computing devices can use capability differences and capability difference thresholds to determine capability matching.

[0264] For example, computing devices use the percentage of capability difference to the capability difference threshold to determine the capability matching degree, and use the capability percentage as the capability matching degree.

[0265] For example, if the capability difference is less than or equal to the capability difference threshold, the computing device will assign a specified first value to the capability matching degree.

[0266] In some possible scenarios, the computing device determines timeliness based on the interval duration and the interval duration threshold.

[0267] For example, computing devices use the ratio of interval duration to interval duration threshold to determine timeliness, and use the timeliness ratio as the timeliness.

[0268] For example, if the interval duration is less than or equal to the interval duration threshold, the timeliness will be assigned a specified second value.

[0269] The computing device can calculate the suitability score of historical tasks based on the aforementioned multiple dimensions in various ways. For example, the computing device can perform a weighted calculation on the values ​​of at least one of the dimensions of task similarity, agent availability, capability matching degree, and failure rate of historical tasks to obtain a weighted result, and the computing device can use the weighted result as the suitability score. Depending on the needs of actual applications, the computing device can also use other methods to obtain the suitability score, which is not limited in this application.

[0270] For example, the K candidate experiences include routing experiences corresponding to historical task 1. The execution strategy 1 of historical task 1 includes: agents 1 to 4, agent 1 starts executing historical task 1, agent 2 depends on the output of agent 1, agent 3 depends on the output of agent 1 and agent 2, and agent 4 depends on the output of agent 3.

[0271] In this scenario, the computing device calculates the similarity 1 between the embedding vector 1 of historical task 1 and the embedding vector 0 of the target task, and uses this similarity 1 as the task similarity. The computing device determines whether each agent (1 to 4) is offline or overloaded. If none of agents (1 to 4) are offline or overloaded, they are determined to be available. The computing device determines availability 1 based on the availability of each agent. The computing device determines that the service adaptation capabilities of each agent (1 to 4) when executing historical task 1 are service adaptation capabilities 11 to 14, and their service adaptation capabilities at the current time are service adaptation capabilities 01 to 04. If the capability difference between service adaptation capabilities 0i and 1i is less than or equal to a capability difference threshold, the computing device determines the capability matching degree as value i, where i is 1, 2, 3, or 4. The computing device determines service adaptation capability 1 based on values ​​1 to 4. The computing device calculates the interval between the execution time of historical tasks and the current time, and determines timeliness 1 based on the interval. The computing device determines the applicability score 1 of historical task 1 based on similarity 1, availability 1, capability matching degree 1, and timeliness 1.

[0272] The process of obtaining the applicability score of historical tasks has been described above. The process of adjusting the execution strategy to be adjusted is described below.

[0273] The computing device can adjust the execution strategy to be adjusted in a variety of ways to obtain the first target execution strategy. The following are examples of four possible methods using (1) to (4).

[0274] (1) The computing device replaces the intelligent agent whose execution strategy is to be adjusted.

[0275] The computing device determines whether the agent whose execution policy instruction needs adjustment is available or overloaded. If the agent whose execution policy instruction needs adjustment is offline or overloaded, another agent is used to replace the offline or overloaded agent. This other agent can be an agent with similar capabilities to the offline or overloaded agent that is neither offline nor overloaded.

[0276] (2) The computing device adds an agent to the execution strategy to be adjusted.

[0277] The computing device obtains multiple steps of the corresponding task executed by each agent according to the execution strategy to be adjusted. If it is determined that the target task still needs to execute other steps, the computing device determines the agents that execute other steps and the data dependencies of the agents that execute other steps, and obtains the first target execution strategy.

[0278] For example, the execution strategy to be adjusted includes: the identifiers of each agent from agent 5 to agent 8, agent 5 starting to execute the task corresponding to the execution strategy to be adjusted, agent 7 relying on the outputs of agent 5 and agent 6, and agent 8 relying on the output of agent 7.

[0279] In this scenario, the computing device determines that the target task also requires agent 9, which depends on the outputs of agents 6 and 8. The computing device adds agent 9 to the execution strategy to be adjusted, resulting in the following first target execution strategy: the identifiers of agents 5 through 9, agent 5 begins executing the target task, agent 7 depends on the outputs of agents 5 and 6, agent 8 depends on the output of agent 7, and agent 9 depends on the outputs of agents 6 and 8.

[0280] (3) The computing device reduces the number of agents for the execution strategy to be adjusted.

[0281] The computing device obtains multiple steps of the corresponding task executed by each agent according to the execution strategy to be adjusted. If the target task does not need to execute at least one of the multiple steps, the computing device prunes the at least one step to obtain the first target execution strategy.

[0282] For example, the execution strategy to be adjusted includes: the identifiers of each agent from agent 5 to agent 8, agent 5 starting to execute the task corresponding to the execution strategy to be adjusted, agent 7 relying on the outputs of agent 5 and agent 6, and agent 8 relying on the output of agent 7.

[0283] In this scenario, the computing device determines that agent 5 does not need to execute the target task. The computing device prunes the steps executed by agent 5 as indicated by the execution strategy to be adjusted, as well as the steps associated with agent 5, to obtain the first target execution strategy as follows: the identifiers of each agent among agents 6 to 8, agent 6 starts executing the target task, agent 7 depends on the output of agent 6, and agent 8 depends on the output of agent 7.

[0284] (4) The computing device adjusts the probability that the agent whose execution strategy is to be adjusted is selected to execute the target task.

[0285] The computing device determines the agent whose execution strategy instruction needs adjustment, and adjusts the probability of the agent being selected to execute the target task based on the task characteristics of the target task and the execution experience of historical tasks. If the adjusted probability (e.g., probability 1) is less than the probability of the agent being selected to execute the target task calculated based on the agent's business adaptability (e.g., probability 2), the agent corresponding to probability 1 is replaced with the agent corresponding to probability 2.

[0286] For example, the execution strategy to be adjusted includes: the identifiers of each agent from agent 5 to agent 8, agent 5 starting to execute the task corresponding to the execution strategy to be adjusted, agent 7 relying on the outputs of agent 5 and agent 6, and agent 8 relying on the output of agent 7.

[0287] In this scenario, the computing device adjusts the probability of agent 8 being selected to execute the target task from 1 to 0.67 based on the task characteristics of the target task and the execution experience of historical tasks. The computing device determines the probability of each candidate expert agent being selected to execute the target task based on the business adaptability of the candidate expert agents (e.g., determining the probability of agent 10 being selected to execute the target task to be 0.8). The computing device adjusts agent 8, as indicated by the execution strategy to be adjusted, to agent 10, resulting in the following first target execution strategy: the identifiers of agents 5 to 7, agent 10, agent 5 begins executing the task corresponding to the execution strategy to be adjusted, agent 7 depends on the outputs of agents 5 and 6, and agent 10 depends on the output of agent 7.

[0288] The process of adjusting the execution strategy to obtain the first target execution strategy has been described above by way of example. Depending on the needs of the actual application, the computing device may also use other methods to adjust the execution strategy to obtain the first target execution strategy, and this application does not limit this.

[0289] The process of obtaining the second intelligent agent is described below.

[0290] The computing device can use multiple sets of first training data to perform multiple rounds of training on the initial agent to obtain the second agent. Training the initial agent can refer to training the policy network invoked by the initial agent. The policy network invoked by the initial agent can be deployed on the same device as the initial agent or on a different device; this application does not limit this. A description of the policy network is provided below and will not be repeated here. In some possible examples, the policy network can also be called a routing network.

[0291] The first training data can be the first execution result. The first execution result is obtained by executing the task according to the first execution strategy. The first execution strategy is determined based on the probability obtained according to the agent's business adaptability. That is, the computing device can use multiple first execution results to train a second agent.

[0292] The following example illustrates the process of training an initial agent using a computing device with a first training data set (such as the training data corresponding to historical task 1).

[0293] Specifically, the computing device can perform the following (1) to (5) to train the policy network of the initial agent calls.

[0294] (1) The computing device determines the policy network invoked by the initial agent.

[0295] The computing device can determine that the policy network invoked by the initial agent is a Differentiable Routing Network (DRN). Depending on the scenario, the computing device can select a policy network with a different architecture.

[0296] For example, in scenarios with diverse task types, computing devices can choose to use policy networks with attention mechanism architectures.

[0297] For example, in scenarios with complex relationships between agents, computing devices can choose to use policy networks with graph neural network architectures. A description of policy networks is provided below and will not be repeated here.

[0298] In some possible scenarios, the computing device can initialize the parameters of the policy network before training it. Specifically, the computing device can use initialization methods such as Xavier™ or Kaiming™ to initialize the parameters of the policy network, such as loading pre-trained parameters for the task encoder of the policy network.

[0299] In some possible scenarios, the computing device may also set hyperparameters before training the policy network, including but not limited to: setting the learning rate. (such as setting) (e.g., set the temperature parameter τ to 1.0, set the batch size B to 32-128, and the gradient clipping threshold, etc.)

[0300] (2) The computing device obtains the execution results and rewards of historical task 1.

[0301] The computing device inputs historical task 1 into the initial agent. The initial agent invokes the policy network to determine execution policy 1 for historical task 1 based on continuously differentiable routing decisions, and executes historical task 1 according to execution policy 1 to obtain the execution result and reward. A description of the routing decisions is provided below and will not be repeated here.

[0302] In some possible scenarios, the reward can be determined based on whether historical task 1 was successfully executed, the quality of the execution result, and the time taken to obtain the result. Specifically, the computing device can calculate a quality score q based on user satisfaction, the accuracy of the execution result, etc. The computing device calculates the cost c of task execution, which can be determined based on execution time, computing resource consumption, communication overhead, etc. The computing device determines the reward based on the quality score and cost. Specifically, the computing device uses the following formula 3 to determine the reward.

[0303] Formula 3 Where R is the reward, q is the quality score, c is the cost, and w1 and w2 are weighting parameters used to balance quality and cost.

[0304] (3) The computing device obtains the loss of historical task 1.

[0305] The computing device determines the loss of historical task 1 based on the reward and a loss function. The loss function can be preset or set according to the needs of the actual application; this application does not limit this, but formula 4 can be used to determine the loss function.

[0306] Formula 4 Where L represents loss, E represents expectation, and R represents reward.

[0307] In some possible situations, the computing device may also determine the loss in other ways, such as determining the loss L as -R, etc., which is not limited in this application.

[0308] (4) The computing device calculates the gradient of the loss with respect to the policy network.

[0309] The computing device can start with the loss and calculate the gradient of the loss with respect to the network parameters θ of the policy network through backpropagation automatic differentiation. Specifically, the computing device can calculate the gradient using the following formula and propagate the gradient unhindered through the softmax function.

[0310] Formula 5 Where L is the gradient, These are the network parameters for the policy network.

[0311] In some possible scenarios, the computing device can also perform gradient pruning to prevent gradient explosion. Specifically, the computing device can... When ||>threshold, the gradient is clipped using Equation 6 to obtain the clipped gradient. In this case, the computing device propagates the clipped gradient unimpeded through the softmax function.

[0312] Formula 6 (5) Calculate the network parameters of the network based on the gradient update strategy of the computing device.

[0313] The computing device can use optimizers such as Adam™ and RMSProp™ to update network parameters using Equation 7.

[0314] Formula 7 in, The updated network parameters for the policy network. For the network parameters of the policy network, For gradient, This is the learning rate.

[0315] In some possible scenarios, the computing device can also update the temperature parameter τ based on the training progress of the policy network. The adjustment strategy for the temperature parameter τ can be exponential decay; specifically, the computing device can update the temperature parameter τ using the following formula 8.

[0316] Formula 8 in, For the updated temperature parameters, Here, k is the temperature parameter, k is the decay rate, and epoch is the current training round number.

[0317] The preceding text described the policy network invoked to train the initial agent using a single set of training data. In some possible examples, the computing device can train the policy network in batches. Specifically, the computing device processes B tasks in parallel, collects B rewards and B gradients corresponding to the B tasks, averages the B rewards and B gradients, and updates the network parameters using the averaged result. This smooths gradient noise and improves training stability.

[0318] The above describes the process of training the policy network invoked by the initial agent using a first training dataset. Similarly, the computing device can use multiple first training datasets to train the initial agent, and obtain a second agent when the termination condition is met. The termination condition may include, but is not limited to, the number of training iterations being greater than or equal to a training iteration threshold.

[0319] In some possible scenarios, the computing device can also test the trained policy network during the process of training the initial agent to obtain the second agent. If the test results indicate that the performance of the policy network no longer improves or begins to decline as training progresses, the computing device can stop training before reaching a certain number of training iterations, thus obtaining the policy network invoked by the second agent.

[0320] In some possible scenarios, the computing device can optimize the policy network invoked by the candidate expert agents while training the policy network invoked by the initial agent, thereby achieving joint optimization of the policy networks invoked by the initial agent and the candidate expert agents and realizing global optimum.

[0321] The computing device can achieve joint optimization through the following process: specifically, it can selectively optimize the network parameters of the policy network invoked by the key expert agent. The computing device adjusts the policy parameters along the gradient direction to increase the expected reward.

[0322] Joint optimization enables the policy networks invoked by the second agent obtained from training the initial agent and the policy networks invoked by each agent in the candidate expert agents to share the same optimization objective (such as maximizing task success rate, user satisfaction, etc.), avoiding the fact that individual training can only achieve local optima.

[0323] Joint optimization can determine effective collaboration patterns among different agents in the candidate expert agent pool, and employ agents that support these effective collaboration patterns to execute tasks, thereby improving task success rates and user satisfaction. For example, if a computing device uses joint optimization to determine that the collaboration pattern of "first using agent A1 for preliminary analysis, then using agent A2 for in-depth reasoning, and finally using agent A3 to generate output" yields optimal results, the computing device records the aforementioned collaboration pattern and applies it to the task execution strategy.

[0324] Joint optimization can quickly adapt to environmental changes (such as changes in task distribution and changes in the business adaptability of agents). Even under environmental changes, the execution strategy generated by the computing device for the task remains adapted to the task, ensuring the success rate of the task.

[0325] The computing device can determine key expert agents through the following process: Specifically, the computing device obtains the gradient magnitude of the policy networks invoked by the candidate expert agents. Expert agents corresponding to policy networks with gradient magnitudes greater than or equal to a threshold are identified as key expert agents. For example, if the execution policy is: Agent A1 → Agent A2 → Agent A3 → Agent A4, then the agents executing the task include Agents A1 to A4. Agent A1 starts executing the task, Agent A2 depends on the output of Agent A1, Agent A3 depends on the output of Agent A2, and Agent A4 depends on the output of Agent A3. Through gradient analysis, it is determined that Agent A3 has the largest and negative gradient magnitude. In this case, the computing device determines that selecting Agent A3 is the main reason for task failure. The computing device then reduces the probability that Agent A3 is selected to execute similar tasks.

[0326] In some possible scenarios, the computing device calculates the second-order gradient (such as the Hessian matrix), determines whether the network parameters of the policy network are locally optimal, and adjusts the learning rate to achieve fine-tuning of the network parameters.

[0327] In some possible scenarios, computing devices can maintain multiple versions of the policy network, supporting rapid rollback. Multiple versions could refer to versions corresponding to different training phases.

[0328] In some possible scenarios, the computing device can also update the post-trained policy network after the second agent invokes the network to make routing decisions.

[0329] In some possible scenarios, the computing device can also test and compare the performance of the updated policy network and the trained policy network before replacing the trained policy network with the updated policy network. If the performance of the updated policy network is better than that of the trained policy network, the computing device uses a second agent to call the updated policy network to make routing decisions.

[0330] The process of training the second agent has been described above. The policy network will be described below.

[0331] The policy network invoked by the second agent can be a differentiable routing network. This ensures the backpropagation of gradients, providing a guarantee for optimizing the policy network using continuous optimization methods such as gradient descent, and thus ensuring the improvement of the optimization efficiency of the policy network.

[0332] The forward propagation of a differentiable routing network requires only one neural network inference, with a time complexity of O(n^2). d), where n is the number of agents among the candidate expert agents, and d is the dimension of the policy network. Typically, the time complexity of a discrete approach is O(n^2). D(D), where D is the depth of the execution strategy, i.e., the number of execution steps included in the execution strategy. In other words, the differentiable routing network used in this application shortens the routing decision time and improves the routing decision efficiency.

[0333] With the second agent invoking the policy network to determine the execution policy of each task in B tasks in parallel according to the batch size B, the processing resources are fully utilized to improve processing efficiency and resource utilization.

[0334] Differentiable routing networks support optimization using gradient descent, which can fully extract information from the training data, improve data utilization, achieve the same performance with less training data, and reduce the cost of acquiring training data.

[0335] In some possible scenarios, a differentiable routing network can be a deep neural network, which may include, but is not limited to: a task encoder, an agent state encoder, a routing decision network, a temperature regulator, etc.

[0336] The following uses (1) to (4) to describe the possible contents of the policy network.

[0337] (1) Task encoder.

[0338] A task encoder is used to encode task descriptions (such as task descriptions in natural language or task feature vectors) into fixed-dimensional task embedding vectors. The task embedding vector is a d_task-dimensional vector, where d_task can have multiple dimensions, such as 128 or 256.

[0339] The architecture of a task encoder can take many forms, including but not limited to: pre-trained language models (such as BERT), task type embedding layers, feature extraction networks, etc.

[0340] (2) Agent state encoder.

[0341] An agent state encoder is used to encode the state of each agent in a pool of candidate expert agents. Agent states include, but are not limited to: overall score, current workload (e.g., number of tasks to be processed), historical success rate, and areas of expertise. Agent states are encoded as d_state dimensional vectors, where d_state can have multiple dimensions, such as 64 or 128.

[0342] (3) Routing decision network.

[0343] Routing decision networks are used to determine the execution strategy of a task based on the task embedding vector and the agent's state encoding. Routing decision networks can include at least one of the following architectures: feedforward neural network architecture, attention mechanism architecture, graph neural network architecture, etc.

[0344] The feedforward neural network architecture is used to concatenate the task embedding vector and the agent state of each agent in the candidate expert agents. Through multiple layers of feedforward network, it outputs the routing score of each agent, which is then normalized to a routing probability distribution using softmax. The routing probability distribution is used to indicate the probability that each agent is selected to execute the target task.

[0345] The attention mechanism architecture can adopt a multi-head attention mechanism to calculate the correlation between the task and each agent among the candidate expert agents and output the routing probability distribution.

[0346] Graph neural network architecture treats each agent in the candidate expert agent group as a node in a graph, with the relationships between agents as edges. It learns the influence relationships between agents through graph convolutional networks and outputs a route probability distribution. Graph neural network architecture supports modeling complex dependencies and discovering collaborations between agents.

[0347] (4) Temperature parameter regulator.

[0348] The temperature parameter regulator dynamically adjusts the temperature parameter τ of the softmax function, controlling the smoothness of the output probability distribution. A high τ results in a smoother distribution, more random selection, and encourages exploration. A low τ results in a sharper distribution, more deterministic selection, and encourages exploitation. The computing device can adjust τ based on task difficulty, stage (e.g., training phase), etc.

[0349] The policy network has been described above; the routing decision will be described below.

[0350] The computing device transforms the existing technology's selection or non-selection of a candidate expert agent to perform a task into obtaining the probability of each candidate expert agent being selected to perform the task, and selecting the agent to perform the task based on the probability. The computing device converts discrete selection into a continuous probability distribution, ensuring that the strategy network can be updated using gradient backpropagation.

[0351] The candidate expert agents include agents A1 to An.

[0352] In this situation, Figure 5 A flowchart illustrating the process of determining the probability of an agent being selected, as provided in this application, is shown below. Figure 5 As shown, the computing device uses a second agent to determine the probability that each agent among the candidate expert agents will be selected to perform the task (e.g., ...). Figure 5The probability that each agent from agent A1 to agent An is selected to perform a task.

[0353] Specifically, the computing device determines the score of each agent among the candidate expert agents selected to execute the task. The computing device acquires the current state of each agent (such as overall score, current load, historical success rate, area of ​​expertise, etc.) and uses a state encoder to convert the current state of each agent into a state vector. The computing device inputs the task embedding vector and state vector into the policy network invoked by the initial agent to generate the score of each agent selected to execute the task, resulting in an N-dimensional vector s. Here, s = [s1, s2…sn], and si is the score of agent Ai among the candidate expert agents selected to execute the task.

[0354] The computing device can call the softmax function to convert scores into probabilities. Specifically, the computing device can execute the following formula 9 to convert scores into probabilities.

[0355] Formula 9 Where T represents the task. The probability of selecting agent Ai to perform the task. The score for the agent Ai being selected to perform the task. For temperature coefficient, It is the sum of the scores of agent A1 to agent An.

[0356] After obtaining the probability that each agent is selected to perform a task, the computing device can generate an execution strategy using Formula 10.

[0357] Formula 10 Where Y is the execution policy, i is the agent Ai, and n is the total number of candidate expert agents. This represents the probability that the agent Ai will perform a task. This is the output of the intelligent agent Ai.

[0358] The computing device selects agents A1 to An from those A1 to An based on the probability of each agent being selected to execute a task, using methods such as Gumbel-Softmax sampling or direct sampling. The computing device then assigns the task to the selected agent.

[0359] The above describes the process of obtaining routing decisions using a policy network with an initial agent. In some possible cases, after training the initial agent to obtain a second agent, the computing device uses the second agent to determine the probability that each agent in the candidate expert agents will be selected to execute the target task based on the business adaptability of each agent and the task characteristics of the target task. Based on the probability of each agent, the second target execution strategy of the target task is determined to achieve the routing decision.

[0360] In some possible scenarios, during the process of the second agent invoking the policy network to determine the second objective execution policy for the target task, the Gumbel-Softmax approach or a direct approach can be used. The agent to execute the target task is selected based on the probability of each agent among the candidate expert agents, and the second objective execution policy is obtained based on the selected agent.

[0361] In the above process, the softmax function is differentiable everywhere, ensuring the backpropagation of the gradient. The sum of the probabilities of agents A1 to An being selected to execute the target task is 1, and the probabilities of agents A1 to An being selected to execute the target task are valid, ensuring the rationality of the second objective execution strategy determined based on the agents' probabilities. According to Equation 9, the agent with the highest score has the highest probability of being selected to execute the target task, ensuring the rationality of the agent indicated by the second objective execution strategy.

[0362] The routing decision has been described above. The process of obtaining the comprehensive score of the third agent is described below.

[0363] The computing device can employ candidate expert agents to execute multiple historical tasks, and determine the comprehensive score of each candidate expert agent based on the execution process of these tasks. The third agent is considered a candidate expert agent.

[0364] The following example, using Agent 1 executing historical task 1, illustrates the process of obtaining Agent 1's overall score. Agent 1 is a candidate expert agent. During the execution of historical task 1, Agents 2 and 3 depend on the intermediate results output by Agent 1. In other words, Agent 1's associated agents include Agent 2 and Agent 3.

[0365] The computing device can embed an evaluation module within each of the candidate expert agents and use the module to obtain a comprehensive score for each agent. For example, the computing device can embed an evaluation module within each of the agents from agent 1 to agent 3 and use the evaluation module to obtain a comprehensive score for each agent.

[0366] In some possible scenarios, the evaluation module can operate independently of the main task execution modules of each agent, employing an asynchronous, non-blocking design. The process by which the evaluation module obtains the comprehensive score for each agent does not affect the execution of the main task. The main task can refer to the task that each agent is processing, such as historical task 1.

[0367] Before explaining the process of obtaining the comprehensive score of the third agent, let's first describe the evaluation module.

[0368] The evaluation module may include at least one of the following components: input parser, rating calculator, rating aggregator, rating reporting interface, etc. The components that the evaluation module may include are described below using (1) to (4).

[0369] (1) Input parser.

[0370] The input parser is used to parse the intermediate results output by the agent to obtain the parsed result. For example, the input parser of agent 2 is used to parse the intermediate result 1 output by agent 1 to obtain the parsed result 2, and the input parser of agent 3 is used to parse the intermediate result 1 output by agent 1 to obtain the parsed result 3.

[0371] Specifically, the input parser for the associated agent can be used to parse the intermediate results output by the agent, extract key information, structural features, and quality indicators from the intermediate results, and obtain the parsed results. Here, key information can be descriptive information about the intermediate results. Structural features can be the relationships between the contents included in the intermediate results.

[0372] For example, if the intermediate result 1 output by agent 1 is text, the input parsers of agents 2 and 3 are both used to extract key entities, logical structure, and language fluency from the text to obtain the parsing result. Here, key entities can refer to the content that carries the semantic information of the text.

[0373] For example, if the intermediate result 1 output by agent 1 is code, the input parsers of agents 2 and 3 extract the code structure, determine the readability of the code, and determine whether the code has syntax errors, and obtain the parsing result.

[0374] (2) Scoring calculator.

[0375] The rating calculator is used to obtain agent ratings based on the parsing results. For example, the rating calculator for agent 2 is used to obtain a rating of agent 1 (2) based on parsing result 2. The rating calculator for agent 3 is used to obtain a rating of agent 1 (3) based on parsing result 3. Rating 2 indicates the degree of support of the intermediate result 1 output by agent 1 for the associated agent 2 in performing historical task 1. Rating 3 indicates the degree of support of the intermediate result 1 output by agent 1 for the associated agent 3 in performing historical task 1.

[0376] In some possible scenarios, rating calculators can be used to obtain multi-dimensional ratings of agents, and to derive agent scores based on multi-dimensional ratings, such as using multi-dimensional ratings as agent scores. Multi-dimensional ratings include, but are not limited to: contribution ratings, capability ratings, timeliness ratings, cost ratings, reliability ratings, and novelty ratings. The following example, using multi-dimensional ratings including contribution and capability ratings, illustrates the process by which a rating calculator obtains agent scores.

[0377] Contribution scores indicate the usefulness of intermediate results output by an agent to the performance of associated agents' tasks. Contribution scores range from 0 to 1, where 0 represents completely useless and 1 represents extremely useful. A scoring calculator determines an agent's contribution score based on factors such as information relevance, information availability, and information novelty. Information relevance indicates whether the intermediate results output by the agent are relevant to the task. Information availability indicates whether the intermediate results output by the agent can be directly used by associated agents. Information novelty indicates the new value provided by the intermediate results output by the agent. For example, if the scoring calculator for agent 2 determines that intermediate result 1 output by agent 1 is useless for agent 2 in performing historical task 1, then agent 2 determines agent 1's contribution score to be 0. Similarly, if the scoring calculator for agent 3 determines that intermediate result 1 output by agent 1 is extremely useful for agent 3 in performing historical task 1, then agent 3 determines agent 1's contribution score to be 1. If the intermediate results output by an agent do not affect the performance of associated agents' tasks, then the intermediate results output by the agent can be considered completely useless to the associated agents' task performance. When the intermediate results output by an agent play a decisive role in the task execution of associated agents, the intermediate results output by the task agent can be extremely useful for the task execution of associated agents.

[0378] A capability score is used to indicate the overall quality and reliability of the intermediate results output by an agent. The capability score can range from 0 to 1. The scoring calculator is used to determine the capability score of an agent based on the quality of the intermediate results output by the agent, response time, historical performance, etc. For example, agent 2 determines the capability score 2 of agent 1 based on the quality of intermediate result 1 output by agent 1, response time, historical performance of agent 1, etc.

[0379] The timeliness score evaluates the agent's response speed and the time required to generate intermediate results. For tasks with high real-time requirements, agents with high timeliness scores can be prioritized. The cost score evaluates the resource consumption of the agent's task processing (e.g., computational resources, API call resources). Agents with low resource consumption should be prioritized while ensuring quality. The reliability score evaluates the stability and repeatability of the agent's output. For tasks requiring stable output, agents with high reliability scores should be prioritized. The novelty score evaluates the originality and innovativeness of the agent's output. For creative generation tasks, agents with high novelty scores should be prioritized.

[0380] In some possible scenarios, the rating calculator can use sliding window averaging or exponential decay splicing to smooth historical fluctuations and improve the stability of contribution and ability ratings.

[0381] In some possible scenarios, after an agent receives a score from a related agent, it can send the score back to the related agent, thus ensuring that the related agents obtain their own comprehensive scores based on the scores.

[0382] (3) Rating aggregator.

[0383] The rating aggregator is used to obtain a comprehensive rating for an agent based on the ratings given by the associated agents. The rating aggregator can use various aggregation methods to obtain the comprehensive rating, including but not limited to: weighted average, median, etc. For example, the rating aggregator of agent 1 performs a weighted average on the rating calculator of agent 2 for agent 1 and the rating calculator of agent 3 for agent 1 to obtain the comprehensive rating 1 of agent 1.

[0384] (4) Scoring and reporting interface.

[0385] The scoring reporting interface is used to report the comprehensive scores of agents to the scoring data storage system without blocking the execution of the main task. Reported content includes, but is not limited to: comprehensive score, scorer identifier, rated entity identifier, task identifier, timestamp, contribution score, and capability score. For example, the scoring reporting interface might report: Comprehensive score 1, agent 2 identifier, agent 1 identifier, historical task 1 identifier, agent 2's scoring timestamp, agent 1's intermediate result 1's contribution score 2 to agent 2's execution of historical task 1, agent 1's intermediate result 1's capability score 2 to agent 2's execution of historical task 1, agent 3 identifier, agent 3's scoring timestamp, agent 1's intermediate result 1's contribution score 3 to agent 3's execution of historical task 1, and agent 1's intermediate result 1's capability score 3 to agent 3's execution of historical task 1. The method by which the scoring data storage system stores scoring data is described below and will not be repeated here.

[0386] The components that the scoring module may include have been described above. The process of obtaining a comprehensive score from the evaluation module is described below.

[0387] The computing device employs an initial agent to determine the task execution strategy and assigns tasks to agents instructing the execution strategy. These agents execute tasks according to the execution order and data dependencies. During task execution, each agent's evaluation module obtains a comprehensive score based on the scores given by associated agents. Each agent's evaluation module reports its score data to the score data storage system via a score reporting interface. The score data storage system receives the score data, updates the corresponding agent's score profile, and pushes the updated score data to the policy network. The policy network invoked by the initial agent updates the business adaptability of each agent based on the updated score data.

[0388] In some possible scenarios, scoring data can be used to support routing decisions, optimize policy networks, and detect anomalies.

[0389] For example, the computing device uses a second intelligent agent to determine the score of each intelligent agent selected to execute a task based on their business adaptability among the candidate expert intelligent agents. Based on the score, it determines the probability of being selected to execute the task, then determines the intelligent agent to execute the task based on the probability, and finally determines the task execution strategy based on the intelligent agent, thus achieving routing decision-making. The business adaptability of each intelligent agent is determined based on a comprehensive score.

[0390] For example, a computing device determines the task execution strategy based on scoring data, executes the task according to the strategy to obtain the execution result, and obtains a reward based on the execution result. The computing device determines the loss based on the reward, determines the gradient based on the loss, and adjusts the network parameters of the policy network based on the gradient to optimize the policy network.

[0391] For example, computing devices can detect anomalous agents (such as agents with consistently low overall scores) based on scoring data. This reduces the probability of anomalous agents being selected to perform tasks.

[0392] In some possible scenarios, the evaluation modules of each agent corresponding to the execution strategy determine the comprehensive score of each agent in parallel.

[0393] In some possible scenarios, the evaluation module reports the scoring data to the scoring data storage system asynchronously, returning the data directly without waiting for confirmation, thus avoiding delays.

[0394] The process of obtaining the comprehensive score of the agent has been described above. The process of obtaining the comprehensive score of the agent will be further described below with specific examples.

[0395] In this example, the computing device uses an initial agent invocation policy network to determine execution policy 1 for historical task 1. Execution policy 1 includes: agents A1 to A3, agent A1 begins executing historical task 1, and agent A1 depends on intermediate results output by agents A2 and A3. The computing device uses agents A1 to A3 to execute historical task 1.

[0396] After agent A2 executes historical task 1 and outputs intermediate result 2, it notifies the associated agent (i.e., agent A1). In some possible examples, agent A2 can notify the associated agent through the output ready channel.

[0397] Agent A1 receives intermediate result 2 from Agent A2, and Agent A1's evaluation module starts in parallel to evaluate intermediate result 2, obtaining the support level 2 of intermediate result 2 for Agent A1's completion of historical tasks. Specifically, Agent A1's evaluation module calls the input parser to parse intermediate result 2 and extract features, obtaining parsing result 2. Agent A1's evaluation module calls the scoring calculator to obtain Agent A2's contribution score 2 and ability score 2. Agent A1's evaluation module calls the scoring calculator to obtain Agent A2's score 2 based on the contribution score 2 and ability score 2. Agent A1 then transmits score 2 to Agent A2.

[0398] Since the intermediate result 2 output by agent A2 is only used by agent A1, that is, agent A1 is the associated agent of agent A2. In this case, agent A2 obtains the comprehensive score 2 of agent A2 based on the score 2 of agent A1.

[0399] Agent A2 calls the scoring reporting interface of the evaluation module to report the comprehensive score 2 to the scoring storage system. The scoring storage system receives the scoring data, updates Agent A2's scoring profile, and pushes the updated comprehensive score 2 to the policy network called by the initial agent.

[0400] In the above process, the process of agent A1 evaluating the intermediate result 2 output by agent A2 using the evaluation module is executed asynchronously, without blocking agent A1 from executing the historical task 1.

[0401] In some possible scenarios, agents executing policy instructions can evaluate in parallel to improve evaluation efficiency. For example, the execution policy 2 for historical task 2 includes: agents A1 to A3, agent A1 begins executing historical task 2, and agents A2 and A3 depend on the intermediate result 1 output by agent A1. In this case, agents A2 and A3 can evaluate agent A1 in parallel. Specifically, agent A2 calls the evaluation module to obtain agent A2's score 2 for agent A1, and correspondingly, agent A3 calls the evaluation module to obtain agent A3's score 3 for agent A1.

[0402] The above describes the process of obtaining the comprehensive score of agent 1. Similarly, the computing device can use the method described above to obtain the comprehensive scores of each agent among the candidate expert agents. Please refer to the above for relevant descriptions, which will not be repeated here.

[0403] The following describes how the scoring data storage system stores scoring data.

[0404] The rating data storage system can use various methods to store rating data, such as distributed storage of rating data to avoid single point of failure.

[0405] The rating data storage system uses rating data tables to store rating data. Specifically, the rating data storage system uses rating data tables to store detailed records of each rating. The rating data table includes, but is not limited to, the following fields: overall rating field, ratingr field, rated person field, task field, time field, contribution rating field, and ability rating field. It uses a time-series database or distributed log storage to support high-concurrency writes.

[0406] The scoring data storage system establishes agent capability profiles. This system maintains a corresponding capability profile for each agent among the candidate expert agents. The agent's capability profile records historical scoring statistics for different task types, including but not limited to: average score, standard deviation, and number of scores. A sliding window mechanism can be used to discard data whose interval between generation time and current time is greater than or equal to a time threshold, maintaining data timeliness.

[0407] The rating data storage system constructs a real-time rating index. This index records the agent's most recent rating data. The index can be updated periodically, balancing real-time performance with update overhead.

[0408] The method provided in this application has been described above; the following uses... Figure 6 A flowchart of the method provided in this application is described.

[0409] Figure 6A flowchart of a task execution method provided in this application is shown below. Figure 6 As shown, the computing device inputs the user request and system prompts into the second agent. The second agent determines a first target execution strategy for the target task based on its experience pool. If the second agent cannot determine an execution strategy for the target task based on the experience pool, it determines a second target execution strategy for the target task based on the business adaptability of each of the candidate expert agents (such as agents A1 to An). Each agent instructed by the second target execution strategy executes the target task according to the second target execution strategy, thereby obtaining the execution result of the target task.

[0410] During the execution of the target task, each agent scores its associated agents, and each agent obtains a comprehensive score based on the scores from its associated agents. Each agent then optimizes the network parameters of its policy network based on this comprehensive score. The second agent receives a reward based on the execution result, calculates a gradient based on the reward, and optimizes its policy network based on the gradient. The second agent generates routing experience for the target task based on the execution result and the target task's execution strategy. The second agent then writes this routing experience into an experience pool.

[0411] In this application, an experience pool records the execution strategies of each historical task across multiple historical tasks. These historical execution strategies instruct the agents executing the historical tasks and describe the processes each agent goes through. The computing device determines the execution strategy for the target task based on the experience pool. This low complexity reduces the time required to determine the execution strategy and improves efficiency. Compared to pre-trained models and using trained models to generate execution strategies for the target task, this method eliminates the need for pre-training, saving the model pre-training process and further shortening the time required to obtain the execution strategy. Furthermore, it eliminates the need to construct training data, saving costs. By directly reusing execution strategies from successfully executed historical tasks, the fit between the execution strategy and the task is not affected by the model, thus improving the task execution success rate.

[0412] It is understood that, in order to achieve the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0413] The above text combines Figures 2 to 6 The task execution method provided according to this embodiment is described in detail below. Figure 7 This embodiment describes the task execution device provided. Figure 7 A schematic diagram of the structure of a task execution device provided in this application is shown below. Figure 7 As shown, the task execution device 700 includes an acquisition module 710 and a processing module 720.

[0414] The task execution device 700 can be used to implement the functions of the computing device in the above method embodiments. When the task execution device 700 performs the steps executed by the computing device in the above method embodiments, the above and other operations and / or functions of each module in the task execution device 700 respectively implement the method flow executed by the computing device in the foregoing figures.

[0415] Specifically, the acquisition module 710 is used to: acquire user requests. The user request requests the execution of a target task. The processing module 720 is used to: respond to the user request and determine a first target execution strategy for executing the target task based on an experience pool. The experience pool records the execution strategy of each historical task among multiple historical tasks. The execution strategy of a historical task includes: information indicating multiple first agents executing the historical task, the execution order of the multiple first agents for the corresponding historical task, and the data dependencies between each first agent during the execution of the corresponding historical task. The first target execution strategy is the execution strategy of the first task in the experience pool, and the first task is one among multiple historical tasks whose fit with the target task is greater than or equal to a fit threshold. The processing module 720 is also used to: execute the target task using the first target execution strategy to obtain the execution result of the target task.

[0416] In some possible scenarios, the experience pool includes: multiple structured routing experiences. Each routing experience includes the execution strategy for a historical task.

[0417] In some possible scenarios, a routing experience may also include: task features and verification tags corresponding to the historical task. Alternatively, a routing experience may also include: task features, verification tags, and extended information corresponding to the historical task, wherein the extended information includes at least one of the following: output summary or context information. The task features describe the corresponding historical task, the verification tags indicate the confidence level of the execution strategy in the routing experience, the output summary is a general description of the agent's execution of the corresponding historical task, and the context information indicates the execution environment of the corresponding historical task. The task features included in the routing experiences in the experience pool, and at least one of the output summary or context information are used to determine the fit between the historical task and the target task.

[0418] In some possible scenarios, the processing module 720 is specifically configured to: identify, from multiple routing experiences, those with a fit between the corresponding historical task and the target task greater than or equal to a fit threshold as candidate experiences. If there are routing experiences among the candidate experiences that meet the reuse conditions, a first target execution strategy is determined based on the execution strategies included in the routing experiences that meet the reuse conditions. The reuse conditions include at least one of the following: the applicability score of the execution strategy included in the candidate experience is greater than or equal to an upper limit of the applicability score; the verification flag included in the candidate experience is a pre-set confidence level; the first agent indicated by the execution strategy included in the candidate experience supports the execution of the target task; and the applicability score is used to indicate the degree of fit of the execution strategy included in the candidate experience in solving the target task.

[0419] In some possible cases, fit is determined based on similarity and suitability scores, where similarity is the semantic similarity between the target task and the historical tasks.

[0420] In some possible scenarios, the processing module 720 is further configured to: when no routing experience in the candidate experiences meets the reuse conditions, adjust the execution strategy included in the target routing experience whose applicability score of the execution strategy included in the candidate experiences is between the upper limit and the lower limit of the applicability score, to obtain a first target execution strategy. The adjustment includes performing one of the following: adjusting the agent indicated by the execution strategy included in the target routing experience; and adjusting the probability that the agent indicated by the execution strategy included in the target routing experience is selected to execute the target task based on the degree of adaptation. The degree of adaptation is used to indicate the degree of matching between the service processed by the agent indicated by the execution strategy included in the target routing experience and the target service.

[0421] In some possible scenarios, the routing experience also includes: performance scores corresponding to the agents performing historical tasks, whereby the performance scores indicate: the effectiveness of the agents in performing the corresponding historical tasks, and the contribution of the agents to performing the corresponding historical tasks. The processing module 720 is further configured to: adjust the agents implementing the execution policy instructions included in the target routing experience based on the performance scores of the agents implementing the execution policy instructions included in multiple routing experiences. The adjustment includes at least one of the following: adding, reducing, or replacing agents.

[0422] In some possible scenarios, where the execution strategy for the target task cannot be determined based on the experience pool, the processing module 720 is further configured to: determine the probability that each third agent will be selected to execute the target task based on the business adaptability of each third agent among multiple third agents. The business adaptability of the third agent indicates its competence in different tasks. The processing module 720 is further configured to: select a target agent from among the multiple third agents to execute the target task based on the probability. The processing module 720 is further configured to: determine a second target execution strategy for the target task based on the target agent. The second target execution strategy includes: information indicating the target agent executing the target task, the execution order of the target agents for the target task, and the data dependencies between each target agent during the execution of the target task. The processing module 720 is further configured to: execute the target task using the second target execution strategy to obtain the execution result of the target task.

[0423] In some possible scenarios, the processing module 720 is specifically used to: employ a second intelligent agent to determine the probability that each third intelligent agent will be selected to execute the target task based on the business adaptability of each of the multiple third intelligent agents. The second intelligent agent is trained based on a first execution result, which is obtained by executing the task according to a first execution strategy. The first execution strategy is determined based on the probability obtained from the business adaptability of the intelligent agents.

[0424] In some possible scenarios, business adaptability includes at least one of the following: comprehensive score, current load, historical success rate, and area of ​​expertise. The comprehensive score indicates the degree to which a third agent supports the execution of historical tasks by associated third agents, where the associated third agent is the one that receives the computational results from multiple third agents. The current load indicates the resource consumption of the third agent. The historical success rate characterizes the probability that the third agent successfully executes historical tasks. The area of ​​expertise indicates the business that the third agent is adapted to handle.

[0425] In some possible scenarios, the overall score determines the usefulness of the associated third agent in performing historical tasks based on the computational results of the third agent.

[0426] In some possible scenarios, the processing module 720 is also used to: update the experience pool using the target task and the second target execution strategy to obtain an updated experience pool. The updated experience pool includes: the task characteristics of the target task and the second target execution strategy.

[0427] For more details on the acquisition module 710 and the processing module 720, please refer to the above description of the task execution method; it will not be repeated here.

[0428] As an example of a software functional unit, processing module 720 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, processing module 720 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0429] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0430] As an example of a hardware functional unit, the processing module 720 may include at least one computing device, such as a server. Alternatively, the processing module 720 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0431] The processing module 720 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 720 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 720 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0432] It should be noted that, in other embodiments, the processing module 720 can be used to execute any step in the task execution method. The steps implemented by the acquisition module 710 and the processing module 720 can be specified as needed. By implementing different steps in the task execution method through the acquisition module 710 and the processing module 720, all functions of the task execution device can be realized.

[0433] It is worth noting that if the aforementioned task execution device is implemented through a software module, for example, the software module can be provided to users through a cloud service subscription model, and users can choose different subscription levels according to their needs; or, for example, the software module can also provide enterprise-level customized services with professional domain customization, interface personalization and extended functions according to the needs of users or enterprises.

[0434] In addition, the task execution device 700 provided in this application can also be provided to users as an value-added service, and this application does not limit this.

[0435] The task execution device in this application embodiment can also be implemented in hardware, such as a computing device, computing device cluster, chip, or processor. For specific implementation details of the computing device, please refer to... Figure 8 For a description of the chip and processor's specific implementation, please refer to [link / reference]. Figure 9 For a detailed description of the implementation of computing device clusters, please refer to [link / reference]. Figure 10 , Figure 11 The description of that will not be repeated here.

[0436] The method steps in this embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a computing device. Of course, the processor and storage medium can also exist as discrete components in a network device or terminal device.

[0437] This application also provides a computing device, such as... Figure 8 As shown, Figure 8 This application provides a schematic diagram of a computing device. The computing device 800 includes a bus 816, a processor 811, a memory 812, and a communication interface 814. The processor 811, memory 812, and communication interface 814 are interconnected via the bus 816. The computing device 800 can refer to a device with data processing capabilities, including but not limited to: personal computers, desktop computers, servers, etc. The computing device for deploying a second intelligent agent and the task execution device 700 can both be implemented using the computing device.

[0438] The 816 bus can be a PCIe bus or an extended industry standard architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 8 The bus 816 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 816 may include a path for transmitting information between various components of the computing device 800 (e.g., processor 811, memory 812, communication interface 814).

[0439] The processor 811 may include any one or more processors such as CPU, GPU, FPGA, microprocessor (MP) or DSP.

[0440] The memory 812 may include volatile memory, such as RAM. The processor 811 may also include non-volatile memory, such as ROM, flash memory, HDD, or SSD.

[0441] The memory 812 stores executable program code, and the processor 811 executes the executable program code to implement the functions of the aforementioned acquisition module 710 and processing module 720, thereby realizing the task execution method. That is, the memory 812 stores instructions for executing the task execution method.

[0442] The communication interface 814 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 800 and other devices or communication networks.

[0443] For example, when the computing device 800 is used to implement the functions of the computing device in the above method embodiments, the computing device 800 can receive user requests through the communication interface 814 and send the execution results of the target task to the client device through the communication interface 814.

[0444] In the case where computing device 800 refers to a device that does not have a physical entity, the various components included in computing device 800 refer to logical components used to implement the corresponding hardware functions.

[0445] For example, Figure 8 The 811 processor in the text can be implemented using chips, such as... Figure 9 As shown, Figure 9 This application provides a schematic diagram of the structure of a chip. For example, the chip 900 includes a core 901, a CPU 902, a system buffer 903, an input / output (I / O) device 905, and a double data rate synchronous dynamic random access memory (DDR) 906.

[0446] In this configuration, CPU 902 receives tasks (such as tasks to be executed) and calls core 901 to execute those tasks. When chip 900 has multiple cores 901, CPU 902 also handles scheduling tasks. For example, CPU 902 can be implemented using an ARM processor, which is small, low-power, uses a 32-bit reduced instruction set, and offers simple and flexible addressing. Of course, in some implementations, CPU 902 can also be implemented using other processors.

[0447] Core 901 provides the computing power required for task execution. In one optional configuration, Core 901 includes a load / store unit (LSU), a cube computing unit, a scalar computing unit, a vector computing unit, and a buffer. The LSU loads data to be processed and stores processed data. It also manages read / write operations between different buffers within the core and performs format conversions. The cube computing unit provides the core computing power for matrix multiplication. The scalar computing unit is a single-instruction-single-data (SISD) processor, processing only one data item (usually an integer or floating-point number) at a time. The vector computing unit, also known as an array processor, allows direct manipulation of arrays or vectors for computation. There may be one or more buffers, primarily referring to a level 1 buffer (L1 buffer). These buffers temporarily store data that Core 901 uses repeatedly, reducing bus read / write operations. Additionally, certain data format conversion functions require the source data to reside in the buffer.

[0448] System buffer 903 is used to temporarily store input data, intermediate results or final results passed through chip 900.

[0449] DDR 906 is an off-chip memory, which can be replaced by high bandwidth memory (HBM) or other off-chip memory. DDR 906 sits between the chip and external memory, overcoming the access speed limitations of shared memory read / write operations in computing resource sharing.

[0450] The I / O device 905 included in chip 900 refers to the hardware that performs data transmission, or the device that interfaces with the I / O interface. Common I / O devices include network cards, printers, keyboards, and mice. All external storage devices can also be used as I / O devices, such as hard drives, floppy disks, and optical discs.

[0451] Core 901, CPU 902, system buffer 903, I / O devices 905, and DDR 906 are connected via a bus. The bus may include a pathway for transmitting information between the aforementioned components (such as CPU 902 and system buffer 903). In addition to a data bus, the bus may also include a power bus, control bus, and status signal bus. However, for clarity, the bus may be a PCIe bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. For example, core 901 can access these I / O devices 905 via a PCIe bus. Core 901 is connected to system buffer 903 via a DDR bus. Here, different system buffers 903 may use different data buses to communicate with core 901; therefore, the DDR bus can also be replaced with other types of data buses. This embodiment does not limit the bus type.

[0452] For example, when CPU 902 loads the data to be processed by the task execution task (such as user requests) into DDR906, LSU in core 901 reads (loads) the data from DDR906, processes the data, and obtains the processing result (such as the execution result of the target task). After obtaining the processing result, LSU then loads (stores) the processing result into DDR806.

[0453] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. In some embodiments, the computing device may also be a terminal device such as a desktop computer, laptop computer, or smartphone.

[0454] like Figure 10 As shown, Figure 10 This application provides a schematic diagram of a computing device cluster, which includes at least one computing device 800. The memory 812 of one or more computing devices 800 in the computing device cluster may store the same instructions for executing task execution methods.

[0455] In some possible implementations, the memory 812 of one or more computing devices 800 in the computing device cluster may also store partial instructions for executing the task execution method. In other words, a combination of one or more computing devices 800 can jointly execute the instructions for executing the task execution method.

[0456] It should be noted that the memory 812 in different computing devices 800 within the computing device cluster can store different instructions, each used to execute a portion of the computing device's functions. That is, the instructions stored in the memory 812 of different computing devices 800 can implement the functions of one or more units in the acquisition module 710 and the processing module 720.

[0457] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN). Figure 11 One possible implementation is shown. For example... Figure 11 As shown, Figure 11 This application provides a schematic diagram of a connection between computing devices, where two computing devices 800A and 800B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the instructions stored in the memory 812 of computing device 800A can implement the functions implemented by the acquisition module 710. Simultaneously, the instructions stored in the memory 812 of computing device 800B can implement the functions implemented by the processing module 720.

[0458] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a task execution method.

[0459] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a task execution method.

[0460] This application also provides a chip. The chip includes an interface circuit and a control circuit. The interface circuit can be used to receive user requests, and the control circuit is used to implement the functions implemented by the computing device, etc., in the task execution method.

[0461] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as an SSD.

[0462] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A task execution method, characterized in that, The method includes: Obtain a user request; wherein the user request is used to request the execution of a target task; In response to the user request, a first target execution strategy for executing the target task is determined based on an experience pool. The experience pool records the execution strategy for each historical task among multiple historical tasks. The execution strategy for each historical task includes: information indicating multiple first agents executing the historical task, the execution order of the multiple first agents for the corresponding historical task, and the data dependencies between each first agent and the corresponding historical task. The first target execution strategy is the execution strategy for a first task in the experience pool, where the first task is one of the multiple historical tasks whose fit with the target task is greater than or equal to a fit threshold. The target task is executed using the first target execution strategy to obtain the execution result of the target task.

2. The method according to claim 1, characterized in that, The experience pool includes: multiple structured routing experiences; wherein each routing experience includes the execution strategy of a historical task.

3. The method according to claim 2, characterized in that, A routing experience also includes: the task characteristics and verification markers of the corresponding historical tasks; Alternatively, a routing experience may also include: task characteristics, verification tags, and extended information corresponding to the historical task, wherein the extended information includes at least one of the following: output summary or context information; Wherein, the task features are used to describe the corresponding historical tasks, the verification flags are used to indicate the confidence of the execution strategy in the routing experience, the output summary is a general description of the agent's execution of the corresponding historical tasks, the context information is used to indicate the execution environment of the corresponding historical tasks, the routing experience in the experience pool includes task features, and at least one of the output summary or context information is used to determine the fit between the historical tasks and the target tasks.

4. The method according to claim 3, characterized in that, The step of determining the first target execution strategy for executing the target task based on the experience pool includes: The routing experiences in which the fit between the corresponding historical task and the target task is greater than or equal to the fit threshold are determined as candidate experiences. If there is a routing experience that satisfies the reuse condition among the candidate experiences, the first target execution strategy is determined based on the execution strategies included in the routing experiences that satisfy the reuse condition among the candidate experiences. The reuse conditions include at least one of the following: the applicability score of the execution strategy included in the candidate experience is greater than or equal to the upper limit of the applicability score; the verification mark included in the candidate experience is a preset reliability; the first agent indicated by the execution strategy included in the candidate experience supports the execution of the target task; and the applicability score is used to indicate the degree of adaptation of the execution strategy included in the candidate experience to solve the target task.

5. The method according to claim 4, characterized in that, The fit is determined based on similarity and applicability scores, where similarity refers to the semantic similarity between the target task and historical tasks.

6. The method according to claim 4 or 5, characterized in that, The step of determining the first target execution strategy for executing the target task based on the experience pool also includes: If no routing experience that satisfies the reuse condition exists among the candidate experiences, the execution strategy included in the target routing experience whose applicability score of the execution strategy included in the candidate experiences is between the upper limit and the lower limit of the applicability score is adjusted to obtain the first target execution strategy. The adjustment includes performing one of the following: adjusting the agent whose execution strategy is indicated by the target routing experience, and adjusting the probability of the agent whose execution strategy is indicated by the target routing experience being selected to execute the target task according to the degree of adaptation, wherein the degree of adaptation is used to indicate the degree of matching between the service processed by the agent whose execution strategy is indicated by the target routing experience and the target service.

7. The method according to claim 6, characterized in that, The routing experience also includes: performance scores corresponding to the agents that performed the historical tasks, the performance scores being used to indicate: the performance effect of the agents on the corresponding historical tasks, and the contribution of the agents to the performance of the corresponding historical tasks; The agent that executes the policy instruction, which includes adjusting the target routing experience, includes: Based on the performance scores of the agents executing policy instructions included in the multiple routing experiences, the agents executing policy instructions included in the target routing experiences are adjusted; wherein, the adjustment includes at least one of the following: adding, reducing, or replacing.

8. The method according to any one of claims 1-7, characterized in that, If the execution strategy for the target task cannot be determined based on the experience pool, The method further includes: Based on the business adaptability of each of the multiple third agents, the probability of each third agent being selected to execute the target task is determined; wherein, the business adaptability of the third agent is used to indicate the degree of competence of the third agent for different tasks. Based on the probability, a target agent is selected from the plurality of third agents to perform the target task; Based on the target agent, a second target execution strategy for the target task is determined; wherein, the second target execution strategy includes: information indicating the target agent to execute the target task, the execution order of the target agent for the target task, and the data dependencies of each target agent in the process of executing the target task; The target task is executed using the second target execution strategy to obtain the execution result of the target task.

9. The method according to claim 8, characterized in that, The step of determining the probability that each third agent is selected to execute the target task based on the service adaptability of each third agent among multiple third agents includes: A second agent determines the probability that each third agent will be selected to execute the target task based on the business adaptability of each of the multiple third agents; wherein the second agent is trained based on a first execution result, the first execution result being obtained by executing the task according to a first execution strategy, and the first execution strategy being determined based on the probability obtained from the business adaptability of the agent.

10. The method according to claim 8 or 9, characterized in that, The business adaptation capabilities include at least one of the following: comprehensive score, current load, historical success rate, and areas of expertise; The comprehensive score is used to indicate: the degree of support of the third agent for the execution of historical tasks by the associated third agent, wherein the associated third agent is the agent among the plurality of third agents that receives the calculation results of the third agent; the current load is used to indicate the resource consumption of the third agent; the historical success rate is used to characterize the probability of the third agent successfully executing historical tasks; and the area of ​​expertise is used to indicate the business that the third agent is adapted to process.

11. The method according to claim 10, characterized in that, The comprehensive score is determined based on the usefulness of the associated third agent in performing historical tasks, according to the computational results of the third agent.

12. The method according to any one of claims 9-11, characterized in that, The method further includes: The experience pool is updated using the target task and the second target execution strategy to obtain an updated experience pool; wherein, the updated experience pool includes: the task characteristics of the target task and the second target execution strategy.

13. A task execution device, characterized in that, The device includes: The acquisition module is used to: acquire user requests; wherein the user requests are used to request the execution of a target task; The processing module is configured to: respond to the user request and determine a first target execution strategy for executing the target task based on an experience pool; wherein the experience pool records the execution strategy of each historical task in a plurality of historical tasks, and the execution strategy of the historical task includes: information indicating a plurality of first agents executing the historical task, the execution order of the plurality of first agents for the corresponding historical task, and the data dependency relationship of each first agent in the process of executing the corresponding historical task, the first target execution strategy being the execution strategy of a first task in the experience pool, and the first task being a historical task whose fit with the target task is greater than or equal to a fit threshold; The processing module is further configured to: execute the target task using the first target execution strategy to obtain the execution result of the target task.

14. The apparatus according to claim 13, characterized in that, The experience pool includes: multiple structured routing experiences; wherein each routing experience includes the execution strategy of a historical task.

15. The apparatus according to claim 14, characterized in that, A routing experience also includes: the task characteristics and verification markers of the corresponding historical tasks; Alternatively, a routing experience may also include: task characteristics, verification tags, and extended information corresponding to the historical task, wherein the extended information includes at least one of the following: output summary or context information; Wherein, the task features are used to describe the corresponding historical tasks, the verification flags are used to indicate the confidence of the execution strategy in the routing experience, the output summary is a general description of the agent's execution of the corresponding historical tasks, the context information is used to indicate the execution environment of the corresponding historical tasks, the routing experience in the experience pool includes task features, and at least one of the output summary or context information is used to determine the fit between the historical tasks and the target tasks.

16. The apparatus according to claim 15, characterized in that, The processing module is specifically used to: determine the routing experiences in the multiple routing experiences whose adaptation degree between the corresponding historical task and the target task is greater than or equal to the adaptation threshold as candidate experiences; If there is a routing experience that satisfies the reuse condition among the candidate experiences, the first target execution strategy is determined based on the execution strategies included in the routing experiences that satisfy the reuse condition among the candidate experiences. The reuse conditions include at least one of the following: the applicability score of the execution strategy included in the candidate experience is greater than or equal to the upper limit of the applicability score; the verification mark included in the candidate experience is a preset reliability; the first agent indicated by the execution strategy included in the candidate experience supports the execution of the target task; and the applicability score is used to indicate the degree of adaptation of the execution strategy included in the candidate experience to solve the target task.

17. The apparatus according to claim 16, characterized in that, The fit is determined based on similarity and applicability scores, where similarity refers to the semantic similarity between the target task and historical tasks.

18. The apparatus according to claim 16 or 17, characterized in that, The processing module is further configured to: when there is no routing experience in the candidate experience that satisfies the reuse condition, adjust the execution strategy included in the target routing experience whose applicability score of the execution strategy included in the candidate experience is between the upper limit of the applicability score and the lower limit of the applicability score, to obtain the first target execution strategy; The adjustment includes performing one of the following: adjusting the agent whose execution strategy is indicated by the target routing experience, and adjusting the probability of the agent whose execution strategy is indicated by the target routing experience being selected to execute the target task according to the degree of adaptation, wherein the degree of adaptation is used to indicate the degree of matching between the service processed by the agent whose execution strategy is indicated by the target routing experience and the target service.

19. The apparatus according to claim 18, characterized in that, The routing experience also includes: performance scores corresponding to the agents that performed the historical tasks, the performance scores being used to indicate: the performance effect of the agents on the corresponding historical tasks, and the contribution of the agents to the performance of the corresponding historical tasks; The processing module is further configured to: adjust the agents implementing the execution policy instructions included in the target route experience based on the performance scores of the agents implementing the execution policy instructions included in the multiple route experiences; wherein the adjustment includes at least one of the following: adding, reducing, or replacing.

20. The apparatus according to any one of claims 13-19, characterized in that, If the execution strategy for the target task cannot be determined based on the experience pool, The processing module is further configured to: determine the probability that each third agent is selected to execute the target task based on the business adaptability of each third agent among a plurality of third agents; wherein, the business adaptability of the third agent is used to indicate the competence of the third agent for different tasks; The processing module is further configured to: select a target agent from the plurality of third agents to perform the target task based on the probability; The processing module is further configured to: determine a second target execution strategy for the target task based on the target agent; wherein the second target execution strategy includes: information indicating the target agent executing the target task, the execution order of the target agent for the target task, and the data dependency relationships of each target agent in the process of executing the target task; The processing module is further configured to: execute the target task using the second target execution strategy to obtain the execution result of the target task.

21. The apparatus according to claim 20, characterized in that, The processing module is specifically used to: employ a second agent to determine the probability that each third agent is selected to execute the target task based on the business adaptation capabilities of each of the multiple third agents; wherein the second agent is trained based on a first execution result, the first execution result being obtained by executing the task according to a first execution strategy, and the first execution strategy being determined based on the probability obtained from the business adaptation capabilities of the agents.

22. The apparatus according to claim 20 or 21, characterized in that, The business adaptation capabilities include at least one of the following: comprehensive score, current load, historical success rate, and areas of expertise; The comprehensive score is used to indicate: the degree of support of the third agent for the execution of historical tasks by the associated third agent, wherein the associated third agent is the agent among the plurality of third agents that receives the calculation results of the third agent; the current load is used to indicate the resource consumption of the third agent; the historical success rate is used to characterize the probability of the third agent successfully executing historical tasks; and the area of ​​expertise is used to indicate the business that the third agent is adapted to process.

23. The apparatus according to claim 22, characterized in that, The comprehensive score is determined based on the usefulness of the associated third agent in performing historical tasks, according to the computational results of the third agent.

24. The apparatus according to any one of claims 21-23, characterized in that, The processing module is further configured to: update the experience pool using the target task and the second target execution strategy to obtain an updated experience pool; wherein the updated experience pool includes: the task characteristics of the target task and the second target execution strategy.

25. A processor, characterized in that, The processor includes an interface circuit and a control circuit; the interface circuit is used to acquire user requests and, in conjunction with the control circuit, execute the method of any one of claims 1-12.

26. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, and each computing device includes a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1-12.

27. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions; when the computer instructions are executed in a computing device, the computing device performs the method of any one of claims 1-12.

28. A computer program product, characterized in that, When the computer program product is run in a computing device, the computing device performs the method according to any one of claims 1-12.