Task execution method, electronic equipment and storage medium
Through pre-trained tasks, the model parses the task request description, and determines and executes multiple subtasks, solving the problem that the intelligent dialogue model cannot complete the task, and achieving efficient and accurate task automatic execution.
Patent Information
- Application Number
- CN202510419036.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-08-15
AI Technical Summary
The existing intelligent dialogue model cannot help users complete tasks and has certain limitations.
Provide a task execution method, through pre-trained tasks, determine the model to parse the task request description, determine multiple subtasks with execution order and the tool type that needs to be called, and call the corresponding tool to execute the subtask until the target task is completed, and use the large language model (LLM) network to perform task analysis and tool calls.
It realizes that users can complete tasks automatically by simply entering the task request description, with high accuracy, high efficiency and good user experience.
Smart Images

Figure CN120492055A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of task processing technology, and in particular to a task execution method, electronic device, and storage medium. Background Art
[0002] With the development of science and technology, large artificial intelligence models are becoming more and more popular, bringing convenience to people's lives.
[0003] Current AI models include intelligent conversational models (such as Deepseek and voice robots). These models can perform logical reasoning, solve complex problems, understand and generate high-quality text, accurately analyze input speech or text, efficiently process large amounts of data and mine valuable information, achieve multimodal data fusion and learning, and respond to user input speech or text. However, current intelligent conversational models only respond to user input speech or text and cannot help users complete tasks, thus exhibiting certain limitations. Summary of the Invention
[0004] The present application provides a task execution method, electronic device and storage medium, which are used to solve the problem in the prior art that intelligent dialogue models cannot help users complete tasks.
[0005] This application provides a task execution method, which is applied to a server. The method provided in this application includes:
[0006] receiving a task request description from a user terminal, where the task request description is used to instruct completion of a target task;
[0007] Parsing the task request description according to a pre-trained task determination model and determining a plurality of subtasks associated with the task request description that have an execution order and a tool type that needs to be called to execute each subtask, wherein the task determination model is trained by inputting a plurality of first training samples into a network to be trained, each first training sample including a historical task request description, a plurality of corresponding historical actual subtasks that have an execution order, and a historical tool type that needs to be called for each historical subtask;
[0008] For each subtask, when it is the turn of the subtask in the execution order, call the task execution tool of the tool type corresponding to the subtask to execute the subtask until multiple subtasks are executed to complete the target task, wherein, if the execution result of the n-th execution of the subtask meets the expectation, the execution result of the n-th execution of the subtask is used as the basis for calling the task execution tool of the determined tool type for the n+1th time, where n is an integer greater than or equal to 1;
[0009] Feedback the execution result of the last subtask to the user terminal for display.
[0010] In some embodiments, for each subtask, when it is the subtask's turn to execute, a task execution tool under the tool type corresponding to the subtask is called to execute the subtask, including:
[0011] For the (n+1)th subtask, if the result of the nth execution of the subtask does not meet the expectation, then the type of tool that needs to be called corresponding to the (n+1)th subtask that has been determined is updated according to the result of the nth execution of the subtask;
[0012] Call the task execution tool under the tool type that needs to be called corresponding to the updated n+1th subtask to execute the n+1th subtask.
[0013] In some embodiments, after the nth subtask is executed, it is determined whether the execution result of the nth subtask satisfies the result condition associated with the nth subtask; if the result condition associated with the nth subtask is not satisfied, it is determined that the execution result of the current subtask does not meet expectations; if the result condition associated with the nth subtask is satisfied, it is determined that the execution result of the nth subtask meets expectations;
[0014] The result condition associated with the nth subtask is at least one of the number of words, format, and semantics that the execution result needs to meet.
[0015] In some embodiments, before parsing the task request description according to the pre-trained task determination model, the method provided by the present application further includes:
[0016] Identify the semantics of the task request description;
[0017] The semantics of the task request description are input into a pre-trained extended description model to obtain an extended task request description, wherein the extended description model is trained by inputting multiple second training samples into the to-be-trained network, and each second training sample includes the semantics of the historical task request description and the corresponding actual task request description of the historical extension.
[0018] In some embodiments, the method provided herein further comprises:
[0019] After each subtask is executed, the execution result of the completed subtask is fed back to the user terminal for display.
[0020] In some implementations, the network to be trained is a large language model (LLM) network.
[0021] In some implementations, the tool type that each subtask needs to call is a network query tool type, a code reading tool type, a file reading tool type, a file editing tool type, a code generation tool type, or a code execution tool type.
[0022] In a second aspect, the present application provides a server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the server executes the method provided in the first aspect of the present application.
[0023] In a third aspect, the present application further provides a storage medium storing a computer program. When the computer program is executed by a processor, the computer executes the method provided in the first aspect of the present application.
[0024] In a fourth aspect, the present application also provides a computer program product, comprising a computer program, which, when executed, enables a server to execute the method provided in the first aspect of the present application.
[0025] The present application provides a task execution method, electronic device and storage medium, which can parse the task request description according to a pre-trained task determination model, and determine the multiple subtasks with an execution order associated with the task request description and the type of tool that needs to be called to execute each subtask. Since the task determination model is obtained by inputting multiple first training samples into the network to be trained, and each first training sample includes a historical task request description, a corresponding multiple historical actual subtasks with an execution order, and the type of historical tool that needs to be called for each historical subtask. In this way, it is possible to accurately determine the various subtasks with an execution order that the user needs to execute, and the type of tool that needs to be called to execute each subtask.
[0026] For each subtask, when it is the turn to execute the subtask, the task execution tool of the corresponding tool type is called to execute the subtask until multiple subtasks are completed to complete the target task. If the execution result of the nth subtask execution meets the expectations, the execution result of the nth subtask execution is used as the basis for calling the task execution tool of the specified tool type for the (n+1)th time. The execution result of the last subtask is fed back to the user terminal for display. In this way, the user only needs to enter the task request description, and the required task can be automatically completed for the user without illusions, with high accuracy, high efficiency, and a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1A schematic diagram of the interaction between a user terminal and a server provided in an embodiment of the present application;
[0029] Figure 2 A flowchart of a task execution method provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of an interface for describing and feeding back the execution results of a task request input by a user, provided in an embodiment of the present application;
[0031] Figure 4 This is a functional module block diagram of the task execution device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely illustrative and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0033] The accompanying drawings illustrate various schematic diagrams of structures according to embodiments of the present disclosure. These figures are not drawn to scale, and for the purpose of clarity, certain details are exaggerated and certain details may be omitted. The shapes of the various regions and layers shown in the figures, as well as their relative sizes and positional relationships, are merely exemplary and may deviate in practice due to manufacturing tolerances or technical limitations. Those skilled in the art may design regions / layers with different shapes, sizes, and relative positions as needed.
[0034] In the context of the present disclosure, when a layer / element is referred to as being "on" another layer / element, it can be directly on the other layer / element or an intervening layer / element may be present therebetween. In addition, if a layer / element is "on" another layer / element in one orientation, it may be "below" the other layer / element when the orientation is reversed.
[0035] The following describes in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0036] This embodiment of the application provides a task execution method, which is applied to the server 102. Figure 1 As shown, the server 102 is connected to the user terminal 101. The user terminal 101 can be, but is not limited to, a mobile phone, a computer, or a tablet. Figure 2 As shown, the method provided in the embodiment of the present application includes:
[0037] S201: Receive a task request description from the user terminal 101, where the task request description is used to instruct the completion of a target task.
[0038] For example, the task request description could be "I want to write a report on the analysis of the recent financial situation. It needs to be written from three aspects: optimistic about the industry, bearish on the industry, and recommended investment plans. Please consult the information for each aspect separately, and finally write the whole thing into a markdown file with no less than 1,000 words."
[0039] Prior to step S202, the method provided in an embodiment of the present application further includes: identifying the semantics of the task request description; and inputting the semantics of the task request description into a pre-trained extended description model to obtain an extended task request description. The extended description model is trained by inputting multiple second training samples into a network to be trained, each second training sample including the semantics of a historical task request description and a corresponding historical extended actual task request description.
[0040] For example, the task request description from the user terminal 101 is "write a financial analysis report", then the extended task request description obtained by the pre-trained extended description model is "I want to write a report on the analysis of the recent financial situation. It needs to be written from three aspects: optimistic about the industry, bearish on the industry, and recommended investment plans. Please consult the information for each aspect separately, and finally write the whole thing into a markdown file with no less than 1,000 words."
[0041] S202: Parse the task request description according to the pre-trained task determination model, and determine a plurality of subtasks associated with the task request description that have an execution order and a tool type that needs to be called to execute each subtask.
[0042] The task determination model is trained by inputting multiple first training samples into a network to be trained. Each first training sample includes a historical task request description, multiple corresponding historical actual subtasks with a certain execution order, and the historical tool type required for each historical subtask to be invoked. In some embodiments, the network to be trained may be, but is not limited to, a Large Language Model (LLM) network; the tool type required for each subtask to be invoked may be, but is not limited to, an online query tool type, a code reading tool type, a file reading tool type, a file editing tool type, a code generation tool type, or a code execution tool type.
[0043] For example, let's determine multiple subtasks that have a specific execution order: Subtask 1: Obtain financial analysis data related to "optimistic industries" from the Internet; Subtask 2: Obtain financial analysis data related to "bearish industries" from the Internet; Subtask 3: Obtain financial analysis data related to "recommended investment plans" from the Internet; Subtask 4: Generate a financial report analysis document. Subtask 1 requires an online query tool, subtask 2 requires an online query tool, subtask 3 requires an online query tool, and subtask 4 requires a document generation tool.
[0044] S203: For each subtask, when it is the subtask's turn to execute in the execution order, call the task execution tool under the tool type corresponding to the subtask to execute the subtask until multiple subtasks are executed to complete the target task.
[0045] Among them, when the execution result of the subtask for the nth execution meets the expectation, the execution result of the subtask for the nth execution is used as the basis for calling the task execution tool under the tool type determined by the n+1th call, where n is an integer greater than or equal to 1.
[0046] For example, the Sogou engine query tool (which can also be the Baidu engine query tool or the 360 engine query tool, etc.) under the network query tool type corresponding to subtask 1 is called to obtain the financial situation analysis data associated with "bearish industry" (i.e., the execution result); if the financial situation analysis data associated with "bearish industry" meets expectations, the Sogou engine query tool under the network query tool type corresponding to subtask 2 is called to obtain the financial situation analysis data associated with "optimistic industry" (i.e., the execution result); if the financial situation analysis data associated with "optimistic industry" meets expectations, the Sogou engine query tool under the network query tool type corresponding to subtask 3 is called to obtain the financial situation analysis data associated with "recommended investment plan" (i.e., the execution result); if the financial situation analysis data associated with "recommended investment plan" meets expectations, the word document generation tool (which can also be a WPS document generation tool or a PDF document generation tool) under the document generation tool type corresponding to subtask 4 is called to generate a financial situation analysis report in word document format (i.e., the execution result) based on the data queried by subtask 1, the data queried by subtask 2, and the data queried by subtask 3.
[0047] It should be noted that after executing the nth subtask, it is determined whether the execution result of the nth subtask meets the result condition associated with the nth subtask; if the result condition associated with the nth subtask is not met, it is determined that the execution result of the current subtask does not meet expectations; if the result condition associated with the nth subtask is met, it is determined that the execution result of the nth subtask meets expectations.
[0048] Among them, the result condition associated with the nth subtask is at least one of the number of words, format, and semantics that the execution result needs to meet. Furthermore, the result condition associated with the nth subtask is that the three conditions of the number of words, format, and semantics that the execution result needs to meet are all met. For example, the content of the feedback execution result is no less than 100 words, the format should be text format or image format, and the semantics should be related to the financial industry. For example, if the feedback execution result is "Sorry, there is a problem with the network", then the semantics are not related to the financial industry, or "Sorry, there is a problem with the online query tool", then the semantics are also not related to the financial industry.
[0049] In addition, in some embodiments, for the n+1th subtask, if the execution result of the nth execution of the subtask does not meet expectations, the type of tool that needs to be called corresponding to the determined n+1th subtask is updated according to the execution result of the nth execution of the subtask. For example, the network query tool is updated to a file reading tool type. Then, the task execution tool under the tool type that needs to be called corresponding to the updated n+1th subtask is called to execute the n+1th subtask. For example, the local database file reading tool under the file reading tool type is called to read the financial situation analysis data associated with the "bearish industry" or the financial situation analysis data associated with the "bullish industry", etc. In this way, the type of tool to be called next time can be determined based on the execution results of each round, so that the execution results can be obtained more accurately.
[0050] S204: Feedback the execution result of the last subtask to the user terminal 101 for display.
[0051] For example, Figure 3 As shown, the generated financial situation analysis report in word document format is fed back to the user terminal 101 for display. Figure 3 As shown, when each subtask is executed, the execution result of the completed subtask is fed back to the user terminal 101 for display. In this way, the user can browse the execution result of each subtask.
[0052] In summary, a task execution method provided by an embodiment of the present application can parse a task request description based on a pre-trained task determination model, and determine a plurality of subtasks associated with the task request description that have an execution order, as well as the type of tool that needs to be called to execute each subtask. Since the task determination model is obtained by inputting a plurality of first training samples into the network to be trained, and each first training sample includes a historical task request description, a corresponding plurality of historical actual subtasks that have an execution order, and the type of historical tool that needs to be called for each historical subtask. In this way, it is possible to accurately determine the various subtasks that the user needs to execute that have an execution order, and the type of tool that needs to be called to execute each subtask.
[0053] For each subtask, when it is the turn to execute the subtask, the task execution tool under the tool type corresponding to the subtask is called to execute the subtask until multiple subtasks are executed to complete the target task. In particular, if the execution result of the nth execution of the subtask meets the expectations, the execution result of the nth execution of the subtask is used as the basis for calling the task execution tool under the determined tool type for the (n+1)th time. The execution result of the last subtask is fed back to the user terminal 101 for display. In this way, the user only needs to enter the task request description, and the required task can be automatically completed for the user without hallucinations. The accuracy is high, the efficiency is high, and the user experience is good.
[0054] See also Figure 4 , the embodiment of the present application also provides a task execution device, which is applied to the server 102. It should be noted that the basic principle and technical effects of the task execution device provided by the embodiment of the present application are the same as those of the above embodiment. For the sake of brief description, for parts not mentioned in the embodiment of the present application, please refer to the corresponding content in the above embodiment. The device provided by the embodiment of the present application includes a data receiving unit, a subtask determination unit, a task execution unit, and a result feedback unit, wherein,
[0055] The data receiving unit is configured to receive a task request description from the user terminal 101 , where the task request description is used to instruct the completion of a target task.
[0056] A subtask determination unit is used to parse the task request description according to a pre-trained task determination model, and determine multiple subtasks with an execution order associated with the task request description and the type of tool that needs to be called to execute each subtask, wherein the task determination model is obtained by inputting multiple first training samples into the network to be trained, and each first training sample includes a historical task request description, a corresponding multiple historical actual subtasks with an execution order, and a historical tool type that needs to be called for each historical subtask.
[0057] In some implementations, the network to be trained is a large language model (LLM) network.
[0058] In some implementations, the tool type that each subtask needs to call is a network query tool type, a code reading tool type, a file reading tool type, a file editing tool type, a code generation tool type, or a code execution tool type.
[0059] A task execution unit is used to call the task execution tool under the tool type corresponding to the subtask for each subtask when it is the subtask's turn to be executed in the execution order, so as to execute the subtask until multiple subtasks are executed to complete the target task, wherein, if the execution result of the subtask for the nth execution meets the expectation, the execution result of the subtask for the nth execution is used as the basis for calling the task execution tool under the determined tool type for the n+1th time, wherein n is an integer greater than or equal to 1.
[0060] The result feedback unit is used to feed back the execution result of the last subtask to the user terminal 101 for display.
[0061] In some embodiments, the task execution unit is specifically used to update the tool type that needs to be called corresponding to the determined n+1th subtask according to the execution result of the nth execution of the subtask, if the execution result of the nth execution of the subtask does not meet expectations; call the task execution tool under the tool type that needs to be called corresponding to the updated n+1th subtask to execute the n+1th subtask.
[0062] In some embodiments, the task execution unit is specifically used to determine whether the execution result of the nth subtask meets the result condition associated with the nth subtask after executing the nth subtask; if the result condition associated with the nth subtask is not met, it is determined that the execution result of the current subtask does not meet expectations; if the result condition associated with the nth subtask is met, it is determined that the execution result of the nth subtask meets expectations; wherein, the result condition associated with the nth subtask is at least one of the number of words, format, and semantics that the execution result needs to meet.
[0063] In some embodiments, before parsing the task request description according to the pre-trained task determination model, the device provided by the present application also includes a description expansion unit for identifying the semantics of the task request description; the semantics of the task request description is input into the pre-trained extended description model to obtain an extended task request description, wherein the extended description model is obtained by inputting multiple second training samples into the network to be trained, and each second training sample includes the semantics of the historical task request description and the corresponding historical extended actual task request description.
[0064] In some implementations, the result feedback unit is further configured to feed back the execution result of each subtask to the user terminal 101 for display after each subtask is executed.
[0065] In addition, an embodiment of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the server executes the method provided in the above embodiment of the present application.
[0066] In addition, an embodiment of the present application further provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the computer executes the method provided in the above embodiment of the present application.
[0067] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which, when executed, enables the server to execute the method provided in the above embodiment of the present application.
[0068] While the above description does not provide detailed technical details regarding the patterning of each layer, those skilled in the art will appreciate that various technical means can be employed to form layers, regions, and the like in desired shapes. Furthermore, those skilled in the art may devise methods that differ from those described above to achieve the same structure. Furthermore, while each embodiment has been described separately, this does not mean that the measures in each embodiment cannot be advantageously combined.
[0069] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0070] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A task execution method, characterized in that: Applied to a server, the method includes: receiving a task request description from a user terminal, wherein the task request description is used to instruct completion of a target task; Parsing the task request description according to a pre-trained task determination model, and determining a plurality of subtasks associated with the task request description that have an execution order, and a tool type that needs to be called to execute each of the subtasks, wherein the task determination model is trained by inputting a plurality of first training samples into a network to be trained, each of the first training samples including a historical task request description, a corresponding plurality of historical actual subtasks that have an execution order, and a historical tool type that needs to be called for each of the historical subtasks; For each of the subtasks, when it is the turn of the subtask in the execution order, calling the task execution tool of the tool type corresponding to the subtask to execute the subtask until multiple subtasks are executed to complete the target task, wherein, if the execution result of the n-th execution of the subtask meets the expectation, the execution result of the n-th execution of the subtask is used as the basis for calling the task execution tool of the determined tool type for the n+1th time, wherein n is an integer greater than or equal to 1; Feedback the execution result of the last subtask to the user terminal for display.
2. The method according to claim 1, characterized in that For each of the subtasks, when it is the subtask's turn to execute, calling a task execution tool under a tool type corresponding to the subtask to execute the subtask includes: For the (n+1)th subtask, if the result of the nth execution of the subtask does not meet the expectation, then the type of tool that needs to be called corresponding to the (n+1)th subtask that has been determined is updated according to the result of the nth execution of the subtask; Call the task execution tool under the tool type that needs to be called corresponding to the updated n+1th subtask to execute the n+1th subtask.
3. The method according to claim 1 or 2, characterized in that After the nth subtask is executed, it is determined whether the execution result of the nth subtask meets the result condition associated with the nth subtask; if the result condition associated with the nth subtask is not met, it is determined that the execution result of the current subtask does not meet expectations; if the result condition associated with the nth subtask is met, it is determined that the execution result of the nth subtask meets expectations; The result condition associated with the nth subtask is at least one of the number of words, format, and semantics that the execution result needs to meet.
4. The method according to claim 1, wherein Before parsing the task request description according to the pre-trained task determination model, the method further includes: Identifying the semantics of the task request description; The semantics of the task request description are input into a pre-trained extended description model to obtain an extended task request description, wherein the extended description model is trained by inputting multiple second training samples into a network to be trained, and each second training sample includes the semantics of a historical task request description and a corresponding historical extended actual task request description.
5. The method according to claim 1, characterized in that The method further comprises: After each subtask is executed, the execution result of the completed subtask is fed back to the user terminal for display.
6. The method according to claim 1, characterized in that The network to be trained is a large language model (LLM) network.
7. The method according to claim 1, characterized in that The tool type that each subtask needs to call is a network query tool type, a code reading tool type, a file reading tool type, a file editing tool type, a code generation tool type, or a code execution tool type.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the electronic device is caused to perform the method according to any one of claims 1 to 7.
9. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer is caused to perform the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.