Task processing method, device and computer readable storage medium

By decomposing and semantically matching user tasks and using a large language model to select target tools, the problem of manually configuring the relationship between the large language model and external tools is solved, thus improving the reliability and accuracy of task processing.

CN123048073APending Publication Date: 2026-11-06CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611347400.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

The calling relationship between the large language model and external tools needs to be configured manually, resulting in low reliability of calling external tools to process user tasks.

Method used

By decomposing user tasks and determining the task constraints and descriptions of each subtask, a large language model is used to select target tools from a set of candidate tools. Matching is performed based on semantic similarity and task constraints to improve the accuracy of tool selection.

Benefits of technology

It improves the reliability of external tools in handling user tasks, reduces the need for manual configuration, and enhances the accuracy and reliability of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123048073A_ABST
    Figure CN123048073A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a task processing method and device and a computer readable storage medium, and relates to the technical field of artificial intelligence. The method comprises: decomposing a user task according to a task target of the user task to obtain a plurality of subtasks; determining a candidate tool set according to a task constraint of each subtask in the plurality of subtasks and a matching degree between the each subtask and each tool in a plurality of tools; determining a target tool from the candidate tool set by using a large language model; and calling the target tool to process the plurality of subtasks. The technical solution of the present disclosure can improve the reliability of calling external tools to process user tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a task processing method, apparatus and computer-readable storage medium. Background Technology

[0002] With the development of Large Language Model (LLM) technology, the ability of LLM to integrate with external tools or Application Programming Interfaces (APIs) has gradually transformed it from a traditional conversational chatbot into a core processing component of complex application systems, thereby enabling it to expand its functional scope by calling external tools.

[0003] In related technologies, the calling relationship between large language models and external tools often needs to be manually configured in advance. Summary of the Invention

[0004] The inventors of this disclosure have discovered the following problem in the aforementioned related technologies: the reliability of calling external tools to process user tasks is low.

[0005] To address the aforementioned problems, the present disclosure provides the following solutions.

[0006] According to some embodiments of this disclosure, a task processing method is provided, including: decomposing a user task to obtain multiple subtasks; determining a candidate tool set based on the task constraints of each subtask and the matching degree between each subtask and each tool among multiple tools; determining a target tool from the candidate tool set using a large language model; and invoking the target tool to process the multiple subtasks.

[0007] In some embodiments, the matching degree is determined based on the semantic similarity between the description information of each subtask and the description information of each of the plurality of tools.

[0008] In some embodiments, determining the candidate tool set includes: determining an initial tool set from the plurality of tools that matches the functional requirements of each subtask based on the semantic similarity; and determining the candidate tool set from the initial tool set that satisfies the task constraints, wherein the candidate tool set includes at least one tool that satisfies the task constraints and has a semantic similarity greater than a threshold.

[0009] In some embodiments, decomposing the user task into multiple subtasks based on the task objective of the user task includes: processing the user task using the large language model to obtain multiple decomposition schemes for achieving the task objective; determining a target decomposition scheme from the multiple decomposition schemes based on the complexity of each decomposition scheme, the semantic similarity between each decomposition scheme and the user task, and the evaluation result of the large language model on each decomposition scheme; and decomposing the user task into the multiple subtasks according to the target decomposition scheme.

[0010] In some embodiments, the complexity of each decomposition scheme is determined based on the execution complexity of each subtask among the multiple subtasks decomposed according to each decomposition scheme and the data transfer complexity between the multiple subtasks after decomposition.

[0011] In some embodiments, the execution complexity is determined based on at least one of the following: the tool call complexity of each subtask in the decomposed plurality of subtasks, wherein the tool call complexity is related to the number of tools called and the parameter complexity of the tool calls; the input-output data complexity of each subtask in the decomposed plurality of subtasks, wherein the input-output data complexity is related to the number of input data and the data structure of the output data; and the execution cost of the decomposed plurality of subtasks, wherein the execution cost is related to the consumption of computing resources and the execution time.

[0012] In some embodiments, the data transfer complexity is determined based on at least one of the following: the depth of the dependencies between the decomposed subtasks; the amount of data transfer between the decomposed subtasks, wherein the amount of data transfer is related to the size of the intermediate data and the number of data format conversions.

