Task processing method and device

By acquiring the user's intent/question as the primary task, decomposing the task into subtasks using a Large Language Model (LLM) and combining it with a DSL library to select basic operations to generate a task planning method, the problem of the inability to adaptively adjust in existing technologies is solved, thereby improving the task solution rate and reducing development costs.

CN123157342APending Publication Date: 2026-11-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510669633.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing task planning methods cannot adaptively adjust according to the difficulty of the problem, resulting in high execution overhead for simple problems or inability to solve complex problems. Furthermore, the cost of training the selected model is high and its generalization ability is limited.

Method used

By acquiring the user's intent/question as the primary task, the task planning method is dynamically adjusted based on the task's complexity. The task is decomposed into subtasks using a Large Language Model (LLM) and its complexity is determined. The task planning method is generated by selecting basic operations in conjunction with a Domain-Specific Language (DSL) library, thus avoiding the limitations of fixed planning methods.

Benefits of technology

It enables flexible adjustment of task planning methods based on task complexity, improving the solution rate of user questions, reducing development costs, and avoiding resource waste and solution failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157342A_ABST
    Figure CN123157342A_ABST
Patent Text Reader

Abstract

This application discloses a task processing method and apparatus, belonging to the field of computer technology. The method includes: acquiring a first task, which is a task used to fulfill a user's intent / question; determining a task planning method for processing the first task based on its complexity; and processing the first task according to the task planning method. This method dynamically adjusts the task planning method for processing different user questions based on the complexity of the tasks corresponding to different user intents / questions. This avoids the limitations of fixed task planning methods, thereby improving the solution rate for user questions. Furthermore, this method does not require training a specific task planning method selection model, thus reducing the development cost of the AI ​​agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of large language models (LLMs), LLM-based agents are increasingly being used in task planning and execution.

[0003] Task planning refers to the process of breaking down a user problem into multiple sub-tasks, designing the execution sequence, and selecting appropriate strategies to efficiently achieve the goal when solving a user problem (or "problem solving"). Task planning is one of the core technologies in fields such as artificial intelligence (AI), automation, robotics, and project management, and it directly affects the efficiency and feasibility of problem solving.

[0004] Currently, the task planning methods used in the industry to handle user problems cannot adaptively adjust according to the difficulty of the problem, resulting in high execution overhead for simple problems or inability to solve complex problems. Summary of the Invention

[0005] This application provides a task processing method and apparatus. The method can dynamically adjust the task planning method for processing different user problems according to the complexity of the tasks corresponding to different user intentions / problems.

[0006] The technical solution provided in this application is as follows.

[0007] In a first aspect, this application provides a task processing method, which includes: obtaining a first task, the first task being a task for fulfilling a user intent / problem; determining a task planning method for processing the first task based on the complexity of the first task; and processing the first task according to the task planning method.

[0008] The method provided in this application dynamically adjusts the task planning method used to handle different user problems based on the complexity of the tasks corresponding to those problems. This avoids the limitations of fixed task planning methods and thus improves the solution rate for user problems. Furthermore, the method provided in this application does not require training a specific task planning method selection model, thereby reducing the development cost of the agent.

[0009] In one possible design approach, before determining the task planning method for handling the first task based on its complexity, the task processing method further includes: decomposing the first task into multiple subtasks; and determining the complexity of the first task based on the multiple subtasks.

[0010] This possible design approach enables the determination of the complexity of the first task based on the multiple subtasks it contains.

[0011] In another possible design approach, the first task is broken down into multiple subtasks, including: submitting the first task to the LLM; and receiving multiple subtasks from the LLM output.

[0012] This possible design achieves the goal of determining the complexity of the first task using LLM.

[0013] In another possible design, the task processing method is executed by a task processing device that has a pre-set reference information set. The reference information set includes at least one task decomposition guide, which describes a decomposition method for decomposing a known task into at least two subtasks. Therefore, the aforementioned decomposition of the first task into multiple subtasks includes: determining a target task decomposition guide matching the first task in the reference information set; the target task decomposition guide instructing the first task to be decomposed into multiple subtasks according to the subtask decomposition method described by the target task decomposition guide; submitting the target task decomposition guide and the first task to the LLM; and receiving multiple subtasks output by the LLM.

[0014] This possible design enables the decomposition of the first task using LLM reference target task decomposition guidance, thereby improving the accuracy of the first task decomposition.

[0015] In another possible design approach, the above-mentioned determination of the complexity of the first task based on multiple subtasks includes: determining the complexity of the first task based on at least one of the following: the number of multiple subtasks, the dependencies between multiple subtasks, the circumstances under which multiple subtasks call tools, or the difficulty of user intent / problems.

[0016] This possible design achieves the goal of determining the complexity of the first task based on multiple pieces of information, and the implementation method is flexible.

[0017] In another possible design, the task processing method is executed by a task processing device that includes a domain-specific language (DSL) library, which contains multiple basic operations. The aforementioned method for determining a task planning method for processing the first task, based on its complexity, includes: selecting at least one basic operation from the DSL library, where the complexity of the first task matches that of the first task; and generating a task planning method for processing the first task based on the at least one basic operation. This task planning method includes multiple steps, each step comprising at least one sequence of basic operations.

[0018] This design enables the automatic activation of available basic operations in the DSL library based on the complexity of the task, allowing subsequent synthesis of corresponding task planning methods based on these activated operations. Thus, this method dynamically adjusts the task planning method according to the task's difficulty (i.e., complexity), overcoming the limitations of traditional fixed planning methods. Furthermore, this method ensures the solvability of complex problems while avoiding unnecessary execution overhead on simple problems, and it eliminates the need for a pre-developed set of task planning methods.

[0019] In another possible design approach, the above-mentioned processing of the first task according to the task planning method includes: sequentially executing the basic operation sequence included in each step according to the execution order of the multiple steps contained in the task planning method, so as to complete the processing of the first task.

[0020] This possible design allows us to use a task planning method designed for handling the first task to achieve our goal of handling the first task.

[0021] In another possible design approach, the above-mentioned acquisition of the first task includes: receiving user intent / question input from the user; parsing the user intent / question to obtain the first task.

[0022] Secondly, this application provides a task processing apparatus, which includes: an acquisition unit for acquiring a first task, wherein the first task is a task for fulfilling a user intent / problem; a determination unit for determining a task planning method for processing the first task based on the complexity of the first task; and a processing unit for processing the first task according to the task planning method.

[0023] In one possible design, the task processing apparatus further includes a decomposition unit, configured to decompose the first task into multiple subtasks before determining the task planning method for processing the first task based on its complexity. The determination unit is further configured to determine the complexity of the first task based on the multiple subtasks.

[0024] In another possible design, the aforementioned decomposition unit is specifically used to submit the first task to the LLM and to receive multiple subtasks from the LLM output.

