Task processing method and apparatus, device, and storage medium

By receiving tasks to be processed, determining an initial plan based on tool description information and executing it, and using mind trees and tool proxy technology to determine the task completion status, the problem of intelligent customer service robots being unable to handle tasks has been solved, thus improving task processing efficiency and response quality.

WO2026026259A1PCT designated stage Publication Date: 2026-02-05RUIJIE NETWORKS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/100778
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-01
Filing Date
2025-06-12
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

Existing intelligent customer service robots can only answer questions raised by users, but cannot effectively handle tasks, lacking flexibility and efficiency.

Method used

By receiving tasks to be processed, an initial plan is determined based on the tool description information, including initial steps and required tools. The initial plan is executed and response information is generated. The task completion status is judged using mind trees and tool proxy technology, and the selection of candidate plans and tool invocation are optimized to ensure the quality of task completion and response.

Benefits of technology

It enables flexible processing of user input tasks, improves task completion rate and response quality, avoids erroneous output of incomplete tasks, and enhances the processing efficiency and accuracy of intelligent customer service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025100778_05022026_PF_FP_ABST
    Figure CN2025100778_05022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of natural language processing, and provides a task processing method and apparatus, and a device. The method comprises: receiving an input task to be processed; on the basis of said task and tool description information, determining an initial plan for processing said task, the initial plan comprising an initial step for processing said task and a tool required for the initial plan; on the basis of the initial step and the tool required for the initial plan, executing the initial plan to obtain an execution result corresponding to the initial plan; and on the basis of the execution result corresponding to the initial plan, determining response information of said task.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing methods, devices, equipment and storage media

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411052385.6, filed on August 1, 2024, entitled “Task Processing Method, Apparatus and Device”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of natural language processing technology, and in particular to a task processing method, apparatus, device and storage medium. Background Technology

[0004] With the rapid development of information technology, the demand for customer service is constantly increasing. In order to meet the needs of efficient and convenient services, intelligent customer service technology has emerged.

[0005] Intelligent customer service technology can be applied to intelligent customer service robots to answer user questions. Currently, intelligent customer service robots can use rule engines and machine learning algorithms to process user questions, analyzing the questions and outputting answers through models trained with preset rules and data. Summary of the Invention

[0006] This application provides a task processing method, apparatus, device, and storage medium.

[0007] In a first aspect, embodiments of this application provide a task processing method, including:

[0008] Receive input tasks to be processed;

[0009] Based on the description information of the task to be processed and the tools, an initial plan for processing the task to be processed is determined, the initial plan including the initial steps for processing the task to be processed and the tools required by the initial plan;

[0010] Based on the initial steps and the tools required for the initial plan, the initial plan is executed to obtain the execution result corresponding to the initial plan;

[0011] Based on the execution results corresponding to the initial plan, the response information for the task to be processed is determined.

[0012] Through the above steps, the solution of this application embodiment can determine the tools required for the initial plan based on the task to be processed and the tool description information, flexibly call the system's tools to execute the initial plan, and then obtain the response information of the task to be processed, thereby realizing the processing of the task to be processed input by the user, solving the problem that currently only questions raised by users can be answered, but task processing cannot be performed.

[0013] In one possible implementation, determining an initial plan for processing the task to be processed based on the task-to-be-processed and tool description information includes:

[0014] Based on the task to be processed and the tool description information, a first candidate plan set is generated, which includes one or more candidate plans;

[0015] Based on the candidate plan evaluation parameters, determine the scores of one or more candidate plans in the first candidate plan set; and

[0016] The initial plan is determined based on the scores of one or more candidate plans in the first candidate plan set.

[0017] In one possible implementation, determining an initial plan for processing the task to be processed based on the task to be processed and the tool description information includes:

[0018] Analyze the task to be processed to determine the initial steps required to process the task; and

[0019] Based on the tool description information, determine the tools required to perform the initial steps.

[0020] Through the above steps, at least one candidate plan in the first candidate plan set is generated. Then, based on the scores of each candidate plan, an initial plan is determined in the first candidate plan set. This allows for the priority execution of candidate plans with higher scores, thereby improving the efficiency and quality of response information generation.

[0021] In one possible implementation, determining the response information of the task to be processed based on the execution result corresponding to the initial plan includes:

[0022] Based on the execution results corresponding to the initial plan, determine whether the pending task has been completed;

[0023] If it is determined that the task to be processed has been completed, the first response information is determined based on the execution results corresponding to the task to be processed and the initial plan;

[0024] If it is determined that the pending task has not been completed, a second response is determined based on the pending task, the tool description information, and the execution result corresponding to the initial plan.

[0025] By determining whether a pending task has been completed, the response information for the pending task can be determined based on the determination result. This can improve the completion rate of pending tasks and avoid outputting the execution result of the initial plan when the pending task has not been completed as the response information.

[0026] In one possible implementation, determining the second response information based on the task to be processed, the tool description information, and the execution result corresponding to the initial plan includes:

[0027] Perform a first operation, wherein the first operation is used to: determine the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information and the execution results corresponding to the first i plans; and execute the (i+1)th plan to obtain the execution result corresponding to the (i+1)th plan; wherein i is initially 1 and i is a positive integer greater than or equal to 1;

[0028] If, based on the execution results of the first i+1 plans, it is determined that the task to be processed has not been completed, update i to i+1 and repeat the first operation; and

[0029] If it is determined that the task to be processed has been completed based on the execution results corresponding to the first i+1 plans, the second response information is determined based on the execution results corresponding to the first i+1 plans.

[0030] By determining whether a pending task has been completed, the response information for the pending task can be determined based on the determination result. This can improve the completion rate of pending tasks and avoid outputting the execution results of the first i plans as response information when the pending task has not been completed.

[0031] In one possible implementation, determining the (i+1)th plan for processing the task to be processed, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, includes:

[0032] Based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate plan set of the (i+1)th time is generated, and the candidate plan set of the (i+1)th time includes one or more candidate plans;

[0033] Based on the candidate plan evaluation parameters, determine the scores of one or more candidate plans in the (i+1)th candidate plan set; and

[0034] Based on the scores of one or more candidate plans in the (i+1)th candidate plan set, the (i+1)th plan is determined in the (i+1)th candidate plan set.

[0035] Through the above steps, in the absence of completed tasks, a candidate plan set of i+1 is generated based on the first i plans. Based on the scores of each candidate plan, the i+1 plan is selected from the i+1 candidate plan set. This allows for the priority execution of candidate plans with higher scores, thereby improving the efficiency and quality of response information generation.

[0036] In one possible implementation, executing the (i+1)th plan and obtaining the execution result corresponding to the (i+1)th plan includes:

[0037] Based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the previous i plans, determine the target tool for executing the (i+1)th plan, and the input parameters of the target tool; and

[0038] Based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0039] By following the steps above, we can select the appropriate target tool and input parameters for the (i+1)th plan, thereby effectively executing the (i+1)th plan.

[0040] In one possible implementation, determining the second response information based on the execution results corresponding to the first i+1 plans includes:

[0041] Perform a second operation, which is used to: determine whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan, wherein the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to the first i+1 plans; and

[0042] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0043] By performing the above steps to evaluate the quality of the target plan, and outputting the second response information if the target plan meets the quality requirements, the quality of the response information can be improved.

[0044] In one possible implementation, the method further includes:

[0045] If the target plan does not meet the quality requirements, the target plan is updated to obtain an updated target plan;

[0046] The second operation is repeated based on the execution results corresponding to the updated target plan.

[0047] By performing the above steps to evaluate the quality of the target plan, and updating the target plan if it fails to meet the quality requirements, we can avoid outputting non-compliant execution results as response information, thus improving the quality of the response information.

[0048] In one possible implementation, updating the target plan to obtain the updated target plan includes:

[0049] In the candidate plan set corresponding to the first i+1 plans, determine the candidate plan set corresponding to the j-th plan, where j is a positive integer less than or equal to i+1;

[0050] If the candidate plan set corresponding to the j-th plan includes unexecuted candidate plans, then based on the scores of the unexecuted candidate plans, a target candidate plan is determined from among the unexecuted candidate plans; and

[0051] Based on the target candidate plan, the target plan is updated to obtain the updated target plan.

[0052] If the target plan does not meet the quality requirements, updating the target plan and continuously selecting suitable candidate plans from the candidate plan set for execution can increase the probability of successfully processing the pending tasks and improve the processing stability of the pending tasks.

[0053] In one possible implementation, determining an initial plan for processing the task to be processed based on the task-to-be-processed and tool description information includes:

[0054] Using mind tree technology, based on the task to be processed and the tool description information, a candidate node set for the first level of the mind tree is generated, and each candidate node in the candidate node set for the first level has a corresponding candidate plan.

[0055] The score of each candidate node in the candidate node set of the first level is determined based on the candidate plan evaluation parameters;

[0056] Based on the scores of each candidate node in the candidate node set of the first level, the target node of the first level is determined in the candidate node set of the first level, and the candidate plan corresponding to the target node of the first level is determined as the initial plan.

[0057] By using mind tree technology to generate at least one candidate node in the candidate node set of the first level, and then determining the target node of the first level in the candidate node set based on the score of each candidate node, the candidate plan corresponding to the target node of the first level is determined as the initial plan. This can prioritize the execution of the candidate plan corresponding to the candidate node with the higher score, thereby improving the efficiency and quality of response information generation.

[0058] In one possible implementation, determining the response information of the task to be processed based on the execution result corresponding to the initial plan includes:

[0059] Using tool proxy technology, based on the execution results corresponding to the initial plan, it is determined whether the task to be processed has been completed;

[0060] If it is determined that the task to be processed has been completed, the first response information is determined by using a discrimination technique based on the execution results corresponding to the task to be processed and the initial plan;

[0061] If it is determined that the task to be processed has not been completed, a second response is determined based on the task to be processed, the tool description information, and the execution result corresponding to the initial plan, using mind tree technology and the tool proxy technology.

[0062] By using tool proxy technology to determine whether a pending task has been completed, and then determining the response information for the pending task based on the determination result, the completion rate of pending tasks can be improved, and the execution result corresponding to the initial plan in the case of incomplete pending tasks can be output as the response information.

[0063] In one possible implementation, determining the second response information based on the task to be processed, the tool description information, and the execution result corresponding to the initial plan, using mind tree technology and the tool proxy technology, includes:

