Task processing method and device, computer equipment, storage medium and program product

By dynamically evaluating and replanning the subtask plans during the execution of intelligent agent tasks, the problem of inaccurate task execution caused by unreasonable subtask settings is solved, and more efficient and reliable task processing is achieved.

CN121785733APending Publication Date: 2026-04-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, the final execution result of a query task may be inaccurate due to unreasonable subtask settings when an intelligent agent performs a task.

Method used

By acquiring the tasks to be processed, initial task planning is performed, sub-task plans are executed sequentially and quality assessments are conducted. When the assessment results meet the preset replanning conditions, the current sub-task plan is replanned, the task plan is updated, and execution continues until the task processing results are obtained.

Benefits of technology

It improves the accuracy and efficiency of task execution results, enhances the adaptability and robustness of task processing, and saves resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785733A_ABST
    Figure CN121785733A_ABST
Patent Text Reader

Abstract

The invention relates to a task processing method and device, computer equipment, a storage medium and a program product. The method comprises the steps that a to-be-processed task is obtained, task planning is conducted based on the to-be-processed task, and an initial task plan is obtained and comprises a plurality of sub-task plans; sequentially executing the plurality of sub-task plans, and performing quality evaluation on an execution result obtained by the current sub-task plan executed in the plurality of sub-task plans to obtain an evaluation result corresponding to the current sub-task plan; when the evaluation result meets a preset re-planning condition, re-planning the current sub-task plan based on the evaluation result to obtain an updated sub-task plan; and updating the initial task plan according to the updating sub-task plan, and continuing execution from the updating sub-task plan in the updated task plan until a task processing result corresponding to the to-be-processed task is obtained. By adopting the method, the task execution quality can be improved, and a high-quality task quality result can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of artificial intelligence technology, it is possible to obtain the execution results of intelligent agents through interaction. Currently, when intelligent agents perform tasks, they typically decompose complex query tasks input by users into multiple sub-tasks for execution. For example, multiple sub-tasks can be generated through LLM Planning (Large Language Model Planning), and then each sub-task can be executed sequentially to finally obtain the task execution result.

[0003] Currently, if a subtask is not set up properly, such as if the requirements of the subtask are not clear enough, it will usually directly lead to inaccurate final execution results of the entire query task. Summary of the Invention

[0004] Therefore, it is necessary to provide a task processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of task execution results in response to the above-mentioned technical problems.

[0005] On one hand, this application provides a task processing method. The method includes:

[0006] Obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0007] The multiple subtask plans are executed sequentially, and the execution results of the current subtask plan are evaluated to obtain the evaluation result corresponding to the current subtask plan.

[0008] When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan;

[0009] The initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0010] On the other hand, this application also provides a task processing apparatus. The apparatus includes:

[0011] The initial planning module is used to acquire tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0012] The evaluation module is used to execute the plurality of subtask plans sequentially, evaluate the quality of the execution results obtained from the current subtask plan among the plurality of subtask plans, and obtain the evaluation result corresponding to the current subtask plan;

[0013] The replanning module is used to replan the current subtask plan based on the evaluation results when the evaluation results meet the preset replanning conditions, so as to obtain an updated subtask plan.

[0014] The update module is used to update the initial task plan according to the update subtask plan, and continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0015] In one embodiment, the update module is configured to replace the current subtask plan in the initial task plan according to the updated subtask plan to obtain an updated task plan; and continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0016] In one embodiment, the update module is configured to: determine the subtask plan to be adjusted in the initial task plan according to the updated subtask plan; replan the subtask plan to be adjusted according to the updated subtask plan to obtain a replanned subtask plan corresponding to the subtask plan to be adjusted; replace the current subtask plan according to the updated subtask plan, and replace the subtask plan to be adjusted according to the replanned subtask plan to obtain an updated task plan; continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0017] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions, and the preset replanning conditions include dimensional replanning conditions of at least two dimensions; the evaluation module is used to evaluate the execution results of the current subtask plan executed in the plurality of subtask plans in at least two dimensions to obtain dimensional evaluation results of at least two dimensions.

[0018] The replanning module is used to replan the current subtask plan based on the dimension evaluation results when at least one dimension evaluation result satisfies the dimension replanning condition of the same dimension, so as to obtain an updated subtask plan.

[0019] In one embodiment, the replanning module is configured to generate dimension planning prompt information for dimension evaluation results that meet the dimension replanning conditions when at least one dimension evaluation result satisfies the same dimension replanning condition; generate an evaluation report based on the dimension evaluation result and the corresponding dimension planning prompt information; and replan the current subtask plan based on the evaluation report to obtain an updated subtask plan.

[0020] In one embodiment, the replanning module is configured to determine the context of the current subtask plan in the initial task plan; obtain the execution results of the subtask plans that have been executed in the initial task plan; and perform replanning based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0021] In one embodiment, the replanning module is configured to: generate an evaluation report based on the evaluation result when the evaluation result meets preset replanning conditions; determine the context of the current subtask plan in the initial task plan; obtain the execution results of the subtask plans that have been executed in the initial task plan; and perform replanning based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0022] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions; the evaluation module is used to evaluate the execution result of the current subtask plan executed in the plurality of subtask plans in at least two dimensions to obtain dimensional evaluation results of at least two dimensions; and to perform a comprehensive evaluation based on the dimensional evaluation results of at least two dimensions to obtain the evaluation result corresponding to the current subtask plan.

[0023] In one embodiment, the at least two dimensions include at least two of the confidence dimension, completeness dimension, or relevance dimension of the execution result; the evaluation results of the at least two dimensions include at least two of the confidence score, completeness score, or relevance score; and the dimension replanning conditions include at least two of the preset confidence score, preset completeness score, or preset relevance score.

[0024] In one embodiment, the initial planning module is used to call a planning agent, and the called planning agent performs task planning based on the task to be processed to obtain an initial task plan;

[0025] The evaluation module is used to call the evaluation agent to evaluate the quality of the execution results obtained from the current sub-task plan executed in the plurality of sub-task plans;

[0026] The replanning module is used to invoke a replanning agent when the evaluation result meets the preset replanning conditions. The invoked replanning agent then replans the current subtask plan based on the evaluation result to obtain an updated subtask plan.

[0027] In one embodiment, the replanning module is configured to select an execution agent from a preset agent pool that matches the intent of the updated subtask plan; establish a calling relationship between the updated subtask plan and the matching execution agent; and the calling relationship is used to instruct the matching execution agent to execute the updated subtask plan.

[0028] In one embodiment, the update module is configured to, when the evaluation result does not meet the preset replanning condition and the current subtask plan is not the last subtask plan in the initial task plan, determine the next subtask plan of the current subtask plan in the initial task plan; update the next subtask plan to the current subtask plan, and proceed to the step of executing the current subtask plan until the task processing result corresponding to the task to be processed is obtained.

[0029] In one embodiment, the update module is configured to generate a task processing result corresponding to the task to be processed based on the execution results of each of the sub-task plans when the evaluation result does not meet the preset replanning condition and the current sub-task plan is the last sub-task plan in the initial task plan.

[0030] In one embodiment, the task to be processed includes a question-and-answer task, and the task processing result includes response information for the question-and-answer task; the initial planning module is used to obtain a query request, perform intent recognition on the query request, and obtain an intent recognition result; generate a question-and-answer task based on the intent recognition result, and perform initial planning based on the question-and-answer task to obtain an initial task plan including multiple sub-task plans and the execution order of the multiple sub-task plans.

[0031] On the other hand, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0032] Obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0033] The multiple subtask plans are executed sequentially, and the execution results of the current subtask plan are evaluated to obtain the evaluation result corresponding to the current subtask plan.

[0034] When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan;

[0035] The initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0036] On the other hand, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0037] Obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0038] The multiple subtask plans are executed sequentially, and the execution results of the current subtask plan are evaluated to obtain the evaluation result corresponding to the current subtask plan.

[0039] When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan;

[0040] The initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0041] On the other hand, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0042] Obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0043] The multiple subtask plans are executed sequentially, and the execution results of the current subtask plan are evaluated to obtain the evaluation result corresponding to the current subtask plan.

[0044] When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan;

[0045] The initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0046] The aforementioned task processing method, apparatus, computer equipment, storage medium, and computer program product perform task planning based on the acquired task to be processed, obtaining an initial task plan. This initial task plan includes multiple sub-task plans, which are executed sequentially. The execution results of the currently executed sub-task plans are evaluated to obtain an evaluation result corresponding to the current sub-task plan. When the evaluation result meets preset replanning conditions, the current sub-task plan is replanned based on the evaluation result to obtain an updated sub-task plan. The initial task plan is then updated according to the updated sub-task plan, and execution continues from the updated sub-task plan until the task processing result corresponding to the task to be processed is obtained. In other words, by evaluating the quality of the execution result when the current sub-task plan of the task to be processed is executed, the rationality of the current sub-task plan is reflected based on the quality of the execution result. Then, unreasonable sub-task plans are replanned according to the evaluation result, and finally, task execution continues from the updated sub-task plan obtained from the replanning. This avoids the problem of inaccurate final execution results of the task to be processed due to unreasonable sub-task plan settings, thereby improving the quality of sub-task plans and execution results. Furthermore, through dynamic evaluation and real-time replanning mechanisms, the adaptability and robustness of handling complex tasks are significantly improved. Iterative optimization can also ensure the quality and reliability of task processing results. By updating and continuing the execution of specific subtask plans that meet the criteria based on the quality evaluation results of the subtask plans, it is not necessary to re-plan the global tasks to be processed or to repeatedly execute previously executed subtask plans. This significantly improves task execution efficiency and saves resources consumed during execution. Attached Figure Description

[0047] Figure 1 This is an application environment diagram of a task processing method in one embodiment;

[0048] Figure 2 This is a flowchart illustrating a task processing method in one embodiment;

[0049] Figure 3 This is a flowchart illustrating a multi-dimensional quality assessment of the execution results of the current subtask plan in one embodiment.

[0050] Figure 4 This is a schematic diagram illustrating the principle of replanning in another embodiment;

[0051] Figure 5 This is a flowchart illustrating the task processing method in another embodiment;

[0052] Figure 6 Here is an overall system architecture diagram of the task processing method in another embodiment;