[0025] In another possible design, the task processing device has a pre-set reference information set, which includes at least one task decomposition guide. The task decomposition guide describes a decomposition method for decomposing a known task into at least two subtasks. In this case, the decomposition unit is specifically used to: determine a target task decomposition guide that matches the first task in the reference information set. The target task decomposition guide instructs the first task to be decomposed into multiple subtasks according to the subtask decomposition method described by the target task decomposition guide; submit the target task decomposition guide and the first task to the LLM; and receive multiple subtasks output by the LLM.

[0026] In another possible design approach, the aforementioned determining unit is specifically used to determine the complexity of the first task based on at least one of the following: the number of multiple subtasks, the dependencies between multiple subtasks, the circumstances under which multiple subtasks call tools, or the difficulty of the user intent / problem.

[0027] In another possible design, the task processing device includes a DSL library, which comprises multiple basic operations. The aforementioned determining unit is specifically used to: select at least one basic operation from the DSL library based on the complexity of the first task, wherein the at least one basic operation matches the complexity of the first task; and generate a task planning method for processing the first task based on the at least one basic operation, wherein the task planning method comprises multiple steps, each step comprising at least one sequence of basic operations.

[0028] In another possible design, the aforementioned processing unit is specifically used to: sequentially execute the basic operation sequence included in each step according to the execution order of the multiple steps contained in the task planning method, so as to complete the processing of the first task.

[0029] In another possible design approach, the aforementioned acquisition unit is specifically used to: receive user intent / question input by the user; parse the user intent / question to obtain the first task.

[0030] It is understood that the technical solutions and beneficial effects provided by any possible design method in the second aspect can be referenced from the solutions and beneficial effects provided by the first aspect and any possible design method, and will not be elaborated further.

[0031] Thirdly, this application provides a task processing apparatus, the apparatus comprising: a memory, a communication interface, and one or more processors, the one or more processors receiving or transmitting data through the communication interface, the one or more processors being configured to read program instructions stored in the memory to perform the methods provided by the first aspect and any possible design of the first aspect.

[0032] The task processing device described in the second or third aspect may be, for example, an electronic device with an agent and an LLM deployed, such as a computing device or a server, or a component within an electronic device, such as a single board or a line card, or a chip used to implement some or all of the operations described in the first aspect and any possible design.

[0033] Fourthly, this application provides a computer-readable storage medium that is a non-volatile computer-readable storage medium, the computer-readable storage medium including computer program instructions, which, when executed by a processor, a computing device including a processor, or a computer system, perform the methods provided by the first aspect and any possible design of the first aspect.

[0034] Fifthly, this application provides a computer program product containing instructions that, when executed by a processor, a computing device including a processor, or a computer system, cause the processor, the computing device including a processor, or the computer system to perform the methods provided by the first aspect and any possible design of the first aspect.

[0035] Sixthly, this application provides a chip that includes a processor for running program instructions or code. The chip or a device including the chip can be used to perform methods provided by the first aspect and any possible design embodiment within the first aspect. Exemplarily, the chip further includes an input interface, an output interface, and a memory. The chip's input interface, output interface, processor, and memory are connected via internal interconnection paths. The memory in the chip stores program instructions or code executed by the processor, and the input and output interfaces are used for communication and connection between the chip and other chips or devices.

[0036] It is understood that any of the task processing devices, computer-readable storage media, computer program products or chips provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.

[0037] In this application, the names of the aforementioned task processing devices, etc., do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those in this application, they all fall within the protection scope of this application. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of a framework for an AI Agent that allows users to manually specify task planning methods;

[0039] Figure 2 This is a schematic diagram of a framework that uses a selection model to automatically select the appropriate task planning method based on user intent / problem;

[0040] Figure 3 This is a schematic diagram of an implementation environment for the method provided in the embodiments of this application;

[0041] Figure 4 This is a flowchart illustrating a task processing method provided in an embodiment of this application;

[0042] Figure 5 This is a schematic diagram illustrating the process by which the AI ​​Agent determines the complexity of the first task according to an embodiment of this application;

[0043] Figure 6 This is a schematic diagram illustrating the process by which the AI ​​Agent, according to an embodiment of this application, generates a task planning method for processing the first task based on the complexity of the first task.

[0044] Figure 7 This is a schematic diagram of a DSL library design provided in an embodiment of this application;

[0045] Figure 8 This is a schematic diagram of a task planning generation method provided in an embodiment of this application;

[0046] Figure 9 This is a schematic diagram illustrating a process of processing a first task according to a task planning method, provided in an embodiment of this application.

[0047] Figure 10 This is another schematic diagram of the task processing method provided in the embodiments of this application;

[0048] Figure 11 This is a flowchart illustrating another task processing method provided in an embodiment of this application;

[0049] Figure 12 This is a schematic diagram of the structure of a task processing device provided in an embodiment of this application;

[0050] Figure 13This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0052] To facilitate understanding, the technologies and background involved in the embodiments of this application will be explained below.

[0053] 1. Intelligent agent

[0054] An intelligent agent, also known as an artificial intelligence agent (AI agent) or AI intelligent agent, is an intelligent entity capable of perceiving its external environment and responding through built-in logic or learning mechanisms. Specifically, an AI agent is an artificial intelligence system that uses LLM (Limited Learning Model) as its core engine and simulates human intelligent behavior. An AI agent can exhibit human-like intelligent behavior in specific domains or tasks, such as problem-solving, decision-making, user interaction, and collaboration with other systems.

[0055] 2. Task planning

[0056] Task planning refers to the process of breaking down a problem into multiple sub-tasks, designing the execution sequence, and selecting appropriate strategies to efficiently achieve the goal of solving the user's problem / intent when addressing the user's problem / intent. Task planning is one of the core technologies in fields such as artificial intelligence (AI), automation, robotics, and project management, and it directly affects the efficiency and feasibility of problem-solving.

[0057] For example, for user question 1, "Search for a target (such as celebrity A) on a search engine," the process of solving this problem can be planned as follows: Open the search engine; enter "target" in the search engine's input box; start searching using the search engine; summarize the pages returned by the search engine to extract relevant information about the target. This planned process can be called the task planning method for solving the user's problem. Therefore, after receiving question 1, the agent can process question 1 according to this task planning method.

[0058] In the first related technology, the AI ​​Agent allows users to manually specify task planning methods. (Reference) Figure 1 , Figure 1 A schematic diagram of a framework for an AI Agent that allows users to manually specify task planning methods is shown. For example... Figure 1As shown, the framework includes an agent actuator (or agent executor) within the AI ​​Agent, and this framework requires a pre-defined set of task planning methods, consisting of at least one task planning method. Each task planning method in the set can consist of a method name and an execution flow, such as common reason & act (ReAct) methods, global planning methods, divide-and-conquer planning methods, etc. It should be understood that if existing task planning methods cannot meet the requirements, developers can define new task planning methods and add them to the set. Since each task planning method in the set contains a corresponding execution flow, during the AI ​​Agent's processing of user intent / questions, the agent executor implements the execution steps according to the flow corresponding to the task planning method specified by the developer to resolve the user intent / question. For example, the developer first selects a suitable task planning method from the task planning set for the AI ​​Agent. Thus, when the AI ​​Agent receives the user's input intent / question, the agent executor implements the execution steps according to the execution flow of the task planning method specified by the developer to resolve the user's input intent / question.