[0064] Perform a third operation, which is used to: determine the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, using the mind tree technology; and execute the (i+1)th plan using the tool proxy technology to obtain the execution result corresponding to the (i+1)th plan; where i is initially 1 and is a positive integer greater than or equal to 1; and

[0065] If, based on the execution results of the first i+1 plans, it is determined that the task to be processed has not been completed using the tool proxy technology, i is updated to i+1, and the third operation is repeated; and

[0066] If the task to be processed is determined to be completed based on the execution results of the first i+1 plans using the tool proxy technology, the second response information is determined based on the execution results of the first i+1 plans using the discrimination technology.

[0067] By using tool proxy technology to determine whether a pending task has been completed, and then determining the response information for the pending task based on the determination result, the completion rate of pending tasks can be improved, and the execution results of the first i plans in the case of incomplete pending tasks can be avoided as the response information output.

[0068] In one possible implementation, determining the (i+1)th plan for processing the task to be processed, based on the task to be processed, the tool description information, and the execution results corresponding to the previous i plans, using the mind tree technology, includes:

[0069] Using the mind tree technology, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate node set at the (i+1)th level is generated, and each candidate node in the (i+1)th level candidate node set has a corresponding candidate plan.

[0070] The score of each candidate node in the candidate node set of the (i+1)th level is determined based on the candidate plan evaluation parameters;

[0071] Based on the scores of each candidate node in the candidate node set of the (i+1)th level, the target node of the (i+1)th level is determined in the candidate node set of the (i+1)th level, and the candidate plan corresponding to the target node of the (i+1)th level is determined as the (i+1)th plan.

[0072] Through the above steps, in the absence of completed tasks, the mind tree technique generates a candidate node set for the (i+1)th level based on the first i plans. Based on the scores of each candidate node, the target node for the (i+1)th level is selected from the candidate node set for the (i+1)th level. This allows for the priority execution of candidate plans corresponding to candidate nodes with higher scores, thereby improving the efficiency and quality of response information generation.

[0073] In one possible implementation, the step of executing the (i+1)th plan using the tool proxy technology to obtain the execution result corresponding to the (i+1)th plan includes:

[0074] Using the tool proxy technology, based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the previous i plans, the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool, are determined.

[0075] Using the tool proxy technology, based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0076] By following the steps above, we can select the appropriate target tool and input parameters for the (i+1)th plan, thereby effectively executing the (i+1)th plan.

[0077] In one possible implementation, determining the second response information based on the execution results corresponding to the first i+1 plans using a discrimination technique includes:

[0078] Perform a fourth operation, which includes: using the discrimination technique, determining whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to the first i+1 plans;

[0079] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0080] By performing the above steps to evaluate the quality of the target plan, and outputting the second response information if the target plan meets the quality requirements, the quality of the response information can be improved.

[0081] In one possible implementation, the method further includes:

[0082] If the target plan does not meet the quality requirements, the target plan is updated using the mind tree technique to obtain an updated target plan.

[0083] Using the aforementioned discrimination technique, the fourth operation is repeated based on the execution result corresponding to the updated target plan.

[0084] By performing the above steps to evaluate the quality of the target plan, and updating the target plan if it fails to meet the quality requirements, we can avoid outputting non-compliant execution results as response information, thus improving the quality of the response information.

[0085] Secondly, embodiments of this application provide a task processing apparatus, including:

[0086] The receiving unit is used to receive input tasks to be processed.

[0087] The first processing unit is configured to determine an initial plan for processing the task to be processed based on the task to be processed and the tool description information. The initial plan includes initial steps for processing the task to be processed and the tools required by the initial plan.

[0088] An execution unit is configured to execute the initial plan based on the initial steps and the tools required by the initial plan, and obtain the execution result corresponding to the initial plan;

[0089] The second processing unit is used to determine the response information of the task to be processed based on the execution result corresponding to the initial plan.

[0090] In one possible implementation, the first processing unit is specifically used for:

[0091] Based on the task to be processed and the tool description information, a first candidate plan set is generated, the first candidate plan set including at least one candidate plan;

[0092] Based on the candidate plan evaluation parameters, the score of each candidate plan in the first candidate plan set is determined;

[0093] Based on the scores of each candidate plan in the first candidate plan set, the initial plan is determined in the first candidate plan set.

[0094] In one possible implementation, the second processing unit is specifically used for:

[0095] Based on the execution results corresponding to the initial plan, determine whether the pending task has been completed;

[0096] If it is determined that the task to be processed has been completed, the first response information is determined based on the execution results corresponding to the task to be processed and the initial plan;

[0097] If it is determined that the pending task has not been completed, a second response is determined based on the pending task, the tool description information, and the execution result corresponding to the initial plan.

[0098] In one possible implementation, the second processing unit is specifically used for:

[0099] Perform a first operation, which includes: determining the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans; executing the (i+1)th plan to obtain the execution result corresponding to the (i+1)th plan; where i is initially 1 and i is a positive integer greater than or equal to 1;

[0100] If it is determined that the task to be processed has not been completed based on the execution results of the first i+1 plans, update i to i+1 and repeat the first operation;

[0101] If it is determined that the task to be processed has been completed based on the execution results of the first i+1 plans, the second response information is determined based on the execution results of the first i+1 plans.

[0102] In one possible implementation, the second processing unit is specifically used for:

[0103] Based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate plan set of the (i+1)th time is generated, wherein the candidate plan set of the (i+1)th time includes at least one candidate plan;

[0104] Based on the candidate plan evaluation parameters, determine the score of each candidate plan in the (i+1)th candidate plan set;

[0105] Based on the scores of each candidate plan in the (i+1)th candidate plan set, the (i+1)th plan is determined in the (i+1)th candidate plan set.

[0106] In one possible implementation, the second processing unit is specifically used for:

[0107] Based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the first i plans, determine the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool;

[0108] Based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0109] In one possible implementation, the second processing unit is specifically used for:

[0110] Perform a second operation, which includes: determining whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to the first i+1 plans;

[0111] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0112] In one possible implementation, the second processing unit is further configured to:

[0113] If the target plan does not meet the quality requirements, the target plan is updated to obtain an updated target plan;

[0114] The second operation is repeated based on the execution results corresponding to the updated target plan.

[0115] In one possible implementation, the second processing unit is specifically used for:

[0116] In the candidate plan set corresponding to the first i+1 plans, determine the candidate plan set corresponding to the j-th plan, wherein there are unexecuted candidate plans in the candidate plan set corresponding to the j-th plan, and j is a positive integer less than or equal to i+1;

[0117] Based on the scores of the unexecuted candidate plans, a target candidate plan is determined from among the unexecuted candidate plans;

[0118] Based on the target candidate plan, the target plan is updated to obtain the updated target plan.

[0119] In one possible implementation, the first processing unit is specifically used for:

[0120] Using mind tree technology, based on the task to be processed and the tool description information, a candidate node set for the first level of the mind tree is generated, and each candidate node in the candidate node set for the first level has a corresponding candidate plan.

[0121] The score of each candidate node in the candidate node set of the first level is determined based on the candidate plan evaluation parameters;

[0122] Based on the scores of each candidate node in the candidate node set of the first level, the target node of the first level is determined in the candidate node set of the first level, and the candidate plan corresponding to the target node of the first level is determined as the initial plan.

[0123] In one possible implementation, the second processing unit is specifically used for:

[0124] Using tool proxy technology, based on the execution results corresponding to the initial plan, it is determined whether the task to be processed has been completed;

[0125] If it is determined that the task to be processed has been completed, the first response information is determined by using a discrimination technique based on the execution results corresponding to the task to be processed and the initial plan;

[0126] If it is determined that the task to be processed has not been completed, a second response is determined based on the task to be processed, the tool description information, and the execution result corresponding to the initial plan, using mind tree technology and the tool proxy technology.

[0127] In one possible implementation, the second processing unit is specifically used for:

[0128] Perform a third operation, which includes: using the mind tree technology, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, determining the (i+1)th plan for processing the task to be processed; using the tool proxy technology, executing the (i+1)th plan to obtain the execution result corresponding to the (i+1)th plan; where i is initially 1 and is a positive integer greater than or equal to 1;

[0129] If, based on the execution results of the first i+1 plans, it is determined that the task to be processed has not been completed using the tool proxy technology, i is updated to i+1, and the third operation is repeated.

[0130] If the task to be processed is determined to be completed based on the execution results of the first i+1 plans using the tool proxy technology, the second response information is determined based on the execution results of the first i+1 plans using the discrimination technology.

[0131] In one possible implementation, the second processing unit is specifically used for:

[0132] Using the mind tree technology, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate node set at the (i+1)th level is generated, and each candidate node in the (i+1)th level candidate node set has a corresponding candidate plan.

[0133] The score of each candidate node in the candidate node set of the (i+1)th level is determined based on the candidate plan evaluation parameters;

[0134] Based on the scores of each candidate node in the candidate node set of the (i+1)th level, the target node of the (i+1)th level is determined in the candidate node set of the (i+1)th level, and the candidate plan corresponding to the target node of the (i+1)th level is determined as the (i+1)th plan.

[0135] In one possible implementation, the second processing unit is specifically used for:

[0136] Using the tool proxy technology, based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the previous i plans, the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool, are determined.

[0137] Using the tool proxy technology, based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0138] In one possible implementation, the second processing unit is specifically used for:

[0139] Perform a fourth operation, which includes: using the discrimination technique, determining whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to the first i+1 plans;

[0140] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0141] In one possible implementation, the second processing unit is further configured to:

[0142] If the target plan does not meet the quality requirements, the target plan is updated using the mind tree technique to obtain an updated target plan.

[0143] Using the aforementioned discrimination technique, the fourth operation is repeated based on the execution result corresponding to the updated target plan.

[0144] Thirdly, embodiments of this application provide a task processing device, including: at least one processor and a memory;

[0145] The memory stores computer-executed instructions;

[0146] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the task processing method as described in any of the first aspects.

[0147] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a controller, are used to implement the task processing method as described in any of the first aspects.

[0148] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a controller, implements the task processing method described in any of the first aspects.