[0053] Figure 7A This is a schematic diagram of a query page in another embodiment;

[0054] Figure 7B This is a schematic diagram of a page showing the reflection task in one embodiment;

[0055] Figure 8 This is a schematic diagram of a page showing the reflection steps in another embodiment;

[0056] Figure 9 This is a schematic diagram of a query page in another embodiment;

[0057] Figure 10 This is a schematic diagram of the front-end page of an artificial intelligence interaction platform in another embodiment;

[0058] Figure 11 This is a structural block diagram of a task processing device in one embodiment;

[0059] Figure 12 This is an internal structural diagram of a computer device in one embodiment;

[0060] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0061] 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.

[0062] First, the key terms used in this application are explained as follows:

[0063] LLM (Large Language Model): A large-scale artificial intelligence model that can understand and generate human language, and is the core of driving agents to plan tasks.

[0064] An agent is a software entity capable of perceiving its environment, reasoning, planning, and invoking tools to perform actions to achieve a goal. In this application, an agent refers to a software entity in an LLM-based task planning system that can be driven by an LLM model.

[0065] Tools are program interfaces or APIs (Application Programming Interfaces) that can be invoked on demand by intelligent agents, have well-defined inputs and outputs, and perform specific functions. The intelligent agent is the decision-maker that invokes the tools, while the tools are the resources or means used by the intelligent agent to complete its tasks.

[0066] ReAct (Reason+Act): A mainstream Large Language Model (LLM) proxy framework paradigm. Its core idea is to decompose the task-solving process into alternating reasoning and action steps. In each step, the LLM generates a thought chain based on the current context and determines the next action to be executed. After executing the action, the system returns the result to the LLM for the next step of reasoning.

[0067] Global Planning: This refers to a preliminary and complete sequence of task execution steps generated by the planning agent at the initial stage of task execution, based on the complex goals input by the user.

[0068] Recursive RePlanning refers to a hierarchical, adaptive adjustment mechanism that, when the system detects environmental changes, execution anomalies, or information updates during task execution, does not simply retry or start over globally. Instead, it recursively triggers a new round of planning, execution, and reflection, with the affected subtask nodes as the root, thus forming a new round of planning, execution, and reflection.

[0069] Reflection Agent: A dedicated agent whose responsibility is to evaluate the execution results and generate structured quantitative (such as confidence scores, data integrity percentages) and qualitative (such as "insufficient evidence", "conclusions contradict data", "source needs to be traced") evaluation reports to provide a basis for RePlan's decision-making.

[0070] Dynamic Agent Orchestration: The system automatically selects and combines the most suitable set of agents to execute newly planned or adjusted subtasks based on current task requirements, the real-time capability status of each agent (such as load and expertise), and execution history.

[0071] Execution Trace: The full-link data automatically recorded by the system during operation, including the original plan, the input and output of each step, agent and tool call records, intermediate results, reflection reports, etc., forming a traceable task execution tree.

[0072] Intermediate artifacts: Valuable data results or states generated during task execution (such as retrieved web page content, cleaned datasets, and generated charts) that can be reused in RePlan to avoid redundant calculations.

[0073] The task processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another server. Both terminal 102 and server 104 can independently execute the task processing methods provided in this embodiment. Terminal 102 and server 104 can also work together to execute the task processing methods provided in this embodiment.

[0074] refer to Figure 1When terminal 102 and server 104 cooperate to execute the task processing provided in this embodiment, terminal 102 obtains the task to be processed and sends it to server 104. Server 104 performs task planning based on the task to be processed to obtain an initial task plan, which includes multiple sub-task plans. Server 104 executes the multiple sub-task plans sequentially, evaluates the execution results of the current sub-task plan, obtains the evaluation result corresponding to the current sub-task plan, and when the evaluation result meets the preset replanning conditions, replans the current sub-task plan based on the evaluation result to obtain an updated sub-task plan. Server 104 updates the initial task plan according to the updated sub-task plan and continues to execute from the updated sub-task plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained. Server 104 returns the task processing result to terminal 102. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Server 104 can be the backend server for the aforementioned target application, used to provide backend services for the target application.

[0075] In one embodiment, such as Figure 2 As shown, a task processing method is provided, which is applied to Figure 1 Computer equipment (computer equipment can be) Figure 1 Taking a terminal or server as an example, the following steps are included:

[0076] Step S202: Obtain the tasks to be processed, perform task planning based on the tasks to be processed, and obtain the initial task plan, which includes multiple sub-task plans.

[0077] In this context, "tasks to be processed" refers to tasks that users need to handle using an intelligent agent, such as query tasks. Query tasks can be determined based on the user's input; for example, if the user's input during interaction with the intelligent agent is "Write a research report on the latest breakthroughs in solid-state battery technology," then that input is considered a query task. Query tasks can be tasks that query information from different fields, such as gaming, finance, industry, agriculture, education, and healthcare. They can also be tasks that query information within a specific vertical domain; for example, if the intelligent agent belongs to a vertical domain, then the query task is typically a vertical domain query task.

[0078] Specifically, the computer device acquires the task to be processed, performs task planning based on the task to be processed, and obtains the initial task plan corresponding to the task to be processed, which includes multiple sub-task plans.

[0079] In one embodiment, task planning is performed based on the task to be processed to obtain an initial task plan, including:

[0080] The task to be processed is decomposed into multiple task objects; an initial plan is generated based on the multiple task objects to obtain the sub-task plans of each task object and the execution order of the multiple sub-task plans.

[0081] Here, a task object refers to structured data that is machine-understandable and processable, obtained by converting the natural language instructions corresponding to the task to be processed. The initial plan refers to the planning content generated initially for the task to be processed, which includes the sub-task plans for each of the multiple task objects.

[0082] In this embodiment, a planning agent can be invoked to decompose the task to be processed and generate an initial plan based on multiple task objects.

[0083] In one embodiment, an initial plan is generated based on multiple task objects to obtain sub-task plans for each task object and their respective execution order, so that the multiple sub-task plans are executed sequentially according to the execution order. The execution order of the multiple sub-task plans can be sequential or it can include steps that are executed in parallel. For example, there are 5 sub-task plans, with the first 2 plans executed in parallel and the last 3 plans executed sequentially.

[0084] Step S204: Execute multiple subtask plans sequentially, evaluate the quality of the execution results of the current subtask plan, and obtain the evaluation result corresponding to the current subtask plan.

[0085] The current subtask plan refers to the subtask plan currently being executed within the task plan for the task to be processed. For example, planning the task to be processed, "Writing a research report on the latest breakthroughs in solid-state battery technology," might result in a task plan that includes "Searching for the latest academic papers → Extracting key breakthroughs → Searching for major manufacturers' activities → Comparing technical routes → Writing the report." This initial task plan includes five subtask plans. When the subtask plan "Extracting key breakthroughs" is executed, that subtask plan becomes the current subtask plan.

[0086] Evaluation results refer to the quality assessment of the execution results of the current subtask plan, and also represent a reflection on the current subtask plan and its execution results. Evaluation results can characterize the quality of the execution results, and can also be used to represent the quality of the current subtask plan.

[0087] The evaluation results may include problems with the execution results, such as insufficient information or inconsistencies between text and graphics in the execution results of the current subtask plan.

[0088] Specifically, a computer device can sequentially execute multiple subtask plans, and the executed subtask plan is called the current subtask plan. By executing the current subtask plan, the computer device can obtain an execution result, evaluate the quality of this result, and obtain the evaluation result corresponding to the current subtask plan.

[0089] In one embodiment, the quality assessment includes quality assessment in at least two dimensions, and the assessment result includes dimensional assessment results in at least two dimensions. The computer device performs quality assessment in at least two dimensions on the execution result of the current subtask plan executed in multiple subtask plans, obtaining dimensional assessment results in at least two dimensions.

[0090] Among them, at least two dimensions include at least two of the following: confidence dimension, complete dimension, or relevant dimension of the execution result.

[0091] In one embodiment, an evaluation agent can be invoked to perform a quality evaluation on the execution results obtained from the current subtask plan. Alternatively, the evaluation agent can perform a quality evaluation on the execution results obtained from the current subtask plan in at least two dimensions.

[0092] In one embodiment, each dimension is matched with its own evaluation agent. The computer device can invoke evaluation agents for at least two dimensions to perform quality evaluations on the execution results obtained from the current subtask plan in the corresponding dimensions. For example, when evaluating confidence, the evaluation agent matched by confidence is used; when evaluating relevance, the evaluation agent matched by relevance is used.

[0093] Step S206: When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain the updated subtask plan.

[0094] Among them, the pre-set replanning conditions refer to the constraints on the quality of the evaluation results, or they can represent the constraints on the updated subtask plan.

[0095] Specifically, the computer device can obtain preset replanning conditions and determine whether the evaluation result of the current subtask plan meets the preset replanning conditions. If it does, it means that the quality of the evaluation result is not good and the current subtask plan needs to be adjusted. Then, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan.

[0096] In this embodiment, the current subtask plan and evaluation results can be input into the large language model, and the large language model can be used for replanning to obtain an updated subtask plan.

[0097] In this embodiment, if the evaluation result of the current subtask plan does not meet the preset replanning conditions, it indicates that the quality of the evaluation result is as expected and there is no need to adjust the current subtask plan. Therefore, the next subtask plan in the initial task plan is determined. The next subtask plan is updated to the current subtask plan, and the step of evaluating the execution results of the current subtask plan among multiple subtask plans is returned and execution continues until the task processing result corresponding to the task to be processed is obtained.

[0098] In one embodiment, planning prompts can be generated based on the evaluation results, and the current subtask plan can be replanned based on the evaluation results and planning prompts to obtain an updated subtask plan.

[0099] Among them, the planning prompt information is a prompt for replanning the current sub-task plan. It can be a suggestion to improve the current sub-task plan, such as suggestions to add, delete, or modify the current sub-task plan.

[0100] In some embodiments, the computer device can obtain the execution results of executed subtask plans and replan the current subtask plan based on the execution results, evaluation results, and planning prompts of the executed subtask plans. Alternatively, the current subtask plan can be replanned based on the context of the current subtask plan in the initial task planning, the execution results, evaluation results, and planning prompts of the executed subtask plans combined.