[0059] However, when manually specifying the task planning method for the AI ​​Agent, the AI ​​Agent cannot dynamically adjust the task planning method according to the problem complexity, leading to resource waste or solution failure. This is because manually specifying and fixing the task planning method makes the AI ​​Agent lack an adaptive mechanism for problem complexity, thus failing to flexibly respond to the needs of different scenarios. This may result in simple problems being treated in a complex way, leading to resource waste, or complex problems being treated in a simple way, leading to solution failure.

[0060] The second related technology uses a selection model trained by machine learning to automatically select an appropriate task planning method based on user intent / problem. (See reference) Figure 2 , Figure 2 This diagram illustrates a framework for automatically selecting an appropriate task planning method based on a selection model, using a choice model. Figure 2 As shown, the framework includes a selection model and an Agent executor. The framework also requires a pre-built set of task planning methods, consisting of various task planning approaches. Detailed descriptions of the task planning method set and the Agent executor can be found in [reference needed]. Figure 1 The relevant descriptions will not be repeated here. The selection model, on the other hand, is a selection model trained on a known dataset that selects an appropriate task planning method based on existing user intents / questions. Thus, the selection model can output a task planning method that selects the appropriate task planning method based on the user intent / question. Figure 2 The specific workflow of the framework shown includes: a) Developers construct a training dataset for task planning method selection and build a deep learning model structure based on the training dataset to complete model training, thereby obtaining the selection model; the AI ​​Agent receives the user's input intent / question; the AI ​​Agent forwards the received user intent / question to the selection model, which outputs the task planning method selected from the task planning method set; the Agent executor implements the execution steps according to the execution flow corresponding to the task planning method selected by the selection model to resolve the user's input intent / question. The training dataset constructed by the developer for task planning method selection includes multiple samples. For example, a sample includes a user intent / question, and the label of the sample is the task planning method specified by the developer for that user intent / question.

[0061] However, while the second related technology can automatically select task planning methods according to user intent / problem to a certain extent, it still has the following shortcomings: 1. Training the selection model requires a large amount of labeled data and computing resources, which leads to high costs for training the selection model; 2. Due to the limited number of samples, the generalization ability of the selection model is limited, and the selection model can only make automatic selections based on existing planning methods, and it is difficult to achieve comprehensive adaptive capabilities to cover tasks of all complexities.

[0062] To overcome the aforementioned problems, embodiments of this application provide a task processing method. When processing a task (such as a first task) aimed at fulfilling a user's intent / question, this method adaptively determines / generates a task planning method based on the complexity of the first task. Then, the task processing device processes the first task according to the generated task planning method. Through this method, the task processing device can comprehensively adapt to tasks of all complexities. That is, the method provided by embodiments of this application can dynamically adjust the task planning method for processing tasks corresponding to different user questions based on the complexity of those questions, avoiding the limitations of fixed task planning methods as in the first related technology, thereby improving the resolution rate of user questions. Furthermore, the method provided by embodiments of this application does not require training a specific task planning method selection model, thus reducing the development cost of the AI ​​Agent.

[0063] refer to Figure 3 , Figure 3 A schematic diagram of an implementation environment for the method provided in the embodiments of this application is shown. Figure 3As shown in (a), the implementation environment can be implemented as an LLM-based AI Agent. The device deploying the LLM and the device implementing the AI ​​Agent can be the same physical device or different physical devices; this embodiment does not limit this. When the device deploying the LLM and the device implementing the AI ​​Agent are different physical devices, they can interact through wired or wireless communication networks. Here, this embodiment does not specifically limit the communication network.

[0064] In one example, the device that deploys the LLM device / the device used to implement the AI ​​Agent can be any computing device, including but not limited to general-purpose computers, tablets, laptops, virtual machines, etc. Alternatively, the computing device can be implemented as a cloud service deployed in a server or cloud platform, without limitation.

[0065] exist Figure 3 In the implementation environment shown, the AI ​​Agent can interact with the user to receive user intent / questions. Then, in response to the received user intent / question, the AI ​​Agent and LLM respectively execute the corresponding steps in the method embodiments below to implement the task processing method provided in this application embodiment. Detailed processes can be found in the description of the method embodiments below, and will not be repeated here.

[0066] In one example, the interaction methods between the user and the AI ​​Agent include, but are not limited to: graphical user interface (GUI), command-line interface (CLI), text-based user interface (TUI), voice user interface (VUI), natural user interface (NUI), or conversational user interface (CUI).

[0067] Continue reading Figure 3 , Figure 3 (b) shows a schematic diagram of the hardware and software architecture of this implementation environment. Figure 3As shown in (b), when the system framework consisting of LLM and AI Agent is called the Agent framework, the upper layer of the Agent framework is the application (APP), such as a chatbot. The lower layer of the Agent framework is the hardware layer of the device, including but not limited to the central processing unit (CPU), graphics processing unit (GPU), neural processing unit (NPU), etc.

[0068] It should be understood that the above content is an exemplary description of the implementation environment of the method provided in the embodiments of this application, and does not constitute a limitation on the implementation environment of the method. As those skilled in the art know, as business needs change, the implementation environment can be adjusted according to application requirements, and the embodiments of this application do not list them one by one.

[0069] This application also provides a task processing apparatus for executing the task processing method provided in this application to process tasks. The task processing apparatus can be any computing device. For example, the computing device can be any device such as a general-purpose computer, tablet computer, laptop computer, virtual machine, etc., and is not limited thereto.

[0070] The implementation process of the task processing method provided in the embodiments of this application will be described below.

[0071] refer to Figure 4 , Figure 4 A flowchart illustrating a task processing method provided in an embodiment of this application is shown. Optionally, this method can be applied to... Figure 3 The implementation environment shown, and by Figure 3 The AI ​​Agent and the device deploying the LLM, as shown, perform the corresponding steps. For example... Figure 4 As shown, the method includes the following steps.

[0072] Step 101: Obtain the first task. The first task is the task used to fulfill the user's intent / problem.

[0073] Specifically, the AI ​​Agent can interact with the user through an interface to receive the user's intent / question (denoted as user intent / question) input through the AI ​​Agent's interface. This interface includes, but is not limited to, GUI, CLI, TUI, VUI, NUI, or CUI. In one example, the user intent / question is an intent / question described by the user in natural language. In another example, the user intent / question is command-line code. This application's embodiments do not limit this.

[0074] After receiving the user's input intent / question, the AI ​​Agent parses it to obtain the first task for achieving that intent / question. Thus, the AI ​​Agent obtains the first task. It can be understood that the AI ​​Agent's parsing of the user intent / question is essentially an understanding of the user's intent / question, such as understanding its purpose. Therefore, the objective of the first task is the purpose of the user intent / question.