[0149] The task processing method, apparatus, and device provided in this application first receive an input task to be processed, and based on the task to be processed and tool description information, determine an initial plan for processing the task. The initial plan includes initial steps for processing the task and the tools required by the initial plan. Then, the initial plan is executed based on the initial steps and the tools required by the initial plan to obtain the execution result corresponding to the initial plan. Finally, the response information for the task to be processed is determined based on the execution result corresponding to the initial plan. The solution in this application, for a task to be processed, can determine the tools required by the initial plan by combining the tool description information, flexibly call the system's tools to execute the initial plan, and then obtain the response information for the task to be processed. This realizes the processing of user-input tasks and solves the problem that currently, it can only answer user questions but cannot process tasks. Attached Figure Description

[0150] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0151] Figure 1 is a schematic diagram of the application scenario of an embodiment of this application.

[0152] Figure 2 is a flowchart of the task processing method provided in the embodiment of this application.

[0153] Figure 3 is a schematic diagram of determining an initial plan according to an embodiment of this application.

[0154] Figure 4 is a task processing flowchart provided in an embodiment of this application.

[0155] Figure 5 is a flowchart of determining the response information of the task to be processed according to an embodiment of this application.

[0156] Figure 6 is a flowchart of the process for determining response information provided in an embodiment of this application.

[0157] Figure 7 is a schematic diagram of a tool calling process and a large language model inference provided in an embodiment of this application.

[0158] Figure 8 is a flowchart of the process of determining response information provided in an embodiment of this application.

[0159] Figure 9 is a schematic diagram of the update target plan provided in an embodiment of this application.

[0160] Figure 10 is a schematic diagram of the structure of the task processing device provided in the embodiment of this application.

[0161] Figure 11 is a schematic diagram of the structure of the task processing device provided in the embodiment of this application.

[0162] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0163] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0164] The terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.

[0165] Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, meaning that a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to those processes, methods, systems, products, or devices.

[0166] The module divisions presented in this document are merely logical divisions. In practical applications, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through interfaces, and the indirect couplings or communication connections between modules may be electrical or other similar forms, none of which are limited in this document. Moreover, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may not be divided into multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0167] With the rapid development of information technology, the demand for customer service is constantly increasing. However, human customer service suffers from problems such as low efficiency, high labor costs, long training cycles, and the inability to provide 24 / 7 service, making it unable to meet the efficient and convenient service needs of modern users. Therefore, intelligent customer service technology has emerged.

[0168] Intelligent customer service technology is primarily applied to intelligent customer service robots. After a user inputs a question, the intelligent customer service robot can analyze and process the input and output a corresponding answer. Currently, there are two main methods for intelligent customer service robots to analyze and process input questions. One method involves training a model using pre-defined rules and data to analyze and process the user's question. This method generates answers that are too fixed and lacks flexibility, failing to accurately respond to new question types. The other method utilizes large-scale pre-trained language models and document knowledge graph construction techniques to retrieve relevant content from documents and generate answers to the user's question. This method is limited by the accuracy of the retrieval and the amount of data, making it prone to providing irrelevant answers and also lacking flexibility.

[0169] This application provides a task processing method to process user-input tasks. The solution of this application embodiment will be described below with reference to the accompanying drawings.

[0170] First, with reference to Figure 1, we will introduce an applicable application scenario of the embodiments of this application.

[0171] Figure 1 is a schematic diagram of an applicable application scenario provided by an embodiment of this application. As shown in Figure 1, it includes a client 11 and a server 12, and the client 11 and the server 12 can interact with each other.

[0172] User A can input a task to be processed through client 11, and then client 11 sends the task input by user A to server 12. Server 12 processes the task, obtains the response information, and outputs the response information through client 11.

[0173] It should be noted that client 11 and server 12 can be two independent devices, or they can be two different components of the same device. This application embodiment does not limit this. For example, client 11 and server 12 can be two components of an intelligent customer service robot, where client 11 is the input / output component of the intelligent customer service robot, used to receive the task to be processed input by user A and output response information, and server 12 is the processing component of the intelligent customer service robot, used to parse and process the task to be processed to obtain response information.

[0174] Based on the application scenario illustrated in Figure 1, the solution of this application embodiment will be described below in conjunction with Figure 2.

[0175] Figure 2 is a flowchart of the task processing method provided in the embodiment of this application. As shown in Figure 2, the method includes the following steps.

[0176] S21, Receive the input task to be processed.

[0177] The executing entity in this application embodiment can be a server, processor, microprocessor, or other component capable of data processing, or it can be a device that integrates server, processor, microprocessor, or other components, such as an electronic device. This application embodiment does not limit the executing entity; any device with data processing capabilities is acceptable. In the following embodiments, a server is used as the executing entity for description.

[0178] The server receives tasks to be processed. These tasks can be input by the user via voice or via devices such as keyboards, mice, or clients. This application embodiment does not limit the specific input of these tasks.

[0179] Tasks to be processed can be of different types. For example, a task to be processed can be a question entered by the user, in which case the server needs to answer the question; or a task to be processed can be an operation that the user wants to perform, in which case the server needs to perform the corresponding operation based on the task to be processed.

[0180] S22, Based on the description information of the task to be processed and the tools, determine an initial plan for processing the task to be processed. The initial plan includes the initial steps for processing the task to be processed and the tools required for the initial plan.

[0181] Tool description information refers to the information used to describe each tool. The system has several different tools pre-installed, each with different functions and usage methods, and therefore different tool description information.

[0182] Tool description information may include, but is not limited to, one or more types of information describing the tool's name, function, usage, input parameters, output parameters, and tool type.

[0183] Taking the WiFi configuration tool as an example, the tool is named WiFi Configuration Tool. Its function is to create a Service Set Identifier (SSID) signal through a wireless access point (AP) device. The input parameters are the name and password of the WiFi to be created. The usage method is to call it and input the configured WiFi name, password, etc. through the API interface. The output is information on whether the WiFi creation was successful. All of this information can be used as the tool description information for creating engineering tools.

[0184] Taking the user tool as an example, the tool is named the user tool. Its function is to ask the user follow-up questions when the user information is unclear. The input parameter is a follow-up question. The usage is that after the call, the client will output the follow-up question to the user. After the user answers, it will be output to the system as the return information of the user tool. The output parameter is the user's answer. All of this information can be used as the tool description information of the user tool.

[0185] Taking the expert tool as an example, the tool is named "Expert Tool". Its function is to seek help from human customer service when the server cannot solve the relevant problem. The input parameter is a question that needs help. The usage method is to send the question to the human customer service in the background after calling it. After the human customer service solves the problem, it returns the solution to the system. The output parameter is the solution. All of this information can be used as the tool description information of the expert tool.

[0186] In the above embodiments, the tool description information is introduced using WiFi configuration tools, user tools, and expert tools as examples. It should be noted that other types of tools can also be pre-configured in the system, and thus also include corresponding tool description information.

[0187] After receiving the task to be processed, the server determines the initial plan based on the task to be processed and the tool description information. The initial plan includes the initial steps and the tools required for the initial plan.

[0188] In one possible implementation, the server can parse the task to be processed, determine the initial steps required to process the task, and then, in conjunction with the tool description information, determine the tools required to perform the initial steps and identify them as the tools required for the initial plan.

[0189] In one possible implementation, the server can also convert the task to be processed and the tool description information into corresponding prompts, and then input the corresponding prompts into the large language model, which will output an initial plan for processing the task to be processed.

[0190] Taking the pending task as "Help me set up the network," and the system's pre-configured tools including Tool A (WiFi configuration tool) and Tool B (user tool) as an example, the prompt word could be:

[0191] "Pending task: Help me set up the network at the start;"

[0192] There are now pre-configured tools A and B in the system;

[0193] Tool A's description is as follows: Tool Name - WiFi Configuration Tool; Function - Creates an SSID signal via an AP device; Input Parameters - The name and password of the WiFi to be created; Usage - After calling the tool, input the configured WiFi name, password, etc., through the API interface; Output - Information indicating whether WiFi creation was successful.

[0194] Tool B's description information is as follows: Tool Name - User Tool; Function - Used to ask follow-up questions to the user when user information is unclear; Input Parameter - A follow-up question; Usage - After invocation, the client will output a follow-up question to the user, and the user's answer will be returned to the system as the user tool's response; Output Parameter - The user's answer;

[0195] Based on the information above, please generate an initial plan for the tasks to be processed.

[0196] In one possible implementation, the server can also convert the task to be processed and the tool description information into corresponding prompts, and then input the corresponding prompts into a large language model. The large language model outputs a first candidate plan set, which includes multiple candidate plans for processing the task to be processed. Then, based on the candidate plan evaluation parameters, the score of each candidate plan in the first candidate plan set is determined, and based on the scores of each candidate plan, an initial plan is determined from the first candidate plan set.

[0197] This process can be seen in the example in Figure 3. Figure 3 is a schematic diagram of determining an initial plan according to an embodiment of this application. As shown in Figure 3, the task to be processed is "help me set up the network". Based on the task to be processed and the tool description information, the corresponding prompt is obtained (see the example of the prompt in Figure 3) and input into the large language model. The large language model generates the first candidate plan set and the score of each candidate plan according to the prompt.

[0198] Taking the pending task as "Help me set up the network," and the system's pre-configured tools including Tool A (WiFi configuration tool) and Tool B (user tool) as an example, the prompt word could be:

[0199] "Pending task: Help me set up the network at the start;"

[0200] There are now pre-configured tools A and B in the system;

[0201] Tool A's description is as follows: Tool Name - WiFi Configuration Tool; Function - Creates an SSID signal via an AP device; Input Parameters - The name and password of the WiFi to be created; Usage - After calling the tool, input the configured WiFi name, password, etc., through the API interface; Output - Information indicating whether WiFi creation was successful.

[0202] Tool B's description information is as follows: Tool Name - User Tool; Function - Used to ask follow-up questions to the user when user information is unclear; Input Parameter - A follow-up question; Usage - After invocation, the client will output a follow-up question to the user, and the user's answer will be returned to the system as the user tool's response; Output Parameter - The user's answer;

[0203] Based on the above information, please generate the first candidate plan set, and then score each candidate plan in the first candidate plan set based on feasibility, resource utilization, and efficiency.

[0204] In this embodiment, the first candidate plan set can be generated by initializing a mind tree. As shown in Figure 3, after obtaining the prompt based on the task to be processed and the tool description information, the first candidate plan set is obtained through processing by a large language model. The first candidate plan set includes plan A, plan B, and plan C, which correspond to the three initial nodes of the mind tree. Furthermore, the large language model can output the scores of each of the three plans. As shown in Figure 3, plan A has a score of 4 points, plan B has a score of 9 points, and plan C has a score of 2 points. Then, the server determines plan B, which has the highest score, as the initial plan.