[0101] Specifically, the execution result of an executed subtask plan can be the execution result corresponding to an evaluation result that does not meet the preset replanning conditions. Executed subtask plans can include subtask plans that do not require replanning and replanned subtask plans. Therefore, the execution result of an executed subtask plan includes the execution result of the subtask plan that does not require replanning and the execution result of the replanned subtask plan.

[0102] In other words, for a current subtask plan that needs to be replanned, the execution result of the current subtask plan will be discarded and will not be used as reference information for replanning.

[0103] The context of the current subtask plan refers to the subtask plans that execute before the current subtask plan, as well as the subtask plans that execute after the current subtask plan. For example, the context refers to the subtask plans preceding and following the current subtask plan in the initial task plan.

[0104] Furthermore, the evaluation results include dimensional evaluation results in at least two dimensions, and the planning prompts include dimensional planning prompts in at least two dimensions. Based on the dimensional evaluation results and dimensional planning prompts, the current subtask plan is replanned in at least two dimensions to obtain an updated subtask plan. The dimensional planning prompts provide guidance on replanning the current subtask plan in a specific dimension. For example, prompts for replanning the "relevance" dimension.

[0105] In one embodiment, the evaluation result includes the quality score corresponding to the problem to be improved and the execution result. The preset replanning condition can be represented by the preset quality score. When the evaluation result meets the preset replanning condition, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan, including:

[0106] Based on the quality score corresponding to the execution result of the current subtask plan, if the quality score is lower than the preset quality score, the current subtask plan can be replanned based on the evaluation result to obtain an updated subtask plan.

[0107] Step S208: Update the initial task plan according to the updated subtask plan, and continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0108] Specifically, the computer device updates the current subtask plan in the initial task plan according to the updated subtask plan, resulting in an updated task plan. Execution continues from the updated subtask plan in the updated task plan until the last subtask plan is completed, at which point the task processing result corresponding to the pending task is obtained.

[0109] In this embodiment, the computer device receives the task to be processed input by the user into a large model, and then performs task planning based on the task to obtain an initial task plan including multiple sub-task plans. The large model can be a large language model, which is a large-scale artificial intelligence model with natural language understanding and generation capabilities. The large language model then executes multiple sub-task plans sequentially. When the execution of the current sub-task plan yields a result, the execution of subsequent sub-task plans is paused, and the quality of the execution result of the current sub-task plan is evaluated to obtain an evaluation result. If the evaluation result does not meet the preset replanning conditions, the next sub-task plan is executed. If the evaluation result meets the preset replanning conditions, the current sub-task plan is replanned based on the evaluation result to obtain an updated sub-task plan. The initial task plan is then updated according to the updated sub-task plan, and execution continues from the updated sub-task plan in the updated task plan.

[0110] In one embodiment, the initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained, including:

[0111] The current subtask plan in the initial task plan is replaced by the updated subtask plan to obtain the updated task plan; the updated subtask plan in the updated task plan continues to be executed until the task processing result corresponding to the pending task is obtained.

[0112] Specifically, the computer device can determine whether there is a correlation between the current subtask plan and subsequent unexecuted subtask plans in the initial task plan. If a correlation exists, it means that the execution of subsequent subtask plans depends on the execution result of the current subtask plan; therefore, updating the current subtask plan will affect subsequent subtask plans. If no correlation exists, it means that the execution of subsequent subtask plans does not depend on the execution result of the current subtask plan; therefore, updating the current subtask plan will not affect subsequent subtask plans.

[0113] If there is no association between the current subtask plan and subsequent unexecuted subtask plans, the computer device can replace the current subtask plan in the initial task plan with the updated subtask plan to obtain the updated task plan.

[0114] Execution continues from the updated subtask plan in the updated task plan until the last subtask plan in the updated task plan is completed, at which point the task processing result corresponding to the pending task is obtained.

[0115] In this embodiment, after updating the current subtask plan in the initial task plan, it is determined whether the update will affect the execution of subsequent subtask plans. If it does not affect subsequent subtask plans, the updated subtask plan directly replaces the current subtask plan in the initial task plan. This way, only unreasonable subtask plans need to be replanned, instead of replanning all subtask plans, which can significantly improve the efficiency of task replanning and save the resources consumed by replanning. Furthermore, continuing execution from the updated subtask plan in the updated task plan does not require repeating already executed subtask plans, which can significantly improve the efficiency of task execution and save the resources consumed by execution.

[0116] In one embodiment, the initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained, including:

[0117] The task plan is determined by identifying the subtasks to be adjusted in the initial task plan based on the updated subtask plan; the subtasks to be adjusted are replanned according to the updated subtask plan to obtain the replanned subtask plans corresponding to the subtasks to be adjusted; the current subtask plan is replaced according to the updated subtask plan, and the subtasks to be adjusted are replaced according to the replanned subtask plans to obtain the updated task plan.

[0118] Among them, the subtask plan to be adjusted refers to the subtask plan that is related to the current subtask plan, that is, the subtask plan will be affected by the update of the current subtask plan.

[0119] Specifically, the computer device can determine whether there is a correlation between the current subtask plan in the initial task plan and the subsequent unexecuted subtask plans, in order to identify the subtask plans to be adjusted from the subsequent unexecuted subtask plans.

[0120] The computer equipment can replan the subtask plan to be adjusted based on the updated subtask plan to obtain the replanned subtask plan corresponding to the subtask plan to be adjusted. The current subtask plan in the initial task plan is replaced according to the updated subtask plan, and the subtask plan to be adjusted in the initial task plan is replaced according to the replanned subtask plan to obtain the updated task plan.

[0121] Execution continues from the updated subtask plan in the updated task plan until the last subtask plan in the updated task plan is completed, at which point the task processing result corresponding to the pending task is obtained.

[0122] In this embodiment, after updating the current subtask plan in the initial task plan, it is determined whether the update will affect the execution of subsequent subtask plans. If it does, the updated subtask plan is used to replan the affected subtask plans. This approach allows for the replanning of both unreasonable and affected subtask plans, preventing the update of one subtask plan from negatively impacting related subsequent subtask plans and ensuring their smooth execution. Furthermore, this method avoids replanning all subtask plans, significantly improving the efficiency of task replanning and saving resources. Moreover, continuing execution from the updated subtask plan in the updated task plan avoids re-executing already executed subtask plans, further improving task execution efficiency and saving resources.

[0123] Understandably, the task execution result is obtained when all subtask plans have been completed. This result can be the execution result of the last subtask plan, or it can be generated based on the execution results of all subtask plans. For example, the result could be obtained by merging the execution results of all subtask plans.

[0124] For example, the task to be completed is: to write a research report on the "latest breakthroughs in solid-state battery technology".

[0125] Generate an initial task plan: Search for the latest academic papers → Extract key breakthroughs → Search for major manufacturers' dynamics → Compare technical routes → Write a report. This initial task plan includes 5 sub-task plans.

[0126] Execution and First Replanning: The subtask plan "Search for the latest academic papers" was executed, yielding numerous and redundant results. The results were evaluated, outputting the assessment: "Information overload, scattered topics; it is recommended to clarify specific technical routes (such as sulfide / oxide electrolytes) before retrieving." The system then triggered recursive replanning, generating a new subtask plan, such as: summarizing the technical routes in the papers → re-searching based on the classification. After executing this new subtask plan, the research direction was successfully focused.

[0127] Execution and Second Replanning: During the execution of the sub-task plan "Searching for Vendor Dynamics," it was discovered that Company A had just released a disruptive patent. The execution results of the sub-task plan "Searching for Vendor Dynamics" were re-evaluated, and the evaluation result was: "Major breaking information has been discovered; the original 'comparison' step needs to be readjusted to incorporate this information." The system triggered replanning again, fine-tuning the focus of the subsequent sub-task plans for "Comparing Technical Routes" and "Report Writing."

[0128] Final task execution result: The report obtained by the user is not only comprehensive in content, but also includes the latest industry trends, and its quality far exceeds that of the execution result of static planning.

[0129] In one embodiment, the number of plans in the updated subtask plan may differ from the number of plans in the current subtask plan. For example, if the current subtask plan has one plan, the updated subtask plan generated by the replanning may include two plans. If the current subtask plan is "search for the latest academic papers", and the updated subtask plan is "summarize the technical routes in the papers → re-search based on the classification", then the updated subtask plan includes two plans.

[0130] In this embodiment, task planning is performed based on the acquired task to be processed to obtain an initial task plan. The initial task plan includes multiple sub-task plans, which are executed sequentially. The execution results of the current sub-task plan are evaluated to obtain the evaluation result corresponding to the current sub-task plan. When the evaluation result meets the preset replanning conditions, the current sub-task plan is replanned based on the evaluation result to obtain an updated sub-task plan. The initial task plan is then updated based on the updated sub-task plan, and execution continues from the updated sub-task plan until the task processing result corresponding to the task to be processed is obtained. That is, by evaluating the execution result when the current sub-task plan of the task to be processed is executed, the quality of the execution result is assessed. Based on the quality of the execution result, the rationality of the current sub-task plan is reflected. Then, unreasonable sub-task plans are replanned based on the evaluation result. Finally, the task execution continues from the updated sub-task plan obtained from the replanning. This avoids the problem of inaccurate final execution results of the task to be processed due to unreasonable sub-task settings. Furthermore, through dynamic evaluation and real-time replanning mechanisms, the adaptability and robustness of handling complex tasks are significantly improved. Iterative optimization can also ensure the quality and reliability of task processing results. By updating and continuing the execution of specific subtask plans that meet the criteria based on the evaluation results of the subtask plans, it is not necessary to re-plan the global tasks to be processed or to repeatedly execute previously executed subtask plans. This significantly improves task execution efficiency and saves resources consumed during execution.

[0131] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions, and the preset replanning conditions include dimensional replanning conditions of at least two dimensions; the quality evaluation of the execution result of the current subtask plan executed in multiple subtask plans to obtain the evaluation result corresponding to the current subtask plan includes: evaluating the execution result of the current subtask plan executed in multiple subtask plans in at least two dimensions to obtain dimensional evaluation results of at least two dimensions.