[0075] Optionally, the first task may include a task name, task purpose, information needed to complete the task, etc., but is not limited to these.

[0076] Optionally, for some very simple user intents / questions (such as questions that only require a yes / no answer), it is not necessary to perform the methods described in the embodiments of this application.

[0077] Step 102: Based on the complexity of the first task, determine the task planning method to handle the first task.

[0078] Before determining the task planning method for handling the first task based on its complexity, the AI ​​agent first determines the complexity of the first task. This process can be achieved through... Figure 5 Steps 1021 to 1022 shown are implemented.

[0079] Step 1021: Decompose the first task into multiple sub-tasks.

[0080] In the first possible implementation, after receiving the first task, the AI ​​Agent submits it to the LLM. In one example, if the AI ​​Agent and the LLM are deployed on the same physical device, the AI ​​Agent can send the first task to the LLM via the device's internal bus to complete the submission. In another example, if the AI ​​Agent and the LLM are deployed on different physical devices, the AI ​​Agent can send the first task to the LLM via the communication link (physical line or wireless communication link) between its own device and the LLM's device to complete the submission.

[0081] In response, the LLM receives the first task submitted by the AI ​​Agent, decomposes the first task into multiple subtasks, and returns these subtasks to the AI ​​Agent. This embodiment of the application does not specifically limit the detailed process by which the LLM decomposes the first task into multiple subtasks.

[0082] In response, the AI ​​Agent receives multiple subtasks returned by the LLM.

[0083] In a second possible implementation, after obtaining the first task, the AI Agent may decompose the first task into multiple subtasks based on a preset task decomposition template. The AI Agent may store one or more task decomposition templates, where the task decomposition template is used to indicate how to decompose one task into multiple subtasks. This application does not impose specific limitations on how the task decomposition template is obtained. Optionally, if multiple task decomposition templates are pre-set in the AI Agent, the AI Agent may perform semantic matching between the description information of the first task and the description information of each task decomposition template. Thus, the AI Agent may select the task decomposition template with the highest matching degree with the first task from multiple task templates, and decompose the first task into multiple subtasks according to the selected task decomposition template.

[0084] In a third possible implementation, a reference information set is preconfigured in the AI Agent, which includes at least one task decomposition guideline. The task decomposition guideline is used to describe the decomposition method for decomposing a known task into at least two subtasks. In this case, the AI Agent decomposes the first task into multiple subtasks, including: the AI Agent determines a target task decomposition guideline matching the first task from the reference information set. The known task described by the target task decomposition guideline is the task matching the first task, and the target task decomposition guideline is used to indicate that the first task is decomposed into multiple subtasks according to the task decomposition method described in the target task decomposition guideline. The target task decomposition guideline and the first task are submitted to the LLM as prompts. The LLM decomposes the first task into multiple subtasks according to the task decomposition method described in the target task decomposition guideline. The LLM returns multiple subtasks.

[0085] The task decomposition guideline in the reference information set may be defined as a binary tuple of (<summary>, <guideline description>). For example, taking task decomposition guideline 1 in the reference information set as an example, the <summary> of task decomposition guideline 1 is typically natural language text, which is used to explain the purpose of task decomposition guideline 1. The <guideline description> in task decomposition guideline 1 may consist of "1. Initial thinking for problem solving; 2. Analysis steps for the problem; 3. Solving steps for the problem; 4. Testing steps for the problem results".

[0086] In addition, the embodiments of the present application may pre-construct task decomposition guidelines in the reference information set based on existing example problems and their solving steps, thereby obtaining the above reference information set. The existing problems and their solving steps can be recorded as: (problem, solving steps). For each existing example problem.

[0087] Illustratively, assuming the user's question is "search for celebrity b on search engine a" (denoted as example question 1), the steps to solve this user's question include: 1. open the search interface of search engine a; 2. enter "celebrity b" on the search interface of search engine a; 3. start executing the operation of searching for "celebrity b" through search engine a; 4. aggregate the pages returned by search engine a and obtain relevant information of "celebrity b" from the pages. Then the embodiments of the present application may obtain a task decomposition guideline according to the user's question and the solving steps of the user's question: (<abstract: how to decompose a search-type task into multiple subtasks>, <guideline description: first open the interface of a search engine, enter the search keyword on the interface, start the search and summarize the searched results>).

[0088] As an example, the embodiments of the present application may use the following prompt word template and LLM to generate a specific guideline description, and after generating the guideline description, save the abstract as semantic information to a vector database. Refer to the following code example 1, which illustrates a prompt template code example for constructing a corresponding task decomposition guideline based on an existing example question and the solving steps of the example question. The guideline in code example 1 is the task decomposition guideline described in the embodiments of the present application, and the "#Example" part in code example 1 is a template example of the composition of the task decomposition guideline, which will not be repeated here.

[0089] Code example 1:

[0090]

[0091]

[0092] After the embodiments of the present application construct the reference information set and pre-configure the reference information set in the AI Agent, when the AI Agent obtains the first task, the AI Agent first finds the task decomposition guideline most similar to the first task from the vector database storing the reference information set, and the task decomposition guideline is the target task decomposition guideline matching the first task. Thus, the AI Agent may submit the target task decomposition guideline and the first task to the LLM together, and the LLM performs the subtask decomposition action on the first task. Illustratively, the result of subtask decomposition generally presents a tree structure, and each subtask consists of a task name, a task description, and key solving steps. The target task decomposition guideline is used to instruct to decompose the first task into the multiple subtasks according to the subtask decomposition manner described in the target task decomposition guideline.

[0093] Optionally, the process by which the AI ​​Agent finds the target task decomposition guidance that is closest to the first task from a vector database storing a set of reference information can be achieved through semantic matching. For example, the AI ​​Agent performs semantic matching between the description information of the first task and the summary of the task decomposition guidance, thereby enabling it to find the task decomposition guidance that is closest to the first task from the vector database storing the set of reference information.

[0094] As an example, refer to Code Example 2 below. Code Example 2 shows a code example of a prompt word template for submitting task decomposition guidance and a first task to the LLM to achieve subtask decomposition of the first task, as described in this application embodiment. The {guideline} position is used to fill in the task decomposition guidance matching the first task, and the {problem} position is used to fill in the description information of the first task.

[0095] Code Example 2:

[0096]

[0097]

[0098] Step 1022: Based on the above multiple sub-tasks, determine the complexity of the first task.

[0099] After obtaining multiple subtasks of the first task, AIAgent determines the complexity of the first task.

[0100] Optionally, the AI ​​Agent can determine the complexity of the first task based on at least one of the following: the number of subtasks obtained by decomposing the first task, the dependencies between the subtasks, the tool calls / uses of the subtasks, or the difficulty level of the user intent / question used to determine the first task. For example, the more dependencies between the subtasks, the higher the complexity of the first task; similarly, the more tools called / used by the subtasks, the higher the complexity of the first task. In this embodiment, the definition of the difficulty level of the user intent / question can be predefined. Thus, after receiving a user intent / question, the AI ​​Agent can determine the difficulty level of the currently received user intent / question according to the definition of the difficulty level of the user intent / question.

