Multi-agent task execution methods, devices, storage media and program products
By generating and adjusting multi-agent task execution plans, the problems of failure and poor planning in traditional agent task execution are solved, thereby improving the success rate and accuracy of tasks.
Patent Information
- Application Number
- CN202611500442.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-17
AI Technical Summary
When traditional intelligent agents perform complex tasks, if subtasks fail or are poorly planned, the success rate of the task is low, and they cannot effectively adjust the execution plan.
The first execution plan is generated by acquiring task information and agent capability information. Sub-tasks are executed according to dependencies to form an execution trajectory. When a task fails, a second execution plan is generated to adjust the execution order to improve the task success rate.
It improves the adaptability and continuity of multi-agent task execution, enhances the accuracy of task execution, and solves the problem that fixed plans cannot be adjusted according to actual results.
Smart Images

Figure CN123114699A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a multi-agent task execution method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology
[0002] With the development of computer technology, intelligent agent technology has emerged. By applying intelligent agents, complex tasks can be performed automatically.
[0003] In traditional technologies, when using intelligent agents to perform complex tasks, it is usually necessary to first plan the complex task and then execute it according to the plan in order to obtain reliable task results.
[0004] However, in traditional technologies, when an agent performs a complex task, if a subtask fails, the return value is not up to standard, or the plan itself is not well thought out, it can only throw an error upwards or directly return an incomplete result, resulting in a low end-to-end success rate for complex tasks. Summary of the Invention
[0005] Therefore, it is necessary to provide a multi-agent task execution method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the accuracy of multi-agent task execution results in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a multi-agent task execution method, including:
[0007] The system acquires task information and capability information of multiple agents, and generates a first execution plan based on the task information and capability information; the first execution plan includes multiple sub-tasks with dependencies.
[0008] Execute multiple subtasks in the first execution plan according to their dependencies to obtain execution trajectories for each subtask. The execution trajectories include task summary information for each subtask. The task summary information is used to characterize the execution results and / or execution process of the corresponding subtasks.
[0009] Based on task information and execution trajectory, task results are evaluated to obtain evaluation information;
[0010] If the evaluation information includes task failure information, a second execution plan is generated based on the task failure information and the execution trajectory.
[0011] According to the second execution plan, the corresponding intelligent agent is invoked to execute the corresponding subtask, and the task result corresponding to the task information is obtained.
[0012] Secondly, this application also provides a multi-agent task execution device, comprising:
[0013] The acquisition module is used to acquire task information and capability information of multiple intelligent agents, and generate a first execution plan based on the task information and capability information; the first execution plan includes multiple sub-tasks with dependencies.
[0014] The first execution module is used to execute multiple subtasks in the first execution plan according to their dependencies, and obtain the execution trajectories corresponding to the multiple subtasks. The execution trajectories include task summary information corresponding to the multiple subtasks. The task summary information is used to characterize the execution result and / or execution process summary information of the corresponding subtask.
[0015] The evaluation module is used to evaluate task results based on task information and execution trajectory, and obtain evaluation information.
[0016] The plan generation module is used to generate a second execution plan based on the task failure information and the execution trajectory if the evaluation information includes task failure information.
[0017] The second execution module is used to call the corresponding intelligent agent to execute the corresponding subtask according to the second execution plan, and obtain the task result corresponding to the task information.
[0018] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps described in the above method embodiments.
[0019] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps described in the above method embodiments.
[0020] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps described in the above method embodiments.
[0021] The aforementioned multi-agent task execution method, apparatus, computer device, computer-readable storage medium, and computer program product generate a first execution plan containing multiple dependent sub-tasks by acquiring task information and the capability information of multiple agents. Each sub-task is executed according to its dependencies, enabling multiple agents to execute complex tasks in an orderly manner based on the dependencies between sub-tasks, reducing the impact of unreasonable sub-task execution order on task execution. During execution, an execution trajectory including task summary information is formed. The task summary information represents the execution result and / or execution process of the corresponding sub-task, thus preserving the execution status of multiple sub-tasks and providing an execution basis for subsequent task result evaluation. Next, task result evaluation is performed based on the task information and execution trajectory. When the evaluation information includes task failure information, a second execution plan is generated by combining the task failure information and the execution trajectory. This allows subsequent execution plans to be adjusted according to the actual execution situation without continuing to execute according to the original first execution plan, thereby solving the problem that pre-generated fixed execution plans are difficult to adjust based on actual execution results. Furthermore, according to the second execution plan, the corresponding agents are called to execute sub-tasks, so that the task execution forms a closed loop process based on the execution results for evaluation and replanning when the task fails. This improves the adaptability to execution failures and the continuity of task execution during multi-agent task execution, thereby improving the accuracy of multi-agent task execution results. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating a multi-agent task execution method in one embodiment;
[0024] Figure 2 This is a schematic diagram of a progressive output compression chain in one embodiment;
[0025] Figure 3 This is a schematic diagram of a dual-channel trajectory hybrid storage structure in one embodiment;
[0026] Figure 4 This is a schematic diagram of the architecture of a multi-agent task execution system in one embodiment;
[0027] Figure 5 This is a schematic diagram of the process interaction between nodes in a multi-agent task execution system in one embodiment;
[0028] Figure 6 This is a structural block diagram of a multi-agent task execution device in one embodiment;
[0029] Figure 7 This is an internal structural diagram of a computer device in one embodiment;
[0030] Figure 8 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0032] The multi-agent task execution method provided in this application embodiment is illustrated using an application to a terminal as an example. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. The terminal communicates with the server via a network. A data storage system can store the data to be processed by the server. The data storage system can be integrated on the server, or it can be located in the cloud or on other network servers. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0033] like Figure 1 As shown, in this embodiment, the method includes the following steps:
[0034] Step S102: Obtain task information and capability information of multiple intelligent agents, and generate a first execution plan based on the task information and capability information.
[0035] The first execution plan comprises multiple subtasks with dependencies. Task information characterizes the target task to be executed and may include user-inputted task content and objectives. Agent capability information characterizes the types of tasks and / or processing capabilities that the corresponding agent can execute. The first execution plan is the task execution arrangement determined based on the task information, including multiple subtasks and the dependencies between them.
[0036] For example, task information and the capability information of multiple agents can be input into a task planning model. The task planning model decomposes the task information into tasks and determines the agents to execute each sub-task based on the capabilities of each agent. At the same time, it determines the dependencies between the sub-tasks to generate a first execution plan.
[0037] For example, after generating the first execution plan, a validity check can be performed on the first execution plan to determine whether it meets the preset execution conditions. For example, the multiple subtasks included in the first execution plan can be checked first to determine whether the agent corresponding to each subtask exists in the capability information of multiple agents, and whether the multiple subtasks can form a valid execution order based on the dependencies between them. For example, starting with a subtask without a prerequisite dependency, it can be determined whether its dependent subtasks can be determined in the execution order, and the execution order of other subtasks can be determined step by step accordingly. When multiple subtasks can be determined in the execution order according to their dependencies, the dependencies in the first execution plan can be determined to be valid. For example, if there are subtasks whose execution order cannot be determined, the dependencies in the first execution plan can be determined to be abnormal. For example, if a cycle exists in the execution order corresponding to the determined multiple subtasks, the dependencies in the first execution plan can be determined to be abnormal. If it is determined that the agents corresponding to each subtask are valid and the dependencies between the subtasks are valid, the first execution plan can be determined to have passed the validity check and can be used for subsequent task execution. If the validity check fails, the first execution plan can be regenerated based on the check result, or the task execution can be terminated if a first execution plan that meets the execution conditions cannot be generated.
[0038] Optionally, after confirming that the first execution plan passes the validity check, it can be persistently saved to form a checkpoint corresponding to the first execution plan. For example, the first execution plan that passes the validity check can be converted into a persistent data format, retaining the data type information corresponding to the first execution plan during the conversion process. This allows the corresponding data to be recovered based on the data type information when subsequently reading the checkpoint. After serializing the first execution plan, the obtained serialized data can be written to a preset persistent storage location, establishing a correspondence between the serialized data and the first execution plan. For example, the plan identifier corresponding to the first execution plan can be used as the index identifier for the serialized data, and the serialized data can be written to the corresponding storage location in the cache database. Therefore, if an execution interruption occurs during subsequent task execution, or if task replanning needs to be performed based on the first execution plan, the corresponding checkpoint can be read according to the plan identifier, and the first execution plan and its related execution state can be restored, providing a saved execution state basis for subsequent task execution.
[0039] Step S104: Execute multiple subtasks in the first execution plan according to their dependencies to obtain the execution trajectories corresponding to the multiple subtasks.
[0040] The execution trajectory includes task summary information corresponding to multiple subtasks.
[0041] The task summary information is used to characterize the summary information of the execution result and / or execution process of the corresponding subtask.
[0042] Among them, dependencies are used to determine the execution order of multiple subtasks. Execution trajectories are used to record relevant information of multiple subtasks during execution, and task summary information is used to characterize the execution results and / or execution process of the corresponding subtasks in summary form.
[0043] For example, the execution order of multiple subtasks can be determined based on the dependencies between subtasks in the first execution plan, and the corresponding agents can be invoked to execute the subtasks according to the determined execution order. For the subtask to be executed, the required context information can be determined based on the execution status of its dependent preceding subtasks, and the context information and the task information corresponding to the current subtask can be provided to the corresponding agent, enabling the agent to execute the current subtask. After the current subtask is completed, the execution output corresponding to the subtask can be obtained, and corresponding task summary information can be formed based on the execution output and / or the execution process of the subtask. Then, the task summary information is recorded according to the actual execution order of multiple subtasks, thereby obtaining the execution trajectory.
[0044] Optionally, when providing context information to the agent corresponding to the current subtask, the method of passing the information of the preceding subtask can be determined according to the context mode corresponding to the current subtask. When the context mode is digest rewriting mode, the execution output and existing task digest information of the previously executed subtask can be obtained, and the execution output and existing task digest information can be rewritten to obtain new task digest information, which is then provided to the agent corresponding to the current subtask. When the context mode is structured reference mode, structured reference information can be determined from the execution information of the previously executed subtasks that the current subtask depends on, and the structured reference information is provided to the agent corresponding to the current subtask. When the context mode is non-injection mode, the context information of the preceding subtask is not injected into the current subtask. In this way, corresponding task digest information is formed while executing multiple subtasks, and an execution trajectory is formed according to the actual execution process, providing a basis for subsequent task result evaluation based on the execution trajectory and regenerating the execution plan when the task fails.
[0045] Step S106: Evaluate the task results based on the task information and execution trajectory to obtain evaluation information.
[0046] The task result evaluation is used to determine whether the execution status of multiple subtasks meets the task requirements corresponding to the task information. Evaluation information characterizes the results of the task result evaluation and can include task success or failure information and the corresponding reasons for failure. For example, evaluation can be based on business rule modules (e.g., whether output fields are complete; whether the values of output fields are within the corresponding acceptable range). Another example is using a large language model for evaluation.
[0047] For example, task summary information corresponding to multiple subtasks can be obtained from the execution trajectory, and the task information and multiple task summary information can be provided to the evaluator. The evaluator can determine the task objective based on the task information, and make a comprehensive judgment on the execution status of multiple subtasks by combining the execution results and / or execution process of the subtasks represented by the multiple task summary information. For example, the execution result of the corresponding subtask in the execution trajectory can be judged according to the task objective, output content or execution conditions required in the task information. If the execution result meets the corresponding task requirements, task success information is generated; if the execution result does not meet the corresponding task requirements, task failure information is generated. Furthermore, the failure reason corresponding to the task failure can be determined according to the execution trajectory, thereby obtaining evaluation information.
[0048] Optionally, when the execution trajectory contains a large amount of task summary information, the amount of information corresponding to the execution trajectory can be determined first, and then compared with a preset evaluation budget. When the amount of information does not exceed the evaluation budget, the task result can be evaluated directly based on the execution trajectory. When the amount of information exceeds the evaluation budget, the task summary information in the execution trajectory can be compressed in layers. For example, some task summary information close to the current execution position can be retained, and other task summary information can be compressed into the identification information and brief overview information of the corresponding subtasks. After the compressed execution trajectory meets the evaluation budget, it can be used for task result evaluation. Thus, while retaining the summary information related to the current task execution status, the execution trajectory can be controlled within the information range required for evaluation, and evaluation information can be obtained based on the task information and the processed execution trajectory.
[0049] Step S108: If the evaluation information includes task failure information, generate a second execution plan based on the task failure information and the execution trajectory.
[0050] The second execution plan is used to rearrange the subsequent task execution process when the first execution plan fails to meet the task requirements.
[0051] For example, after determining that the evaluation information includes task failure information, the reasons for failure in the task failure information can be obtained, and combined with the task summary information corresponding to each subtask in the execution trajectory, the actual execution of the first execution plan can be analyzed to determine the correlation between the reasons for failure and the executed subtasks. Further, based on the reasons for failure and the execution results and / or execution processes of each subtask recorded in the execution trajectory, the subtasks that need adjustment and their execution methods can be re-determined, and a second execution plan can be generated based on the re-determined task execution arrangements.
[0052] Optionally, task failure information and execution trajectory can be provided to the task planning process, which then regenerates a second execution plan based on the cause of task failure and the execution status of existing subtasks. For example, when the execution trajectory indicates that some subtasks have achieved results that meet the task requirements, while the execution results of other subtasks lead to task failure, the subtasks related to the cause of failure can be replanned based on the cause of failure, and the execution status of other subtasks can be determined based on the existing execution trajectory, thereby generating a second execution plan. When the cause of task failure involves multiple subtasks, the corresponding execution arrangements can be re-determined by combining the task summary information corresponding to multiple subtasks. Thus, the second execution plan is not regenerated independently of the existing execution process, but rather adjusts the original execution process by combining task failure information and the already formed execution trajectory, enabling the regenerated execution plan to perform subsequent execution for the task failure situations that have already occurred.
[0053] In some embodiments, if the number of times the regenerated execution plan is executed reaches a preset number, subsequent steps are not executed. Instead, the regeneration process is terminated, the most recent evaluation result and the output results of some existing subtasks are returned to the user terminal, and an alarm log can be generated. This avoids the infinite loop caused by the illusion of a large model.
[0054] Step S110: According to the second execution plan, call the corresponding agent to execute the corresponding subtask and obtain the task result corresponding to the task information.
[0055] For example, the second execution plan can be parsed to identify multiple subtasks and their dependencies, and the execution order of each subtask can be determined according to the dependencies. The corresponding agent can then be invoked to execute the subtask. During execution, the agent can be provided with the relevant task information and necessary context information based on the execution schedule of each subtask in the second execution plan, enabling the agent to complete the corresponding subtask and obtain the execution results.
[0056] After each subtask is completed, the task result corresponding to the task information can be determined based on the execution results of each subtask in the second execution plan. For example, the execution results of multiple subtasks can be summarized according to the dependencies between them to obtain the task result corresponding to the task information. When the second execution plan only adjusts some subtasks in the first execution plan, the task result corresponding to the task information can also be obtained by combining the existing execution results of the unadjusted subtasks and the execution results of the re-executed subtasks. This allows the regenerated second execution plan to actually apply to the subsequent task execution process and obtain the task result using the results of the re-executed subtasks, thus completing the adjustment of the task execution process after the first execution plan fails.
[0057] In the aforementioned multi-agent task execution method, a first execution plan containing multiple dependent sub-tasks is generated by acquiring task information and the capability information of multiple agents. Each sub-task is then executed according to its dependencies, enabling multiple agents to execute complex tasks in an orderly manner based on the dependencies between sub-tasks, reducing the impact of unreasonable sub-task execution order on task execution. During execution, an execution trajectory including task summary information is formed. The task summary information represents the execution result and / or execution process of the corresponding sub-task, thus preserving the execution status of multiple sub-tasks and providing an execution basis for subsequent task result evaluation. Next, task result evaluation is performed based on the task information and execution trajectory. When the evaluation information includes task failure information, a second execution plan is generated by combining the task failure information and the execution trajectory. This allows subsequent execution plans to be adjusted according to the actual execution situation without continuing to execute according to the original first execution plan, thereby solving the problem that pre-generated fixed execution plans are difficult to adjust based on actual execution results. Furthermore, according to the second execution plan, the corresponding agents are called to execute sub-tasks, so that the task execution forms a closed loop process based on the execution results for evaluation and replanning when the task fails. This improves the adaptability to execution failures and the continuity of task execution during multi-agent task execution, thereby improving the accuracy of multi-agent task execution results.
[0058] In an exemplary embodiment, when multiple agents execute a complex task comprising multiple subtasks, the degree of dependency of different subtasks on the information of preceding subtasks varies. If the same context passing method is used for all subtasks, such as directly passing the complete execution information of preceding subtasks to the current subtask, the current subtask may receive information irrelevant to its own execution, thereby wasting computer resources and reducing task execution efficiency. Therefore, in the process of executing multiple subtasks in the first execution plan according to their dependencies, the following steps can be performed: determining the context information related to the subtask based on the context mode corresponding to the subtask and the task summary information corresponding to the already executed subtasks in the first execution plan; sending the context information and the subtask information corresponding to the subtask to the agent corresponding to the subtask to execute the subtask.
[0059] Among them, the context mode includes at least a first mode that rewrites the summary of the execution information corresponding to the executed subtask, a second mode that references the structured information corresponding to the executed subtask, and a third mode that does not inject the context information corresponding to the executed subtask.
[0060] Contextual information is determined from the information of already executed subtasks and provided to the agent corresponding to the current subtask based on the context mode of the current subtask. Structured information is information organized according to a predetermined data structure that can directly identify or reference content related to executed subtasks, such as task identifiers, object identifiers, or other fields that can locate relevant execution information.
[0061] In this embodiment, when generating the first execution plan, a corresponding context mode can be determined for each subtask in the first execution plan, so that each subtask has a corresponding context passing strategy. For example, the first execution plan may include subtask A, subtask B, and subtask C, and a corresponding context mode can be configured for each of the three subtasks. The context mode can be determined according to the degree of information dependency between each subtask and other subtasks that have already been executed: when the current subtask needs to understand the semantic content expressed by the execution process or execution result of the preceding subtask, the first mode can be used. When the current subtask only needs some structured information generated by the preceding subtask, the second mode can be used. When the current subtask can be executed independently without the information of the preceding subtask, the third mode can be used. Thus, when executing the first execution plan, the corresponding context information can be constructed according to the pre-determined context mode of each subtask.
[0062] When executing a specific subtask, the context mode corresponding to the current subtask is first determined based on the first execution plan, and subtasks that can serve as context sources are identified from the already completed subtasks. Then, based on the determined context mode, context information related to the current subtask is determined from the task summary information and execution information of the already executed subtasks, and this context information, along with the subtask information, is sent to the agent corresponding to the current subtask. Upon receiving this information, the agent can determine the specific task it needs to complete based on the subtask information, and use the context information to obtain the preceding task information required to execute the current subtask, thereby executing the current subtask.
[0063] In this embodiment, by configuring different context modes for each subtask in the first execution plan, and determining the context information according to the corresponding context mode when executing each subtask, different subtasks can obtain the preceding task information by using digest rewriting, structured information referencing, or no context injection, respectively. This reduces unnecessary context passing while meeting the information requirements of the current subtask, and reduces the impact of the continuous accumulation of preceding execution information on the execution of subsequent subtasks.
[0064] In one exemplary implementation, executing a subtask includes: if the context mode corresponding to the current subtask is a first mode, obtaining the execution output and task summary information corresponding to the previously executed subtask, rewriting the execution output and task summary information to obtain new task summary information, and sending the new task summary information and the subtask information corresponding to the subtask to the corresponding intelligent agent; if the context mode corresponding to the current subtask is a second mode, obtaining the structured reference information corresponding to the previously executed subtask that the current subtask depends on, and sending the structured reference information and the subtask information corresponding to the current subtask to the corresponding intelligent agent; if the context mode corresponding to the current subtask is a third mode, sending the subtask information corresponding to the current subtask to the corresponding intelligent agent.
[0065] Specifically, when executing the current subtask, the context mode corresponding to the current subtask in the first execution plan can be obtained first, and the corresponding information processing method can be adopted according to different context modes. For the first mode, the execution output of the completed preceding subtask and the existing task summary information can be obtained. Both are used as input for summary rewriting to update the existing task summary information, thereby obtaining new task summary information. Subsequently, the new task summary information and the subtask information corresponding to the current subtask are sent to the agent corresponding to the current subtask. Here, the existing task summary information can be used to retain the previously formed context content, while the new execution output is used to supplement the latest information generated by the preceding subtask. By rewriting the summary of both, a new task summary information that reflects the current execution status of the preceding subtask can be formed.
[0066] For example, a previous subtask might analyze customer needs, and its output could include customer need categories, specific needs, and various pieces of information generated during the analysis. The previously generated task summary only encapsulates some key information from the preceding task. If the current subtask needs to understand the preceding customer needs, the execution output and existing task summary can be combined to rewrite the summary. This allows the new task summary to absorb new execution information while retaining the existing context. This new task summary, along with current subtask information such as "generating a sales plan," is then provided to the corresponding agent. For subsequent subtasks, the new task summary information and new execution output from the previous step can be used to rewrite the summary, thus creating a summary that is progressively updated as the task execution progresses.
[0067] like Figure 2As shown, in a traditional context passing method, the execution outputs of multiple preceding subtasks are concatenated step by step during the execution of the current subtask. For example, after executing the first subtask (Step 1), the execution output `output_1` is formed. When executing the second subtask (Step 2), `output_1` and the execution output `output_2` of the current subtask are used together as the subsequent context. When executing the third subtask (Step 3), `output_1`, `output_2`, and `output_3` are further used together as the context. As the number of execution steps increases, the historical execution outputs accumulate, causing the amount of context information that the current subtask needs to process to continuously increase.
[0068] To address the aforementioned issues, this embodiment employs a progressive summary rewriting approach. When executing the first subtask, the subtask is executed based on its corresponding subtask information, and a first task summary, summary_1, is generated from the execution output. Subsequently, when executing the second subtask, the task summary information generated in the previous stage (i.e., previous_summary_1) and the execution output of the second subtask are used for summary rewriting to obtain a new task summary, summary_2. Further, when executing the third subtask, the task summary information summary_2 from the previous stage and the execution output of the third subtask are used for summary rewriting to obtain a new task summary, summary_3. Following this method, summary_1, summary_2, and summary_3 can be generated sequentially, until the task summary information summary_N corresponding to the Nth subtask is generated.
[0069] The summary rewriting process does not continuously accumulate historical task summaries and current execution outputs. Instead, it uses the task summary information from the previous stage and the execution output of the current subtask as input to regenerate the task summary information for the current stage. Therefore, after summary_2 is formed, summary_2 can replace summary_1 to represent the previously retained historical key information; after summary_3 is formed, summary_3 then replaces summary_2 as the historical summary information for subsequent tasks. This forms a progressively updated summary chain, rather than a continuously accumulating execution output chain.
[0070] For example, when executing the i-th subtask, the task summary information previous_summary_(i-1) generated in the previous stage and the execution output output_i of the current subtask can be obtained. A new task summary information previous_summary_i can be generated through the summary processing. The new task summary information can be restricted to a preset information range and written into the execution trajectory record for use as context information in subsequent subtask executions.
[0071] In the traditional approach, as the number of execution steps increases, the current context may simultaneously contain multiple historical execution outputs (corresponding to a time complexity of O(N*L)). However, in this embodiment, historical information is primarily carried out through task summary information with controlled length (corresponding to a time complexity of O(N*Ls+L)). Therefore, the historical context that the current subtask needs to process no longer simply accumulates with the increase in the number of historical execution steps, while still retaining key information related to subsequent tasks from the execution of previous tasks.
[0072] For the second mode, the dependencies between the current subtask and already executed subtasks are first used to determine the already executed subtasks that the current subtask actually needs to reference. Then, structured reference information is determined from the execution information corresponding to the already executed subtasks. Structured reference information can be specific data that can be directly used for processing by the current subtask, such as object identifiers, task identifiers, or specific field values generated by preceding tasks. After determining the structured reference information, it is sent together with the subtask information corresponding to the current subtask to the corresponding agent, enabling the agent to execute the current subtask using the structured reference information without needing to receive the complete execution output or all summary information of the preceding subtasks.
[0073] For example, after the previous subtask created customer information and obtained the customer identifier "C12345", the current subtask is used to query the customer's historical order information. If the current subtask corresponds to the second mode, the customer identifier can be determined as structured reference information from the execution information of the previous subtask, and "C12345" and the subtask information "query customer historical orders" can be sent to the corresponding agent. The agent can then determine the customer object to be queried based on the customer identifier and execute the corresponding subtask. In this case, the current agent only needs to obtain the structured information that can locate the object of the preceding task, and does not need to obtain the complete execution content of the previous subtask.
[0074] In the third mode, it can be determined that the execution of the current subtask does not require the context information of already executed subtasks. Therefore, it does not obtain or provide the current agent with the execution output, task summary information, or structured reference information of the preceding subtasks, but directly sends the subtask information corresponding to the current subtask to the corresponding agent. After receiving the subtask information, the corresponding agent can independently execute the current subtask based on that information. For example, if there is a subtask among multiple subtasks that only generates independent text according to predetermined task requirements, and its execution does not require the information generated by the preceding subtasks, then the third mode can be configured for this subtask, allowing the corresponding agent to process it directly based on the current subtask information.
[0075] Therefore, during the execution of the same first execution plan, the above three methods can be used for different subtasks. For example, the first mode can be used for subtasks that need to understand the overall semantics of the preceding task, the second mode can be used for subtasks that only need specific data from the preceding task, and the third mode can be used for subtasks that can be executed without using the preceding information. This allows the preceding information to be transmitted at different granularities according to the actual needs of the current subtask.
[0076] In this embodiment, by employing summary rewriting, structured referencing, and non-injected context methods for different context modes, the current subtask can obtain preceding information of appropriate granularity according to its own information needs. This improves the specificity of context passing between different subtasks and reduces the impact of irrelevant information on the execution of the current subtask.
[0077] In practical applications, when multi-agent tasks contain numerous subtasks, the execution trajectory includes increasingly more task summary information as the number of subtasks increases. If the complete execution trajectory is directly provided to the evaluator for task result evaluation, the amount of information input to the evaluator may exceed its preset processing capacity, affecting the normal evaluation of the task results. Therefore, the current task trajectory can be compressed to keep its corresponding information content within a preset range. For example, task result evaluation based on task information and execution trajectory includes: obtaining the amount of trajectory information corresponding to the execution trajectory and comparing the amount of trajectory information with a preset evaluation information amount; when the amount of trajectory information does not exceed the preset evaluation information amount, evaluating the task result based on a preset evaluator on the execution trajectory and task information; when the amount of trajectory information exceeds the preset evaluation information amount, performing the following compression steps based on a preset position: compressing the task summary information corresponding to each subtask whose execution position is before the preset position to obtain compressed summary information; obtaining a compressed execution trajectory based on the task summary information of each execution position at and after the preset position in the execution trajectory and each compressed summary information; evaluating the task result based on the task information and compressed execution trajectory; if the compressed execution trajectory still exceeds the preset evaluation information amount, adjusting the preset position to increase the amount of compressed summary information; performing the above compression steps based on the adjusted preset position to obtain an adjusted compressed execution trajectory; repeating the above steps until the adjusted compressed execution trajectory does not exceed the preset evaluation information amount or reaches the preset compression condition.
[0078] The trajectory information content is used to characterize the amount of information contained in the execution trajectory. It can be determined based on the amount of data occupied by the task summary information in the execution trajectory, such as the number of characters, words, or other quantities that can represent the scale of information in the task summary information. The preset evaluation information content is a pre-set upper limit on the amount of information in the execution trajectory provided to the evaluator for task result evaluation. The preset evaluator is an evaluation processing module used to judge the task execution status based on task information and the execution trajectory. It can evaluate the task execution status according to pre-set evaluation rules or pre-configured evaluation models. The preset position is a position in the execution trajectory used to divide the execution trajectory into the pre-compressed information and the post-execution information that retains the original task summary information. The compressed summary information is information formed by compressing one or more task summary information points located before the preset position, used to reduce the amount of information while retaining some execution information of the corresponding subtasks. The compressed execution trajectory is an execution trajectory formed by the uncompressed task summary information and the compressed summary information, used to replace the original execution trajectory for task result evaluation. Preset compression conditions are pre-defined conditions used to limit the continuous compression process of the execution trajectory, such as a pre-defined number of compressions, a minimum allowed preset position, or other conditions used to terminate repeated compression.
[0079] In this embodiment, before evaluating task results using the execution trajectory, the amount of trajectory information corresponding to the current execution trajectory can be determined first and compared with a preset evaluation information amount. The amount of trajectory information can be determined based on multiple task summary information contained in the execution trajectory. For example, the amount of information contained in multiple task summary information can be statistically analyzed to obtain the total amount of information corresponding to the current execution trajectory. Alternatively, the amount of information can be determined based on the actual execution trajectory content provided to the evaluator. The preset evaluation information amount is used to limit the amount of execution trajectory information allowed to be provided to the evaluator in a single task result evaluation. By comparing the two, it can be determined whether the current execution trajectory can be directly used for subsequent task result evaluations.
[0080] When the amount of trajectory information does not exceed the preset evaluation information limit, the execution trajectory can be provided directly to the preset evaluator without compression. The preset evaluator can determine the task objective to be achieved based on the task information, and analyze the execution results and / or execution process of each subtask in conjunction with the task summary information corresponding to multiple subtasks in the execution trajectory. This allows it to determine whether the current task meets the corresponding task requirements and obtain the corresponding evaluation result. Since the amount of information in the execution trajectory does not exceed the preset range at this time, the complete task summary information can be retained for evaluation.
[0081] When the amount of trajectory information exceeds the preset evaluation information amount, the execution trajectory needs to be compressed. In this case, a preset position can be determined first, and the execution trajectory can be divided into a pre-position and a post-position based on this position. The task summary information before the preset position is the part to be compressed, while the task summary information at and after the preset position is the part to be retained. For the part to be compressed, the task summary information corresponding to each subtask can be compressed separately to obtain compressed summary information corresponding to each task summary. For example, the main content that can characterize the execution status of the corresponding subtask can be extracted from the task summary information, and the original longer task summary information can be converted into shorter summary information, while retaining the subtask identifier corresponding to the task summary information to distinguish the execution status of different subtasks.
[0082] After obtaining the compressed summary information, it can be recombined with the original task summary information located at the preset position and subsequent positions according to the original execution order to form a compressed execution trajectory. In other words, compressing the execution trajectory does not simply delete the information at the beginning of the trajectory; rather, it compresses and retains the multiple task summary information at the beginning, while preserving the task summary information at the end as it was. For example, if the execution trajectory includes task summaries S1, S2, S3, S4, and S5, and the current preset position is before S3, then S1 and S2 can be compressed into compressed summaries S1' and S2' respectively, and combined with S3, S4, and S5 according to the original execution order to form S1', S2', S3, S4, and S5, thus obtaining the compressed execution trajectory.
[0083] After obtaining the compressed execution trajectory, its corresponding information content can be determined again, and the task result can be evaluated based on the task information and the compressed execution trajectory. If the information content of the compressed execution trajectory does not exceed the preset evaluation information content, the compressed execution trajectory can be provided to the preset evaluator for task result evaluation. At this time, the task summary information near the current execution position is still retained in its original form, while the task summary information of earlier executed tasks is represented as compressed summary information, thereby reducing the overall information content of the execution trajectory while retaining the latest task execution information.
[0084] If the compressed execution trajectory still exceeds the preset evaluation information amount, the preset position is further adjusted to include more task summary information located at the beginning of the execution trajectory within the compression range. For example, during the first compression, multiple task summary information near the current execution position can be retained, compressing only the earlier portions. If the compressed trajectory still exceeds the preset evaluation information amount, the preset position is adjusted towards the current execution position, including some previously uncompressed earlier task summary information within the compression range. Subsequently, the above compression process is executed again according to the adjusted preset position to obtain a new compressed execution trajectory, and its information amount is reassessed to ensure it meets the preset evaluation information amount. By gradually adjusting the preset position, the amount of compressed summary information can be gradually increased until the compressed execution trajectory does not exceed the preset evaluation information amount, or when the preset compression condition is met, compression stops.
[0085] For example, suppose a task executes 10 subtasks sequentially, generating 10 task summary messages S1 to S10. The preset evaluation information limit can only accommodate a portion of the execution trajectory after compression. Initially, S1 to S4 can be compressed into S1' to S4', while S5 to S10 are retained, resulting in a compressed execution trajectory. If this compressed execution trajectory still exceeds the preset evaluation information limit, the preset positions are further adjusted, compressing S1 to S5 and retaining S6 to S10; if it still exceeds the limit, the compression range is further expanded. Ultimately, compressed execution trajectories such as S1', S2', S3', S4', S5', S6, S7, S8, S9, and S10 are formed, and once their information content meets the preset evaluation information limit, they are provided to the evaluator for task result evaluation.
[0086] In this embodiment, by comparing the amount of information in the execution trajectory before the task result evaluation, and gradually expanding the compression range when the preset evaluation information amount is exceeded, the summary information of the earlier executed tasks is compressed, while the summary information of the tasks closer to the current execution position is retained. This allows the execution trajectory to retain newer task execution information while meeting the evaluation information amount limit, thereby improving the executability and information integrity of the task result evaluation process.
[0087] In some implementations, process interruptions or task failures may occur during task execution, leading to replanning. Therefore, it is necessary to continuously save checkpoints reflecting the current task execution status during subtask execution, and select the appropriate data recovery method based on the saved type identifier during recovery. This ensures that the corresponding execution status data can be restored when task execution is interrupted or when historical execution status needs to be retrieved again. For example, the following steps can be performed: After the current subtask in a set of multiple subtasks is completed, obtain the execution status data of the current subtask. The execution status data includes at least the currently active execution plan, the current execution position, the execution trajectory, the task results corresponding to the executed subtasks, and the number of replanning attempts; generate checkpoints based on the execution status data, and perform structured serialization of the checkpoints to obtain serialized checkpoint data. The serialized checkpoint data includes a type identifier used to identify the data type of the execution status data; and persistently store the serialized checkpoint data. Accordingly, to obtain execution status data, the following steps can be performed: read serialized checkpoint data and obtain type identifiers from the serialized checkpoint data; query pre-established type registration information based on the type identifiers; when type registration information corresponding to the type identifiers is found, deserialize the serialized checkpoint data based on the type registration information to restore the execution status data; when no type registration information corresponding to the type identifiers is found, parse the serialized checkpoint data based on a preset data structure to obtain the execution status data.
[0088] The execution state data is used to characterize the current execution state of the multi-agent task, including at least the currently active execution plan, current execution position, execution trajectory, task results corresponding to executed subtasks, and number of replanning attempts. The currently active execution plan is the execution plan currently being used to organize and schedule task execution; it can be the initially generated first execution plan, the second execution plan regenerated and activated after a task failure, or another regenerated execution plan. The current execution position indicates the task step or subtask position already executed in the current execution process, allowing for the determination of subsequent execution positions when task execution is resumed. A checkpoint is a snapshot of the execution state data at a specific moment, used to save the task execution state at that moment. Structured serialization is the process of converting the execution state data in the checkpoint into serialized data suitable for persistent storage according to a predetermined data organization method, and retaining the corresponding data type information in the serialized data. The type identifier is information used to identify the data type of the corresponding execution state data in the serialized checkpoint data, allowing for the determination of the corresponding data recovery method during recovery. Type registration information is the pre-established correspondence between data types and type identifiers, and may include recovery processing information corresponding to the corresponding data type. Deserialization is the process of converting persistently stored serialized checkpoint data back into execution state data that can be used for task execution.
[0089] In this embodiment, execution status data can be continuously generated during the execution of multiple subtasks. Specifically, after the current subtask is completed, relevant status information during the task execution process at the current moment can be obtained and combined to form the execution status data after the current subtask is executed. The currently active execution plan is used to determine the task execution arrangement adopted by the current task. The current execution position is used to determine the position the task has reached so far. The execution trajectory is used to record the task summary information corresponding to the multiple executed subtasks. The task results corresponding to the executed subtasks are used to save the execution results generated by the completed subtasks. The number of replanning attempts is used to record the number of replanning attempts that have occurred during the task execution process. Therefore, the generated execution status data can reflect the current task execution status from aspects such as execution plan, execution position, execution trajectory, task results, and replanning status.
[0090] For example, the first execution plan includes subtasks A, B, and C. When subtasks A and B have been completed, and subtask C has just been completed, the current execution status data can be the following: the currently active execution plan, the current execution position indicating the progress to subtask C, the execution trajectory from subtask A to subtask C, the corresponding task results from subtask A to subtask C, and the number of replanning operations that have occurred. If the task execution is subsequently interrupted, this execution status data can be used to determine the position the task had reached before the interruption and which subtasks had been completed.
[0091] After acquiring execution status data, checkpoints can be generated based on this data. Specifically, the currently active execution plan, current execution position, execution trajectory, task results corresponding to executed subtasks, and replanning counts acquired at the same time can be organized according to a predetermined data structure to form a checkpoint representing the task execution status at that moment. Subsequently, the execution status data in the checkpoints is structured and serialized, converting the execution status data originally used for processing during runtime into serialized checkpoint data suitable for persistent storage. During this serialization process, for data that needs to be saved, its corresponding data type can be determined simultaneously, and a type identifier for identifying that data type can be set in the corresponding serialized data.
[0092] For example, an execution plan can correspond to one type of execution plan data type, an execution trajectory can correspond to another type of data type, and task results can correspond to other data types. When serializing this data, a type identifier corresponding to the data type can be recorded in the serialized representation of each data type. This allows subsequent reading of checkpoint data to not only obtain the data itself but also determine the original data type based on the type identifier. After serialization, the obtained serialized checkpoint data can be persistently stored in a preset storage location, thus preserving the current execution state detached from the current task execution process.
[0093] When it is necessary to restore the task execution state, the serialized checkpoint data corresponding to the task can be read from a preset storage location, and the corresponding type identifier can be obtained from the serialized checkpoint data. Subsequently, the obtained type identifier can be used to query pre-established type registration information to determine the data type corresponding to the current serialized data and the corresponding data recovery method. If the type registration information contains registration information corresponding to the obtained type identifier, the corresponding data type can be determined based on this registration information, and the serialized checkpoint data can be deserialized according to the recovery method corresponding to that data type, thereby restoring the corresponding execution state data. For example, if the type identifier corresponds to an execution plan data type, the serialized data can be restored to execution plan data usable for subsequent task execution according to the recovery method corresponding to that data type.
[0094] In some cases, the current runtime environment may not have type registration information corresponding to the type identifier in the serialized checkpoint data. For example, the data type used when saving the checkpoint may change in subsequent runtime environments, or the current runtime environment may not have registered that data type. In this situation, instead of discarding the entire checkpoint, the serialized checkpoint data can be parsed based on a pre-defined data structure. For example, the fields and their corresponding data content can be obtained according to the pre-defined data organization structure of the checkpoint, and the execution status data can be obtained accordingly. In this way, even if it is impossible to recover the original data type based on the type identifier, the execution status information saved in the checkpoint can still be obtained using the pre-defined data structure.
[0095] Furthermore, after restoring the execution status data, the subsequent task execution process can be determined based on the currently effective execution plan and the current execution position stored therein. Task processing can then continue based on the saved execution trajectory, task results, and number of replanning attempts. For example, if a task is interrupted after executing subtask C and a corresponding checkpoint has been formed, restarting the task execution process allows reading the checkpoint and restoring the execution status data. This confirms that subtasks A through C have been completed, and subsequent unfinished subtasks can be processed based on the current execution position. When replanning is required during task execution, the execution trajectory and other execution status data stored in the checkpoint can be used to restore the task execution state required for replanning.
[0096] In this embodiment, after the current subtask is completed, execution state data containing the execution plan, execution location, execution trajectory, task result, and number of replanning attempts is saved, and this data is serialized and persisted in a structured manner with type identifiers. This enables the task execution process to form a recoverable state snapshot. During the recovery process, the corresponding data recovery method is determined by the type identifier and type registration information, and parsing is performed based on a preset data structure when the type cannot be matched. This improves the adaptability of execution state recovery, enabling the task to recover the corresponding execution state data when execution is interrupted or when it needs to reacquire historical execution states.
[0097] In some embodiments, to improve task execution efficiency, after a task fails, instead of simply re-executing all subtasks, checkpoints are first used to restore the existing execution state. Then, the reasons for failure and the execution trajectory are combined to distinguish between subtasks that need adjustment and those that can be retained, thereby forming a second execution plan. For example, generating a second execution plan based on task failure information and the execution trajectory includes: obtaining serialized checkpoint data corresponding to the first execution plan; obtaining the execution trajectory based on the serialized checkpoint data; determining, from multiple subtasks of the first execution plan, subtasks that are associated with the task failure information and those that can be retained but are not associated with the task failure information, based on the task failure information and the execution trajectory; and generating a second execution plan based on the task information, the subtasks to be adjusted, and the subtasks that can be retained.
[0098] First, when replanning based on task failure information, the serialized checkpoint data corresponding to the first execution plan is obtained. The serialized checkpoint data can be checkpoint data formed and persisted after one or more subtasks are executed during the execution of the first execution plan.
[0099] After obtaining the serialized checkpoint data, the checkpoints are deserialized or parsed based on the information recorded therein, such as the type identifier, execution plan, execution location, execution trajectory, and task results corresponding to the executed subtasks, thereby restoring the execution state corresponding to the first execution plan and obtaining the execution trajectory formed during the execution of the first execution plan.
[0100] Subsequently, task failure information is obtained. Task failure information may include reasons for failure where the task did not meet the predetermined requirements, such as the output of a subtask not meeting the input requirements of subsequent subtasks, a processing result not meeting the task objective, or the final result formed by multiple subtasks not meeting the task requirements.
[0101] Based on task failure information and the recovered execution trajectory, a correlation analysis is performed on multiple subtasks in the first execution plan. For example, the failure reasons reflected in the task failure information can be correlated with the task summary information, execution results, and execution process of each subtask to determine which subtask execution processes or results may have caused the task failure.
[0102] Subtasks associated with the cause of task failure are identified as subtasks requiring adjustment. For example, if the first execution plan includes subtasks A, B, and C, and the execution result of subtask C fails to meet the task requirements, and the execution trajectory indicates that subtask B is the cause of subtask C's failure, then subtasks B and / or C can be identified as subtasks requiring adjustment. When generating the second execution plan subsequently, the execution method, execution order, or corresponding agent for these subtasks can be redefined.
[0103] For subtasks whose failure is not related to the cause of task failure, if the subtask has been executed normally according to the first execution plan and its execution results can still be used to complete the task, it can be identified as a reusable subtask. For example, if subtask A has generated valid customer basic information and the cause of task failure is only related to the subsequent data analysis process, then subtask A can be identified as a reusable subtask and does not need to be executed again in the second execution plan.
[0104] After identifying the subtasks to be adjusted and those that can be retained, a second execution plan is generated based on the task information, the subtasks to be adjusted, and the subtasks that can be retained. The execution results of the subtasks that can be retained can be used as the existing task states during the execution of the second execution plan, and the corresponding task execution arrangements for the subtasks to be adjusted can be redefined. Therefore, the second execution plan does not necessarily have to re-execute all subtasks in the first execution plan; instead, it can adjust the parts that caused the task failure while retaining the still valid task execution portions.
[0105] For example, for the task of "generating a customer sales plan," the first execution plan sequentially includes: subtask A "obtaining customer information," subtask B "analyzing customer historical orders," and subtask C "generating a sales plan." If the evaluation results indicate that the sales plan contains errors, and the execution trajectory determines that the error originates from subtask B's analysis of customer historical orders, then subtasks B and C can be identified as subtasks to be adjusted, while subtask A, which has been correctly completed, can be identified as a retainable subtask. Subsequently, a second execution plan is regenerated based on the customer information, the subtasks to be adjusted, and the retainable subtasks. This allows the second execution plan to utilize the customer information already obtained from subtask A, re-executing or adjusting only the task steps related to order analysis and sales plan generation.
[0106] Optionally, when the execution result of a subtask is related to the cause of failure, but some of its results are still valid, the subtask can be adjusted in the second execution plan instead of simply deleting it, thereby further utilizing the valid execution information already generated by the first execution plan.
[0107] In this embodiment, by restoring the execution trajectory corresponding to the first execution plan from the checkpoint after a task failure, and by combining the task failure information to distinguish between subtasks to be adjusted and subtasks that can be retained, the replanning process can use the existing execution state to identify the execution part involved in the task failure, thereby reducing the repetitive processing in the task replanning process and improving the recovery and continuous execution efficiency after multi-agent task failure.
[0108] In multi-agent task execution, each subtask typically produces relatively complete execution results. As the number of subtasks increases, providing all complete execution results directly as execution trajector would continuously increase the amount of information required for evaluation, impacting task evaluation efficiency. However, saving only compressed task summaries to reduce processing load could lead to the loss of complete execution results, resulting in a lack of original execution information when generating task reports and reducing the traceability of the task execution process. Therefore, the following steps can be performed to improve task execution efficiency while ensuring the correctness of task execution results: Execute multiple subtasks in the first execution plan according to dependencies, obtaining the execution results corresponding to each subtask; when obtaining the task results corresponding to the task information, derive the task result based on the execution results corresponding to each subtask.
[0109] Specifically, firstly, the execution order is determined according to the dependencies between multiple subtasks in the first execution plan, and the multiple subtasks are executed sequentially. For the current subtask, the corresponding context information can be determined from the already executed subtasks based on the context mode corresponding to the subtask, and the context information and the subtask information corresponding to the current subtask are sent to the corresponding agent.
[0110] After the current subtask is completed, the execution result corresponding to that subtask is obtained. The execution result can retain relatively complete task execution information, such as structured fields output by the agent, text content, and other information that can be used to generate results for subsequent tasks.
[0111] While obtaining the execution results, task summary information can be generated based on the results and the corresponding execution process. For example, key information that can characterize the current subtask execution status can be extracted from the execution results to form a summary with a small amount of information, and the task summary information can be written into the summary record channel according to the execution order of multiple subtasks.
[0112] At the same time, the execution result corresponding to the current subtask is written to the full record channel. Thus, for the same subtask, two different information records can be formed: one is a task summary information with less information, and the other is a relatively complete execution result.
[0113] For example, for subtask A, after the agent executes it, it obtains the complete execution result step_output_A, which can be used to form summary_A. Summary_A retains only the key execution information needed for subsequent evaluation, while step_output_A is saved in its entirety. When executing subtask B, summary_B and step_output_B are similarly formed. And so on, we can obtain:
[0114] Summary recording channels: summary_A→summary_B→...→summary_N;
[0115] Full recording channels: step_output_A→step_output_B→...→step_output_N.
[0116] The two recording channels correspond to the same task execution process, but the granularity of the information saved is different.
[0117] When evaluating task results, multiple task summary information can be read from the summary recording channel, and an execution trajectory can be formed based on the task information and multiple task summary information. This execution trajectory is then provided to the evaluation process. Since the evaluation process mainly processes task summary information with relatively small amounts of information, it is not necessary to input the complete execution results of each subtask into the evaluation process.
[0118] On the other hand, when the task result corresponding to the task information is obtained, the execution result corresponding to each subtask can be read from the full record channel, and the multiple execution results can be combined, summarized or further processed according to the dependency relationship between multiple subtasks and the correlation relationship between each execution result, so as to form the task result corresponding to the task information.
[0119] For example, for the task of "generating customer sales plans", the first execution plan may include: Subtask A: Obtain basic customer information; Subtask B: Analyze customer historical orders; Subtask C: Generate sales plans based on customer information and order analysis results.
[0120] After executing subtask A, simultaneously save a task summary of customer information and the complete execution result. After executing subtask B, simultaneously save a task summary of order analysis and the complete execution result. After executing subtask C, simultaneously save a task summary of the sales plan and the complete execution result.
[0121] When evaluating a task, only the task summary information corresponding to the three sub-tasks can be used to determine whether the entire task has met the expected requirements. However, when generating the final task results or forming a task report, the complete execution results corresponding to the three sub-tasks can be read to retain complete content such as customer information, order analysis process, and sales plans.
[0122] Furthermore, after the task assessment determines that the task has failed, the summary recording channel can also be used to provide the execution trajectory to the replanning process, enabling the replanning process to quickly understand the execution status of each subtask with a small amount of information. When it is necessary to further trace the specific reasons for failure, the relevant subtasks can be identified based on the summary recording channel, and then the complete execution results corresponding to the subtasks can be obtained from the full recording channel for analysis.
[0123] Therefore, the two channels do not simply save the same data repeatedly, but rather create two types of records with different information granularities for the same execution process, each serving different subsequent processing stages. The summary recording channel emphasizes rapid analysis and evaluation of the execution process, while the full recording channel emphasizes the complete preservation of execution results, task result generation, and execution traceability.
[0124] For example, when the output formats of agents are inconsistent, the original execution output can first undergo format pre-validation and necessary format repair, and then field completion can be performed based on the expected output information of the corresponding subtask to obtain a structured execution result. Subsequently, on the one hand, task summary information can be generated based on this structured execution result and written to the summary recording channel; on the other hand, this structured execution result can be retained as a full record and written to the full recording channel. Thus, what is stored in the full recording channel is not necessarily the unprocessed original output of the agent, but can be the structured execution result after unified processing. Therefore, heterogeneous outputs generated by different agents can be uniformly processed and used for subsequent task result generation, report generation, and execution traceability.
[0125] like Figure 3 As shown, during the execution of a multi-agent task, the executor or sub-task agent generates a corresponding execution output, step_output, after executing the current sub-task. Two data processing and recording channels are simultaneously established for the execution output.
[0126] One of these channels is the summary recording channel (i.e., the EXECUTION_TRACE channel). The execution output undergoes summary compression (e.g., using an LLM model) to obtain the corresponding task summary information `previous_summary_i`, which is then written into the execution trajectory record according to the execution order of the subtasks. The summary recording channel only retains the compressed task summary information, and its information content is less than the corresponding complete execution output. The subsequent evaluator can obtain the task summary information corresponding to each subtask from the summary recording channel and form an execution trajectory based on the task summary information to evaluate the task execution results (through a post-supervision node). For example, the evaluator can determine whether the current task meets the predetermined task requirements based on the execution trajectory and task information, and output the corresponding task success or failure information.
[0127] The other channel is the full record channel (i.e., the TASK_REPORT_RECORDS channel). Execution output is saved directly without digest compression, forming a full execution result record for each subtask according to the execution order. The report generator can obtain the complete execution results for each subtask from the full record channel, which can be used to generate task reports, task results, or to audit and trace the execution process.
[0128] Therefore, during the execution of the same multi-agent task, the execution output for the same subtask can be divided into summary information and full execution results, and recorded along different data channels.
[0129] In this embodiment, by maintaining a summary recording channel and a full recording channel in parallel during the execution of a multi-agent task, task summary information and complete execution results are stored separately at different information granularities and used for task evaluation, task result generation, report generation, and execution traceability, respectively. On the one hand, the evaluation process does not need to repeatedly process a large number of complete execution results, thereby reducing the information processing burden of the evaluation process. On the other hand, the complete execution results are still retained, enabling the final task result to utilize the complete sub-task execution results and to achieve traceability of the specific execution process.
[0130] In one exemplary embodiment, such as Figures 4 to 5 As shown, a multi-agent task execution system is proposed, which includes a user interface, a planner node, an executor node, a step broker node, an agent pool, a post-supervision node, an evaluator node, and a storage layer for saving execution state and execution trajectory.
[0131] The user inputs task information to be executed through a user interface. The Planner node obtains the task information and the capability information of multiple agents in the agent pool, and generates a structured execution plan (ExecutionPlan) based on the task and capability information. The execution plan includes multiple subtasks with dependencies, and a corresponding context mode can be configured for each subtask.
[0132] After the planning node generates the execution plan, it sends the execution plan to the scheduling node (Executor). The scheduling node determines the execution order of the subtasks based on the dependencies between them in the execution plan and distributes the subtasks to the corresponding agents through the step broker node (StepBroker). The step broker node (StepBroker) determines the context information required for the current subtask from the already executed subtasks based on the context mode of the current subtask and sends the context information and the corresponding subtask information to the corresponding agent.
[0133] The agent pool comprises multiple subtask agents capable of executing different types of subtasks. Upon receiving a subtask, each agent executes it and generates corresponding execution output. This output can be further processed into task summary information and structured execution results, which are written to different recording channels in the storage layer. The summary information is used to form the execution trajectory and is subsequently used by the evaluator to assess the task results; the full or structured execution results are used for task result generation, report generation, and tracing the execution process.
[0134] The storage layer can also be used to save checkpoints formed during task execution, recording the execution status such as the currently active execution plan, current execution position, execution trajectory, and task results corresponding to executed subtasks. If the task execution is interrupted, or if the task evaluation result indicates that the current execution plan does not meet the task requirements, the corresponding checkpoints can be read from the storage layer to restore the task execution status.
[0135] After the execution of multiple subtasks corresponding to the first execution plan is completed, the post-execution supervisory node, Evaluator, reads the execution trajectory and evaluates the task execution results in conjunction with the task information input by the user. When the evaluation result indicates that the task execution is successful, the task result can be returned to the user; when the evaluation result indicates that the task execution fails, the task failure information and related execution trajectory are fed back to the planning node, Planner. The planning node regenerates the execution plan based on the obtained execution information, and the scheduling node, Executor, continues to execute it, thus forming a closed loop of task execution.
[0136] like Figure 5As shown, firstly, the user inputs task information in natural language form to the Planner node (i.e., S1: inputting natural language instructions). Based on the task information and the capability information of multiple agents, the Planner node invokes the task planning process to generate a structured ExecutionPlan (i.e., S2: calling the LLM model to process the task information and the capability information of multiple agents to obtain the structured ExecutionPlan), and returns the ExecutionPlan to the Executor node. After obtaining the ExecutionPlan, it can be written to Redis (i.e., S3: writing a checkpoint). After obtaining the ExecutionPlan, the Executor node can first read the corresponding checkpoint information to determine whether the current task has a recoverable execution state.
[0137] During the normal execution of the first execution plan, the Executor node processes multiple Steps (i.e., multiple subtasks) sequentially according to the dependencies between the subtasks. For each Step, the Executor node constructs context information based on the context_mode corresponding to that Step through the Step Broker inter-step mediator node (i.e., S41: retrieve context_mode and construct context), and sends the corresponding sub_task and the determined context information to the corresponding Agent (i.e., S42: distribute sub_task). After the Agent executes the subtask, it returns step_output (i.e., S43: return step_output).
[0138] After obtaining the step_output, the step broker node or the scheduling node Executor processes the execution result accordingly and writes the information generated during task execution into the storage layer. Specifically, the task summary information after digest processing can be written into the execution trajectory recording channel, while the complete or structured execution result can be written into the full recording channel, thus forming the aforementioned dual-channel trajectory recording structure (i.e., S44: dual-channel write to Redis).
[0139] Once all subtasks in the first execution plan have been completed, the Executor node sends a task evaluation request to the Evaluator node (S5: Execution Complete, Request Evaluation). The Evaluator node reads the task summary information from the execution trajectory (i.e., reads the EXECUTIONTRACE summary) from the storage layer and evaluates the task result in conjunction with the task information input by the user. When the execution trajectory information is large, it can be compressed according to a preset evaluation information amount before evaluation is performed (S6: Hierarchical Trajectory Truncation + LLM Evaluation).
[0140] When the post-monitoring node Evaluator outputs task success information, for example Figure 5 When the PASS result is shown, the scheduling node Executor can form a task result based on the execution result of each subtask and return the final business report or task result to the user (i.e., S7: return the final business report).
[0141] When the post-monitoring node Evaluator outputs task failure information, for example Figure 5 When a FAIL result is displayed, the replanning process begins. The replanning count is incremented by 1. If the current replanning count reaches the preset replanning count, no further planning is performed. If the current replanning count has not reached the preset replanning count, the following steps can continue: At this point, the task failure information and execution trajectory can be fed back to the Planner node, which then combines the existing execution information to regenerate a new execution plan. If necessary, the checkpoints corresponding to the first execution plan can be read and restored first, thereby restoring the task execution status and trajectory. Based on the reason for the task failure, the subtasks that need adjustment and those that can be retained are determined, and then a second execution plan is generated.
[0142] After generating the second execution plan, the scheduling node Executor continues to call the corresponding agents to execute the corresponding subtasks according to the new execution plan, and forms the task result based on the execution results obtained from the re-execution. Thus, the entire task processing process forms a closed-loop process of "task input → task planning → subtask scheduling and execution → execution trajectory recording → task evaluation → output if successful / re-planning if unsuccessful → re-execution".
[0143] If, before entering the "Generate Second Execution Plan" step, the current number of replanning iterations is found to be greater than or equal to the preset number of replanning iterations (i.e., REPLAN_COUNT ≥ REPLAN_MAX (default 3 times), a circuit breaker is triggered: the replanning loop is terminated, the most recent evaluation result and the existing subtask results are returned to the user, and an alarm log is generated. This circuit breaker mechanism avoids the infinite loop caused by the large model illusion at the algorithmic level.
[0144] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0145] Based on the same inventive concept, this application also provides a multi-agent task execution apparatus for implementing the multi-agent task execution method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the multi-agent task execution apparatus provided below can be found in the limitations of the multi-agent task execution method described above, and will not be repeated here.
[0146] In one exemplary embodiment, such as Figure 6 As shown, a multi-agent task execution device 600 is provided, including: an acquisition module 601, a first execution module 602, an evaluation module 603, a plan generation module 604, and a second execution module 605, wherein:
[0147] The acquisition module 601 is used to acquire task information and capability information of multiple intelligent agents, and generate a first execution plan based on the task information and capability information; the first execution plan includes multiple sub-tasks with dependencies.
[0148] The first execution module 602 is used to execute multiple sub-tasks in the first execution plan according to the dependencies, and obtain the execution trajectory corresponding to the multiple sub-tasks; the execution trajectory includes task summary information corresponding to the multiple sub-tasks; the task summary information is used to characterize the execution result and / or execution process summary information of the corresponding sub-task.
[0149] The evaluation module 603 is used to evaluate the task results based on task information and execution trajectory, and obtain evaluation information.
[0150] The plan generation module 604 is used to generate a second execution plan based on the task failure information and the execution trajectory if the evaluation information includes task failure information.
[0151] The second execution module 605 is used to call the corresponding intelligent agent to execute the corresponding subtask according to the second execution plan, and obtain the task result corresponding to the task information.
[0152] In some embodiments, in executing multiple subtasks in a first execution plan according to dependencies, the first execution module 602 is specifically configured to: determine context information related to the subtask based on the context mode corresponding to the subtask and the task summary information corresponding to the executed subtask in the first execution plan; send the context information and the subtask information corresponding to the subtask to the agent corresponding to the subtask to execute the subtask; wherein, the context mode includes at least a first mode that rewrites the summary of the execution information corresponding to the executed subtask, a second mode that references the structured information corresponding to the executed subtask, and a third mode that does not inject the context information corresponding to the executed subtask.
[0153] In some embodiments, in terms of executing subtasks, the first execution module 602 is specifically configured to: if the context mode corresponding to the current subtask is a first mode, obtain the execution output and task summary information corresponding to the previously executed subtask, rewrite the execution output and task summary information to obtain new task summary information, and send the new task summary information and the subtask information corresponding to the subtask to the corresponding intelligent agent; if the context mode corresponding to the current subtask is a second mode, obtain the structured reference information corresponding to the previously executed subtasks on which the current subtask depends, and send the structured reference information and the subtask information corresponding to the current subtask to the corresponding intelligent agent; if the context mode corresponding to the current subtask is a third mode, send the subtask information corresponding to the current subtask to the corresponding intelligent agent.
[0154] In some embodiments, in evaluating task results based on task information and execution trajectory, the evaluation module 603 is specifically used to: obtain the amount of trajectory information corresponding to the execution trajectory and compare the amount of trajectory information with a preset evaluation amount; when the amount of trajectory information does not exceed the preset evaluation amount, evaluate the task results based on a preset evaluator on the execution trajectory and task information; when the amount of trajectory information exceeds the preset evaluation amount, perform the following compression steps based on a preset position: compress the task summary information corresponding to each subtask whose execution position is before the preset position to obtain compressed summary information; obtain a compressed execution trajectory based on the task summary information of each execution position located at and after the preset position in the execution trajectory and each compressed summary information; evaluate the task results based on the task information and the compressed execution trajectory; if the compressed execution trajectory still exceeds the preset evaluation amount, adjust the preset position to increase the amount of compressed summary information; perform the above compression steps based on the adjusted preset position to obtain an adjusted compressed execution trajectory; repeat the above steps until the adjusted compressed execution trajectory does not exceed the preset evaluation amount or reaches the preset compression condition.
[0155] In some embodiments, the multi-agent task execution device includes a storage module, configured to: after the current subtask in a plurality of subtasks has been completed, acquire execution status data of the current subtask, the execution status data including at least the currently effective execution plan, the current execution position, the execution trajectory, the task results corresponding to the executed subtasks, and the number of replanning attempts; generate checkpoints based on the execution status data, and perform structured serialization of the checkpoints to obtain serialized checkpoint data, wherein the serialized checkpoint data includes a type identifier for identifying the data type of the execution status data; and persistently store the serialized checkpoint data.
[0156] In some embodiments, the multi-agent task execution device includes a reading module, configured to: read serialized checkpoint data and obtain a type identifier from the serialized checkpoint data; query pre-established type registration information based on the type identifier; when type registration information corresponding to the type identifier is found, deserialize the serialized checkpoint data based on the type registration information to restore execution state data; when type registration information corresponding to the type identifier is not found, parse the serialized checkpoint data based on a preset data structure to obtain execution state data.
[0157] In some embodiments, in generating a second execution plan based on task failure information and execution trajectory, the plan generation module 604 is specifically used to: obtain serialized checkpoint data corresponding to the first execution plan, and obtain the execution trajectory based on the serialized checkpoint data; based on task failure information and execution trajectory, determine from multiple subtasks of the first execution plan the subtasks that are associated with the task failure information and the subtasks that are not associated with the task failure information that can be retained; and generate a second execution plan based on the task information, the subtasks that are to be adjusted, and the subtasks that can be retained.
[0158] In some embodiments, the multi-agent task execution device includes a result determination module, configured to: execute multiple sub-tasks in a first execution plan according to dependencies, and obtain the execution results corresponding to each sub-task; and, when obtaining the task results corresponding to the task information, obtain the task result based on the execution results corresponding to each sub-task.
[0159] Each module in the aforementioned multi-agent task execution device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0160] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-agent task execution method.
[0161] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a multi-agent task execution method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0162] Those skilled in the art will understand that Figure 7 The structure shown in Figure 8 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0163] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps described in the above method embodiments.
[0164] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps described in the above method embodiments.
[0165] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps described in the above method embodiments.
[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0167] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A multi-agent task execution method, characterized in that, The method includes: The system acquires task information and capability information of multiple intelligent agents, and generates a first execution plan based on the task information and capability information; the first execution plan includes multiple sub-tasks with dependencies. Execute multiple subtasks in the first execution plan according to the dependencies to obtain execution trajectories corresponding to the multiple subtasks; the execution trajectory includes task summary information corresponding to the multiple subtasks; the task summary information is used to characterize the execution result and / or execution process summary information of the corresponding subtask; Based on the task information and the execution trajectory, the task results are evaluated to obtain evaluation information; If the evaluation information includes task failure information, a second execution plan is generated based on the task failure information and the execution trajectory; According to the second execution plan, the corresponding intelligent agent is invoked to execute the corresponding sub-task, and the task result corresponding to the task information is obtained.
2. The method according to claim 1, characterized in that, The first execution plan includes context modes corresponding to each subtask, and executing multiple subtasks in the first execution plan according to the dependencies includes: Based on the context mode corresponding to the subtask and the task summary information corresponding to the executed subtask in the first execution plan, the context information related to the subtask is determined; The context information and the subtask information corresponding to the subtask are sent to the intelligent agent corresponding to the subtask to execute the subtask; The context mode includes at least a first mode that rewrites the summary of the execution information corresponding to the executed subtask, a second mode that references the structured information corresponding to the executed subtask, and a third mode that does not inject the context information corresponding to the executed subtask.
3. The method according to claim 2, characterized in that, The execution of the subtask includes: If the context mode corresponding to the current subtask is the first mode, obtain the execution output and task summary information corresponding to the previously executed subtask, rewrite the execution output and task summary information to obtain new task summary information, and send the new task summary information and the subtask information corresponding to the subtask to the corresponding intelligent agent. If the context mode corresponding to the current subtask is the second mode, obtain the structured reference information corresponding to the executed subtasks that the current subtask depends on, and send the structured reference information and the subtask information corresponding to the current subtask to the corresponding intelligent agent; If the context mode corresponding to the current subtask is the third mode, the subtask information corresponding to the current subtask is sent to the corresponding intelligent agent.
4. The method according to claim 1, characterized in that, The task result evaluation based on the task information and the execution trajectory includes: Obtain the amount of trajectory information corresponding to the execution trajectory, and compare the amount of trajectory information with the preset evaluation information. When the amount of trajectory information does not exceed the preset evaluation information amount, the task result is evaluated based on the preset evaluator on the execution trajectory and the task information. When the amount of trajectory information exceeds the preset evaluation information amount, the following compression steps are performed based on the preset position: the task summary information corresponding to each subtask whose execution position is before the preset position is compressed to obtain compressed summary information; a compressed execution trajectory is obtained based on the task summary information of each execution position located at and after the preset position in the execution trajectory and each of the compressed summary information; and the task result is evaluated based on the task information and the compressed execution trajectory. If the compression execution trajectory still exceeds the preset evaluation information amount, the preset position is adjusted to increase the amount of compressed summary information; the above compression steps are performed based on the adjusted preset position to obtain the adjusted compression execution trajectory; the above steps are repeated until the adjusted compression execution trajectory does not exceed the preset evaluation information amount or reaches the preset compression condition.
5. The method according to claim 1, characterized in that, The method further includes: After the current subtask in the plurality of subtasks is completed, the execution status data of the current subtask is obtained. The execution status data includes at least the currently effective execution plan, the current execution position, the execution trajectory, the task results corresponding to the executed subtasks, and the number of replanning attempts. Checkpoints are generated based on the execution status data, and the checkpoints are structured and serialized to obtain serialized checkpoint data, wherein the serialized checkpoint data includes a type identifier for identifying the data type of the execution status data; The serialized checkpoint data is persistently stored; The method further includes: Read the serialized checkpoint data and obtain the type identifier from the serialized checkpoint data; Based on the type identifier, query the pre-established type registration information; When the type registration information corresponding to the type identifier is found, the serialized checkpoint data is deserialized based on the type registration information to restore the execution state data; If no type registration information corresponding to the type identifier is found, the serialization checkpoint data is parsed based on a preset data structure to obtain the execution status data.
6. The method according to claim 1, characterized in that, The step of generating a second execution plan based on the task failure information and the execution trajectory includes: Obtain the serialized checkpoint data corresponding to the first execution plan, and obtain the execution trajectory based on the serialized checkpoint data; Based on the task failure information and the execution trajectory, determine from the multiple subtasks of the first execution plan the subtasks to be adjusted that are associated with the task failure information, and the subtasks that can be retained that are not associated with the task failure information; Based on the task information, the subtasks to be adjusted, and the subtasks that can be retained, a second execution plan is generated.
7. The method according to claim 1, characterized in that, The method further includes: Execute multiple sub-tasks in the first execution plan according to the aforementioned dependencies, and obtain the execution results corresponding to each sub-task; When the task result corresponding to the task information is obtained, the task result is obtained based on the execution result corresponding to each of the sub-tasks.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