[0132] When the evaluation results meet the preset replanning conditions, the current subtask plan is replanned based on the evaluation results to obtain an updated subtask plan, including: when there is at least one dimension evaluation result that meets the dimension replanning conditions of the same dimension, the current subtask plan is replanned based on the dimension evaluation results to obtain an updated subtask plan.

[0133] The dimensional evaluation results are the quality assessment results of the current subtask plan in a specific dimension. The dimensional evaluation results may include the issues to be improved in a certain dimension and the dimensional quality score for that dimension.

[0134] Specifically, the computer device can execute the current subtask plan from multiple subtask plans and obtain the execution result. The execution result is then subjected to a quality evaluation across at least two dimensions, yielding dimensional evaluation results for at least two dimensions. Dimensional replanning conditions matching these at least two dimensions are obtained. For each of the at least two dimensions, it is iterated through to determine whether the dimensional evaluation result of the traversed dimension satisfies the dimensional replanning condition. If at least one dimensional evaluation result satisfies the dimensional replanning condition for the same dimension, the current subtask plan is replanned based on the dimensional evaluation result to obtain an updated subtask plan.

[0135] Specifically, the current subtask plan can be replanned based on the dimensional evaluation results of at least two dimensions to improve the accuracy of the replanning. Alternatively, the current subtask plan can be replanned based on the dimensional evaluation results of the corresponding dimensions that meet the dimensional replanning conditions.

[0136] Specifically, the current subtask plan is replanned based on the dimensional evaluation results of the corresponding dimensions that meet the dimensional replanning conditions. This allows for replanning only of specific dimensions of the current subtask plan, rather than across all dimensions, thus improving planning efficiency.

[0137] In one embodiment, the dimensional evaluation result may include the problem to be improved in a certain dimension and the dimensional quality score of that dimension. The dimensional replanning condition can be represented by a preset dimensional quality score. Each of at least two dimensions is traversed, and it is determined whether the dimensional quality score of the traversed dimension reaches the preset dimensional quality score of the traversed dimension. When there is at least one dimensional quality score that reaches the preset dimensional quality score of the same dimension, the current subtask plan is replanned based on the problem to be improved in the same dimension to obtain an updated subtask plan.

[0138] In this embodiment, a refined replanning mechanism with multi-dimensional evaluation and multi-condition triggering is introduced, greatly enhancing the perception and responsiveness of the task processing system. The replanning mechanism performs cross-evaluation of the execution results of each subtask across multiple dimensions (such as efficiency, quality, and resource consumption), and allows for independent setting of replanning conditions for each dimension. When the evaluation result of any dimension triggers its corresponding condition, replanning is automatically initiated. This enables accurate identification of different types and sources of deviations or anomalies in the execution results, achieving earlier and more accurate insights into problems. Furthermore, based on the most relevant dimensional information, a more targeted update plan for subtasks is generated, ultimately significantly improving the accuracy of replanning and the overall intelligence level of task processing.

[0139] In one embodiment, when at least one dimension evaluation result satisfies the dimension replanning condition for the same dimension, the current subtask plan is replanned based on the dimension evaluation result to obtain an updated subtask plan, including:

[0140] When at least one dimension evaluation result satisfies the dimension replanning condition for the same dimension, dimension planning prompts are generated for the dimension evaluation results that satisfy the dimension replanning condition; a structured evaluation report is generated based on the dimension evaluation results and the corresponding dimension planning prompts; and the current subtask plan is replanned based on the evaluation report to obtain an updated subtask plan.

[0141] Specifically, obtain the dimension replanning conditions that are the same as the at least two dimensions, traverse each of the at least two dimensions, determine whether the dimension evaluation result of the traversed dimension satisfies the dimension replanning conditions of the traversed dimension, and when it is found that at least one dimension evaluation result satisfies the dimension replanning conditions of the same dimension, corresponding dimension planning prompt information can be generated for the dimension evaluation result that satisfies the dimension replanning conditions.

[0142] A structured evaluation report is generated based on the dimensional evaluation results and corresponding dimensional planning prompts; the current subtask plan is then replanned based on the evaluation report to obtain an updated subtask plan.

[0143] In this embodiment, at least two dimensions include at least two of the following: confidence dimension, completeness dimension, or relevance dimension of the execution result; at least two dimension evaluation results include at least two of the following: confidence score, completeness score, or relevance score; and dimension replanning conditions include at least two of the following: preset confidence score, preset completeness score, or preset relevance score.

[0144] The confidence dimension is used to assess the reliability of the execution result. For example, it assesses whether the information in the execution result is sufficient and whether the data in the execution result can be traced or verified. For instance, when the assessment result indicates that the information in the execution result is insufficient, the generated dimension planning prompt is: "Add a step to 'search the company's official patent details' for verification." When the assessment result indicates that the source of the data in the execution result cannot be traced or verified, the generated dimension planning prompt is: "The initial data source needs to be traced again, and a precise retrieval agent or tool should be called to execute the execution."

[0145] The completeness dimension is used to determine the comprehensiveness of the execution result, for example, to assess whether the output content of the execution result is too short. When the assessment result indicates that the output content of the execution result is too short, the generated dimension planning prompt message is: Generate Agent extended content according to the instruction summary, covering at least 5 key technical parameters.

[0146] Relevance is used to assess the consistency of data in the execution results, the relevance of the execution results to the context, and the relevance of the execution results to unexpected information. For example, it evaluates whether the text and graphics content in the execution results are consistent, whether the execution results are related to the execution results of previously executed sub-tasks, and whether the execution results are related to unexpected information. Unexpected information refers to important information that was previously unknown, such as newly released policies, competitor activities, sudden data releases, and the latest technological breakthroughs.

[0147] For example, when the evaluation results indicate that the text and graphics content in the execution results are inconsistent, the generated dimension planning prompt message is: the charts should be regenerated, or an additional step should be added to "verify the matching degree between the charts and the text data".

[0148] If the current subtask is designed to generate a comparative scheme for a technical route, and the execution result is the development of a detailed comparative scheme for a technical route, but an unexpected search reveals a newly published patent whose comparative scheme for a technical route is very similar to the one in the execution result, indicating the discovery of unexpected significant information, then the generated dimension planning prompt message will be: the original technical route comparative scheme needs to be adjusted, and a new step "evaluate the impact of the newly published patent on the current technical route" should be added.

[0149] In this embodiment, by introducing a structured report generation mechanism, the replanning decision-making process is upgraded from simple condition-triggered to a systematic optimization based on comprehensive analysis. When the evaluation result of any dimension meets the replanning conditions, the system automatically generates guiding dimension planning prompts for that abnormal dimension and integrates them with the specific evaluation results into a comprehensive evaluation report. This report not only indicates which aspects of the execution results are of poor quality but also provides optimization directions through prompts, thus providing a highly condensed and goal-oriented decision-making basis for the replanning algorithm. This significantly improves the quality and relevance of replanning, enabling the generated update subtask plan to not only correct current deviations but also integrate multi-dimensional optimization suggestions, achieving an advancement from passive repair to intelligent optimization, and ultimately ensuring that the task processing process moves more accurately and efficiently toward the final goal.

[0150] In one embodiment, the current subtask plan is replanned based on the evaluation report to obtain an updated subtask plan, including:

[0151] Determine the context of the current subtask plan within the initial task plan; obtain the execution results of the subtask plans already executed in the initial task plan; and re-plan based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0152] Specifically, the execution result of an executed subtask plan can be the execution result corresponding to an evaluation result that does not meet the preset replanning conditions. Executed subtask plans can include subtask plans that do not require replanning and replanned subtask plans. Therefore, the execution result of an executed subtask plan includes the execution result of the subtask plan that does not require replanning and the execution result of the replanned subtask plan.

[0153] The context of the current subtask plan refers to the subtask plans that execute before the current subtask plan, as well as the subtask plans that execute after the current subtask plan. For example, the context refers to the subtask plans preceding and following the current subtask plan in the initial task plan.

[0154] Specifically, the computer device can determine the context of the current subtask plan within the initial task plan and obtain the execution results of the subtask plans that have already been executed in the initial task plan. Based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report, a replanning is performed to obtain an updated subtask plan.

[0155] In this embodiment, by introducing a global context and historical execution results, the replanning process is upgraded from isolated local corrections to a global optimization that builds upon past and future plans. When replanning a subtask that currently needs replanning, not only is the task itself and the evaluation report considered, but its contextual position in the overall task planning and the historical results of all executed tasks are also actively acquired. This ensures that the newly generated updated subtask plan is closely connected with the logic of the preceding and following tasks and is dynamically adjusted based on the existing actual execution progress. This method effectively avoids new conflicts or gaps in subsequent plans caused by local replanning, ensuring the overall continuity and consistency of the task flow. Planning updates are no longer simple "patching," but rather an intelligent replanning that fully absorbs historical experience and aligns with the global plan, greatly improving the overall coordination of complex task processing systems and the reliability of the final results.

[0156] In one embodiment, at least two dimensions include at least two of the following: confidence dimension, completeness dimension, or relevance dimension of the execution result; the evaluation results of at least two dimensions include at least two of the following: confidence score, completeness score, or relevance score; and the dimension replanning conditions include at least two of the following: preset confidence score, preset completeness score, or preset relevance score.

[0157] The relevant dimensions include at least one of contextual relevance dimensions or search result relevance dimensions. The relevance score includes at least one of contextual relevance score or search result relevance score. The preset relevance score includes at least one of preset contextual relevance score or preset search result relevance score. Preset search results refer to search results for breaking news.

[0158] The context relevance score refers to the relevance between the execution result of the current subtask plan and other execution results, as well as the already executed task plans. Furthermore, the context relevance score can also include the relevance between the execution result of the current subtask plan and other unexecuted task plans.

[0159] like Figure 3 As shown, the execution results of the current subtask plan are evaluated using the confidence dimension to obtain a confidence score; the execution results are evaluated using the completeness dimension to obtain a completeness score; and the execution results are evaluated using the relevance dimension to obtain a relevance score. It is then determined whether the confidence score, completeness score, and relevance score meet the preset confidence score, the preset completeness score, and the preset relevance score, respectively. If at least one of these conditions is met, the current subtask plan is replanned to obtain an updated subtask plan.