[0205] S23, Execute the initial plan based on the tools required by the initial steps and the initial plan, and obtain the execution results corresponding to the initial plan.

[0206] After obtaining the tools required for the initial steps and initial plan, the server can call the tools required for the initial plan based on the initial steps, execute the initial plan, and obtain the corresponding execution results.

[0207] For example, the server can determine the output parameters of the tools required for the initial plan, the name of the tools, and other information based on the initial steps. Then, based on the name and output parameters of the tools, the server can call the tools to execute the initial plan and obtain the execution results corresponding to the initial plan.

[0208] For example, the server can convert the tool description information of the tools required for the initial steps and initial plan into corresponding prompts, then input the corresponding prompts into the large language model, which will output the tool name and input parameters to be called, execute the initial plan through the API interface, and obtain the execution results of the tools, thereby obtaining the execution results corresponding to the initial plan.

[0209] Taking the task to be processed as "Help me set up the network", the initial plan as creating a project interface, and the required tool as tool A (WiFi configuration tool) as an example, the prompt word could be:

[0210] "Pending task: Help me set up the network at the start;"

[0211] Tool A's description is as follows: Tool Name - WiFi Configuration Tool; Function - Creates an SSID signal via an AP device; Input Parameters - The name and password of the WiFi to be created; Usage - After calling the tool, input the configured WiFi name, password, etc., through the API interface; Output - Information indicating whether WiFi creation was successful.

[0212] Initial plan: Create project interfaces;

[0213] Based on the information above, please output the name of the tool to be called and the input parameters.

[0214] S24. Based on the execution results corresponding to the initial plan, determine the response information for the tasks to be processed.

[0215] After obtaining the execution result corresponding to the initial plan, the server can directly determine the execution result as the response information for the pending task and output the response information. Alternatively, the server can determine whether the pending task has been completed based on the execution result of the initial plan. If it is determined that the pending task has been completed, the server converts the execution result of the initial plan and the pending task into a corresponding prompt, and then inputs the corresponding prompt into the large language model. The large language model outputs a quality assessment result, which indicates whether the initial plan meets the quality requirements, i.e., whether the execution result of the initial plan can solve the pending task.

[0216] Taking the pending task as "Help me set up the network" and the initial plan as creating a project interface as an example, the prompt message could be something like:

[0217] "Pending task: Help me set up the network at the start;"

[0218] The execution result corresponding to the initial plan is: Project interface successfully created;

[0219] Based on the information above, please output the quality assessment result in the format True / False (choose one).

[0220] Optionally, the quality assessment result can be indicated by the field "True" or "False". "True" indicates that the initial plan meets the quality requirements, meaning that the execution result of the initial plan can resolve the task to be processed; "False" indicates that the initial plan does not meet the quality requirements, meaning that the execution result of the initial plan cannot resolve the task to be processed. Then, combining the quality assessment result and the execution result of the initial plan, the response information for the task to be processed is determined and output.

[0221] The task processing method provided in this application first receives an input task to be processed, and then determines an initial plan for processing the task based on the task and tool description information. The initial plan includes initial steps for processing the task and the tools required by the initial plan. The initial plan is then executed based on the initial steps and the required tools to obtain the corresponding execution result. Finally, the response information for the task is determined based on the execution result. This solution, by combining the tool description information with the task description, can determine the tools required for the initial plan, flexibly invoke system tools to execute the initial plan, and thus obtain the response information for the task. This achieves the processing of user-input tasks, solving the current problem that it can only answer user questions but cannot perform task processing.

[0222] Based on any of the above embodiments, the solutions of the embodiments of this application will be further described below with reference to the accompanying drawings.

[0223] First, the overall process framework of the solution of the embodiment of this application will be introduced with reference to Figure 4.

[0224] Figure 4 is a task processing flowchart provided in an embodiment of this application. As shown in Figure 4, the input task to be processed is first received, and then the agent tool is initialized. The process of initializing the agent tool is the process of obtaining the tool description information of each tool preset in the system.

[0225] Then, the task to be processed and the tool description information are input into the mind tree decision generation module. The mind tree decision generation module represents the solution process of the task to be processed as a tree. Each node in the mind tree represents a part of the solution. By maintaining the mind tree, the mind tree decision generation module searches for different solutions on the mind tree to process the task to be processed.

[0226] As shown in Figure 4, the overall processing of the mind tree decision generation module includes: outputting multiple candidate plans, evaluating multiple candidate plans, growing the mind tree, and outputting the plan to be executed.

[0227] After the mind tree decision generation module outputs the plan to be executed, it is input into the reason and act (ReAct) tool agent module (also known as the tool agent module). The overall processing of the ReAct tool agent module includes: thinking about the plan to be executed, calling the tool to execute the plan, and outputting the execution result.

[0228] Initially, the mind tree decision generation module can use mind tree technology to generate a set of candidate nodes for the first level of the mind tree based on the task to be processed and the tool description information. The set of candidate nodes for the first level includes multiple candidate nodes, and each node corresponds to a candidate plan. For example, the three nodes in Figure 3 belong to multiple candidate nodes in the set of candidate nodes for the first level of the mind tree, and the plans corresponding to the three nodes are Plan A, Plan B, and Plan C, respectively.

[0229] After generating the candidate node set for the first level, the mind tree decision generation module determines the score of each candidate node in the candidate node set for the first level based on the candidate plan evaluation parameters.

[0230] Candidate plan evaluation parameters are used to indicate the criteria for scoring candidate plans. Accordingly, the candidate plan evaluation parameters can be scores under different scoring criterion dimensions. Scoring criteria may include dimensions such as feasibility, efficiency, and resource utilization of the candidate plan. Therefore, scores under different scoring criterion dimensions may include feasibility scores, efficiency scores, resource utilization scores, etc. For each candidate node in the first-level candidate node set, the mind tree decision generation module can obtain a score for that candidate node based on the scores of the corresponding candidate plan under at least one scoring criterion dimension. The scores under at least one scoring criterion dimension may include at least one of feasibility scores, efficiency scores, or resource utilization scores.

[0231] Then, the mind tree decision generation module determines the target node of the first level based on the scores of each candidate node in the candidate node set of the first level, and determines the candidate plan corresponding to the target node of the first level as the initial plan.

[0232] After determining the initial plan, the mind tree decision generation module inputs the initial plan into the ReAct tool proxy module. The ReAct tool proxy module then executes the initial plan using tool proxy technology, obtaining the corresponding execution result. Specifically, the ReAct tool proxy module, based on the initial plan, tool description information, and the task to be processed, determines the tool for executing the initial plan and its input parameters. Then, using tool proxy technology, the ReAct tool proxy module executes the initial plan based on the tool and its corresponding input parameters, obtaining the corresponding execution result.

[0233] After obtaining the execution result corresponding to the initial plan, the ReAct tool proxy module, using tool proxy technology, determines whether the pending task has been completed based on the execution result of the initial plan. The ReAct tool proxy module's judgment of the execution result of the initial plan involves assessing the completeness of the pending task execution, as shown in Figure 4, i.e., determining whether the pending task has ended (ReAct tool proxy module judgment). Specifically, the ReAct tool proxy module can convert the execution result of the initial plan and the pending task into corresponding prompts, then input the corresponding prompts into the large language model, which outputs a judgment result indicating whether the pending task has been completed.

[0234] Once it is determined that the pending task has been completed, the ReAct tool agent module sends the execution results corresponding to the pending task and the initial plan to the discrimination module; the discrimination module determines the first response information based on the execution results corresponding to the pending task and the initial plan using discrimination technology.

[0235] Specifically, the discrimination module can use discrimination techniques to determine whether the initial plan meets the quality requirements based on the execution results corresponding to the task to be processed and the initial plan, as shown in Figure 4, i.e., whether the user's problem has been solved (discrimination module judgment). If so, the execution result corresponding to the initial plan can be determined as the first response information, as shown in Figure 4, thus confirming that the final answer can be found. If not, it first checks whether there are any untraversed nodes. Currently, there are candidate nodes in the first-level candidate node set in the mind tree. If there are untraversed candidate nodes (i.e., unexecuted candidate plans) in the first-level candidate node set, a mind tree pruning operation can be performed. Then, the discrimination module can send the quality evaluation result to the mind tree decision generation module. The mind tree decision generation module, using mind tree technology, selects a new candidate node as the updated target node of the first level based on the scores of each candidate node in the first-level candidate node set, and determines the candidate plan corresponding to the updated target node of the first level as the updated initial plan. The above steps are then repeated based on the updated initial plan. If there are no unvisited candidate nodes, then it can be determined that no answer can be found.

[0236] If it is determined that the pending task has not been completed, the second response information is determined based on the pending task, tool description information and execution results corresponding to the initial plan, using mind tree technology and tool proxy technology.

[0237] Specifically, the third operation is performed, which includes: the mind tree decision generation module, using mind tree technology, determines the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information, and the execution results of the first i plans, and sends the (i+1)th plan to the ReAct tool proxy module; the ReAct tool proxy module, using tool proxy technology, executes the (i+1)th plan and obtains the execution result corresponding to the (i+1)th plan; i is initially 1, and i is a positive integer greater than or equal to 1.

[0238] The mind tree decision generation module determines the (i+1)th plan using mind tree technology. First, based on the task to be processed, tool description information, and the execution results of the previous i plans, the module generates a candidate node set for the (i+1)th level. Each candidate node in the (i+1)th level candidate node set has a corresponding candidate plan. Then, the module determines the score of each candidate node in the (i+1)th level candidate node set based on the candidate plan evaluation parameters. Finally, based on the scores of each candidate node in the (i+1)th level candidate node set, the module determines the target node for the (i+1)th level and identifies the candidate plan corresponding to the target node as the (i+1)th plan.

[0239] The ReAct tool proxy module executes the (i+1)th plan using tool proxy technology. First, based on the (i+1)th plan, tool description information, tasks to be processed, and the execution results of the previous i plans, the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool, is determined. Then, based on the target tool and its input parameters, the (i+1)th plan is executed using tool proxy technology, and the execution result corresponding to the (i+1)th plan is obtained.

