CN-122019625-A - Task processing method, device, computer equipment, storage medium and product
Abstract
The application relates to a task processing method, a task processing device, computer equipment, a storage medium and a product. The method comprises the steps of responding to a processing request of a target task, determining a multidimensional matching factor of the target task, wherein the multidimensional matching factor is a characteristic of the target task in a multidimensional degree, inquiring a first stream Cheng Moban matched with the target task based on the multidimensional matching factor, fusing the first flow template with a prompt word of a large language model to obtain a fusion result, generating a first tool call sequence through the large language model according to the fusion result, and processing the target task based on tools in the first tool call sequence to obtain a first processing result of the target task. By adopting the method, the task processing efficiency can be improved.
Inventors
- HUANG BIN
- ZHAO YANG
Assignees
- 腾讯科技(深圳)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260126
Claims (17)
- 1. A method of task processing, comprising: Responding to a processing request of a target task, and determining a multidimensional matching factor of the target task, wherein the multidimensional matching factor is the characteristic of the target task in a multidimensional degree; Querying a first stream Cheng Moban that matches the target task based on the multidimensional matching factor; fusing the first flow template with the prompt word of the large language model to obtain a fusion result; generating a first tool call sequence through the large language model according to the fusion result; And processing the target task based on the tool in the first tool call sequence to obtain a first processing result of the target task.
- 2. The method of claim 1, wherein querying the first stream Cheng Moban that matches the target task based on the multidimensional matching factor comprises: Determining semantic matching degree between the target task and a vertical flow template in a flow template library based on the multidimensional matching factor; Determining the overlapping degree between the target task and the vertical flow template based on the multidimensional matching factor; determining fusion similarity between the target task and the vertical flow template based on the semantic matching degree and the overlapping degree; And selecting the vertical flow templates with the fusion similarity meeting the similarity condition to obtain a first flow Cheng Moban.
- 3. The method of claim 2, wherein determining a semantic match between the target task and a vertical flow template in a flow template library based on the multidimensional matching factor comprises: determining a task feature vector of the target task based on the multidimensional matching factor; determining a fusion value between the task feature vector and a template feature vector of a vertical flow template in a flow template library; determining the length of the task feature vector of the target task to obtain the task length; Determining the length of the template feature vector of the vertical flow template to obtain the template length; and determining the semantic matching degree between the target task and the vertical flow template based on the fusion value, the task length and the template length.
- 4. The method of claim 3, wherein the determining the degree of overlap between the target task and the vertical flow template based on the multidimensional matching factor comprises: Determining the number of the same features in the task feature vector and the template feature vector; Determining a total number of different features in the task feature vector and the template feature vector; and determining the overlapping degree between the target task and the vertical flow template based on the number of the same features and the total number of the different features.
- 5. The method of claim 2, wherein the determining a fusion similarity between the target task and the vertical flow template based on the semantic matching degree and the overlap degree comprises: acquiring a first weight and a second weight; And carrying out weighted summation on the semantic matching degree and the overlapping degree based on the first weight and the second weight to obtain the fusion similarity between the target task and the vertical flow template.
- 6. The method of claim 5, wherein the acquiring the first weight and the second weight comprises: determining the task field of the target task; And acquiring a first weight and a second weight based on the task field.
- 7. The method of claim 2, wherein selecting the vertical flow template with the fused similarity satisfying a similarity condition, to obtain the first flow Cheng Moban, comprises: Under the condition that the target fusion similarity is greater than or equal to a first template threshold, selecting a vertical flow template corresponding to the target fusion similarity from the flow template library to obtain a first flow Cheng Moban, wherein the target fusion similarity is the fusion similarity with the maximum; Under the condition that the target fusion similarity is smaller than the first template threshold value but larger than or equal to the second template threshold value, selecting M vertical flow templates with the largest fusion similarity from the flow template library, wherein M is an integer larger than 1; And selecting one vertical flow template from the M vertical flow templates based on the task information of the target task and tools in a tool library to obtain a first flow Cheng Moban.
- 8. The method of claim 7, wherein the method further comprises: acquiring a corresponding relation between the task type and a template threshold value; and acquiring a template threshold corresponding to the task type of the target task based on the corresponding relation to obtain the first template threshold.
- 9. The method according to claim 1, wherein the method further comprises: performing exception handling based on exception handling rules in the first flow template under the condition that the first handling result is failure; Determining a step to be adjusted in the first flow template based on the first processing result and an unprocessed step in the first flow template under the condition that the exception processing fails; Adjusting the step to be adjusted in the first flow template to obtain a second flow Cheng Moban; And processing the target task based on the second stream Cheng Moban to obtain a second processing result of the target task.
- 10. The method according to claim 1, wherein the method further comprises: outputting prompt information for prompting whether to modify the target constraint under the condition that the task requirement of the target task conflicts with the target constraint of the first flow template; responding to the confirmation operation for the prompt information, and displaying a modification area comprising the target constraint; Modifying the target constraint of the first flow template in response to a modification operation for the modification region to obtain a third stream Cheng Moban; The step of fusing the first flow template and the prompt word of the large language model to obtain a fusion result comprises the following steps: And fusing the third flow template with the prompt word of the large language model to obtain a fusion result.
- 11. The method of claim 7, wherein the method further comprises: generating a second tool call sequence based on the universal flow templates in the flow template library under the condition that the target fusion similarity is smaller than the second template threshold; and processing the target task based on the tool in the second tool call sequence to obtain a third processing result of the target task.
- 12. The method of claim 1, wherein the multi-dimensional matching factor of the target task includes base information of the target task and task tools, and wherein the determining the multi-dimensional matching factor of the target task comprises: extracting entity information from the target task to obtain a task entity of the target task; Carrying out semantic analysis on the target task based on the task entity to obtain basic information of the target task; and selecting tools required by the target task from a tool library based on the basic information to obtain a task tool of the target task.
- 13. The method of claim 12, wherein the base information of the target task includes at least one of a task type, a scene feature, and a core keyword of the target task; the semantic analysis is performed on the target task based on the task entity to obtain basic information of the target task, including: Performing semantic analysis on the target task based on the task entity to obtain task intention, task type and scene characteristics of the target task; Summarizing the behaviors of the target task based on the task intention, the task type and the scene characteristics to obtain a behavior keyword of the target task; and determining core keywords of the target task based on the task entity and the behavior keywords.
- 14. A task processing device, comprising: The determining module is used for responding to a processing request of a target task and determining a multidimensional matching factor of the target task, wherein the multidimensional matching factor is a characteristic of the target task in a multidimensional degree; A query module for querying a first stream Cheng Moban that matches the target task based on the multidimensional matching factor; the fusion module is used for fusing the first flow template with the prompt word of the large language model to obtain a fusion result; the generation module is used for generating a first tool call sequence through the large language model according to the fusion result; And the processing module is used for processing the target task based on the tool in the first tool call sequence to obtain a first processing result of the target task.
- 15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
- 16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 13.
- 17. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 13.
Description
Task processing method, device, computer equipment, storage medium and product Technical Field The present application relates to the field of computer technologies, and in particular, to a task processing method, a task processing device, a computer device, a storage medium, and a product. Background With the continuous development of computer technology and internet technology, large language models (Large Language Model, LLM) are increasingly being used. Inference actions (Reason Act, reAct) are a structured prompting method that can guide LLM to perform tasks in a manner similar to human resolution. ReAct in the process of processing a task, determining a first step of tool to be called, after the first step of tool is called to process the task, determining whether the tool needs to be continuously called or not based on a processing result, and determining a second step of tool to be called until the task is processed under the condition that the tool needs to be continuously called. Since ReAct requires an autonomous reasoning about the tools called for at each step, the time required is long, so that the efficiency of processing tasks is low. Disclosure of Invention In view of the foregoing, it is desirable to provide a task processing method, apparatus, computer device, storage medium, and product that can improve task processing efficiency. In a first aspect, the present application provides a task processing method. The method comprises the steps of responding to a processing request of a target task, determining a multidimensional matching factor of the target task, wherein the multidimensional matching factor is a characteristic of the target task in a multidimensional degree, inquiring a first stream Cheng Moban matched with the target task based on the multidimensional matching factor, fusing the first flow template with a prompt word of a large language model to obtain a fusion result, generating a first tool call sequence through the large language model according to the fusion result, and processing the target task based on tools in the first tool call sequence to obtain a first processing result of the target task. In a second aspect, the application further provides a task processing device. The device comprises a determining module, a query module, a fusion module, a generating module and a processing module, wherein the determining module is used for responding to a processing request of a target task and determining a multidimensional matching factor of the target task, the multidimensional matching factor is a characteristic of the target task in a multidimensional degree, the query module is used for querying a first flow Cheng Moban matched with the target task based on the multidimensional matching factor, the fusion module is used for fusing the first flow template and a prompt word of a large language model to obtain a fusion result, the generating module is used for generating a first tool call sequence through the large language model according to the fusion result, and the processing module is used for processing the target task based on tools in the first tool call sequence to obtain a first processing result of the target task. In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, wherein the memory stores a computer program, the processor is used for responding to a processing request of a target task and determining a multi-dimensional matching factor of the target task, the multi-dimensional matching factor is a multi-dimensional characteristic of the target task, a first stream Cheng Moban matched with the target task is queried based on the multi-dimensional matching factor, the first flow template and a prompt word of a large language model are fused to obtain a fusion result, a first tool call sequence is generated through the large language model according to the fusion result, and a tool in the first tool call sequence is used for processing the target task to obtain a first processing result of the target task. In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium is provided with a computer program stored thereon, and when the computer program is executed by a processor, the method comprises the steps of determining a multi-dimensional matching factor of a target task in response to a processing request of the target task, wherein the multi-dimensional matching factor is a multi-dimensional characteristic of the target task, inquiring a first flow Cheng Moban matched with the target task based on the multi-dimensional matching factor, fusing the first flow template with a prompt word of a large language model to obtain a fusion result, generating a first tool call sequence through the large language model according to the fusion result, and processing the target task based on tools in the first tool call sequen