[0160] In this embodiment, by introducing multi-dimensional quantitative indicators such as confidence level, completeness, relevance, and new information, along with explicit threshold conditions, a highly refined and quantifiable closed-loop decision-making system is constructed. This system can accurately diagnose the reliability (confidence level), comprehensiveness (completeness), logical consistency with historical data (relevance), and whether new key information has appeared in the execution results. When any indicator exceeds a preset threshold (such as low confidence level or insufficient completeness), replanning is automatically triggered. This transforms the originally vague execution deviations into specific and measurable technical parameters, making the replanning decision-making process more objective, accurate, and automated. This significantly improves the system's ability to perceive and adapt to complex and dynamic task environments, ensuring that task planning can be continuously optimized based on comprehensive, reliable, and context-consistent information.

[0161] In one embodiment, when the evaluation result meets a preset replanning condition, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan, including:

[0162] When the evaluation results meet the preset replanning conditions, an evaluation report is generated based on the evaluation results; the context of the current subtask plan in the initial task plan is determined; the execution results of the subtask plans that have been executed in the initial task plan are obtained; and replanning is performed based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0163] Specifically, the executed subtask plan includes subtask plans that do not require replanning and replanned subtask plans. The execution results of the executed subtask plans include the execution results of subtask plans that do not require replanning and the execution results of replanned subtask plans. The context of the current subtask plan refers to subtask plans that are executed before the current subtask plan and subtask plans that are executed after the current subtask plan.

[0164] When the evaluation result of the current subtask plan meets the preset replanning conditions, the computer device can generate an evaluation report based on the evaluation result. Furthermore, the computer device can determine the context of the current subtask plan within the initial task plan and obtain the execution results of the subtask plans already executed in the initial task plan. Replanning is then performed based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0165] In this embodiment, when the evaluation result meets the preset replanning conditions, an evaluation report is generated based on the evaluation result. This report is used to summarize and categorize the problems existing in the current subtask plan. Furthermore, when replanning the current subtask plan, not only the task itself and the evaluation report are considered, but its contextual position in the overall task plan and the historical results of all executed tasks are also actively obtained. This ensures that the newly generated updated subtask plan is closely connected with the logic of the preceding and following tasks and is dynamically adjusted based on the existing actual execution progress. This effectively avoids new conflicts or gaps in subsequent plans caused by local replanning, ensuring the overall coherence and consistency of the task plan, and greatly improving the overall coordination of complex task processing and the reliability of the final task execution results.

[0166] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions; a quality evaluation is performed on the execution results of the current subtask plan executed in multiple subtask plans to obtain the evaluation result corresponding to the current subtask plan, including:

[0167] The execution results of the current subtask plan executed in multiple subtask plans are evaluated in at least two dimensions to obtain dimensional evaluation results in at least two dimensions; a comprehensive evaluation is performed based on the dimensional evaluation results in at least two dimensions to obtain the evaluation result corresponding to the current subtask plan.

[0168] Specifically, the computer device performs quality evaluations on the execution results of the current subtask plan within a multi-subtask plan, considering at least two dimensions, to obtain dimensional evaluation results for at least two dimensions. A comprehensive evaluation is then performed based on these at least two dimensional evaluation results to obtain the overall evaluation result for the current subtask plan.

[0169] In one embodiment, the dimensional evaluation result may include the problem to be improved in a certain dimension and the dimensional quality score of that dimension, and the dimensional replanning condition may be represented by a preset dimensional quality score in a certain dimension.

[0170] The computer equipment can perform quality assessment on the execution results in at least two dimensions, obtain the problems to be improved and the quality score of each dimension, and can merge the quality scores of each dimension to obtain the quality score of the current subtask plan; and merge the problems to be improved in each dimension to obtain the problem set of the current subtask plan.

[0171] In one embodiment, at least two dimensions include at least two of the confidence dimension, completeness dimension, or relevance dimension of the execution result; the dimension quality scores of at least two dimensions include at least two of the confidence score, completeness score, or relevance score; and the dimension preset dimension quality scores of at least two dimensions include at least two of the preset confidence score, preset completeness score, or preset relevance score.

[0172] In this embodiment, a two-layer analysis mechanism of multi-dimensional evaluation and comprehensive judgment is constructed, significantly improving the systematic nature of task evaluation and the holistic view of decision-making. Based on the refined measurement of sub-task execution results from multiple independent dimensions (such as confidence and completeness), these dispersed dimensional evaluation results are further integrated and comprehensively evaluated to generate a final evaluation result that comprehensively and three-dimensionally reflects the overall execution status of the current sub-task. This design effectively avoids the one-sidedness that may result from single-dimensional judgment, enabling the system to weigh the mutual influence and overall situation between different dimensional indicators at a higher level. This provides a more robust and reliable decision-making basis for whether to trigger replanning and how to perform replanning, ultimately ensuring the comprehensive judgment capability and overall decision-making quality of the task processing system in complex environments.

[0173] In one embodiment, task planning based on the task to be processed to obtain an initial task plan includes: invoking a planning agent, and using the invoked planning agent to perform task planning based on the task to be processed to obtain the initial task plan;

[0174] Execute multiple subtask plans sequentially, and evaluate the quality of the execution results of the current subtask plan among the multiple subtask plans. This includes: calling the execution agent to execute multiple subtask plans sequentially; when the execution result of the current subtask plan among the multiple subtask plans is obtained, calling the evaluation agent; and evaluating the quality of the execution result through the called evaluation agent.

[0175] When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan. This includes: when the evaluation result meets the preset replanning conditions, a replanning agent is invoked, and the invoked replanning agent replans the current subtask plan based on the evaluation result to obtain an updated subtask plan.

[0176] Specifically, the computer device acquires a task to be processed, invokes a planning agent, and the planning agent performs task planning based on the task to be processed to obtain an initial task plan. The computer device invokes an execution agent to execute multiple sub-task plans sequentially. When the execution result of a certain sub-task plan is obtained, an evaluation agent is invoked. The evaluation agent evaluates the quality of the execution result of the current sub-task plan among the multiple sub-task plans. When the evaluation result meets the preset replanning conditions, the computer device invokes a replanning agent, which replans the current sub-task plan based on the evaluation result to obtain an updated sub-task plan.

[0177] The computer device invokes the planning agent to update the current subtask plan in the initial task plan according to the updated subtask plan, thus obtaining the updated initial task plan.

[0178] The computer device invokes the execution agent to continue execution from the updated subtask plan in the updated initial task plan. Once all subtask plans in the updated initial task plan have been executed, the task processing result is obtained.

[0179] For example, if the task to be processed is to write a research report on "the latest breakthroughs in solid-state battery technology", the processing flow for this task is as follows:

[0180] Generate an initial task plan: Search for the latest academic papers → Extract key breakthroughs → Search for major manufacturers' dynamics → Compare technical routes → Write a report. This initial task plan includes 5 sub-task plans.

[0181] Execution and First Replanning: The sub-task plan "Searching Academic Papers" was executed, yielding numerous and redundant results. An evaluation agent (i.e., a reflective agent) assessed the results, outputting the assessment: "Information overload, scattered topics; it is recommended to clarify specific technical routes (such as sulfide / oxide electrolytes) before retrieving." The system then triggered recursive replanning, generating a new sub-task plan, such as summarizing the technical routes in the papers and then re-searching based on these categories. After executing this new sub-task plan, the research direction was successfully focused.

[0182] Execution and Second Replanning: During the execution of the sub-task plan "Searching for Vendor Dynamics," it was discovered that Company A had just released a disruptive patent. The Agent reassessed: "Major breaking information has been discovered; the original 'comparison' step needs to be readjusted to incorporate this information." The system triggered another replanning, fine-tuning the focus of the subsequent sub-task plans for "Comparing Technical Roadmaps" and "Report Writing."

[0183] Final task execution result: The report obtained by the user is not only comprehensive in content, but also includes the latest industry trends, and its quality far exceeds that of the execution result of static planning.

[0184] In a specific embodiment, such as Figure 4 The diagram illustrates the principle of replanning. The computer replans the current subtask plan using a replanning agent. Specifically, the computer receives the evaluation result from the evaluation agent and inputs the evaluation result and the current subtask plan into the replanning agent. The replanning agent replans the current subtask plan based on the evaluation result, resulting in an updated subtask plan. This replanning agent can be driven by an LLM model. Finally, the updated subtask plan is executed by the execution agent to obtain the corresponding execution result.

[0185] In this embodiment, by adopting a modular agent invocation architecture, core functions such as planning, evaluation, and replanning are decoupled into independent, specialized agents, greatly improving the flexibility, scalability, and maintainability of the task processing system. By dynamically invoking dedicated planning, evaluation, and replanning agents to execute corresponding steps, not only can the most advanced algorithm models be selected and integrated for each key step to ensure their professional performance, but the system can also easily upgrade, replace, or customize individual agents independently without altering the core process (e.g., switching different agents for different task types). This achieves plug-and-play and continuous optimization of system capabilities, ultimately endowing the system with strong adaptability and evolvability while ensuring a high degree of automation and intelligence in the processing flow.

[0186] In one embodiment, the executing agent includes an agent that executes the plan for each subtask, and the method further includes:

[0187] Based on the intent of the updated subtask plan, select an execution agent that matches the intent from the preset agent pool; establish a call relationship between the updated subtask plan and the matching execution agent; the call relationship is used to instruct the matching execution agent to execute the updated subtask plan.

[0188] The preset agent pool integrates various execution agents, each capable of performing different tasks. For example, a deep analysis agent performs deep analysis tasks, while a precise retrieval agent performs retrieval tasks.

[0189] Specifically, after the computer equipment replans and obtains the updated subtask plan, it selects an execution agent from a preset agent pool that matches the intent of the updated subtask plan. The execution agent that matches the intent of the updated subtask plan is also matched with the updated subtask plan.

[0190] A calling relationship is established between the updated subtask plan and the matching execution agent. This calling relationship instructs the matching execution agent to execute the updated subtask plan. When the updated subtask plan needs to be executed, the computer device can call the execution agent that matches the updated subtask plan, thereby executing the updated subtask plan through that execution agent.

