Task processing method and device
By identifying and splitting tasks on the electronic device side, generating sub-tasks, and processing them according to the sorting results, the problem that the processing results of the big model engine in complex multi-task scenarios do not meet expectations, and the orderly task processing is achieved and accuracy.
Patent Information
- Application Number
- CN202411146047.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-22
AI Technical Summary
When the existing large-scale model engine on the electronic device side handles complex multi-task scenarios, the previous and subsequent tasks are correlated and there is a complex task graph chain relationship, resulting in the processing results that do not meet user expectations.
By identifying and splitting the tasks to be processed, a multi-intention set is generated, and splitting them into multiple subtasks, processing them according to the task sorting results, and processing subtasks asynchronously or synchronously using a dedicated functional model.
Ensure that the task is processed normally and in an orderly manner, avoid the task being messy, improve processing speed and accuracy, and ensure that the final output meets the user's expected processing results.
Smart Images

Figure CN119003125A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a task processing method and device thereof. Background Art
[0002] For scenarios where users of electronic devices input complex tasks or multiple tasks, currently after the big model on the electronic device receives the task instructions input by the user, for example, the user inputs the following task instruction: "Help me find yesterday's paper on the big model on the XXX website, and then classify and summarize it into a narrative daily report according to the chronological relationship, and output it in the form of Word", when the big model engine processes such complex multi-task scenarios, due to the interrelationship between the previous and subsequent tasks and the existence of a complex task graph chain relationship, the big model engines in related technologies are usually unable to handle it, or the tasks are processed in a disorganized manner, resulting in the final processing results not meeting user expectations. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a task processing method and device thereof, which can output a processing result that meets the user's expectations when processing a task input by a user.
[0004] In a first aspect, an embodiment of the present application provides a task processing method, the method comprising:
[0005] Performing intent recognition and intent splitting on the first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents;
[0006] Splitting the first task according to the multi-intention set to obtain a task set, wherein the task set includes a plurality of subtasks, and one subtask corresponds to one task intention;
[0007] Sorting the subtasks in the task set to obtain a task sorting result;
[0008] Process each of the subtasks according to the task sorting result.
[0009] In a second aspect, an embodiment of the present application provides a task processing device, the device comprising:
[0010] A first splitting module is used to perform intent recognition and intent splitting on a first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents;
[0011] A second splitting module is used to split the first task according to the multiple intention sets to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intention;
[0012] A sorting module is used to sort the subtasks in the task set to obtain a task sorting result;
[0013] A processing module is used to process each of the subtasks according to the task sorting result.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the task processing method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the task processing method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the task processing method described in the first aspect.
[0017] In an embodiment of the present application, the first task to be processed is subjected to intent recognition and intent splitting to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents; the first task is split according to the multi-intent set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intent; the subtasks in the task set are sorted to obtain a task sorting result; and each subtask is processed according to the task sorting result. It can be seen that in an embodiment of the present application, when processing complex tasks or multiple tasks, the user's intent can be analyzed, and the task can be split into subtasks one by one based on the user's intent, and the subtasks can be sorted, and each subtask can be processed according to the sorting result. On the one hand, it can ensure that the task processing is normal and orderly, avoid the task processing in a disorderly manner, thereby improving the task processing speed. On the other hand, it can ensure that the task processing meets the user's intent, thereby ensuring that the final output meets the user's expected processing results. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is one of the flowcharts of a task processing method provided in an embodiment of the present application;
[0019] Figure 2 is an example diagram of a system architecture of a task processing method provided in an embodiment of the present application;
[0020] Figure 3 This is the second flowchart of a task processing method provided in an embodiment of the present application;
[0021] Figure 4a This is one of the example diagrams of the task scheduling structure provided in the embodiment of the present application;
[0022] Figure 4b This is the second example diagram of the task scheduling structure provided in the embodiment of the present application;
[0023] Figure 4c This is the third example diagram of the task scheduling structure provided in the embodiment of the present application;
[0024] Figure 4d This is the fourth example diagram of the task scheduling structure provided in the embodiment of the present application;
[0025] Figure 4e This is the fifth example diagram of the task scheduling structure provided in the embodiment of the present application;
[0026] Figure 4f This is the sixth example diagram of the task scheduling structure provided in the embodiment of the present application;
[0027] Figure 5 is a structural block diagram of a task processing device provided in an embodiment of the present application;
[0028] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 7 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] To facilitate understanding, the concepts and application scenarios involved in the embodiments of the present application are first introduced.
[0033] 1. Concept
[0034] A large model refers to a machine learning model with a large number of parameters and complex structure. It can process massive data and complete various complex tasks, such as natural language processing, computer vision, and speech recognition.
[0035] An AI agent is an intelligent entity that can autonomously perceive the environment, make decisions and execute actions. In practical applications, it can be a program, a system or a robot. The core of an AI agent lies in its artificial intelligence algorithms, including machine learning, deep learning, reinforcement learning, neural networks and other technologies. Through these algorithms, an AI agent can learn from a large amount of data and improve its own performance, and continuously optimize its own decisions and behaviors.
[0036] A directed acyclic graph (DAG) is a special type of graph in which each edge has a clear direction and there are no loops in the entire graph. In graph theory, if a directed graph cannot return to any vertex through several edges, then the graph is a directed acyclic graph; a directed acyclic graph has complete and strict topological properties, which makes it have strong process expression capabilities; two problems can be solved through a directed acyclic graph: logically, the dependencies of each node are organized; technically, nodes with dependencies need to wait for execution, and nodes without dependencies can be executed concurrently.
[0037] Affinity is used to indicate the degree of affinity between an entity and other entities.
[0038] 2. Application Scenarios
[0039] For scenarios where users on the electronic device input complex tasks or multiple tasks, currently after the large model on the electronic device receives the complex task instructions input by the user, the large model can usually only perform simple serial structure task processing during execution. When processing one task, other tasks can only wait, which will cause waste of resources and increase time consumption, and cannot achieve the effect of improving user experience.
[0040] For example, the user inputs the following task instruction: "Help me find yesterday's paper on large models on XXX website, and then classify and summarize it into a narrative daily report according to the chronological relationship, and output it in the form of Word."
[0041] In related technologies, when large model engines process such complex multi-task scenarios, due to the interrelationship between previous and subsequent tasks and the existence of complex task graph chain relationships, large model engines are usually unable to handle them, or they process the tasks in a disorganized manner, resulting in the final processing results not meeting user expectations.
[0042] In order to solve the above technical problems, the embodiments of the present application provide a task processing method and a device thereof to establish a complete task flow engine system to manage subtasks and multi-tasks in complex tasks, so that the large model engine can complete the user's intentions more quickly and accurately when processing complex tasks and multi-tasks.
[0043] Next, in conjunction with the accompanying drawings, the task processing method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0044] It should be noted that the task processing method provided in the embodiment of the present application is applicable to electronic devices. In practical applications, the electronic devices may include: mobile terminals such as smart phones, tablet computers, personal digital assistants, or computer devices such as laptop computers, desktops, servers, etc., and the embodiment of the present application is not limited to this.
[0045] Figure 1 is one of the flowcharts of a task processing method provided in an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps: S101, S102, S103 and S104;
[0046] In S101, intent recognition and intent splitting are performed on the first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents.
[0047] In the embodiment of the present application, the first task may be a complex task, a multi-task, or a complex multi-task, and the embodiment of the present application does not limit this.
[0048] In an embodiment of the present application, intent recognition can be performed on the first task to obtain a complex intent, the complex intent can be split into intents, and a multi-intent set can be generated to achieve the separation of the intents in the first task and separate processing.
[0049] In an embodiment of the present application, a basic intelligent agent can be used to perform intent recognition on the first task to obtain a complex intent, perform intent splitting on the complex intent, and generate a multi-intent set, wherein the basic intelligent agent is a pre-trained intent recognition and splitting model.
[0050] For example, the user inputs the following task instruction: "Help me find yesterday's paper on the big model on the XXX website, and then classify and summarize it into a narrative daily report according to the chronological relationship, and output it in the form of Word." According to the task instruction input by the user, the basic agent is called to perform intent recognition and judge that it is a complex task containing multiple intents; after recognizing the complex intent, the basic agent splits the complex intent and generates a multi-intent set, where the multi-intent set includes the following 10 task intents:
[0051] Mission Figure 1 , the task intent of "query the current date and find the date range Data for the last 2 weeks";
[0052] Mission Figure 2 , the task intention of "calling out the browser and jumping to XXX website";
[0053] Mission Figure 3 The task intention of "performing OCR recognition on the screenshot of the current electronic device to find the account password login entrance";
[0054] Task intent 4: "Find the user's account record for logging into the website in the electronic device, and automatically log in if there is a record; if there is no record, prompt the user to log in and store the account";
[0055] Mission Figure 5 The task intent of “find all the paper collections allList within the Data date range”;
[0056] Mission Figure 6 The task intent is to "match the article titles in allList with keywords and find the paper set markList that matches the keyword "big model";
[0057] Mission Figure 7 The task intention of "using a crawler to obtain papers in the markList collection on the website";
[0058] Task intent 8: "Summarize the contents of the articles in the crawled article set markList"
[0059] Task intent 9, “Generate a daily report from the summary results”;
[0060] Task intent 10, the task intent of "generating a word document from the daily report results and outputting it". In S102, the first task is split according to the multi-intent set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intent.
[0061] In the embodiment of the present application, the first task is split according to each split task intention, so as to assemble subtasks for each task intention and generate a task set.
[0062] For example, according to the above task Figure 1 ~Task Intention 10, split the first task "Help me find yesterday's paper on the big model on XXX website, and then classify and summarize it into a narrative daily report according to the chronological relationship, and output it in the form of Word" to obtain the following 10 subtasks:
[0063] Corresponding to the task Figure 1 Subtask 1 of "Query the current date and find the date range Data for the last 2 weeks";
[0064] Corresponding to the task Figure 2 Subtask 2 of “The electronic device calls out the browser and jumps to the XXX website”;
[0065] Corresponding to the task Figure 3 Subtask 3 of the task is to “take a screenshot of the electronic device screen, identify the account login entrance through OCR and click to enter”;
[0066] Subtask 4 of Task Intent 4 corresponds to "Search for the user's account record for logging into the website in the electronic device, and automatically log in if there is a record; if there is no record, prompt the user to log in and store the account";
[0067] Corresponding to the task Figure 5 Subtask 5 of "Find all the paper collections allList within the Data date range";
[0068] Corresponding to the task Figure 6 Subtask 6 of "matching keywords on the article titles in allList and finding the paper set markList that matches the keyword 'big model'";
[0069] Corresponding to the task Figure 7 Subtask 7 of "Use a crawler to obtain papers in the markList collection on the website";
[0070] Corresponding to subtask 8 of task intent 8, "summarize the contents of the articles in the crawled article set markList respectively";
[0071] Corresponding to subtask 9 of task intent 9, “generate a daily report based on the summary results”;
[0072] The subtask 10 corresponding to the task intention 10 is "generating a word document with the daily report results and outputting it".
[0073] In S103, the subtasks in the task set are sorted to obtain a task sorting result.
[0074] In the embodiment of the present application, any existing sorting method can be used to sort all subtasks in the task set or some identified important subtasks to obtain task sorting results, so as to sort the processing order of the subtasks of the first task.
[0075] In S104, each subtask is processed according to the task sorting result.
[0076] In the embodiment of the present application, each subtask can be processed synchronously or asynchronously according to the task sorting result to obtain the target processing result corresponding to the first task.
[0077] In some embodiments, in order to improve the efficiency and effect of task processing, different agents may be used to perform different subtasks. Accordingly, the above S104 may include the following steps: S1041 and S1042;
[0078] In S1041, a special function model corresponding to each subtask is selected from the model set, wherein the model set includes at least two of the following special function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a personality agent, and a skill agent.
[0079] In the embodiments of the present application, each special function model is a lightweight model obtained by pre-training based on the training data of each special scenario; among them, the dialogue agent is a lightweight model specially used to process dialogue information, the text processing agent is a lightweight model specially used to process text information, the image processing agent is a lightweight model specially used to process image information, the audio processing agent is a lightweight model specially used to process audio information, the web page processing agent is a lightweight model specially used to process web page information, the screen recognition agent is a lightweight model specially used to process screen information, the perception agent is a lightweight model specially used to process perception information, the personality agent is a lightweight model specially used to process personality information, and the skill agent is a lightweight model specially used to process skill information.
[0080] Exemplarily, for subtask 1 "query the current date and find the date range Data for the last 2 weeks", a perception agent is assigned so that subtask 1 is subsequently processed by the perception agent to find information such as the date range of the current device.
[0081] Exemplarily, for subtask 2 "the electronic device calls out the browser and jumps to the XXX website", a skill agent is assigned so that subtask 2 is subsequently processed by the skill agent to jump to the corresponding website through the browser.
[0082] Exemplarily, for subtask 3 "taking a screenshot of the electronic device screen, identifying the account login entry through OCR and clicking to enter", an image processing agent is assigned so that subtask 3 is subsequently processed by the image processing agent, first taking a screenshot, then using OCR technology to find the account login entry button location and simulating a click to enter the account login page.
[0083] Exemplarily, for subtask 4 "search for account records of users logging into websites in electronic devices, and automatically log in if records exist; if records do not exist, prompt the user to log in and store the account", a perception agent is assigned so that subtask 4 is subsequently processed by the perception agent, and the account and password stored in the electronic device are automatically verified and automatically filled into the login box. If not found, the user is prompted to log in manually and the account and password are stored.
[0084] Exemplarily, for subtask 5 "find all the paper collections allList within the Data date range", a web page processing agent is assigned so that subtask 5 is subsequently processed by the web page processing agent to output the paper collection URL of the XXX website.
[0085] Exemplarily, for subtask 6 "keyword matching of article titles in allList to find the paper set markList that matches the keyword 'big model'", a text processing agent is assigned so that subtask 6 is subsequently processed by the text processing agent to match the text with keywords.
[0086] Exemplarily, for subtask 7 "Use a crawler to obtain papers in the markList collection on the website", a web page processing agent is assigned so that subtask 7 is subsequently processed by the web page processing agent to execute a web page content crawler on the website to obtain the paper text content.
[0087] Exemplarily, for subtask 8 "respectively summarize the contents of articles in the crawled article set markList", a text processing agent is assigned so that subtask 8 is subsequently processed by the text processing agent to summarize the contents of the articles.
[0088] Exemplarily, for subtask 9 "generating a daily report from the summary results", a text processing agent is assigned so that subtask 9 is subsequently processed by the text processing agent to generate the summary results into a daily report format.
[0089] Exemplarily, for subtask 10 "generate a word document from the daily report results and output it", a text processing agent is assigned so that the text processing agent can subsequently process subtask 10 and generate a word document from the daily report results.
[0090] In S1042, based on the task sorting result, the dedicated function model corresponding to each subtask is called to process each subtask.
[0091] In the embodiment of the present application, for each subtask, the subtask can be processed by the dedicated function model corresponding to the task, wherein each dedicated function model can process each subtask synchronously or asynchronously.
[0092] It can be seen that in the embodiments of the present application, multiple intelligent agents dedicated to a certain function can be pre-trained, and different intelligent agents can be used to process different sub-tasks. Since each intelligent agent is a lightweight model and has learned rich prior information, the processing efficiency and processing effect of the entire task can be improved.
[0093] In some embodiments, multi-agent construction can be performed on the electronic device side to create a variety of professional agent sets based on large models, such as Figure 2 As shown in the figure, the bottom layer of the overall architecture is based on the big model as the basic capability. First, the basic intelligent agent is built to provide basic intent recognition, splitting and big model input and output channels, providing basic capabilities for the upper-level professional intelligent agents; secondly, based on the basic intelligent agent, a variety of professional intelligent agent services are built. Each professional intelligent agent is divided according to the field and function, namely: dialogue agent, text processing agent, image processing agent, audio processing agent, web page processing agent, screen recognition agent, perception agent, personality agent and skill agent, etc. A collection of professional functional intelligent agent services.
[0094] It can be seen from the above embodiments that in this embodiment, the first task to be processed is subjected to intent recognition and intent splitting to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents; the first task is split according to the multi-intent set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intent; the subtasks in the task set are sorted to obtain a task sorting result; and each subtask is processed according to the task sorting result. It can be seen that in the embodiments of the present application, when processing complex tasks or multiple tasks, the user's intention can be analyzed, and the task can be split into subtasks one by one based on the user's intention, and the subtasks can be sorted, and each subtask can be processed according to the sorting result. On the one hand, it can ensure that the task processing is normal and orderly, avoid the task processing in a disorderly manner, thereby improving the task processing speed. On the other hand, it can ensure that the task processing meets the user's intention, thereby ensuring that the final output meets the user's expected processing results.
[0095] Figure 3 This is a second flowchart of a task processing method provided in an embodiment of the present application. Figure 3 As shown, the method may include the following steps: S301, S302, S303, S304, S305 and S306;
[0096] In S301, intent recognition and intent splitting are performed on the first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents.
[0097] In S302, the first task is split according to the multi-intention set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intention.
[0098] The contents of S301 and S302 in the embodiment of the present application are Figure 1 The contents of S101 and S102 in the illustrated embodiment are similar and will not be described in detail here.
[0099] In S303, the subtasks in the task set are classified to obtain multiple subtask sets; wherein the correlation of all subtasks in the same subtask set is higher than or equal to a first threshold, and the correlation of subtasks in different subtask sets is lower than the first threshold.
[0100] In some embodiments, the above S303 may include the following steps: S3031 and S3032;
[0101] In S3031 , the correlation between any two subtasks in the task set is calculated.
[0102] Considering that affinity can accurately represent the correlation between tasks, the higher the affinity, the higher the correlation, and the lower the affinity, the lower the correlation. Therefore, the affinity between two subtasks can be used to represent the correlation.
[0103] For example, the task set is recorded as TaskList, TaskList is traversed, and the degree of influence of the gradient update of the shared parameter of subtask i on the loss of another task j is calculated to measure the affinity of the two subtasks. The specific algorithm is as follows:
[0104] Consider the task set TaskList and the shared parameter θ s , and the parameter θ of task i i , where i∈T, for a batch of training data X, the overall training loss formula is as follows:
[0105]
[0106] Among them, L i is the loss corresponding to task i, then for a batch of training data X at training time t t , when using the loss of a task i to share parameters After performing a gradient risk, the new shared parameter formula 2 is obtained as follows:
[0107]
[0108] Then, we can use the new shared parameter results to train the data X t , and the parameters of another task j The new loss formula for task j after the shared parameters are updated is as follows:
[0109]
[0110] By comparing with the old loss of task j before the shared parameters were updated, we can get the affinity formula of task i to task j as follows:
[0111]
[0112] If the affinity is greater than 0, it means that the gradient update of task i to the shared parameters will reduce the loss of another task j, which corresponds to a positive impact; on the contrary, if it is less than 0, it means that the update of i to the shared parameters will increase the loss of j, which corresponds to a negative impact.
[0113] In practical applications, in addition to affinity, other measurement indicators that can characterize the correlation between tasks can also be used, and the embodiments of the present application are not limited to this.
[0114] In S3032, multiple subtasks with correlations higher than a first threshold are assigned to the same subtask set to obtain multiple subtask sets.
[0115] Exemplarily, based on the results of algorithm calculation, the subtasks in the TaskList set are classified, and subtasks with high correlation are assigned to the same subtask set, eventually generating a subtask set {SubTaskList1, SubTaskList2, SubtaskList3…}, and marking the order of each SubTaskList subtask set, as well as marking the designated professional agents to perform services.
[0116] It can be seen that in the embodiment of the present application, subtasks with high correlation can be assigned to the same subtask set based on the correlation between tasks, so that the subtasks can be processed as subtask sets subsequently, thereby improving task processing efficiency.
[0117] In S304, the subtasks in the subtask set are sorted based on the task scheduling structure of the directed acyclic graph to obtain a task sorting result.
[0118] In an embodiment of the present application, task scheduling can be performed on all subtask sets or all or part of the important subtasks in the identified part of the important subtask sets to create a task flow structure based on a directed acyclic graph task architecture.
[0119] In the embodiment of the present application, the task scheduling structure of the directed acyclic graph may include at least one of the following: a serial structure, a parallel structure, a strong and weak dependency structure, an access condition structure, a task group structure, and an interrupt structure.
[0120] For example, Figure 4a The serial structure shown in the figure arranges the subtasks in series, which is shown as only one branch in the figure. Figure 4b The parallel structure shown arranges the subtasks in parallel, which is shown as a directed acyclic structure with multiple branches in the figure. There is no dependency, serial relationship, etc. between the parallel subtasks.
[0121] In the embodiment of the present application, strong dependency refers to the default dependency relationship between nodes. The subsequent nodes can only be executed after the previous node is executed. The execution time of the orchestration process depends on the node with the longest execution time among all nodes. Weak dependency refers to an execution logic different from strong dependency. The current node can be executed as long as one of the other nodes that the node depends on is executed. The execution time of the orchestration process depends on the node with the shortest execution time among all nodes.
[0122] For example, Figure 4c In the strong and weak dependency structure shown, subtask 3 is strongly dependent on subtask 1 (marked by a solid arrow) and weakly dependent on subtask 2 (marked by a dotted arrow). Assuming that it takes 500ms to process subtask 1 and 200ms to process subtask 2, subtask 3 can be processed directly after subtask 1 is processed. When processing subtask 3 at the same time, if subtask 3 is all weakly dependent on subtask 1 and subtask 2, subtask 3 can be processed as long as one of subtask 1 and subtask 2 is processed.
[0123] In the embodiment of the present application, the access condition mechanism dynamically determines whether to execute the current node based on the execution results of the dependent nodes.
[0124] For example, Figure 4d As shown in the access condition structure, subtask 3 is weakly dependent on subtask 1 and subtask 2. After processing, each subtask can execute the access condition of subtask 3 to determine whether the condition for executing subtask 3 is currently met. If so, it will be executed directly.
[0125] In the embodiments of the present application, a task group refers to abstracting multiple tasks into a group, which can simplify the management of task dependencies. Especially when there are many tasks in the entire task flow engine, they are divided into multiple groups based on the dependencies, and the nodes in each group can be managed separately. For example, the system involves multiple modules, and each module has multiple tasks.
[0126] For example, Figure 4e In the task group structure shown, subtask 1, subtask 2 and subtask 3 are one task group, and subtask 4, subtask 5 and subtask 6 are one task group. The task groups are processed as units.
[0127] In the embodiment of the present application, the interrupt structure means that during the process execution, the execution of the process can be interrupted in advance according to the result of the current execution.
[0128] For example, Figure 4f The interrupt structure shown processes subtask 1 first and interrupts task processing when subtask 2 is processed.
[0129] It can be seen that in the embodiments of the present application, tasks can be arranged into task flow structures for scenarios such as serial tasks, parallel tasks, strong and weak dependencies, access conditions, task groups, interruptions, etc. based on a directed acyclic graph, and the task sorting method is relatively flexible.
[0130] In S305, a special function model corresponding to each subtask is selected from the model set; wherein the model set includes at least two of the following special function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a personality agent and a skill agent.
[0131] In S306, based on the task sorting result, the dedicated function model corresponding to each subtask is called to process each subtask.
[0132] In an embodiment of the present application, a graph traversal will be performed on the task sorting results to each subtask node. According to the dedicated function model identifier in the subtask, the dedicated function model corresponding to each subtask is called to process each subtask, and the target processing result corresponding to the first task is obtained. The target processing result is returned to the user to complete the task loop.
[0133] In the embodiment of the present application, during the graph traversal process, asynchronous and synchronous execution of tasks can be supported, wherein the main difference between synchronous and asynchronous is that synchronous is that the calling thread waits for the task to be completed, and asynchronous call is to submit the task to the thread pool for execution, and a callback will be called back after the execution is completed.
[0134] It can be seen that in the embodiment of the present application, a large-model multi-agent collaborative task flow engine solution is proposed, and a complete task flow system is established to manage subtasks and multi-tasks in complex tasks, thereby enhancing the ability of the large model engine to process tasks, so that the large model engine can complete the user's intentions more quickly and accurately when processing complex tasks and multi-tasks.
[0135] Figure 5 is a structural block diagram of a task processing device provided in an embodiment of the present application, such as Figure 5 As shown, the task processing device 500 may include: a first splitting module 501, a second splitting module 502, a sorting module 503 and a processing module 504;
[0136] A first splitting module 501 is used to perform intent recognition and intent splitting on a first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents;
[0137] A second splitting module 502 is used to split the first task according to the multiple intention sets to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intention;
[0138] The sorting module 503 is used to sort the subtasks in the task set to obtain a task sorting result;
[0139] The processing module 504 is used to process each of the subtasks according to the task sorting result.
[0140] It can be seen from the above embodiments that in this embodiment, the first task to be processed is subjected to intent recognition and intent splitting to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents; the first task is split according to the multi-intent set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intent; the subtasks in the task set are sorted to obtain a task sorting result; and each subtask is processed according to the task sorting result. It can be seen that in the embodiments of the present application, when processing complex tasks or multiple tasks, the user's intention can be analyzed, and the task can be split into subtasks one by one based on the user's intention, and the subtasks can be sorted, and each subtask can be processed according to the sorting result. On the one hand, it can ensure that the task processing is normal and orderly, avoid the task processing in a disorderly manner, thereby improving the task processing speed. On the other hand, it can ensure that the task processing meets the user's intention, thereby ensuring that the final output meets the user's expected processing results.
[0141] Optionally, as an embodiment, the sorting module 503 may include:
[0142] a classification submodule, configured to classify the subtasks in the task set to obtain a plurality of subtask sets, wherein the relevance of all subtasks in the same subtask set is higher than or equal to a first threshold, and the relevance of subtasks in different subtask sets is lower than the first threshold;
[0143] The sorting submodule is used to sort the subtasks in the subtask set based on the task scheduling structure of the directed acyclic graph to obtain a task sorting result.
[0144] Optionally, as an embodiment, the classification submodule may include:
[0145] A calculation unit, used to calculate the correlation between any two subtasks in the task set;
[0146] The allocating unit is used to allocate multiple subtasks with a correlation degree higher than the first threshold to the same subtask set to obtain multiple subtask sets.
[0147] Optionally, as an embodiment, the task scheduling structure of the directed acyclic graph may include at least one of the following: a serial structure, a parallel structure, a strong or weak dependency structure, an access condition structure, a task group structure, and an interrupt structure.
[0148] Optionally, as an embodiment, the processing module 504 may include:
[0149] A selection submodule is used to select a dedicated function model corresponding to each of the subtasks from a model set, wherein the model set includes at least two of the following dedicated function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a persona agent, and a skill agent;
[0150] The calling submodule is used to call the dedicated function model corresponding to each subtask to process each subtask according to the task sorting result.
[0151] The task processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0152] The task processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0153] The task processing device provided in the embodiment of the present application can achieve Figure 1 or Figure 3 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0154] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned task processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0155] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0156] Figure 7 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0157] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0158] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0159] Among them, the processor 710 is used to perform intent recognition and intent splitting on the first task to be processed to obtain a multi-intention set, wherein the multi-intention set includes multiple task intentions; perform task splitting on the first task according to the multi-intention set to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intention; perform task sorting on the subtasks in the task set to obtain a task sorting result; and process each of the subtasks according to the task sorting result.
[0160] It can be seen that in the embodiments of the present application, when processing complex tasks or multiple tasks, the user's intentions can be analyzed, the tasks can be split into sub-tasks one by one based on the user's intentions, the sub-tasks can be sorted, and each sub-task can be processed according to the sorting results. On the one hand, it can ensure that the tasks are processed normally and orderly, avoid processing tasks in a disorderly manner, thereby improving the task processing speed. On the other hand, it can ensure that the tasks are processed in accordance with the user's intentions, thereby ensuring that the final output meets the processing results expected by the user.
[0161] Optionally, as an embodiment, the processor 710 is specifically used to perform task classification on the subtasks within the task set to obtain multiple subtask sets, wherein the correlation of all subtasks within the same subtask set is higher than or equal to a first threshold, and the correlation of subtasks in different subtask sets is lower than the first threshold; and sort the subtasks within the subtask set based on the task scheduling structure of the directed acyclic graph to obtain a task sorting result.
[0162] Optionally, as an embodiment, the processor 710 is specifically configured to calculate the correlation between any two subtasks in the task set; and assign multiple subtasks with correlation higher than the first threshold to the same subtask set to obtain multiple subtask sets.
[0163] Optionally, as an embodiment, the task scheduling structure of the directed acyclic graph includes at least one of the following: a serial structure, a parallel structure, a strong and weak dependency structure, an access condition structure, a task group structure and an interrupt structure.
[0164] Optionally, as an embodiment, the processor 710 is specifically used to select a special function model corresponding to each of the subtasks from a model set, wherein the model set includes at least two of the following special function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a personality agent and a skill agent; and according to the task sorting result, call the special function model corresponding to each of the subtasks to process each of the subtasks.
[0165] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.
[0166] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned task processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0167] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0168] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned task processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0169] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0170] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), including instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0172] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A task processing method, characterized in that: The method comprises: Performing intent recognition and intent splitting on the first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents; Splitting the first task according to the multi-intention set to obtain a task set, wherein the task set includes a plurality of subtasks, and one subtask corresponds to one task intention; Sorting the subtasks in the task set to obtain a task sorting result; Process each of the subtasks according to the task sorting result.
2. The method according to claim 1, characterized in that The step of performing task sorting on the subtasks in the task set to obtain a task sorting result includes: Classifying the subtasks in the task set to obtain a plurality of subtask sets, wherein the relevance of all subtasks in the same subtask set is higher than or equal to a first threshold, and the relevance of subtasks in different subtask sets is lower than the first threshold; The subtasks in the subtask set are sorted based on the task scheduling structure of the directed acyclic graph to obtain a task sorting result.
3. The method according to claim 2, characterized in that The subtasks in the task set are classified to obtain a plurality of subtask sets, including: Calculating the correlation between any two subtasks in the task set; Multiple subtasks with correlations higher than the first threshold are assigned to the same subtask set to obtain multiple subtask sets.
4. The method according to claim 2, characterized in that: The task scheduling structure of the directed acyclic graph includes at least one of the following: a serial structure, a parallel structure, a strong and weak dependency structure, an access condition structure, a task group structure and an interrupt structure.
5. The method according to claim 1, characterized in that The processing of each of the subtasks according to the task sorting result includes: Selecting a dedicated function model corresponding to each of the subtasks from a model set, wherein the model set includes at least two of the following dedicated function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a person setting agent, and a skill agent; According to the task sorting result, the dedicated function model corresponding to each subtask is called to process each subtask.
6. A task processing device, characterized in that: The device comprises: A first splitting module is used to perform intent recognition and intent splitting on a first task to be processed to obtain a multi-intent set, wherein the multi-intent set includes multiple task intents; A second splitting module is used to split the first task according to the multiple intention sets to obtain a task set, wherein the task set includes multiple subtasks, and one subtask corresponds to one task intention; A sorting module is used to sort the subtasks in the task set to obtain a task sorting result; A processing module is used to process each of the subtasks according to the task sorting result.
7. The device according to claim 6, characterized in that The sorting module comprises: a classification submodule, configured to classify the subtasks in the task set to obtain a plurality of subtask sets, wherein the relevance of all subtasks in the same subtask set is higher than or equal to a first threshold, and the relevance of subtasks in different subtask sets is lower than the first threshold; The sorting submodule is used to sort the subtasks in the subtask set based on the task scheduling structure of the directed acyclic graph to obtain a task sorting result.
8. The device according to claim 7, characterized in that The classification submodule includes: A calculation unit, used to calculate the correlation between any two subtasks in the task set; The allocating unit is used to allocate multiple subtasks with a correlation degree higher than the first threshold to the same subtask set to obtain multiple subtask sets.
9. The device according to claim 7, characterized in that The task scheduling structure of the directed acyclic graph includes at least one of the following: a serial structure, a parallel structure, a strong and weak dependency structure, an access condition structure, a task group structure and an interrupt structure.
10. The device according to claim 6, characterized in that The processing module comprises: A selection submodule is used to select a dedicated function model corresponding to each of the subtasks from a model set, wherein the model set includes at least two of the following dedicated function models: a dialogue agent, a text processing agent, an image processing agent, an audio processing agent, a web page processing agent, a screen recognition agent, a perception agent, a persona agent, and a skill agent; The calling submodule is used to call the dedicated function model corresponding to each subtask to process each subtask according to the task sorting result.
Citation Information
Cited By
Task processing system and method based on large model and computer program product
CN119537042A
Robot asynchronous control method and system based on intention driving
CN121374556A
Operation trajectory construction method, interaction method, device, and storage medium
WO2026113572A1