[0013] In some embodiments, the evaluation results are obtained by the large language model evaluating each decomposition scheme based on its feasibility, logic, and completeness.

[0014] In some embodiments, the description information of each tool includes at least one of the following: a functional description of each tool, the type of task it processes, the data format it processes, a response latency threshold, and a historical call success rate.

[0015] In some embodiments, the plurality of tools include at least one of a text generation model, an image recognition model, a speech recognition model, a knowledge base retrieval tool, and an API calling tool.

[0016] According to some other embodiments of this disclosure, a task processing apparatus is provided, comprising: a decomposition module configured to decompose a user task to obtain a plurality of subtasks; a determination module configured to determine a set of candidate tools based on the task constraints of each of the plurality of subtasks and the matching degree between each of the subtasks and each of the plurality of tools; determining a target tool from the set of candidate tools using a large language model; and a processing module configured to invoke the target tool to process the plurality of subtasks.

[0017] According to further embodiments of the present disclosure, a task processing apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the task processing method of any of the above embodiments based on instructions stored in the memory device.

[0018] According to further embodiments of the present disclosure, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the task processing method of any of the above embodiments.

[0019] According to further embodiments of this disclosure, a computer program product is also provided, including instructions that, when executed by a processor, cause the processor to perform the task processing method according to any of the foregoing embodiments.

[0020] In the above embodiments, after decomposing the user task into multiple sub-tasks, each sub-task has more explicit task constraints and descriptive information, resulting in finer-grained matching between tasks and tools. This avoids the problem of misselection caused by too many interfering items when directly matching from a large set of tools. Furthermore, using a large language model candidate tool set for secondary screening allows for a more focused comparison of subtle differences between candidate tools, thereby improving the accuracy of the final target tool selection and enhancing the reliability of using external tools to process user tasks. Attached Figure Description

[0021] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.

[0022] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein: Figure 1 A flowchart illustrating a task processing method according to some embodiments of the present disclosure is shown; Figure 2 A flowchart illustrating a task decomposition method according to some embodiments of the present disclosure is shown; Figure 3 A block diagram of a task processing apparatus according to some embodiments of the present disclosure is shown; Figure 4Block diagrams of a task processing apparatus according to other embodiments of the present disclosure are shown; Figure 5 A block diagram of an electronic device according to some embodiments of the present disclosure is shown. Detailed Implementation

[0023] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0024] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0025] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0026] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0027] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0028] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0029] Figure 1 A flowchart illustrating a task processing method according to some embodiments of the present disclosure is shown.

[0030] like Figure 1 As shown, in step 110, the user task is decomposed to obtain multiple subtasks.

[0031] In some embodiments, user tasks may be input in the form of natural language, images, speech, or a combination of multiple modalities.

[0032] For example, a user task input in natural language could be, "Help me plan a three-day, two-night trip from City M to City N, check the weather for the next three days, and recommend pictures of local delicacies." Breaking down this user task, we get subtask 1: transportation and itinerary planning; subtask 2: weather information query; subtask 3: local delicacies knowledge retrieval; and subtask 4: generating food recommendation images. Achieving the goal of this user task involves multiple external capabilities, including route planning, weather query, knowledge base retrieval, and image generation.

[0033] In step 120, a set of candidate tools is determined based on the task constraints of each subtask in the multiple subtasks and the matching degree between each subtask and each tool in the multiple tools.

[0034] In some embodiments, by decomposing the user task, the task constraints and description information of each subtask can be parsed synchronously. For example, the description information of each subtask may include a description of the functional requirements of the subtask. For example, the description information of subtask 2 is "obtain the weather forecast information (including temperature, precipitation probability, wind force, etc.) for the next three days in City N", and the corresponding task constraints may include modal constraints (e.g., the input is text and the output is structured text data) and timeliness constraints (e.g., the data must be real-time data).

[0035] In some embodiments, a tool library is maintained in advance, in which multiple tools are registered. Each tool has corresponding descriptive information, such as tool name, function description, type of task being processed, data format being processed, response latency threshold, and historical call success rate, among other things.