[0101] Optionally, the process of determining the complexity of the first task after the AI ​​Agent receives multiple subtasks of the first task can also be achieved through interaction with the LLM. Specifically, the AI ​​Agent can submit the first task and the multiple subtasks obtained from decomposing the first task to the LLM. The LLM can then analyze the complexity of the first task based on the received first task and the multiple subtasks obtained from decomposing the first task. For example, the LLM can learn / analyze at least one of the following: the purpose of the first task, the number of multiple subtasks obtained from decomposing the first task, the dependencies between these multiple subtasks, the use of tools by these multiple subtasks, or the difficulty level of the user intent / problem used to determine the first task. Thus, the LLM can determine the complexity of the first task based on the information learned and analyzed.

[0102] As an example, refer to Code Example 3 below. Code Example 3 shows a code example of a prompt word template for the AI ​​Agent to submit the first task to the LLM and decompose the first task into multiple subtasks to determine the complexity of the first task. In the background information, "##Task Description" describes the task's structure. "##DifficultyDescription" defines and provides an example of the difficulty level of the user's intent / question. "##Category Description" defines and provides an example of the task's category. "#Instruction" is the structure of the analysis results for the first task and its subtasks. "#Input" contains information related to the first task that the AI ​​Agent needs to fill in, including information about the first task and its subtasks.

[0103] Code Example 3:

[0104]

[0105] Once the AI ​​Agent determines the complexity of the first task, it can generate a task planning method to handle that task based on that complexity. This process can be achieved through... Figure 6 Steps 1023 to 1024 shown are implemented.

[0106] Step 1023: Based on the complexity of the first task, select at least one basic operation from the DSL library, wherein at least one basic operation matches the complexity of the first task.

[0107] In one exemplary embodiment, the AIAgent includes a pre-built DSL library. Here, the information in the DSL library consists of two parts: syntactic elements and semantic rules. Syntactic elements define the structural rules of the language, such as the combination of keywords, symbols, and expressions. These syntactic elements are similar to the grammar used in natural language to specify how sentences are composed. Semantic rules define the actual physical meaning of the language, such as actions, code logic, and the results of operations.

[0108] For example, the BNF definition of syntactic elements is shown in Code Example 4 below. Here, BNF stands for Backus-Naurform, which is a formal notation method used to describe context-free syntax such as programming languages, protocols, or file formats.

[0109] Proxy Example 4:

[0110]

[0111] Typically, task planning methods consist of steps, including but not limited to the steps numbered 1 to 4 below.

[0112] 1. Operation steps: Different operation steps consist of different operation sequences. The operations in each operation sequence are connected by the symbol "|>". This symbol is used to indicate that the next operation of the symbol is executed after the previous operation is completed.

[0113] For example, the operations in the operation sequence include, but are not limited to:

[0114] The "think" operation is used to generate an idea or plan based on the current state.

[0115] An action is an operation used to select and execute an action of an available tool.

[0116] The check operation is used to evaluate the result of the previous operation or subtask and update the status.

[0117] The answer operation is used to generate the final output or response based on the current state and terminate the execution flow. Typically, if the task planning method finishes executing the answer operation, an answer operation will be implicitly executed at the end.

[0118] The ask operation is used to prompt the user for input and update the status with the input results.

[0119] 2. Conditional Control Steps: Conditional control steps consist of a conditional step (If), a conditional loop step (While), and a loop iteration step (Loop). The conditions in the conditional control steps are built-in variables in the DSL, including: incomplete (whether the current task has been solved).

[0120] 3. Subtask decomposition step: This step instructs the decomposition of the primary task (or the current user intent / problem) into subtasks, instructs the resolution of these subtasks, and automatically summarizes the results of these subtasks.

[0121] 4. Proposal Steps: This step instructs the exploration of multiple task planning methods, each of which generates an answer based on the current state, and the merging of multiple answers using a specified fusion mode (e.g., summary, vote).

[0122] The semantic rules for the operations in each of the above steps and the DSL activation rules for the corresponding task complexity (or problem complexity) are shown in Table 1. Here, the activation rule indicates that when the task complexity meets a certain condition, the operation can be used subsequently to generate a task planning method. The operation name column exemplarily shows the names of the operations in each of the steps numbered 1-4 above, and the operation description describes the function / purpose that the operation can achieve. Semantic constraints indicate the scenarios or locations where the operation can be used. The activation rule indicates that when the conditions described in the activation rule are met, the corresponding operation is used subsequently to generate a task planning method. For example, for the operation "think," the "think" operation indicates that an LLM is available to think about the next step based on the current state. The "think" operation is allowed to be used in any task / user intent / problem, and when the number of subtasks of a task is greater than 2, the "think" operation is activated, thus allowing the "think" operation to be used in the subsequent generation of a task planning method.

[0123] Table 1

[0124]