[0240] After the ReAct tool proxy module executes the (i+1)th plan and obtains its execution result, it uses tool proxy technology to determine whether to end the pending task. Specifically, it determines whether the pending task is complete based on the execution results of the previous (i+1) plans. As shown in Figure 4, this involves determining whether to end the pending task (ReAct tool proxy module judgment). Specifically, the ReAct tool proxy module can convert the execution results of the previous (i+1) plans and the pending task into corresponding prompts, then input these prompts into the large language model. The large language model outputs a judgment result indicating whether the pending task has been completed.

[0241] When the ReAct tool proxy module determines that there are unfinished tasks based on the execution results of the first i+1 plans using tool proxy technology, it sends the execution result of the i+1th plan to the mind tree decision generation module and updates i to i+1; then it repeats the third operation. As shown in Figure 4, if the unfinished tasks are not completed, the mind tree decision generation module needs to grow the mind tree to generate the candidate node set for the next level and repeat the above steps.

[0242] When the ReAct tool proxy module determines that the pending task has been completed based on the execution results of the first i+1 plans using tool proxy technology, it sends the execution results of the first i+1 plans to the discrimination module. The discrimination module then determines the second response information based on the execution results of the first i+1 plans using discrimination technology. As shown in Figure 4, after the pending task is completed, the discrimination module determines whether the user's problem has been resolved.

[0243] Specifically, the discrimination module performs a fourth operation, which includes: using discrimination technology, based on the execution results corresponding to the task to be processed and the target plan, determining whether the target plan meets the quality requirements; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to each of the first i+1 plans.

[0244] If the target plan meets the quality requirements, the discrimination module determines the second response information based on the execution result corresponding to the target plan. As shown in Figure 4, if the user's problem is solved, it can be determined that the final answer can be found.

[0245] If the target plan does not meet the quality requirements, the discrimination module sends the target plan to the thinking tree decision generation module. The thinking tree decision generation module updates the target plan using thinking tree technology, obtaining an updated target plan, and sends the updated target plan to the discrimination module. The discrimination module, based on the execution result corresponding to the updated target plan, repeats the fourth operation. As shown in Figure 4, it first determines whether there are any untraversed nodes. Currently, there are candidate nodes in the candidate node set of i+1 levels in the thinking tree. If there are any untraversed candidate nodes (i.e., candidate plans that have not been executed) in these i+1 levels of candidate node sets, a thinking tree pruning operation can be performed. Then, the discrimination module can send the quality evaluation result to the thinking tree decision generation module. The thinking tree decision generation module selects a new candidate node based on the scores of each candidate node in the i+1 levels of candidate node sets, updates the target plan, and repeats the above steps based on the updated target plan. If there are no untraversed candidate nodes, it can be determined that no answer can be found.

[0246] The mind tree pruning process can be seen in the example in Figure 4. First, pruning is performed, that is, deleting failed nodes from the mind tree. In this embodiment, if after executing the (i+1)th plan, the discrimination module determines that the target plan (i.e., the first i+1 plans) does not meet the quality requirements, then the node corresponding to the (i+1)th plan is the failed node in the mind tree. Then, traversal starts from the last level node in the mind tree, and a new plan is output. Specifically, it is determined whether the search is complete (i.e., the search of all levels of nodes is completed). If yes, it is determined that the search cannot continue and no answer can be found; if no, the nodes of the kth level are searched, and it is determined whether there are any untraversed nodes in the kth level of the mind tree. k is initially M, where M is the number of levels included in the mind tree, and M is a positive integer.

[0247] If there are no untraversed nodes in the k-th level of the mind tree, update k to k-1 and continue pruning and searching for nodes in the k-th level; if there are untraversed nodes in the k-th level, output the plan corresponding to the untraversed nodes in the k-th level.

[0248] Then, the plans corresponding to the untraversed nodes are input into the mind tree decision generation module to update the mind tree. The mind tree decision generation module and the ReAct tool proxy module continue to output and execute the plans. For details, please refer to the above-mentioned introduction.

[0249] As shown in Figure 4, the solution of this application introduces mind tree technology on the ReAct framework, and combines plan backtracking, multi-path exploration, dynamic adjustment and optimization, multi-tool collaboration and feedback-based error correction mechanism, which can significantly improve the flexibility, accuracy and stability of the intelligent customer service system's response.

[0250] The following describes the solution of the embodiment of this application in further detail within the process framework illustrated in Figure 4.

[0251] Figure 5 is a flowchart of determining the response information of the task to be processed according to an embodiment of this application. As shown in Figure 5, it includes the following steps.

[0252] S51, based on the execution results corresponding to the initial plan, determines whether the pending tasks have been completed.

[0253] S51 involves determining the completeness of the task to be processed. For example, if completing the task requires three steps (A, B, and C), and the initial plan only completed step A and obtained the result of step A, then the task is incomplete. Conversely, if completing the task only requires step A, and the initial plan completed step A and obtained the result of step A, then the task is complete. The large language model then outputs the final response information based on the execution result.

[0254] In one possible implementation, the server can convert the execution results and pending tasks corresponding to the initial plan into corresponding prompts, and then input the corresponding prompts into the large language model. The large language model will output a judgment result, which indicates whether the pending tasks have been completed.

[0255] Taking the task to be processed as "Help me set up the network", the initial plan as "To set up the network, a project needs to be created first", and the execution result corresponding to the initial plan as "Project creation completed", the prompt input to the large language model could be, for example:

[0256] "Pending task: Help me set up the network at the start;"

[0257] The execution result corresponding to the initial plan: Project creation completed;

[0258] Please determine whether the pending task has been completed.

[0259] Then, if the large language model outputs "The task to be processed has not been completed", the server can determine that the task to be processed has not been completed.

[0260] S52, if it is determined that the pending task has been completed, determine the first response information based on the execution results corresponding to the pending task and the initial plan.

[0261] In one possible implementation, the execution result corresponding to the initial plan can be directly determined as the first response information.

[0262] In one possible implementation, the execution results of the initial plan can be evaluated based on the task to be processed to determine whether the initial plan meets the quality requirements. If the initial plan meets the quality requirements, the execution result corresponding to the initial plan is determined as the first response information. If the initial plan does not meet the quality requirements, a new initial plan can be selected from the first candidate plan set, and then the new initial plan is executed. Based on the execution result corresponding to the new initial plan, the first response information is determined. For example, in the example of Figure 3, Plan A, Plan B, and Plan C are pre-generated. Since Plan B has the highest score, Plan B is determined as the initial plan and is executed. If Plan B does not meet the quality requirements, the server can determine Plan A as the new initial plan, execute Plan A, obtain the execution result corresponding to Plan A, and determine the first response information based on the execution result corresponding to Plan A.

[0263] It should be noted that if the execution result corresponding to the new initial plan determines that the pending task is not completed, then the next plan needs to be generated and executed based on the new initial plan. This process can be referred to the relevant description of S53 in the following embodiments, and will not be repeated here. If the execution result corresponding to the new initial plan determines that the pending task has been completed, then the execution result corresponding to the new initial plan can be directly determined as the first response information. Alternatively, the first response information can be determined based on whether the new initial plan meets the quality requirements. This process can be referred to the relevant description in S52.

[0264] S53, if it is determined that the pending task has not been completed, determine the second response information based on the pending task, the tool description information and the execution result corresponding to the initial plan.

[0265] If the pending tasks are not completed, a new plan needs to be generated based on the initial plan. The process is described below with reference to Figure 6.

[0266] Figure 6 is a flowchart of determining response information provided in an embodiment of this application. As shown in Figure 6, it includes:

[0267] S61, perform the first operation, which includes: determining the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information, and the execution results of the first i plans.

[0268] i is initially set to 1, and i is a positive integer greater than or equal to 1. The first operation may specifically include the following steps (a)-(c):

[0269] (a) Based on the task to be processed, the tool description information and the execution results of the first i plans, generate the (i+1)th candidate plan set, which includes at least one candidate plan.

[0270] In one possible implementation, the server can convert the task to be processed, the tool description information, and the execution results of the first i plans into corresponding prompts, and then input the corresponding prompts into the large language model, which outputs the (i+1)th candidate plan set, which includes at least one candidate plan.

[0271] (b) Determine the score of each candidate plan in the (i+1)th candidate plan set based on the candidate plan evaluation parameters.

[0272] Candidate plan evaluation parameters are used to indicate the criteria for scoring candidate plans. The scoring criteria may include dimensions such as feasibility, efficiency, and resource utilization of the candidate plan. In other words, candidate plan evaluation parameters may include feasibility, efficiency, resource utilization, etc.

[0273] In one possible implementation, for any candidate plan in the (i+1)th candidate plan set, the server obtains a score for the candidate plan based on at least one of the scores of the candidate plan under the scoring criteria dimension (e.g., feasibility score, efficiency score, resource utilization score).

[0274] For example, the feasibility score, efficiency score, and resource utilization score of the candidate plan can be averaged to obtain the score of the candidate plan; or different weights can be set for the feasibility score, efficiency score, and resource utilization score, and the score of the candidate plan can be obtained based on the feasibility score, efficiency score, resource utilization score, and their respective weights.

[0275] In one possible implementation, for any candidate plan in the (i+1)th candidate plan set, the server can convert the candidate plan and the candidate plan evaluation parameters into a corresponding prompt, and then input the corresponding prompt into the large language model, which will output the score of the candidate plan.

[0276] Taking the task to be processed as "help me set up the network" and the candidate plan as "consulting users' needs scenarios" as an example, the prompt input to the large language model could be, for example:

[0277] "Pending task: Help me set up the network at the start;"

[0278] Candidate plans: Consulting users' needs and scenarios;

[0279] Please rate the candidate plans based on several dimensions, including feasibility, efficiency, and resource utilization.

[0280] Then, if the large language model outputs "the candidate plan has a score of 9 points", the server can determine that the candidate plan has a score of 9 points.

[0281] (c) Based on the scores of each candidate plan in the (i+1)th candidate plan set, determine the (i+1)th plan in the (i+1)th candidate plan set.

[0282] After obtaining the scores of each candidate plan in the (i+1)th candidate plan set, the server can determine the candidate plan with the highest score as the (i+1)th plan, the server can also determine the candidate plan with the second highest score as the (i+1)th plan, and so on.

[0283] S62, execute the (i+1)th plan and obtain the execution result corresponding to the (i+1)th plan.

[0284] After determining the (i+1)th plan, the server needs to select a suitable tool to execute the (i+1)th plan.

[0285] Executing the (i+1)th plan may specifically include the following steps (d)-(e):