[0036] For example, Tool A is described as "providing real-time weather queries and 7-day weather forecasts for any city, returning structured data such as temperature, humidity, wind speed, and precipitation probability"; Tool B is described as "providing route planning, geocoding, and map rendering services"; Tool C is described as "generating high-quality images based on text descriptions"; and Tool D is described as "providing search services for tourist attractions, hotels, and restaurants".

[0037] In some embodiments, the multiple tools may include at least one of a text generation model, an image recognition model, a speech recognition model, a knowledge base retrieval tool, and an API calling tool.

[0038] In some embodiments, the functions of each tool can be determined based on the description information of each tool, and the task constraints of each subtask can be matched with the functions of each tool. For example, tool A supports input of city name and number of days, and outputs fields including temperature, precipitation probability, wind force, etc., which satisfies the modal constraints of subtask 2.

[0039] In step 130, the target tool is determined from the candidate tool set using a large language model.

[0040] In some embodiments, the descriptions and constraints of each subtask can be concatenated into a prompt and input into a large language model. Based on semantic understanding and reasoning capabilities, the large language model evaluates the functional matching degree of each candidate tool to determine the target tool. Optionally, invocation parameters for the target tool can be generated.

[0041] In step 140, the target tool is invoked to process multiple subtasks.

[0042] In some embodiments, the target tool can be invoked based on the invocation parameters of the large language model to process multiple subtasks. For example, the target tool can be invoked to process multiple subtasks according to the dependencies between them.

[0043] In some embodiments, the task processing method can be executed by a large language model. This allows full utilization of the large language model's natural language understanding, semantic reasoning, and context awareness capabilities to achieve a deep understanding and intelligent decomposition of user tasks. Furthermore, the semantic context accumulated during the decomposition phase can be directly reused during the invocation phase, helping to maintain semantic consistency from task understanding to tool execution.

[0044] In the above embodiments, decomposing the user task into multiple sub-tasks provides each sub-task with clearer task constraints and descriptive information, resulting in finer-grained matching between tasks and tools. This avoids the problem of misselection caused by too many interfering items when directly matching from a large tool set. Furthermore, secondary filtering using a large language model candidate tool set allows for a more focused comparison of subtle differences between candidate tools, thereby improving the accuracy of the final target tool selection and enhancing the reliability of calling external tools to process user tasks.

[0045] Moreover, through task decomposition, each subtask can be independently matched with a suitable tool, eliminating the need for manual tool configuration for each task. This reduces the limitations of fixed tool calls in meeting the needs of complex and flexible tasks, and improves the reliability of task processing.

[0046] The technical solutions proposed in this disclosure will be further described below with reference to some embodiments.

[0047] In some embodiments, the matching degree between each subtask and each of the multiple tools is determined based on the semantic similarity between the description information of each subtask and the description information of each tool. For example, the description information of each subtask and the description information of each tool can be encoded into semantic vectors respectively, and the cosine similarity between the two can be calculated as the semantic similarity.

[0048] In the above embodiments, the task constraints of each subtask and their semantic similarity with the description information of the tool are combined to filter the candidate tool set, and a large language model is used to select the target tool from the candidate tool set to process the user task.

[0049] In this way, semantic similarity can more accurately capture the matching relationship between task intent and tool function in semantic space, thereby quickly filtering out irrelevant tools, narrowing the decision range of the large language model, improving the accuracy of the final target tool selection, and thus improving the reliability of calling external tools to process user tasks.

[0050] In some embodiments, an initial set of tools matching the functional requirements of each subtask is determined from a plurality of tools based on semantic similarity, and then a set of candidate tools satisfying the task constraints is determined from the initial set of tools. For example, the candidate set of tools includes at least one tool that satisfies the task constraints and has a semantic similarity greater than a threshold.

[0051] For example, after receiving a user task, the user task is decomposed into multiple subtasks using a large language model. Each subtask includes a description of the functional requirements (such as "check the weather").