[0125] In this way, based on the DSL library defined above, the AI ​​Agent can select at least one basic operation that meets the activation rules from the DSL library based on the complexity of the first task (such as the number of subtasks of the first task, dependencies, the number of tools used or called, and / or the difficulty of the user's intent / problem). This at least one basic operation can be called an operation that matches the complexity of the first task.

[0126] It can be seen that, reference Figure 7Before performing step 1023, this embodiment of the application needs to design language elements that can be used to generate a DSL for task planning methods, define the semantics of each grammatical element, and define semantic rules and operation activation rules.

[0127] It can also be seen that, by executing step 1023, this embodiment of the application realizes the activation of the corresponding DSL rules of the task planning method based on the task complexity analysis results (i.e., at least one basic operation selected from the DSL library according to the activation rules of the basic operations based on the task complexity). Here, the DSL rules can be regarded as a set of predefined activation rules for tasks of different complexities. The purpose of this design is to guide the LLM to generate an efficient task planning method based on the DSL rules. That is, this embodiment of the application can select the matching DSL rules according to the task complexity and apply the DSL rules to the subsequent steps of generating the task planning method. The key point of step 1023 is to ensure that the DSL rules selected according to the task complexity can effectively cope with the task complexity and avoid over-design or waste of resources. In this way, by dynamically activating the DSL rules, this embodiment of the application enables the AI ​​Agent to flexibly adjust the task planning method in different scenarios, thereby improving the efficiency and accuracy of task solving.

[0128] Step 1024: Generate a task planning method for processing the first task based on at least one of the above basic operations. The task planning method includes multiple steps, each step including at least one sequence of basic operations.

[0129] Optionally, step 1024 can be implemented through the interaction between the AI ​​Agent and the LLM. For example, the AI ​​Agent submits at least one selected basic operation and the first task to the LLM. Accordingly, the LLM can generate a task planning method for processing the first task based on the received at least one basic operation and the first task.

[0130] In one example, in conjunction with the following proxy example 5, an embodiment of this application uses at least one basic operation, a DSL library, and a first task as prompt words to be submitted to the LLM, in order to request the LLM to generate a task planning method for processing the first task based on the received information.

[0131] Proxy Example 5:

[0132]

[0133] In this way, AIAgent can use the prompt word template shown in code example 5 to submit at least one basic operation selected from the DSL library, the DSL library, and the first task to the LLM. The LLM can then generate a task planning method for processing the first task based on the received at least one basic operation, the DSL's definition description of each of those basic operations, and the first task.

[0134] Optionally, the LLM can also perform parsing and validation on the generated task planning method. If the parsing and validation result is correct, the LLM returns the generated task planning method to the AI ​​Agent. If the parsing and validation result is incorrect, the LLM can regenerate the task planning method for processing the first task based on the received at least one basic operation, the definition description of each basic operation in the DSL, and the first task.

[0135] As an example, see reference Figure 8 , Figure 8 An exemplary schematic diagram of a task planning generation method in an embodiment of this application is shown, such as... Figure 8 As shown, after selecting at least one basic operation from the DSL library based on the complexity analysis results of the first task, the AI ​​Agent can assemble a prompt word as shown in Code Example 5 based on the first task and the at least one basic operation selected from the DSL library. The AI ​​Agent then submits this prompt word to the LLM, which generates a task planning method for handling the first task based on the content carried by the received prompt word. Next, the LLM parses the newly generated task planning method and verifies it based on the first task, obtaining a verification result. When the verification result is correct, the LLM returns the newly generated task planning method to the AI ​​Agent. When the verification result is incorrect, the LLM regenerates the task planning method for handling the first task based on the content information carried by the prompt word.

[0136] Step 103: Process the first task according to the task planning method generated above.

[0137] Once the AI ​​Agent obtains the task planning method generated by the LLM for handling the first task, it can process the first task according to that method. Optionally, the AI ​​Agent can interact with the LLM and execute the basic operation sequence included in each step of the newly generated task planning method in the order of execution to complete the processing of the first task.

[0138] Taking the task planning method generated above, which includes multiple steps and each step includes multiple basic operation sequences, as an example, refer to... Figure 9 , Figure 9An exemplary schematic diagram illustrates the process of processing the first task according to the task planning method in an embodiment of this application. For example... Figure 9 As shown, after the AI ​​Agent obtains the task planning method for handling the first task, it can execute the steps in the task planning method sequentially according to the execution order of each step. After the AI ​​Agent completes the basic operation in the current step, it determines whether the currently executed basic operation is the last operation in the current step.

[0139] If the AI ​​Agent determines that the currently executing basic operation is the last operation in the current step, it further determines whether the currently executing step is the last step in the task planning method. If the AI ​​Agent determines that the currently executing step is the last step in the task planning method, it outputs the execution result after processing the first task according to the task planning method to the user. If the AI ​​Agent determines that the currently executing step is not the last step in the task planning method, it continues to execute the next step in the task planning method in sequence.

[0140] If the AI ​​Agent determines that the currently executed basic operation is not the last operation in the current step, it will execute all subsequent basic operations in the current step in sequence, and after each basic operation is executed, it will determine whether the currently executed basic operation is the last operation in the current step.

[0141] The basic operations performed by the AI ​​Agent can be implemented by calling the LLM, and this application embodiment does not limit this.

[0142] As can be seen, step 103 is executed after the LLM generates the task planning method. Furthermore, the AI ​​Agent iteratively executes all steps in this task planning method, and upon determining that the step traversal has ended, it implicitly executes the `answer` operation to generate the answer and returns the result to the user. Conversely, if the step traversal is not yet complete, it further iterates through all operation sequences in the current step, and can use the LLM to execute the current operation sequence. For special conditional steps and loop steps, the conditions contained in the step are checked first, and then execution jumps to the corresponding step based on the condition to continue.

[0143] In one example, the prompt word template used by the above sequence of operations performed using LLM can be as shown in Code Example 6 below.

[0144] Proxy Example 6:

[0145]

[0146] Optionally, when the AI ​​Agent processes the first task according to the task planning method described above, it can monitor the progress of the first task in real time during the execution of the task planning method. If the AI ​​Agent determines that an anomaly or unforeseen situation has occurred in the part of the first task that has been processed according to the task planning method, the AI ​​Agent will report this to the LLM so that the LLM can regenerate the task planning method. The core of this process is to ensure that the task planning method can be executed accurately and ultimately resolve the user's intent / problem.

[0147] In summary, by executing the methods described in steps 101 to 103 of the embodiments of this application, an automated method for analyzing the complexity of tasks corresponding to user intents / questions based on prompt word engineering is achieved. This method collects existing user intents / questions and their solution steps, uses LLM to generate task decomposition guidance, and combines this guidance with the task corresponding to the user intent / question to decompose the task into multiple sub-tasks. This process significantly improves the accuracy of sub-task decomposition for tasks corresponding to new user intents / questions. Furthermore, LLM is used to analyze the task complexity of the decomposition results, and a task planning method is generated based on the complexity analysis results. This overcomes the limitations of traditional methods that require manually specifying planning methods or training specific models to select task planning methods, thus achieving adaptive analysis and resolution of task complexity.

[0148] Secondly, the method provided in this application can adaptively plan task planning methods based on task complexity. In this application, a method is proposed to plan a DSL (including syntactic elements and semantic rules) based on the analyzed task complexity. This method can automatically activate available basic operations in the DSL library according to the task complexity, thereby synthesizing the corresponding task planning method based on the activated basic operations. Thus, the method provided in this application can dynamically adjust the task planning method according to the difficulty of the task, overcoming the limitations of traditional fixed planning methods. Furthermore, the method provided in this application can ensure the solvability of complex problems while avoiding unnecessary execution overhead on simple problems, and this application does not require a pre-developed set of task planning methods.

[0149] Furthermore, the method in this application embodiment can construct a complete adaptive task planning system. This system can automatically analyze task complexity and generate corresponding task planning methods, thus eliminating the need for manual intervention to specify task planning methods or to use expensively trained models to select task planning methods. Therefore, the method in this application embodiment can significantly reduce development and usage costs while improving the flexibility and adaptability of task planning methods.

[0150] Additionally, in one example, considering the integration of an AI Agent and an LLM into a single device (called an Agent framework), see [reference needed]. Figure 10 , Figure 10 Another schematic diagram of the task processing method provided in this application embodiment is shown. For example... Figure 10 As shown, the Agent framework includes an Agent runtime module, an Agent executor, a complexity analysis module, a task planning method generation module, and a DSL module. Each module can be used to execute the various steps in the method described above, thereby enabling the solution of the user's input intent / question. For example, the Agent runtime module can be used to execute step 101, which involves receiving the user's input intent / question. The Agent executor can be used to execute step 103 above. The complexity analysis module can execute steps 1021-1022 through interaction with the LLM to obtain the complexity analysis result of the first task. The DSL module is used to execute step 1023 above to select at least one basic operation for the first task from the DSL library. The task planning method generation module can then execute step 1024 through interaction with the LLM.

[0151] In another example, combined Figure 10 The Agent framework shown is referenced. Figure 11 , Figure 11 A flowchart illustrating another task processing method provided in an embodiment of this application is shown. Figure 11 As shown, after receiving the user's input intent / question, the Agent framework first parses the intent / question to obtain the corresponding first task (refer to step 101), and decomposes the first task into multiple subtasks (refer to step 1021). Then, the Agent framework analyzes the complexity of the first task based on the multiple subtasks (refer to step 1022), activates at least one basic operation in the DSL library based on the complexity of the first task (refer to step 1023), and generates a task planning method for processing the first task using LLM based on at least one basic operation and the first task (refer to step 1024). Next, the Agent framework solves for the user intent / question corresponding to the first task according to the task planning method (refer to step 103), and outputs the solution to the user.

[0152] The above mainly describes the solution provided by the embodiments of this application from a methodological perspective.

[0153] To achieve the above functions, such as Figure 12 As shown, Figure 12 A schematic diagram of a task processing apparatus according to an embodiment of this application is shown. The task processing apparatus 1200 is used to execute the task processing method described above, for example, to execute... Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 or Figure 9 The method shown. The task processing apparatus 1200 may include an acquisition unit 1201, a determination unit 1202, and a processing unit 1203.

[0154] The acquisition unit 1201 is used to acquire a first task, which is a task used to fulfill a user intent / problem. The determination unit 1202 is used to determine a task planning method for processing the first task based on its complexity. The processing unit 1203 is used to process the first task according to the task planning method.

[0155] As an example, combined Figure 4 The acquisition unit 1201 can be used to execute step 101, the determination unit 1202 can be used to execute step 102, and the processing unit 1203 can be used to execute step 103.

[0156] Optionally, the task processing apparatus 1200 further includes: a decomposition unit 1204, configured to decompose the first task into multiple subtasks before determining a task planning method for processing the first task based on the complexity of the first task; and a determination unit 1202, configured to determine the complexity of the first task based on the multiple subtasks.

[0157] As an example, combined Figure 5 The decomposition unit 1204 can be used to execute step 1021, and the determination unit 1202 can be used to execute step 1022.

[0158] Optionally, the decomposition unit 1204 is specifically used to submit the first task to the LLM and receive multiple subtasks output by the LLM.

[0159] Optionally, the task processing device 1200 has a preset reference information set, which includes at least one task decomposition guide. The task decomposition guide describes a decomposition method for decomposing a known task into at least two subtasks. The decomposition unit 1204 is specifically used to: determine a target task decomposition guide matching the first task in the reference information set, the target task decomposition guide instructing the first task to be decomposed into multiple subtasks according to the subtask decomposition method described by the target task decomposition guide; submit the target task decomposition guide and the first task to the LLM; and receive multiple subtasks output by the LLM.

[0160] Optionally, the determining unit 1202 is specifically used to determine the complexity of the first task based on at least one of the following: the number of multiple subtasks, the dependencies between multiple subtasks, the situation where multiple subtasks call tools, or the difficulty of user intent / problem.

[0161] Optionally, the task processing device 1200 includes a DSL library, which includes multiple basic operations. The determining unit 1202 is specifically used to: select at least one basic operation from the DSL library based on the complexity of the first task, wherein the at least one basic operation matches the complexity of the first task; and generate a task planning method for processing the first task based on the at least one basic operation, wherein the task planning method includes multiple steps, and each step includes at least one sequence of basic operations.

[0162] As an example, combined Figure 6 The determination unit 1202 can be used to execute steps 1023 to 1024.

[0163] Optionally, the processing unit 1203 is specifically used to: execute the basic operation sequence included in each step in the order of execution of the multiple steps included in the task planning method, so as to complete the processing of the first task.

[0164] As an example, combined Figure 4 The processing unit 1203 can be used to execute step 103.

[0165] Optionally, the acquisition unit 1201 is specifically used for: receiving user intent / question input by the user; parsing the user intent / question to obtain the first task.

[0166] As an example, combined Figure 4 The acquisition unit 1201 can be used to execute step 101.

[0167] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the task processing devices 1200 provided above, as well as the description of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.

[0168] Those skilled in the art will readily recognize that, based on the units and algorithm steps described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0169] It should be noted that, Figure 12 The module / unit division shown is illustrative and represents only one logical functional division; in actual implementation, other division methods are possible. For example, two or more functions can be integrated into a single processing module. The functions implemented by the integrated modules described above can be implemented either in hardware or as software functional modules.