[0286] (d) Based on the (i+1)th plan, tool description information, tasks to be processed, and the execution results of the previous i plans, determine the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool.

[0287] The execution results of the first i plans are historical execution information, and the (i+1)th plan is a plan executed based on the first i plans.

[0288] In one possible implementation, the server can output the thought process for executing the (i+1)th plan based on the (i+1)th plan, tool description information, tasks to be processed, and the execution results of the previous (i)th plans.

[0289] Specifically, the server can convert the (i+1)th plan, tool description information, pending tasks, and the execution results of the previous i plans into corresponding prompts, and then input the corresponding prompts into the large language model, which will output the thought process for executing the (i+1)th plan.

[0290] (d) is the process of selecting a suitable tool for the (i+1)th plan. The execution information corresponding to the (i+1)th plan indicates how to execute the (i+1)th plan, and different execution methods require different tools.

[0291] For example, if the (i+1)th plan is to consult the user's needs, and if the thought process of the (i+1)th plan indicates that the needs are determined by questioning the user, then the required tools include user tools; if the thought process of the (i+1)th plan indicates that the needs are determined by seeking help from human customer service, then the required tools include expert tools, and so on.

[0292] In one possible implementation, the server can convert the thought process of the (i+1)th plan, the (i+1)th plan, the tool description information, the task to be processed, and the execution results of the previous i plans into corresponding prompts, and then input the corresponding prompts into the large language model, which will output the name of the target tool.

[0293] Then, the server can convert the thought process of the (i+1)th plan, the (i+1)th plan, the tool description information, the tasks to be processed, the execution results of the first i plans, and the name of the target tool into corresponding prompts. Then, the corresponding prompts are input into the large language model, and the large language model outputs the input parameters of the target tool. The input parameters of the target tool are used to call the target tool.

[0294] (e) Based on the target tool and the input parameters of the target tool, execute the (i+1)th plan and obtain the execution result corresponding to the (i+1)th plan.

[0295] Once the input parameters of the target tool are determined, the target tool can be invoked through the input parameters. The target tool will then process the input parameters, execute the (i+1)th plan, and obtain the execution result corresponding to the (i+1)th plan.

[0296] For example, if the (i+1)th plan is to consult a user's needs scenario, the target tool is the user tool, and the input parameter is a follow-up question such as "What is your needs scenario?", then the server calls the user tool through the output parameter, and the front end outputs the follow-up question to the user. After the user answers, the execution result corresponding to the (i+1)th plan is obtained based on the user's answer.

[0297] This process can be understood in conjunction with Figure 7, which is a tool call flow and large language model inference diagram provided by an embodiment of this application. As shown in Figure 7, the task to be processed is "help me set up the network", the plan is "select the creation project interface and create the project first", ReAct thinks "I need to select the creation interface API", then determines the target tool, calls the tool to execute the plan, completes the project creation, and the final answer is "all operations have been completed for you".

[0298] As shown in the example on the left of Figure 7, for knowledge retrieval tools, the input parameter can be the knowledge question to be retrieved, and the retrieved article content is returned by calling the underlying API interface; for expert tools, the input parameter is the consultation question, and the output parameter is the expert's reply; for user tools, the input parameter is the follow-up question to the user, and the output parameter is the user's reply; for other tools, there are also corresponding inputs and outputs, as shown in Figure 7, and the data format of the input and output can be JSON.

[0299] S63, based on the execution results of the first i+1 plans, determine whether the pending task has been completed. If not, execute S64; if yes, execute S65.

[0300] After obtaining the (i+1)th plan, the server can determine whether the pending task has been completed based on the execution results of the previous (i+1) plans. Specifically, the server can convert the execution results and pending tasks of the previous (i+1) plans into corresponding prompts, then input the corresponding prompts into the large language model, which outputs a judgment result indicating whether the pending task has been completed. The implementation of this process can be found in the above embodiment, where the execution results and pending tasks of the initial plan are converted into corresponding prompts, and then the corresponding prompts are input into the large language model, which outputs a judgment result. This will not be elaborated further here.

[0301] S64, update i to i+1, then execute S61.

[0302] If, based on the execution results of the first i+1 plans, it is determined that there are unfinished tasks to be processed, the server updates i to i+1 and repeats the first operation.

[0303] In this embodiment, the first plan is the initial plan. If the execution result of the initial plan indicates that the task to be processed is incomplete, the first operation needs to be performed to generate the second plan, and then the second plan is executed. The execution result of the second plan is used to determine whether the task to be processed is completed, and so on. If the execution result of the first i+1 plans indicates that the task to be processed is incomplete, the first operation needs to be performed again to generate the next plan, until the task to be processed is completed.

[0304] S65, based on the execution results of the first i+1 plans, determine the second response information.

[0305] If the server determines that the tasks to be processed have been completed based on the execution results of the first i+1 plans, it then determines the second response information based on those results. This process will be described below with reference to Figure 8.

[0306] Figure 8 is a flowchart of determining response information provided in an embodiment of this application. As shown in Figure 8, it includes the following steps.

[0307] S81, based on the execution results of the tasks to be processed and the target plan, determine whether the target plan meets the quality requirements. If not, proceed to S82; if yes, proceed to S83.

[0308] Initially, the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to each of the first i+1 plans.

[0309] The server can convert the execution results of the pending tasks and the target plan into corresponding prompts, and then input the corresponding prompts into the large language model. The large language model outputs quality evaluation results, which are used to indicate whether the target plan meets the quality requirements, that is, whether the execution results corresponding to the target plan can solve the pending tasks.

[0310] Determining whether a target plan meets quality requirements mainly involves assessing whether the execution results of each plan within the target plan match the tasks to be processed, and whether there are any issues such as irrelevant answers.

[0311] In one implementation, if the task to be processed is "Help me set up the network", then the prompt word could be, for example:

[0312] "Pending task: Help me set up the network at the start;"

[0313] The execution result for the first plan is: consultation on the user's needs has been completed;

[0314] The execution result for the second plan is: Project interface successfully created;

[0315] ...

[0316] The execution result corresponding to the (i+1)th plan is: the initial network setup task has been completed based on the user's needs and the created project interface;

[0317] Based on the information above, please output the quality assessment result in the format True / False (choose one).

[0318] "True" indicates that the target plan meets the quality requirements, meaning that the execution result of the target plan can solve the pending task, while "False" indicates that the target plan does not meet the quality requirements, meaning that the execution result of the target plan cannot solve the pending task.

[0319] In one implementation, if the task to be processed is "Help me set up the network", then the prompt word could be, for example:

[0320] "Pending task: Help me set up the network at the start;"

[0321] The execution result for the first plan is: consultation on the user's needs has been completed;

[0322] The execution result for the second plan is: Project interface successfully created;

[0323] ...

[0324] The execution result corresponding to the (i+1)th plan is: the initial network setup task has been completed based on the user's needs and the created project interface;

[0325] Based on the information above, please output the matching score between the target plan and the tasks to be processed.

[0326] The above prompts are input into the large language model, which can output a matching score between the target plan and the task to be processed. The score is then compared with a preset matching threshold. If the matching score is greater than or equal to the preset matching threshold, the target plan is determined to meet the quality requirements. If the matching score is less than the preset matching threshold, the target plan is determined to not meet the quality requirements.

[0327] S82, Update the target plan.

[0328] If the target plan does not meet the quality requirements, it means that the execution result corresponding to the target plan is of poor quality, unable to solve the user's problem, and unable to complete the task to be processed well. In one implementation, when the quality evaluation result of the target plan output by the large language model is False, it is determined that the target plan does not meet the quality requirements; in another implementation, when the matching degree score between the target plan output by the large language model and the task to be processed is less than a preset matching degree threshold, it is determined that the target plan does not meet the quality requirements.

[0329] Therefore, if the target plan does not meet the quality requirements, the server updates the target plan to obtain the updated target plan.

[0330] Specifically, the server determines the candidate plan set corresponding to the j-th plan from the candidate plan sets corresponding to the first i+1 plans. There are unexecuted candidate plans in the candidate plan set corresponding to the j-th plan, where j is a positive integer less than or equal to i+1.

[0331] Then, based on the scores of the unexecuted candidate plans, the server determines the target candidate plan from among the unexecuted candidate plans. Optionally, the target candidate plan is the candidate plan with the highest score among the unexecuted candidate plans in the candidate plan set corresponding to the j-th plan.

[0332] Finally, the server updates the target plan based on the target candidate plan, obtaining the updated target plan. The updated target plan includes at least the first j-1 plans and the target candidate plan; that is, the server identifies the target candidate plan as the new j-th plan and deletes the original j-th plan. The server can determine whether the pending task has been completed after executing the first j-1 plans and the target candidate plan. If so, the updated target plan includes the first j-1 plans and the target candidate plan; otherwise, it needs to further generate a new set of candidate plans based on the pending task, tool description information, and the execution results of the first j-1 plans and the target candidate plan, until the pending task is finally completed, resulting in the updated target plan. The method of generating a new set of candidate plans based on the pending task, tool description information, the first j-1 plans, and the target candidate plan is similar to the implementation method in the above embodiment of generating the (i+1)-th candidate plan set based on the pending task, tool description information, and the execution results of the first i plans. For details, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0333] Once the updated target plan is determined, the second operation can be repeated based on the execution results corresponding to the updated target plan until the final target plan meets the quality requirements.

[0334] This process can be understood in conjunction with Figure 9, for example. Figure 9 is a schematic diagram of the update target plan provided in the embodiment of this application. As shown in Figure 9, the prompt illustrates the generated plans and their corresponding scores. For example, in Figure 9, Plan A is "To conduct initial network setup, a project should be created first," and Plan A has a score of 4 points. Plan B is "To conduct initial network setup, the user's needs and scenarios should be consulted first," and Plan B has a score of 9 points, and so on.

[0335] As shown in the mind tree example in Figure 9, the server first generates the first candidate plan set based on the task to be processed and the tool description information. The first candidate plan set includes Plan A, Plan B, and Plan C, and the scores of each plan are shown in Figure 9. The first candidate plan set corresponds to the first level in the mind tree, which includes the nodes corresponding to Plan A, Plan B, and Plan C respectively. Since Plan B has the highest score, it is selected as the initial plan, and then Plan B is executed to obtain the execution result corresponding to Plan B.