[0052] The description information of each tool in the tool library is pre-encoded as a semantic vector, and a semantic vector index library for the tools is constructed. The description information of each subtask is also encoded as a semantic vector. For each subtask's semantic vector, the semantic similarity (such as cosine similarity, inner product, etc.) between it and the semantic vectors of each tool in the tool library is calculated. Tools are sorted from high to low similarity, and those meeting preset conditions are selected to form the initial tool set for that subtask. For example, the preset condition could be tools with similarity higher than a threshold. Continuing the above example, for subtask 2, through semantic similarity matching, the top K tools most semantically similar to "weather information query" are selected from multiple tools to form the initial tool set for subtask 2.

[0053] For each tool in the initial toolkit, we can check whether it meets the task constraints of the subtask one by one. For example, we can use the structured information such as the parameter requirements and supported functions declared when each tool is registered in the toolkit to perform a precise match with the task constraints; or we can use a large language model to perform semantic judgment.

[0054] Tools that pass the constraint test are retained, while those that do not meet the constraints are removed, resulting in a candidate tool set for this subtask.

[0055] In the above embodiments, the semantic similarity-based screening is a coarse-screening step with low computational cost and broad coverage. It can quickly filter tools from a large-scale tool library that are semantically related to the functional requirements of the subtask, avoiding the omission of potentially usable tools. On this basis, the task constraint-based screening is a fine-grained screening step with high accuracy, capable of eliminating tools that are semantically related but do not meet the actual execution constraints.

[0056] This ensures that candidate tools entering the decision-making stage of the large language model are not only semantically relevant, but also practically executable under the current task constraints, thereby reducing the probability of tool failure after selection and improving the reliability of task processing.

[0057] The following is combined Figure 2 The method for task decomposition in step 110 is illustrated by example.

[0058] Figure 2 A flowchart illustrating a task decomposition method according to some embodiments of the present disclosure is shown.

[0059] like Figure 2 As shown, in step 210, the user task is processed using a large language model to obtain multiple decomposition schemes for achieving the task objective.

[0060] In some embodiments, the processing of user tasks using a large language model may include intent recognition, key entity extraction, context completion, and other processes to form a structured task representation.

[0061] In some embodiments, each decomposition scheme is used to decompose a user task into multiple subtasks corresponding to that decomposition scheme. For example, each decomposition scheme may describe the implementation method of breaking down a user task into multiple subtasks. For example, each decomposition scheme may include the number of subtasks, the task dependencies between the subtasks, etc.

[0062] For example, different prompts can be used to instruct the large language model to decompose the same user task from different perspectives, resulting in different decomposition schemes under the constraints indicated by the different prompts. For instance, one prompt might focus on "minimum number of subtasks," while another might focus on "maximum execution parallelism," thus yielding two different decomposition schemes.

[0063] For example, taking the above example, the large language model can generate the first decomposition scheme: first query the weather, then plan the transportation route, then search for food, and finally generate food recommendation images; the second decomposition scheme: query the weather and food in parallel, then plan the route based on the query results, and finally generate food recommendation images.

[0064] In step 220, a target decomposition scheme is determined from multiple decomposition schemes based on the complexity of each decomposition scheme, the semantic similarity between each decomposition scheme and the user task, and the evaluation results of the large language model for each decomposition scheme.

[0065] In some embodiments, the concatenation result of the description information of each subtask in each decomposition scheme and the original description of the user task can be encoded into semantic vectors respectively, and the cosine similarity between the two can be calculated as the semantic similarity between each decomposition scheme and the user task.

[0066] In this way, based on the semantic similarity between the decomposition scheme and the user task, the decomposition scheme that fully and accurately covers the user task intent can be identified and prioritized. This effectively avoids the problem of key intent elements being omitted or misinterpreted during the decomposition process, which helps to improve the accuracy of task decomposition and thus improve the reliability of subsequent task processing.

[0067] In some embodiments, a large language model can be used to evaluate each decomposition scheme based on its feasibility, logic, and completeness. The evaluation results reflect the comprehensive judgment of the quality of the decomposition scheme based on the large language model's own reasoning ability.

[0068] For example, a feasibility assessment can include whether each of the decomposed subtasks matches a corresponding available tool, and whether there are any subtasks that cannot be executed.