[0170] This application provides a computing device that can be used to deploy an LLM and / or to implement an AI Agent, and to implement some or all of the functions implemented by the AI ​​Agent and LLM in the task processing method provided in this application.

[0171] refer to Figure 13 , Figure 13 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 13 As shown, the computing device 1300 includes a processor 1301, a memory 1302, a communication interface 1303, and a bus 1304. The processor 1301, memory 1302, and communication interface 1303 are interconnected via the bus 1304. Optionally, the computing device 1300 also includes an input / output interface 1305, which is interconnected with the processor 1301, memory 1302, and communication interface 1303 via the bus 1304.

[0172] Processor 1301 may include a general-purpose processor and / or a dedicated hardware chip. The general-purpose processor may include a CPU, a microprocessor, or a GPU. The CPU may be a single-core processor or a multi-core processor. The dedicated hardware chip is a high-performance processing hardware module. The dedicated hardware chip includes at least one of the following: digital signal processor (DSP), data processing unit (DPU), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, NPU, tensor processing unit (TPU), artificial intelligence chip, or network processor (NP). Processor 1301 may also be an integrated circuit chip with signal processing capabilities. In implementation, some or all of the functions of the methods provided in this application embodiment may be implemented through the integrated logic circuitry of the hardware in processor 1301 or through software instructions.

[0173] Memory 1302 is used to store computer programs, including operating system 1302a and executable code (i.e., program instructions) 1302b. Memory 1302 may be, for example, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other types of static storage devices capable of storing static information and instructions; or, for example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), or synchronous linked dynamic random access memory (SDRAM). DRAM (SLDRAM) or other types of dynamic storage devices capable of storing information and instructions, such as read-only optical discs or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired executable code in the form of instructions or data structures and accessible by a computer, but not limited thereto. For example, memory 1302 is used to store a set of reference information, etc. Memory 1302 may exist independently and be connected to processor 1301 via bus 1304. Alternatively, memory 1302 and processor 1301 may be integrated together. Memory 1302 can store executable code. When the executable code stored in memory 1302 is executed by processor 1301, processor 1301 performs some or all of the functions of the method provided in the embodiments of this application. Please refer to the relevant descriptions in the foregoing embodiments for the implementation of the processor 1301 executing this process. Memory 1302 may also include software modules and data required by other running processes, such as an operating system.

[0174] Communication interface 1303 uses a transceiver module, such as, but not limited to, a transceiver, to enable communication with other devices or communication networks. For example, communication interface 1303 can be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, or other devices with network access capabilities. Communication interface 1303 includes a receiving unit for receiving data / messages and a sending unit for sending data / messages.