[0191] In one embodiment, an update subtask plan may require multiple execution agents to execute. In this case, a calling relationship between the update subtask plan and multiple matching execution agents can be established according to the intent of the update subtask plan, and the calling order among the multiple execution agents can be set so that the update subtask plan can be executed in sequence.

[0192] In this embodiment, by establishing an intent-driven dynamic agent matching and invocation mechanism, the accuracy and automation level of the task execution process are significantly improved. When an updated subtask is generated, the system can automatically select the most functionally suitable specialized agent from a preset agent pool based on its core intent and establish a clear invocation relationship. This design not only ensures that each subtask is efficiently processed by the most suitable agent, enhancing the effectiveness and success rate of task execution, but also achieves seamless intelligent connection between the task planning layer and the specific agent execution layer. This maintains the high adaptability and coherence of the entire system even in dynamic replanning scenarios, ultimately ensuring the overall smoothness and reliable results of complex task processing.

[0193] In one embodiment, the method further includes:

[0194] If the evaluation result does not meet the preset replanning conditions, and the current subtask plan is not the last subtask plan in the initial task plan, determine the next subtask plan of the current subtask plan in the initial task plan; update the next subtask plan to the current subtask plan, and proceed to the step of executing the current subtask plan until the task processing result corresponding to the pending task is obtained.

[0195] Specifically, when the evaluation result does not meet the preset replanning conditions, the computer device determines whether the current subtask plan is the last subtask plan in the initial task plan. If the current subtask plan is not the last subtask plan in the initial task plan, the computer device determines the next subtask plan of the current subtask plan in the initial task plan, updates the next subtask plan to the current subtask plan, and enters the step of executing the current subtask plan and continues to execute until the execution of the last subtask plan is completed, and obtains the task processing result corresponding to the task to be processed.

[0196] In this embodiment, an automated continuous task advancement mechanism is introduced to ensure seamless and efficient execution of the task processing flow without the need for replanning. When the evaluation confirms that the current subtask result meets the standard and is not the final task, a state switch is automatically triggered, accurately locating and activating the next subtask to be processed, and then looping back to the evaluation and execution phase. This design forms an automated evaluation-pass-advancement process, effectively eliminating the need for process interruption or manual intervention, ensuring that task planning runs smoothly and autonomously on the predetermined track. Thus, while ensuring the quality control of each stage, it significantly improves the coherence and execution efficiency of the overall task processing.

[0197] In one embodiment, the method further includes:

[0198] If the evaluation results do not meet the preset replanning conditions, and the current subtask plan is the last subtask plan in the initial task plan, the task processing results corresponding to the task to be processed are generated based on the execution results of each subtask plan.

[0199] Specifically, when the evaluation result does not meet the preset replanning conditions, the computer device determines whether the current subtask plan is the last subtask plan in the initial task plan. If the current subtask plan is the last subtask plan in the initial task plan, the task processing result corresponding to the task to be processed is generated based on the execution result of each subtask plan.

[0200] like Figure 5 The diagram shown is a flowchart of a task processing method in one embodiment, including:

[0201] 1) Task Initiation: The user submits the task, and the planning agent generates the initial global plan P0.

[0202] 2) Step execution: The execution engine executes the subtask plans in P0 sequentially, with each subtask plan being a step.

[0203] 3) Reflection and Evaluation: After each subtask is planned, the Reflection Agent immediately conducts a quality evaluation of the execution results.

[0204] 4) Evaluation Passed: If the evaluation passes, determine if this is the last subtask plan. If yes, the pending task is successfully completed; otherwise, continue executing the next subtask plan.

[0205] 5) Assessment Failure: If the Reflection Agent's assessment concludes that the implementation results are unsatisfactory or the environment has changed, a structured reflection report will be generated, clearly pointing out the issues to be improved and planning suggestions (i.e., planning recommendations).

[0206] 6) Recursive Replanning: The replanning scheduler analyzes the scope of impact, retrieves intermediate products, dynamically orchestrates agents, and generates updated subtask plans based on the evaluation report (i.e., the reflection report). Among these:

[0207] Analyze the scope of impact, that is, identify the task branches that need to be replanned to avoid a complete overhaul.

[0208] Retrieve intermediate products, that is, find the successfully generated execution results, to ensure that the new plan can reuse these results.

[0209] Dynamic agent orchestration means selecting the most suitable agent to handle the task based on the requirements of the new task.

[0210] Generate a subtask plan, i.e., a collaborative planning agent, to generate a targeted, new subtask plan P_sub.

[0211] 7) Plan Update and Loop: The newly generated task plan P_sub is integrated into the existing task plan, replacing or adjusting the affected parts. The execution engine then continues the loop based on the updated task plan P_sub until the task is completed.

[0212] In this embodiment, by clearly defining the judgment conditions for task termination and the result synthesis mechanism, a clear and reliable exit is provided for the entire closed-loop processing flow: when it is confirmed that the execution result of the last subtask also meets the requirements and no replanning is needed, the result generation stage will be automatically triggered. Based on the execution results of all successfully completed subtasks, the final task processing result will be generated. This ensures that the closing work can be completed in an orderly manner after all planned tasks have been successfully executed, effectively avoiding process suspension or result loss, thereby ensuring the integrity and automation level of the entire task processing cycle, and finally reliably delivering the processing results that meet expectations.

[0213] In one embodiment, the task to be processed includes a question-and-answer task, and the task processing result includes response information for the question-and-answer task; obtaining the task to be processed, performing task planning based on the task to be processed, and obtaining an initial task plan includes:

[0214] Obtain the query request, perform intent recognition on the query request, and obtain the intent recognition result; generate a question-and-answer task based on the intent recognition result, generate an initial plan based on the question-and-answer task, and obtain an initial task plan including multiple sub-task plans, as well as the execution order of each of the multiple sub-task plans.

[0215] A query request is a query statement provided by the user to express their needs. This query statement may include at least one of the following types: text, image, audio, or video.

[0216] Specifically, in a question-and-answer scenario, users can input a query request on the question-and-answer interface. The computer device then performs intent recognition on the query request to obtain the intent recognition result, thereby clarifying the user's intent. After clarifying the user's intent, a corresponding task to be processed, i.e., a question-and-answer task, can be generated based on the intent recognition result.

[0217] The computer device generates an initial plan based on the question-and-answer task, resulting in an initial task plan that includes multiple sub-task plans. It can also obtain the execution order of each sub-task plan, so that each sub-task plan can be executed sequentially according to the execution order.

[0218] In one embodiment, the method further includes: returning the response information to the requesting end corresponding to the query request, wherein the requesting end is used to display the response information corresponding to the query request.

[0219] In this embodiment, a general task processing framework is specifically applied to a question-and-answer scenario. Through a refined process of intent recognition, task decomposition, and planning generation, a deep understanding and systematic solution to complex queries are achieved. First, the user's query request is parsed into a structured question-and-answer task, which is then scientifically decomposed into multiple interrelated task objects. Then, an ordered sub-task plan is generated for each object, thereby transforming an open and potentially ambiguous user question into a series of executable and evaluable specific steps. Finally, the generated answer information is returned and displayed to the user, which significantly improves the processing capability and answer quality of complex questions and answers. It can handle queries that require multi-hop reasoning or step-by-step solutions, and the closed-loop task execution and replanning ensure that the final answer information provided is verified, accurate, and complete.

[0220] In one embodiment, a task processing method is provided, applied to a computer device, the processing flow of which includes:

[0221] Obtain the task to be processed, call the planning agent, and use the called planning agent to perform task planning based on the task to be processed to obtain the initial task plan, which includes multiple sub-task plans.

[0222] The execution agent is invoked to execute multiple subtask plans sequentially. Once the execution result of the current subtask plan is obtained, the evaluation agent is invoked.

[0223] By invoking the evaluation agent, the execution results of the current subtask plan executed in multiple subtask plans are evaluated in at least two dimensions to obtain dimensional evaluation results in at least two dimensions; wherein, the at least two dimensions include at least two of the confidence dimension, completeness dimension or relevance dimension of the execution result, and the at least two dimensional evaluation results include at least two of the confidence score, completeness score or relevance score.

[0224] By invoking the evaluation agent, when at least one dimension evaluation result satisfies the dimension replanning condition of the same dimension, dimension planning prompt information is generated for the dimension evaluation result that satisfies the dimension replanning condition; wherein, the dimension replanning condition includes at least two of the following: preset reliability score, preset completeness score, or preset relevance score.

[0225] An evaluation report is generated based on the dimensional evaluation results and corresponding dimensional planning prompts by invoking the evaluation agent.

[0226] The replanning agent is invoked, and the invoked replanning agent replans the current subtask plan based on the evaluation report to obtain an updated subtask plan;

[0227] The initial task plan is updated based on the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the pending task is obtained.

[0228] If the evaluation result does not meet the preset replanning conditions, and the current subtask plan is not the last subtask plan in the initial task plan, determine the next subtask plan of the current subtask plan in the initial task plan.

[0229] Update the next subtask plan to the current subtask plan, and return to the step of evaluating the quality of the execution results obtained from the current subtask plan among multiple subtask plans and continue execution until the task processing result corresponding to the pending task is obtained.

[0230] If the evaluation results do not meet the preset replanning conditions, and the current subtask plan is the last subtask plan in the initial task plan, the task processing results corresponding to the task to be processed are generated based on the execution results of each subtask plan.

[0231] like Figure 6 The diagram shown illustrates the overall system architecture of a task processing method in one embodiment. The system in this embodiment can serve as an enhanced service layer integrated onto a multi-agent system, and its core architecture is as follows: Figure 6 As shown, where:

[0232] 1. Planning Agent:

[0233] Input: User's original task query.

[0234] Output: A structured global program P_initial = [Step1, Step2, ..., StepN].

[0235] Mechanism: A well-designed Prompt guides the LLM to decompose tasks. The Prompt template requires output of step names, descriptions, expected inputs, and success criteria.

[0236] 2. Execution Engine:

[0237] Responsibilities: Execute the planned steps sequentially and manage the entire recursive RePlan loop.

[0238] Component 1: Actuator: Invokes the corresponding intelligent agent or worker Tool To execute the specific steps.

[0239] Component 2: Reflection Agent: One of the core components of this solution. It is activated after each step to evaluate the results.

[0240] Evaluation dimensions: confidence level, completeness, consistency with upstream results, and whether unexpected new information was discovered.