[0069] For example, logical evaluation can include assessing whether the granularity of subtask division is reasonable and whether the dependencies between subtasks are correct. "Whether the granularity of subtask division is reasonable" refers to evaluating whether the division is too coarse, leading to excessive complexity for individual subtasks, or too fragmented, resulting in excessive orchestration costs (e.g., splitting "query flight tickets" into four subtasks: "extract departure city," "extract arrival city," "extract date," and "call query interface," leading to excessive orchestration costs). "Whether the dependencies between subtasks are correct" refers to assessing whether there are logical contradictions or unnecessary circular dependencies, or whether there are situations where parallel execution is incorrectly judged as serial execution. For example, "query flight tickets" and "query hotel" have no data dependency and could be executed in parallel, but are orchestrated as serial execution, resulting in redundant dependencies.

[0070] For example, completeness assessment can include whether the decomposed subtasks fully cover all intent elements and constraints in the user task, and whether there are any omissions. For example, whether all intent elements contained in the user task (such as the three elements "flight", "hotel", and "attraction tickets" in "help me book flight, hotel, and attraction tickets") have corresponding subtasks to carry them.

[0071] In some embodiments, the large language model scores each decomposition scheme in dimensions such as feasibility, logicality, and completeness, and outputs an evaluation score as the evaluation result. For example, the evaluation score... ,in, A score indicating completeness. Scoring that indicates logical consistency A score indicating feasibility. , , These are the corresponding weights. For example, the evaluation score output by a large language model can be a floating-point number between 1 and 10 (e.g., rounded to two decimal places).

[0072] In some embodiments, weights can be assigned to the three dimensions of complexity, semantic similarity, and evaluation result, and a comprehensive score can be calculated for each decomposition scheme. The scheme with the highest comprehensive score can be selected as the target decomposition scheme.

[0073] For example, the overall score for each decomposition scheme can be: , in, This represents the i-th decomposition scheme among multiple decomposition schemes. This is a text embedding function that maps text to a high-dimensional vector, where Q represents the user task. Represents the cosine similarity function. This represents the evaluation results of the large language model. Indicate the complexity of the decomposition scheme. The preset weights.

[0074] In step 230, the user task is decomposed into multiple subtasks according to the target decomposition scheme.

[0075] For example, according to the determined goal decomposition scheme, the user task is decomposed into multiple subtasks, and structured description information is generated for each subtask.

[0076] In the above embodiments, multiple decomposition schemes are generated using a large language model, and each decomposition scheme is comprehensively evaluated from three dimensions: complexity, semantic similarity, and the evaluation results of the large language model. The target decomposition scheme is then selected based on the best result. In this way, the task decomposition scheme is determined through a selection process involving competition among multiple schemes and evaluation from multiple dimensions. This effectively reduces the risk of quality fluctuations caused by the randomness of a single inference, provides a reliable decomposition scheme for subsequent tool selection and task processing, and thus helps to improve the reliability of task processing.

[0077] In some embodiments, the complexity of each decomposition scheme is determined based on the execution complexity of each subtask in the plurality of subtasks after decomposition according to each decomposition scheme and the data transfer complexity between the plurality of subtasks after decomposition.

[0078] For example, execution complexity can be used to measure the resource consumption and processing difficulty of each subtask in the decomposition scheme at the execution level, reflecting the complexity of a single subtask; data transfer complexity can be used to measure the orchestration overhead and coordination difficulty of data interaction between subtasks in the decomposition scheme, reflecting the coordination complexity between subtasks.

[0079] For example, the complexity of the decomposition scheme ,in, The weights are preset. In this way, the weight coefficients between execution complexity and data transfer complexity can be flexibly configured, allowing the system to dynamically adjust the focus of complexity evaluation according to different optimization objectives.

[0080] This approach breaks down the complexity of the decomposition scheme into two dimensions: execution complexity and data transfer complexity. These are evaluated from two independent perspectives: the complexity of individual subtasks and the coordination complexity between subtasks. Compared to a general approach that evaluates all factors together, this reduces interference between factors of different natures, resulting in more accurate and interpretable complexity assessments. This helps improve the reliability of the final target decomposition scheme.