[0175] Bus 1304 is any type of communication bus used to interconnect internal devices (e.g., memory 1302, processor 1301, communication interface 1303) of computing device 1300. For example, a system bus. This embodiment illustrates the interconnection of the aforementioned devices within computing device 1300 via bus 1304. Optionally, the aforementioned devices within computing device 1300 can also communicate with each other using other connection methods besides bus 1304; for example, the aforementioned devices within computing device 1300 can be interconnected via internal logic interfaces.

[0176] Input / output interface 1305 is used to realize human-computer interaction between the user and computing device 1300. For example, it enables text or voice interaction between the user and computing device 1300. Input / output interface 1305 includes an input interface for the user to input information to computing device 1300, and an output interface for the computing device 1300 to output information to the user. As an example, the input interface includes, but is not limited to, a touchscreen, keyboard, mouse, or microphone, and the output interface includes, but is not limited to, a display screen, speaker, etc. The touchscreen, keyboard, or mouse is used to input text / image information, the microphone is used to input voice information, the display screen is used to output text / image information, and the speaker is used to output voice information.

[0177] In one example, the input interface in input / output interface 1305 can be used to input user intent / questions into the computing device. In another example, the output interface in input / output interface 1305 is used to output the processing result of the first task mentioned above to the user.

[0178] It should be noted that the aforementioned devices can be disposed on separate chips, or at least partially or entirely on the same chip. Whether to dispose of the devices independently on different chips or integrate them on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices. Furthermore, the descriptions of the processes corresponding to the various figures above each have their own emphasis; for parts of a process not described in detail in one figure, please refer to the relevant descriptions of other processes.

[0179] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product providing the program development platform includes one or more computer instructions, which, when loaded and executed on the computing device 1300, implement some or all of the functions of the methods provided in the embodiments of this application.

[0180] Furthermore, computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium stores computer program instructions that provide a program development platform.

[0181] As an example, combined Figure 12 The functions implemented by the acquisition unit 1201 in the task processing device 1200 can be achieved through... Figure 13 The communication interface 1303 and processor 1301 jointly implement the program code in memory 1302. The functions implemented by the determination unit 1202, processing unit 1203, and decomposition unit 1204 in the task processing device 1200 can be achieved through… Figure 13 Processor 1301 in the middle executes Figure 13 The program code is implemented in memory 1302.

[0182] This application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium. The computer-readable storage medium includes computer program instructions. When the computer program instructions are executed by a processor, a computing device including the processor, or a computer system, the processor, the computing device including the processor, or the computer system performs the task processing method provided in this application.

[0183] This application also provides a computer program product containing instructions that, when executed by a processor, a computing device including a processor, or a computer system, cause the processor, the computing device including a processor, or the computer system to implement the task processing method provided in this application.

[0184] A computer system is a system with computational processing capabilities. A computer system generally includes a processor and memory. The processor retrieves and executes instructions stored in memory to enable the computer system to perform the task processing methods described above. Optionally, a computer system may also include at least one of an input interface or an output interface. The processor, memory, input interface, and output interface of the computer system are interconnected through internal connection paths.

[0185] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0186] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0187] This application also provides a chip that includes a processor for running program instructions or code. The chip or a device containing the chip can be used to execute the task processing method provided in this application. Exemplarily, the chip further includes an input interface, an output interface, and a memory. The chip's input interface, output interface, processor, and memory are connected via internal interconnection paths. The memory in the chip stores program instructions or code executed by the processor, and the input and output interfaces are used for communication between the chip and other chips or devices.

[0188] In the embodiments of this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "at least one" refers to one or more, and the term "multiple" refers to at least two, unless otherwise expressly defined.

[0189] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0190] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0191] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0192] It should be understood that the term "comprising" (also referred to as "includes", "including", "comprises" and / or "comprising") as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0193] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0194] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the concept and principles of this application should be included within the protection scope of this application.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A task processing method, characterized in that, include: Obtain the first task, which is a task designed to fulfill the user's intent / question; Based on the complexity of the first task, a task planning method for processing the first task is determined; The first task is processed according to the task planning method described above.

2. The task processing method according to claim 1, characterized in that, Before determining the task planning method for processing the first task based on its complexity, the task processing method further includes: The first task is broken down into multiple sub-tasks; The complexity of the first task is determined based on the multiple sub-tasks.

3. The task processing method according to claim 2, characterized in that, The step of decomposing the first task into multiple sub-tasks includes: Submit the first task to the Large Language Model (LLM); Receive the multiple subtasks output by the LLM.

4. The task processing method according to claim 2, characterized in that, The task processing method is executed by a task processing device, which has a preset reference information set. The reference information set includes at least one task decomposition guide, which describes a decomposition method for breaking down a known task into at least two sub-tasks. The step of decomposing the first task into multiple sub-tasks includes: In the reference information set, a target task decomposition guide matching the first task is determined. The target task decomposition guide is used to instruct the first task to be decomposed into the plurality of sub-tasks according to the sub-task decomposition method described by the target task decomposition guide. Submit the target task decomposition guide and the first task to the LLM; Receive the multiple subtasks output by the LLM.

5. The task processing method according to any one of claims 2 to 4, characterized in that, Determining the complexity of the first task based on the multiple sub-tasks includes: The complexity of the first task is determined based on at least one of the following: the number of the multiple subtasks, the dependencies between the multiple subtasks, the circumstances under which the multiple subtasks invoke tools, or the difficulty of the user intent / question.

6. The task processing method according to any one of claims 2 to 5, characterized in that, The task processing method is executed by a task processing device, which includes a domain-specific language (DSL) library, the DSL library including multiple basic operations; the step of determining a task planning method for processing the first task based on its complexity includes: Based on the complexity of the first task, at least one basic operation is selected from the DSL library, and the at least one basic operation matches the complexity of the first task. A task planning method for processing the first task is generated based on the at least one basic operation. The task planning method includes multiple steps, each step including at least one sequence of basic operations.

7. The task processing method according to any one of claims 1 to 6, characterized in that, Processing the first task according to the task planning method includes: The basic operation sequence included in each step of the task planning method is executed sequentially according to the execution order of the multiple steps to complete the processing of the first task.

8. The task processing method according to any one of claims 1 to 7, characterized in that, The acquisition of the first task includes: Receive the user's input of their intent / question; The user intent / question is analyzed to obtain the first task.

9. A task processing device, characterized in that, include: The acquisition unit is used to acquire a first task, which is a task for fulfilling a user intent / question; A generation unit is used to determine a task planning method for processing the first task based on the complexity of the first task. A processing unit is used to process the first task according to the task planning method.

10. A task processing device, characterized in that, include: The device includes a memory, a communication interface, and one or more processors, the one or more processors receiving or transmitting data through the communication interface, the one or more processors being configured to read program instructions stored in the memory to perform the method as described in any one of claims 1 to 8.