[0241] Output: A structured reflection report (JSON format), for example:

[0242] 1) When information is insufficient: {"verdict": "NEEDS_REPLAN", "reason": "evidence_insufficient", "suggestion": "An additional step should be added: 'Search the company's official patent details' for verification."}

[0243] 2) When the output content is too short: {"verdict": "NEEDS_REPLAN", "reason": "output_too_short", "suggestion": "Generate Agent extended content according to the instruction summary, covering at least 5 key technical parameters."}

[0244] 3) When the text and image content are inconsistent: {"verdict": "NEEDS_REPLAN", "reason": "image_text_mismatch", "suggestion": "The chart should be regenerated, or an additional step should be added to 'verify the match between the chart and the text data'."}

[0245] 4) When the source of the recommendation reason cannot be traced: {"verdict": "NEEDS_REPLAN", "reason": "source_verification_failed", "suggestion": "The initial data source needs to be traced again, and the precise retrieval agent or tool should be called to execute the process."}

[0246] 5) When unexpected critical information is discovered: {"verdict": "NEEDS_REPLAN", "reason": "new_critical_information", "suggestion": "The original technical route comparison scheme needs to be adjusted, and a step of 'assessing the impact of the newly published patent on the current technical route' should be added."}

[0247] Trigger condition: Receive NEEDS_REPLAN verdict from the Reflection Agent.

[0248] Core operations:

[0249] 1) Impact analysis: Determine the scope of tasks that need to be adjusted (whether it is the entire plan or a specific sub-branch).

[0250] 2) Knowledge retrieval: Retrieve all intermediate products that have been generated from the execution trace knowledge base to ensure that existing work can be fully utilized during RePlan.

[0251] 3) Agent orchestration: Select the most suitable Agent from the registered Agent pool based on the new subtask requirements (e.g., call the Analysis Agent when in-depth analysis is needed, and call the Search Agent when precise retrieval is needed).

[0252] 4) Subprogram generation: The reflection report, existing intermediate products, and current context are used as Prompt inputs to call the planning agent to generate a new subprogram P_sub.

[0253] 3. Execution Trace Knowledge Base:

[0254] Data structure: A graph database that persistently stores the global plan for each execution, the inputs and outputs of each step, reflection reports, agent call records, and generated intermediate products.

[0255] Function: It provides data support for reflection, RePlan and Agent orchestration, and is the foundation for achieving system self-adaptation and intelligence.

[0256] In this embodiment, by introducing a "global planning + recursive RePlan" mechanism and dynamic multi-agent collaboration, significant benefits are achieved compared to traditional linear execution or simple retry schemes: the system can gracefully cope with various changes and uncertainties during execution, dynamically adjust strategies based on real-time feedback, exhibiting human-like problem-solving intelligence, greatly improving the completion rate of complex tasks, and possessing extremely high flexibility and adaptability. Through recursive, local replanning and intelligent reuse of intermediate products, unnecessary global retries and computational resource waste are avoided, resulting in faster overall execution speed and lower costs, significantly improving execution efficiency and resource utilization.

[0257] Furthermore, the deep reflection mechanism ensures that the output of each stage is rigorously verified, and the RePlan process can promptly correct deviations and supplement information, thereby fundamentally guaranteeing the accuracy, completeness, and reliability of the final task execution result. In addition, the execution trace knowledge base records a large amount of planning, execution, and reflection data, providing a high-quality data foundation for optimizing the reflection model, planning strategy, and agent scheduling algorithm. The system possesses continuous evolution capabilities, enabling it to become increasingly intelligent with use.

[0258] In a specific embodiment, such as Figure 7A The image shows a schematic of the query page. The page displays the submitted query task, "Write a research report on the latest breakthroughs in solid-state battery technology." A mind map area shows the execution steps (i.e., sub-task execution plans) of this query task, including five sub-task plans: "Search for the latest academic papers," "Extract key breakthroughs," "Search for major manufacturers' activities," "Compare technical routes," and "Write the report." Users can click on actions in the mind map area to view each sub-task plan. The computer then executes each sub-task plan sequentially. After executing the "Search for the latest academic papers" sub-task plan, the execution result and execution time "12 seconds" are displayed. If the quality evaluation of the execution result fails, a re-planning is initiated. The "Search for the latest academic papers" execution steps also display a message: "Search result evaluation failed; trying alternative solutions." Figure 7B As shown, the reflection agent is automatically triggered after all steps in "Searching for the Latest Academic Papers" are completed, and a subtask (i.e., the reflection task) is added after the last execution step of "Searching for the Latest Academic Papers". Furthermore, the reflection steps executed by the reflection agent can be displayed in the workspace. For example, reflection steps may include summarizing the technical routes in the papers, re-searching based on the classification, etc., and each step can also include more detailed steps.

[0259] In one embodiment, such as Figure 8As shown, the reflection agent is automatically triggered to execute reflection tasks. The reflection task can be hidden, or its execution time can be displayed, such as "Executing task, taking 2 minutes." Furthermore, the reflection steps executed by the reflection agent can be displayed in the workspace. The reflection agent can call corresponding tools from the tool library for processing. For example: Reflection content XXX. After reflection, an evaluation result is generated, namely: "Information overload, scattered topics, it is recommended to clarify the specific technical route (such as sulfide / oxide electrolyte) before searching."

[0260] Finally, based on the evaluation results, the "Search for the latest academic papers" task was replanned, resulting in an updated subtask plan of "Summarizing the technical routes in the papers → Re-searching based on the classification." After executing this updated subtask plan, the corresponding execution results and execution time were displayed. Then, subsequent execution steps were performed, ultimately yielding the generated report.

[0261] In a specific embodiment, such as Figure 9 The image shows a schematic of the query page. The query page displays updated search results for "Update Subtask Plan." These updated search results are obtained by replanning the "Search Latest Academic Papers" task when the evaluation of "Search Latest Academic Papers" fails, resulting in an "Updated Subtask Plan," which is then re-executed. Simultaneously, a message appears for "Extract Key Breakthrough Points": "Search results evaluation failed, trying alternative solutions." Upon receiving the updated search results for "Search Latest Academic Papers," the "Extract Key Breakthrough Points" task is re-executed, and the "Search results evaluation failed, trying alternative solutions" message is replaced with the search results for that execution step.

[0262] In one specific embodiment, this task execution method is applied in an artificial intelligence interaction platform, specifically: as follows: Figure 10The diagram shows a front-end page of an AI interaction platform. This front-end page includes a task record area, a query interaction area, and a workspace area. The task record area records the user's historical query tasks, which can be viewed by clicking on them. New query tasks can also be created in this area. Currently, the query interaction area, where no interaction has occurred, is displayed. The user enters a query task in this area and interacts with it. The area then displays the sent query task and shows the corresponding steps to be executed using a mind map. Each step is executed sequentially, and its execution status is updated synchronously. After the execution steps are completed, an execution result is generated. A reflection agent performs a quality assessment on this result, obtaining an evaluation result. If the evaluation result meets preset replanning conditions, the execution steps can be replanned according to the steps in any of the above embodiments to obtain updated execution steps. Finally, after all execution steps are completed, the execution result of the current query task is displayed. Simultaneously, during the execution of each step, the workspace area displays the execution details and reflection details of the query task. For example, when reflecting on the current step, the reflection process can be displayed, as well as the execution details of each execution step. This means that users can perform various queries and obtain query results through this AI interactive platform, which can improve the success rate and efficiency of queries, while saving the resources of the AI ​​interactive platform.

[0263] It should be understood that although the steps in the flowcharts of the embodiments described above 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 embodiments described above 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.

[0264] Based on the same inventive concept, this application also provides a task processing apparatus for implementing the task processing 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 task processing apparatus embodiments provided below can be found in the limitations of the task processing method described above, and will not be repeated here.

[0265] In one embodiment, such as Figure 11As shown, a task processing device 1100 is provided, comprising:

[0266] The initial planning module 1102 is used to obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans.

[0267] The evaluation module 1104 is used to execute multiple subtask plans sequentially, evaluate the quality of the execution results of the current subtask plan among the multiple subtask plans, and obtain the evaluation result corresponding to the current subtask plan.

[0268] The replanning module 1106 is used to replan the current subtask plan based on the evaluation results when the evaluation results meet the preset replanning conditions, so as to obtain an updated subtask plan.

[0269] The update module 1108 is used to update the initial task plan according to the update subtask plan, and continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0270] In one embodiment, the update module 1108 is used to replace the current subtask plan in the initial task plan according to the updated subtask plan to obtain the updated task plan; and continue to execute from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0271] In one embodiment, the update module 1108 is configured to determine the subtask plan to be adjusted in the initial task plan according to the updated subtask plan, replan the subtask plan to be adjusted according to the updated subtask plan to obtain the replanned subtask plan corresponding to the subtask plan to be adjusted; replace the current subtask plan according to the updated subtask plan, and replace the subtask plan to be adjusted according to the replanned subtask plan to obtain the updated task plan; continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

[0272] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions, and the preset replanning conditions include dimensional replanning conditions of at least two dimensions; the evaluation module is used to evaluate the execution results of the current subtask plan executed in multiple subtask plans in at least two dimensions to obtain dimensional evaluation results of at least two dimensions.

[0273] The replanning module is used to replan the current subtask plan based on the dimensional evaluation results when at least one dimensional evaluation result satisfies the dimensional replanning condition of the same dimension, thereby obtaining an updated subtask plan.

[0274] In one embodiment, the replanning module is configured to generate dimension planning prompts for dimension evaluation results that meet the dimension replanning conditions when at least one dimension evaluation result satisfies the dimension replanning conditions of the same dimension; generate a structured evaluation report based on the dimension evaluation results and the corresponding dimension planning prompts; and replan the current subtask plan based on the evaluation report to obtain an updated subtask plan.

[0275] In one embodiment, the replanning module is used to determine the context of the current subtask plan in the initial task plan; obtain the execution results of the subtask plans that have been executed in the initial task plan; and perform replanning based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0276] In one embodiment, at least two dimensions include at least two of the following: confidence dimension, completeness dimension, or relevance dimension of the execution result; the evaluation results of at least two dimensions include at least two of the following: confidence score, completeness score, or relevance score; and the dimension replanning conditions include at least two of the following: preset confidence score, preset completeness score, or preset relevance score.