[0081] In some embodiments, the execution complexity of each subtask in the decomposed subtasks can be determined based on at least one of the following: the tool call complexity of each subtask in the decomposed subtasks, the input / output data complexity of each subtask in the decomposed subtasks, and the execution cost of the decomposed subtasks.

[0082] In some embodiments, tool invocation complexity is related to the number of tools invoked and the parameter complexity of the tool invocation. Tool invocation complexity can be used to measure the complexity of how tools are invoked to complete a subtask. For example, fewer tools are invoked, resulting in lower tool invocation complexity; invoking string parameters has lower parameter complexity than invoking parameters from nested JSON structures.

[0083] For example, the subtask "querying flight tickets" requires calling one flight ticket query tool and three string parameters: departure city, arrival city, and date. The tool call complexity is relatively low. However, the subtask "travel demand analysis" requires calling two tools: a user profiling tool and a preference analysis tool. The input of the second tool depends on the output of the first tool, which makes the tool call complexity higher.

[0084] In some embodiments, input / output data complexity is related to the amount of input data and the data structure of the output data. Input / output data complexity can be used to measure the difficulty of processing input and output data during the processing of subtasks.

[0085] For example, the more input data there is, the higher the complexity of the input and output data. The deeper the hierarchical structure of the output data, the higher the complexity of the input and output data.

[0086] In some embodiments, execution cost is related to computational resource consumption and execution time. Execution cost can be used to measure the computational resources and time costs consumed during the execution of a subtask. For example, the greater the computational resource consumption and the longer the execution time, the higher the execution cost. For instance, computational resource consumption may include the amount of CPU, memory, GPU, and other resources required for the execution of the subtask. Execution time may include the expected time from the start of execution of the subtask to the return of a result.

[0087] In some embodiments, the execution complexity score of each subtask can be obtained by weighted summing of the scores of the three dimensions mentioned above for each subtask after decomposition. The execution complexity scores of all subtasks in the decomposition scheme are aggregated (e.g., summed, weighted averaged, or the maximum value is taken) to obtain the overall execution complexity of the multiple subtasks after decomposition according to the decomposition scheme.

[0088] In the above embodiments, the execution complexity of subtasks is further refined into three dimensions: tool invocation complexity, input / output data complexity, and execution cost. This refined quantification method makes the complexity assessment results more accurate and interpretable, which helps to improve the reliability of the final target decomposition scheme.

[0089] In some embodiments, the data transfer complexity between multiple subtasks is determined based on at least one of the following: the depth of the dependencies between the decomposed multiple subtasks, and the amount of data transfer between the decomposed multiple subtasks.

[0090] In some embodiments, the depth of dependencies can reflect the degree of parallelism between subtasks. For example, a greater depth of dependencies means more tasks are processed sequentially, resulting in lower parallelism and a longer overall execution time.

[0091] For example, the depth of a dependency can be the maximum length of the dependency chain among the multiple subtasks after decomposition. For instance, the subtasks and their dependencies in the decomposition scheme can be modeled as a directed acyclic graph (DAG), and the length of the longest path in the DAG can be calculated as the depth of the dependency.

[0092] For example, the DAG of scheme P1 is a linear chain (subtask 1 → subtask 2 → subtask 3 → subtask 4), with a longest path length of 4 and a high depth of dependency; the DAG of scheme P2 is a parallel structure (subtask 1|subtask 2|subtask 3 → subtask 4), with a longest path length of 2 and a low depth of dependency.

[0093] In some embodiments, the amount of data transferred between the decomposed subtasks is related to the size of the intermediate data and the number of data format conversions. For example, the size of the intermediate data can be determined based on the total amount of data transferred between each subtask and the data type, and the number of data format conversions can include the number of conversions performed during data transfer to adapt to the data requirements of the preceding and following subtasks.

[0094] In the above embodiments, by introducing two evaluation dimensions—the depth of dependency and the amount of data transferred—the coordination difficulty between subtasks is incorporated into the complexity evaluation system, making the complexity evaluation more comprehensive and helping to improve the reliability of the final target decomposition scheme.