[0336] Then, based on the execution result of Plan B, unfinished tasks were identified, leading to the generation of a second candidate plan set, which includes Plan D and Plan E. This second candidate plan set corresponds to the second level of the mind tree, containing nodes for Plan D and Plan E respectively. Plan D has a score of 1 point, and Plan E has a score of 10 points. Therefore, the server can select Plan E as the second plan and execute it, obtaining the execution result for Plan E.

[0337] Then, based on the execution results of Plan B and Plan E, unfinished tasks are identified, thus generating a third candidate plan set, which includes Plan F. This third candidate plan set corresponds to the third level in the mind tree, and this level includes the node corresponding to Plan F. Therefore, the server can identify Plan F as the third plan, execute Plan F, and obtain the execution result corresponding to Plan F.

[0338] If, after executing Plan F, it is determined that the pending plans are complete, and the target plan now includes Plans B, E, and F, then it is necessary to determine whether the quality requirements (i.e., whether the user's problem can be resolved) are met based on the execution results of Plans B, E, and F. If the quality requirements are met, the response information can be determined based on the execution results of Plans B, E, and F. If the quality requirements are not met, the target plan needs to be updated.

[0339] As shown in Figure 9, plan F can be pruned from the mind tree first (plan F is the currently executing (i+1)th plan, and based on the previous (i+1) plans, it can be determined that it does not meet the quality requirements, so plan F can be pruned). The mind tree then includes nodes corresponding to plans A, B, C, D, and E. Tracing back from plan F to plan E, and then from plan E to plan D, plan D is determined as a new second plan because there are unexecuted candidate plans in the candidate plan set corresponding to plan E. Therefore, the first plan at this point includes at least plan B and plan D. If, based on the execution results of plans B and D, it is determined that the pending tasks are incomplete, then a next plan needs to be generated based on plan D until the pending tasks are completed. For example, in Figure 9, plans G and H are generated based on plan D. This process can be referred to the relevant descriptions in the above embodiments, and will not be repeated here. If the tasks to be processed are determined to be completed based on the execution results of Plan B and Plan D respectively, then the new target plan includes Plan B and Plan D. Then, it is determined whether the new target plan meets the quality requirements, and the response information is determined based on whether the new target plan meets the quality requirements. This process can be referred to the relevant description in the above embodiments, and will not be repeated here.

[0340] S83, the execution result corresponding to the target plan is determined as the second response information.

[0341] If the target plan meets the quality requirements, the server will determine the execution result corresponding to the target plan as the second response information.

[0342] In summary, the solution of this application embodiment, for the task to be processed, can determine the tools required for the initial plan by combining the tool description information, flexibly call the system's tools to execute the initial plan, and if it is determined that the task to be processed is incomplete based on the execution result corresponding to the initial plan, explore new paths, generate the next plan, until the target plan is obtained. Furthermore, a quality assessment is conducted to determine whether the target plan meets the quality requirements. If it does not meet the quality requirements, the target plan is updated until the target plan meets the quality requirements, and then the response information is output. Through the above path exploration and target plan update, the flexibility, accuracy, and stability of the response can be improved, and the quality of the response information can be enhanced.

[0343] Figure 10 is a schematic diagram of the structure of the task processing device provided in an embodiment of this application. As shown in Figure 10, the task processing device 100 includes:

[0344] The receiving unit 101 is used to receive the input task to be processed;

[0345] The first processing unit 102 is configured to determine an initial plan for processing the task to be processed based on the task to be processed and the tool description information. The initial plan includes initial steps for processing the task to be processed and the tools required by the initial plan.

[0346] Execution unit 103 is used to execute the initial plan based on the initial steps and the tools required by the initial plan, and obtain the execution result corresponding to the initial plan;

[0347] The second processing unit 104 is used to determine the response information of the task to be processed based on the execution result corresponding to the initial plan.

[0348] In one possible implementation, the first processing unit 102 is specifically used for:

[0349] Based on the task to be processed and the tool description information, a first candidate plan set is generated, the first candidate plan set including at least one candidate plan;

[0350] Based on the candidate plan evaluation parameters, the score of each candidate plan in the first candidate plan set is determined;

[0351] Based on the scores of each candidate plan in the first candidate plan set, the initial plan is determined in the first candidate plan set.

[0352] In one possible implementation, the second processing unit 104 is specifically used for:

[0353] Based on the execution results corresponding to the initial plan, determine whether the pending task has been completed;

[0354] If it is determined that the task to be processed has been completed, the first response information is determined based on the execution results corresponding to the task to be processed and the initial plan;

[0355] If it is determined that the pending task has not been completed, a second response is determined based on the pending task, the tool description information, and the execution result corresponding to the initial plan.

[0356] In one possible implementation, the second processing unit 104 is specifically used for:

[0357] Perform a first operation, which includes: determining the (i+1)th plan for processing the task to be processed based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans; executing the (i+1)th plan to obtain the execution result corresponding to the (i+1)th plan; where i is initially 1 and i is a positive integer greater than or equal to 1;

[0358] If it is determined that the task to be processed has not been completed based on the execution results of the first i+1 plans, update i to i+1 and repeat the first operation;

[0359] If the task to be processed has been completed based on the execution results of the first i+1 plans, the second response information is determined based on the execution results of the first i+1 plans.

[0360] In one possible implementation, the second processing unit 104 is specifically used for:

[0361] Based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate plan set of the (i+1)th time is generated, wherein the candidate plan set of the (i+1)th time includes at least one candidate plan;

[0362] Based on the candidate plan evaluation parameters, determine the score of each candidate plan in the (i+1)th candidate plan set;

[0363] Based on the scores of each candidate plan in the (i+1)th candidate plan set, the (i+1)th plan is determined in the (i+1)th candidate plan set.

[0364] In one possible implementation, the second processing unit 104 is specifically used for:

[0365] Based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the first i plans, determine the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool;

[0366] Based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0367] In one possible implementation, the second processing unit 104 is specifically used for:

[0368] Perform a second operation, which includes: determining whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to each of the first i+1 plans;

[0369] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0370] In one possible implementation, the second processing unit 104 is further configured to:

[0371] If the target plan does not meet the quality requirements, the target plan is updated to obtain an updated target plan;

[0372] The second operation is repeated based on the execution results corresponding to the updated target plan.

[0373] In one possible implementation, the second processing unit 104 is specifically used for:

[0374] In the candidate plan sets corresponding to the first i+1 plans, determine the candidate plan set corresponding to the j-th plan, wherein there are unexecuted candidate plans in the candidate plan set corresponding to the j-th plan, and j is a positive integer less than or equal to i+1;

[0375] Based on the scores of the unexecuted candidate plans, a target candidate plan is determined from among the unexecuted candidate plans;

[0376] Based on the target candidate plan, the target plan is updated to obtain the updated target plan.

[0377] In one possible implementation, the first processing unit 102 is specifically used for:

[0378] Using mind tree technology, based on the task to be processed and the tool description information, a candidate node set for the first level of the mind tree is generated, and each candidate node in the candidate node set for the first level has a corresponding candidate plan.

[0379] The score of each candidate node in the candidate node set of the first level is determined based on the candidate plan evaluation parameters;

[0380] Based on the scores of each candidate node in the candidate node set of the first level, the target node of the first level is determined in the candidate node set of the first level, and the candidate plan corresponding to the target node of the first level is determined as the initial plan.

[0381] In one possible implementation, the second processing unit 104 is specifically used for:

[0382] Using tool proxy technology, based on the execution results corresponding to the initial plan, it is determined whether the task to be processed has been completed;

[0383] If it is determined that the task to be processed has been completed, the first response information is determined by using a discrimination technique based on the execution results corresponding to the task to be processed and the initial plan;

[0384] If it is determined that the task to be processed has not been completed, a second response is determined based on the task to be processed, the tool description information, and the execution result corresponding to the initial plan, using mind tree technology and the tool proxy technology.

[0385] In one possible implementation, the second processing unit 104 is specifically used for:

[0386] Perform a third operation, which includes: using the mind tree technology, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, determining the (i+1)th plan for processing the task to be processed; using the tool proxy technology, executing the (i+1)th plan to obtain the execution result corresponding to the (i+1)th plan; where i is initially 1 and is a positive integer greater than or equal to 1;

[0387] If, through the tool proxy technology, it is determined that the task to be processed has not been completed based on the execution results of the first i+1 plans, i is updated to i+1, and the third operation is repeated.

[0388] If the task to be processed is determined to be completed based on the execution results of the first i+1 plans using the tool proxy technology, the second response information is determined based on the execution results of the first i+1 plans using the discrimination technology.

[0389] In one possible implementation, the second processing unit 104 is specifically used for:

[0390] Using the mind tree technology, based on the task to be processed, the tool description information, and the execution results corresponding to the first i plans, a candidate node set at the (i+1)th level is generated, and each candidate node in the (i+1)th level candidate node set has a corresponding candidate plan.

[0391] The score of each candidate node in the candidate node set of the (i+1)th level is determined based on the candidate plan evaluation parameters;

[0392] Based on the scores of each candidate node in the candidate node set of the (i+1)th level, the target node of the (i+1)th level is determined in the candidate node set of the (i+1)th level, and the candidate plan corresponding to the target node of the (i+1)th level is determined as the (i+1)th plan.

[0393] In one possible implementation, the second processing unit 104 is specifically used for:

[0394] Using the tool proxy technology, based on the (i+1)th plan, the tool description information, the task to be processed, and the execution results corresponding to the previous i plans, the target tool for executing the (i+1)th plan, as well as the input parameters of the target tool, are determined.

[0395] Using the tool proxy technology, based on the target tool and its input parameters, the (i+1)th plan is executed to obtain the execution result corresponding to the (i+1)th plan.

[0396] In one possible implementation, the second processing unit 104 is specifically used for:

[0397] Perform a fourth operation, which includes: using the discrimination technique, determining whether the target plan meets the quality requirements based on the execution results corresponding to the task to be processed and the target plan; the target plan initially includes the first i+1 plans, and the execution results corresponding to the target plan initially include the execution results corresponding to each of the first i+1 plans;

[0398] If the target plan meets the quality requirements, the second response information is determined based on the execution results corresponding to the target plan.

[0399] In one possible implementation, the second processing unit 104 is further configured to:

[0400] If the target plan does not meet the quality requirements, the target plan is updated using the mind tree technique to obtain an updated target plan.

[0401] Using the aforementioned discrimination technique, the fourth operation is repeated based on the execution result corresponding to the updated target plan.