[0277] In one embodiment, the replanning module is used to generate an evaluation report based on the evaluation results when the evaluation results meet preset replanning conditions; determine the context of the current subtask plan in the initial task plan; obtain the execution results of the subtask plans that have been executed in the initial task plan; and perform replanning based on the current subtask plan, the execution results of the executed subtask plans, the context, and the evaluation report to obtain an updated subtask plan.

[0278] In one embodiment, the evaluation result includes dimensional evaluation results of at least two dimensions; the evaluation module is used to evaluate the execution result of the current subtask plan executed in multiple subtask plans in at least two dimensions to obtain dimensional evaluation results of at least two dimensions; and to perform a comprehensive evaluation based on the dimensional evaluation results of at least two dimensions to obtain the evaluation result corresponding to the current subtask plan.

[0279] In one embodiment, the initial planning module is used to call a planning agent, and the called planning agent performs task planning based on the task to be processed to obtain an initial task plan.

[0280] The evaluation module is used to call the evaluation agent to evaluate the quality of the execution results of the current subtask plan executed in multiple subtask plans;

[0281] The replanning module is used to call the replanning agent when the evaluation result meets the preset replanning conditions. The called replanning agent replans the current subtask plan based on the evaluation result to obtain the updated subtask plan.

[0282] In one embodiment, the replanning module is used to select an execution agent that matches the intention from a preset agent pool according to the intention of updating the subtask plan; establish a calling relationship between the updated subtask plan and the matching execution agent; the calling relationship is used to instruct the matching execution agent to execute the updated subtask plan.

[0283] In one embodiment, the update module is used to determine the next subtask plan of the current subtask plan in the initial task plan when the evaluation result does not meet the preset replanning conditions and the current subtask plan is not the last subtask plan in the initial task plan; update the next subtask plan to the current subtask plan, and proceed to the step of executing the current subtask until the task processing result corresponding to the task to be processed is obtained.

[0284] In one embodiment, the update module is used to generate task processing results corresponding to the task to be processed based on the execution results of each subtask plan when the evaluation result does not meet the preset replanning conditions and the current subtask plan is the last subtask plan in the initial task plan.

[0285] In one embodiment, the task to be processed includes a question-and-answer task, and the task processing result includes the response information for the question-and-answer task; the initial planning module is used to obtain a query request, perform intent recognition on the query request, and obtain an intent recognition result; generate a question-and-answer task based on the intent recognition result, and perform initial planning based on the question-and-answer task to obtain an initial task plan including multiple sub-task plans, and the execution order of the multiple sub-task plans.

[0286] In one embodiment, the device further includes:

[0287] The response module is used to return response information to the requesting end corresponding to the query request. The requesting end is used to display the response information corresponding to the query request.

[0288] Each module in the aforementioned task processing 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 invoke and execute the operations corresponding to each module.

[0289] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12As shown, this computer device includes a processor, memory, input / output interfaces (I / O), 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 operation of the operating system and computer programs stored in the non-volatile storage media. The database stores task processing data. 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 task processing method.

[0290] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces 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 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 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 interfaces are 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, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a task processing method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a 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.

[0291] Those skilled in the art will understand that Figures 12-13The structure shown 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. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0292] In one embodiment, a computer device is also 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 in the above method embodiments.

[0293] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0294] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0295] 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0296] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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, etc., and are not limited to these.

[0297] 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 specification.

[0298] 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 task processing method, characterized in that, The method includes: Obtain tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans. The multiple subtask plans are executed sequentially, and the execution results of the current subtask plan are evaluated to obtain the evaluation result corresponding to the current subtask plan. When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan; The initial task plan is updated according to the updated subtask plan, and execution continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

2. The method according to claim 1, characterized in that, The step of updating the initial task plan according to the updated subtask plan, and continuing execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained, includes: The current subtask plan in the initial task plan is replaced according to the updated subtask plan to obtain the updated task plan; The process continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the pending task is obtained.

3. The method according to claim 1, characterized in that, The step of updating the initial task plan according to the updated subtask plan, and continuing execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained, includes: Based on the updated subtask plan, determine the subtask plan to be adjusted in the initial task plan, and replan the subtask plan to be adjusted based on the updated subtask plan to obtain the replanned subtask plan corresponding to the subtask plan to be adjusted. The current subtask plan is replaced according to the updated subtask plan, and the subtask plan to be adjusted is replaced according to the replanned subtask plan to obtain the updated task plan; The process continues from the updated subtask plan in the updated task plan until the task processing result corresponding to the pending task is obtained.

4. The method according to claim 1, characterized in that, The evaluation results include dimensional evaluation results of at least two dimensions, and the preset replanning conditions include dimensional replanning conditions of at least two dimensions; the quality evaluation of the execution results of the current subtask plan executed in the plurality of subtask plans to obtain the evaluation result corresponding to the current subtask plan includes: The execution results of the current subtask plan executed in the plurality of subtask plans are evaluated in at least two dimensions to obtain dimensional evaluation results in at least two dimensions. When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan, including: When at least one dimension evaluation result satisfies the dimension replanning condition of the same dimension, the current subtask plan is replanned based on the dimension evaluation result to obtain an updated subtask plan.

5. The method according to claim 4, characterized in that, When at least one dimension evaluation result satisfies the dimension replanning condition for the same dimension, the current subtask plan is replanned based on the dimension evaluation result to obtain an updated subtask plan, including: When at least one dimension evaluation result satisfies the dimension replanning condition of the same dimension, dimension planning prompt information is generated for the dimension evaluation results that satisfy the dimension replanning condition; A structured evaluation report is generated based on the dimensional evaluation results and corresponding dimensional planning prompts. Based on the evaluation report, the current subtask plan is replanned to obtain an updated subtask plan.

6. The method according to claim 4, characterized in that, The at least two dimensions include at least two of the confidence dimension, completeness dimension, or relevance dimension of the execution result; the evaluation results of the at least two dimensions include at least two of the confidence score, completeness score, or relevance score; the dimension reprogramming conditions include at least two of the preset confidence score, preset completeness score, or preset relevance score.

7. The method according to claim 1, characterized in that, When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan, including: When the evaluation results meet the preset replanning conditions, an evaluation report is generated based on the evaluation results; Determine the context of the current subtask plan within the initial task plan; Obtain the execution results of the sub-task plans that have been executed in the initial task plan, and re-plan based on the current sub-task plan, the execution results of the executed sub-task plans, the context, and the evaluation report to obtain an updated sub-task plan.

8. The method according to claim 1, characterized in that, The evaluation results include dimensional evaluation results of at least two dimensions; the quality evaluation of the execution results obtained from the current subtask plan executed in the plurality of subtask plans, to obtain the evaluation result corresponding to the current subtask plan, includes: The execution results of the current subtask plan executed in the plurality of subtask plans are evaluated in at least two dimensions to obtain dimensional evaluation results in at least two dimensions. A comprehensive evaluation is performed based on the dimensional evaluation results of at least two dimensions to obtain the evaluation result corresponding to the current subtask plan.

9. The method according to claim 1, characterized in that, The step of performing task planning based on the task to be processed to obtain an initial task plan includes: The planning agent is invoked, and the invoked planning agent performs task planning based on the task to be processed to obtain an initial task plan; The sequential execution of the plurality of subtask plans, and the quality evaluation of the execution results obtained from the current subtask plan executed among the plurality of subtask plans, include: The execution agent is invoked to execute the multiple sub-task plans sequentially. When the execution result of the current sub-task plan is obtained, the evaluation agent is invoked. The quality of the execution results is evaluated by the invoked evaluation agent; When the evaluation result meets the preset replanning conditions, the current subtask plan is replanned based on the evaluation result to obtain an updated subtask plan, including: When the evaluation result meets the preset replanning conditions, the replanning agent is invoked. The invoked replanning agent replans the current subtask plan based on the evaluation result to obtain an updated subtask plan.

10. The method according to claim 9, characterized in that, The executing agent includes an agent that executes each of the sub-task plans, and the method further includes: Based on the intent of the updated subtask plan, select an execution agent from a preset agent pool that matches the intent; Establish a calling relationship between the update subtask plan and the matching execution agent; the calling relationship is used to instruct the matching execution agent to execute the update subtask plan.

11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: If the evaluation result does not meet the preset replanning condition, and the current subtask plan is not the last subtask plan in the initial task plan, determine the next subtask plan of the current subtask plan in the initial task plan; The next subtask plan is updated to the current subtask plan, and the process of executing the current subtask plan continues until the task processing result corresponding to the task to be processed is obtained.

12. The method according to claim 11, characterized in that, The method further includes: When the evaluation result does not meet the preset replanning condition, and the current subtask plan is the last subtask plan in the initial task plan, the task processing result corresponding to the task to be processed is generated based on the execution result of each subtask plan.

13. The method according to claim 1, characterized in that, The tasks to be processed include question-and-answer tasks, and the task processing results include response information for the question-and-answer tasks; the process of obtaining the tasks to be processed and performing task planning based on the tasks to be processed to obtain an initial task plan includes: Obtain a query request, perform intent recognition on the query request, and obtain the intent recognition result; Based on the intent recognition result, a question-answering task is generated. Based on the question-answering task, an initial plan is generated to obtain an initial task plan including multiple sub-task plans and the execution order of the multiple sub-task plans.

14. A task processing device, characterized in that, The device includes: The initial planning module is used to acquire tasks to be processed, perform task planning based on the tasks to be processed, and obtain an initial task plan, which includes multiple sub-task plans. The evaluation module is used to execute the plurality of subtask plans sequentially, evaluate the quality of the execution results obtained from the current subtask plan among the plurality of subtask plans, and obtain the evaluation result corresponding to the current subtask plan; The replanning module is used to replan the current subtask plan based on the evaluation results when the evaluation results meet the preset replanning conditions, so as to obtain an updated subtask plan. The update module is used to update the initial task plan according to the update subtask plan, and continue execution from the updated subtask plan in the updated task plan until the task processing result corresponding to the task to be processed is obtained.

15. 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 13.

16. 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 13.

17. 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 13.