[0095] Moreover, in scenarios with a large number of subtasks and complex dependencies, the complexity of data transfer is a key factor affecting overall execution efficiency. Quantitatively evaluating it helps to select a decomposition scheme with higher execution efficiency.

[0096] Figure 3 A block diagram of a task processing apparatus according to some embodiments of the present disclosure is shown.

[0097] like Figure 3 As shown, the task processing device 300 includes a decomposition module 301, a determination module 302, and a processing module 303.

[0098] The decomposition module 301 is configured to decompose the user task into multiple subtasks.

[0099] The determination module 302 is configured to determine a set of candidate tools based on the task constraints of each subtask in a plurality of subtasks and the matching degree between each subtask and each tool in a plurality of tools; and to determine the target tool from the set of candidate tools using a large language model.

[0100] Processing module 303 is configured to invoke the target tool to process multiple subtasks.

[0101] In some embodiments, the matching degree is determined based on the semantic similarity between the description information of each subtask and the description information of each of the multiple tools.

[0102] In some embodiments, the determining module 302 is configured to determine an initial set of tools from a plurality of tools that match the functional requirements of each subtask based on semantic similarity; and to determine a set of candidate tools that satisfy the task constraints from the initial set of tools.

[0103] In some embodiments, the candidate tool set includes at least one tool that satisfies the task constraints and has a semantic similarity greater than a threshold.

[0104] In some embodiments, the decomposition module 301 is configured to process the user task using a large language model to obtain multiple decomposition schemes to achieve the task objective; determine the target decomposition scheme from the multiple decomposition schemes based on the complexity of each decomposition scheme, the semantic similarity between each decomposition scheme and the user task, and the evaluation result of the large language model on each decomposition scheme; and decompose the user task into multiple subtasks according to the target decomposition scheme.

[0105] In some embodiments, the complexity of each decomposition scheme is determined based on the execution complexity of each subtask in the plurality of subtasks after decomposition according to each decomposition scheme and the data transfer complexity between the plurality of subtasks after decomposition.

[0106] In some embodiments, the execution complexity is determined based on at least one of the following: the tool call complexity of each subtask in the decomposed subtasks, which is related to the number of tools called and the parameter complexity of the tool calls; the input and output data complexity of each subtask in the decomposed subtasks, which is related to the number of input data and the data structure of the output data; and the execution cost of the decomposed subtasks, which is related to the consumption of computing resources and the execution time.

[0107] In some embodiments, data transfer complexity is determined based on at least one of the following: The depth of dependencies among the decomposed subtasks; the amount of data transferred between the decomposed subtasks, which is related to the size of the intermediate data and the number of data format conversions.

[0108] In some embodiments, the evaluation results are obtained by the large language model evaluating each decomposition scheme based on its feasibility, logic, and completeness.

[0109] In some embodiments, the description information for each tool includes at least one of the following: a functional description of each tool, the type of task it processes, the format of the data it processes, a threshold for response latency, and a historical call success rate.

[0110] In some embodiments, the multiple tools include at least one of a text generation model, an image recognition model, a speech recognition model, a knowledge base retrieval tool, and an API calling tool.

[0111] Figure 4 A block diagram of a task processing apparatus according to other embodiments of the present disclosure is shown.

[0112] like Figure 4As shown, the task processing apparatus 400 of this embodiment includes a memory 401 and a processor 402 coupled to the memory 401. The processor 402 is configured to execute a task processing method in any embodiment of this disclosure based on instructions stored in the memory 401.

[0113] The memory 401 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, an operating system, application programs, a boot loader, a database, and other programs.

[0114] Figure 5 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.

[0115] like Figure 5 As shown, the task processing apparatus 500 of this embodiment includes a memory 501 and a processor 502 coupled to the memory 501. The processor 502 is configured to execute the task processing method of any of the foregoing embodiments based on instructions stored in the memory 501.

[0116] The memory 501 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, the operating system, application programs, boot loader, and other programs.