[0402] The task processing device provided in this application embodiment is used to execute the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0403] Figure 11 is a schematic diagram of the structure of the task processing device provided in an embodiment of this application. As shown in Figure 11, the task processing device includes: a memory 1101, a processor 1102, and a transceiver 1103.

[0404] Memory 1101 is used to store program instructions.

[0405] The processor 1102 is used to execute program instructions stored in the memory so that the task processing device performs the method steps in the above embodiments.

[0406] Transceiver 1103 may include a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, transmitter, transmitting port, or transmitting interface, and the receiver may also be referred to as a receiver, receiving port, or receiving interface, etc. Exemplarily, the memory 1101, processor 1102, and transceiver 1103 are interconnected via bus 1104.

[0407] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0408] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method steps described in the above method embodiments.

[0409] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the method steps described in the above method embodiments.

[0410] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0411] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0412] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0413] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0414] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0415] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program implements the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0416] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A task processing method, comprising: receiving an inputted task to be processed; determining an initial plan for processing the task to be processed based on the task to be processed and tool description information, the initial plan comprising an initial step for processing the task to be processed and tools required by the initial plan; executing the initial plan based on the initial step and the tools required by the initial plan to obtain an execution result corresponding to the initial plan; and determining response information of the task to be processed based on the execution result corresponding to the initial plan. The determining of the initial plan for processing the task to be processed based on the task to be processed and the tool description information comprises:

2. The method of claim 1, wherein, generating a first candidate plan set based on the task to be processed and the tool description information, the first candidate plan set comprising one or more candidate plans; determining scores of the one or more candidate plans in the first candidate plan set based on candidate plan evaluation parameters; and determining the initial plan based on the scores of the one or more candidate plans in the first candidate plan set. The determining of the initial plan for processing the task to be processed based on the task to be processed and the tool description information comprises:

3. The method of claim 1 or 2, wherein, parsing the task to be processed to determine an initial step required for processing the task to be processed; and determining tools required for executing the initial step based on the tool description information. The determining of the response information of the task to be processed based on the execution result corresponding to the initial plan comprises:

4. The method of any one of claims 1 to 3, wherein, determining whether the task to be processed has been completed based on the execution result corresponding to the initial plan; in a case where it is determined that the task to be processed has been completed, determining first response information based on the task to be processed and the execution result corresponding to the initial plan; and in a case where it is determined that the task to be processed has not been completed, determining second response information based on the task to be processed, the tool description information and the execution result corresponding to the initial plan. The determining of the second response information based on the task to be processed, the tool description information and the execution result corresponding to the initial plan comprises:

5. The method of claim 4, wherein, performing a first operation, wherein the first operation is configured to: determine an i+1th plan for processing the task to be processed based on the task to be processed, the tool description information and execution results corresponding to previous i plans, and execute the i+1th plan to obtain an execution result corresponding to the i+1th plan; wherein i is initially 1, and i is a positive integer greater than or equal to 1; in a case where it is determined that the task to be processed has not been completed based on the execution result corresponding to the previous i+1th plan, updating i to i+1 and repeating the first operation; and in a case where it is determined that the task to be processed has been completed based on the execution result corresponding to the previous i+1th plan, determining the second response information based on the execution result corresponding to the previous i+1th plan. The determining of the i+1th plan for processing the task to be processed based on the task to be processed, the tool description information and the execution result corresponding to the previous i plans comprises:

6. The method of claim 5, wherein, ​ generating an (i+1)th candidate plan set based on the to-be-processed task, the tool description information, and the execution results corresponding to the first i plans, the (i+1)th candidate plan set including one or more candidate plans; determining scores of the one or more candidate plans in the (i+1)th candidate plan set based on candidate plan evaluation parameters; and determining the (i+1)th plan in the (i+1)th candidate plan set based on the scores of the one or more candidate plans in the (i+1)th candidate plan set.

7. The method of claim 5 or 6, wherein, the execution of the (i+1)th plan to obtain an execution result corresponding to the (i+1)th plan includes: determining a target tool for executing the (i+1)th plan and input parameters of the target tool based on the (i+1)th plan, the tool description information, the to-be-processed task, and the execution results corresponding to the first i plans; and executing the (i+1)th plan based on the target tool and the input parameters of the target tool to obtain the execution result corresponding to the (i+1)th plan.

8. The method of claim 6, wherein, the determination of the second response information based on the execution results corresponding to the first i+1 plans includes: performing a second operation, the second operation being configured to determine whether a target plan meets a quality requirement based on the to-be-processed task and an execution result corresponding to the target plan, wherein the target plan initially includes the first i+1 plans, and the execution result corresponding to the target plan initially includes the execution results corresponding to the first i+1 plans; and in a case where the target plan meets the quality requirement, determining the second response information based on the execution result corresponding to the target plan.

9. The method of claim 8, wherein, the method further includes: in a case where the target plan does not meet the quality requirement, updating the target plan to obtain an updated target plan; and repeating the second operation based on an execution result corresponding to the updated target plan.

10. The method of claim 9, wherein, the updating of the target plan to obtain the updated target plan includes: determining, in a candidate plan set corresponding to the first i+1 plans, a candidate plan set corresponding to a jth plan, the j being a positive integer less than or equal to i+1; if the candidate plan set corresponding to the jth plan includes a candidate plan that has not been executed, determining a target candidate plan in the candidate plan that has not been executed based on scores of the candidate plan that has not been executed; and updating the target plan based on the target candidate plan to obtain the updated target plan.

11. The method of claim 1, wherein, the determination of an initial plan for processing the to-be-processed task based on the to-be-processed task and tool description information includes: generating, by a thinking tree technique, a first-level candidate node set in a thinking tree based on the to-be-processed task and the tool description information, each candidate node in the first-level candidate node set having a corresponding candidate plan; determining scores of the candidate nodes in the first-level candidate node set based on candidate plan evaluation parameters; and determine a target node of the first level from the candidate nodes of the candidate node set of the first level based on the scores of the candidate nodes of the candidate node set of the first level, and determine a candidate plan corresponding to the target node of the first level as the initial plan.

12. The method of claim 1 or 10, wherein, The determining of the response information of the to-be-processed task based on the execution result corresponding to the initial plan comprises: determining whether the to-be-processed task has been completed based on the execution result corresponding to the initial plan through a tool agent technology; In the case where it is determined that the to-be-processed task has been completed, determining the first response information based on the to-be-processed task and the execution result corresponding to the initial plan through a discrimination technology; and In the case where it is determined that the to-be-processed task has not been completed, determining second response information based on the to-be-processed task, the tool description information and the execution result corresponding to the initial plan through the thinking tree technology and the tool agent technology.

13. The method of claim 12, wherein, The determining of the second response information based on the to-be-processed task, the tool description information and the execution result corresponding to the initial plan through the thinking tree technology and the tool agent technology comprises: performing a third operation, the third operation being configured to: determine an i+1th plan for processing the to-be-processed task based on the to-be-processed task, the tool description information and the execution results corresponding to the first i plans through the thinking tree technology, and execute the i+1th plan through the tool agent technology to obtain an execution result corresponding to the i+1th plan; i being initially 1, i being a positive integer greater than or equal to 1; and in the case where it is determined through the tool agent technology that the to-be-processed task has not been completed based on the execution result corresponding to the first i+1 plans, updating i to i+1 and repeating the third operation; and in the case where it is determined through the tool agent technology that the to-be-processed task has been completed based on the execution result corresponding to the first i+1 plans, determining the second response information based on the execution result corresponding to the first i+1 plans through a discrimination technology.

14. The method of claim 13, wherein, The determining of the i+1th plan for processing the to-be-processed task based on the to-be-processed task, the tool description information and the execution results corresponding to the first i plans through the thinking tree technology comprises: generating a candidate node set of an i+1th level based on the to-be-processed task, the tool description information and the execution results corresponding to the first i plans through the thinking tree technology, each candidate node in the candidate node set of the i+1th level having a corresponding candidate plan; determining scores of the candidate nodes in the candidate node set of the i+1th level based on a candidate plan evaluation parameter; and determining a target node of the i+1th level from the candidate nodes of the candidate node set of the i+1th level based on the scores of the candidate nodes of the candidate node set of the i+1th level, and determining a candidate plan corresponding to the target node of the i+1th level as the i+1th plan.

15. The method of claim 13 or 14, wherein, The executing the i+1th plan by the tool agent technology comprises: The executing the i+1th plan by the tool agent technology comprises: The executing the i+1th plan by the tool agent technology comprises:

16. The method of claim 13 or 14, wherein, The determining the second response information by the discrimination technology comprises: The fourth operation comprises: determining, by the discrimination technology, whether the target plan meets a quality requirement based on the to-be-processed task and an execution result corresponding to the target plan; the target plan initially comprises the first i+1 plans, and the execution result corresponding to the target plan initially comprises the execution results corresponding to the first i+1 plans; and The second response information is determined based on the execution result corresponding to the target plan in a case where the target plan meets the quality requirement.

17. The method of claim 16, wherein, The method further comprises: The target plan is updated by the thinking tree technology to obtain an updated target plan in a case where the target plan does not meet the quality requirement; and The fourth operation is repeatedly executed by the discrimination technology based on an execution result corresponding to the updated target plan. 18.A task processing apparatus, comprising: a receiving unit configured to receive an input to-be-processed task; a first processing unit configured to determine an initial plan for processing the to-be-processed task based on the to-be-processed task and tool description information, the initial plan comprising an initial step for processing the to-be-processed task and tools required by the initial plan; an executing unit configured to execute the initial plan based on the initial step and the tools required by the initial plan to obtain an execution result corresponding to the initial plan; a second processing unit configured to determine response information of the to-be-processed task based on the execution result corresponding to the initial plan.

19. A task processing device comprising: at least one processor and a memory; the memory stores computer-executed instructions; the at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the task processing method according to any one of claims 1 to 17.

20. A computer readable storage medium, wherein, The computer-readable storage medium stores computer-executed instructions, and the computer-executed instructions are executed by a controller to implement the task processing method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Task processing method and device, electronic equipment and storage medium

    CN118113444A

  • Task-based dialogue method, storage medium and computer equipment

    CN118245589A

  • Task processing method and device, equipment and storage medium

    CN118312529A

  • Multi-modal processing method and device of large language model based on tool enhancement

    CN118364061A

  • Natural language processing and machine learning for personalized tasks experience

    US20200364305A1