[0117] The task processing device 500 may also include an input / output interface 503, a network interface 504, and a storage interface 505. These interfaces 503, 504, and 505, as well as the memory 501 and processor 502, can be connected, for example, via a bus 506. The input / output interface 503 provides a connection interface for input / output devices such as a monitor, mouse, keyboard, touchscreen, microphone, and speakers. The network interface 504 provides a connection interface for various networked devices. The storage interface 505 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0118] This disclosure also provides a computer-readable storage medium including computer program instructions that, when executed by a processor, implement the task processing method of any of the above embodiments.

[0119] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the task processing method of any of the above embodiments.

[0120] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0121] The task processing technical solution according to this disclosure has now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solution disclosed herein based on the above description.

[0122] The methods and systems of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the specific order described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0123] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A task processing method, comprising: The user task is broken down into multiple subtasks; A set of candidate tools is determined based on the task constraints of each subtask and the matching degree between each subtask and each tool. The target tool is determined from the candidate tool set using a large language model; The target tool is invoked to process the multiple sub-tasks.

2. The task processing method according to claim 1, wherein, The matching degree is determined based on the semantic similarity between the description information of each subtask and the description information of each tool among the multiple tools.

3. The task processing method according to claim 2, wherein, The set of candidate tools includes: Based on the semantic similarity, an initial set of tools matching the functional requirements of each subtask is determined from the plurality of tools; The initial tool set is used to determine the candidate tool set that satisfies the task constraints, the candidate tool set including at least one tool that satisfies the task constraints and has a semantic similarity greater than a threshold.

4. The task processing method according to claim 1, wherein, The process of decomposing the user task into multiple sub-tasks includes: The user task is processed using the large language model to obtain multiple decomposition schemes to achieve the task objective; Based on the complexity of each decomposition scheme, the semantic similarity between each decomposition scheme and the user task, and the evaluation results of the large language model on each decomposition scheme, a target decomposition scheme is determined from the multiple decomposition schemes. The user task is decomposed into the multiple sub-tasks according to the target decomposition scheme.

5. The task processing method according to claim 4, wherein, The complexity of each decomposition scheme is determined based on the execution complexity of each subtask in the multiple subtasks after decomposition according to each decomposition scheme and the data transfer complexity between the multiple subtasks after decomposition.

6. The task processing method according to claim 5, wherein, The execution complexity is determined based on at least one of the following: The tool call complexity of each subtask in the decomposed subtasks is related to the number of tools called and the parameter complexity of the tool call. The input-output data complexity of each subtask in the decomposed subtasks is related to the number of input data and the data structure of the output data. The execution cost of the decomposed subtasks is related to the consumption of computing resources and the execution time.

7. The task processing method according to claim 5, wherein, The data transfer complexity is determined based on at least one of the following: The depth of the dependencies between the decomposed subtasks; The amount of data transferred between the decomposed subtasks is related to the size of the intermediate data and the number of data format conversions.

8. The task processing method according to claim 4, wherein, The evaluation results are obtained by the large language model evaluating each decomposition scheme based on its feasibility, logic, and completeness.

9. The task processing method according to any one of claims 1-8, wherein, The description information for each tool includes at least one of the following: a functional description of each tool, the type of task it processes, the data format it processes, the response latency threshold, and the historical call success rate.

10. The task processing method according to any one of claims 1-8, wherein, The multiple tools include at least one of the following: text generation model, image recognition model, speech recognition model, knowledge base retrieval tool, and application programming interface (API) calling tool.

11. A task processing apparatus, comprising: The decomposition module is configured to decompose user tasks into multiple subtasks; The determination module is configured to determine a set of candidate tools based on the task constraints of each of the plurality of subtasks and the matching degree between each of the subtasks and each of the plurality of tools; The target tool is determined from the candidate tool set using a large language model; The processing module is configured to invoke the target tool to process the multiple subtasks.

12. A task processing apparatus, comprising: Memory; and A processor coupled to the memory, the processor being configured to execute the task processing method of any one of claims 1-10 based on instructions stored in the memory.

13. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the task processing method according to any one of claims 1-10.

14. A computer program product comprising instructions that, when executed by a processor, cause the processor to perform the task processing method according to any one of claims 1-10.