Task processing method and device, electronic equipment, storage medium and program product
Patent Information
- Application Number
- CN202611122488.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-07-27
AI Technical Summary
这种方式虽然灵活,但在处理多轮、多步骤的复杂任务时,容易因推理链过长而引发任务执行不稳定
[0011]本申请实施例提供的技术方案,智能体系统通通过构建双存储系统分别维护会话上下文与携带任务上下文的任务执行图,在接收到用户当前交互轮次的任务需求信息后,基于识别出的任务意图信息、会话标识、流程名称及任务执行参数等多维任务属性,动态生成适配当前交互轮次的任务执行策略,有效应对多样化交互场景下的执行混乱问题,有效避免传统方案任务流程一旦被打断就只能整体重跑的问题;同时,通过将会话上下文与任务上下文解耦存储,显著降低上下文污染,提升任务状态追踪的准确性与响应生成质量,从而在多轮交互驱动的复杂任务执行中,增强了智能体系统执行任务流程的执行稳定性和准确性。
Smart Images

Figure CN122633358B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a task processing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] With the rapid development of Language Model (LM) and AI Agent systems, more and more enterprises are beginning to try to drive complex tasks through natural language interaction, such as troubleshooting, inspection analysis, process approval, information aggregation, work order processing, and knowledge retrieval. These tasks usually cannot be completed through a single round of interaction, but require users to continuously supplement the context, correct parameters, clarify ambiguities, or further inquire about the results in multiple rounds of dialogue.
[0003] In real-world scenarios, users rarely provide complete and unambiguous instructions all at once. For example, a user might first ask, "Help me analyze this task," then add, "Just look at yesterday's data," then correct themselves to, "Not yesterday, last week," and finally ask, "Why did this result occur?" This dynamic, iterative interaction pattern requires intelligent agent systems to not only possess strong natural language understanding capabilities but also continuous and accurate task state management capabilities.
[0004] However, mainstream intelligent agent task processing solutions mainly fall into two categories: The first is based on the ReAct (Reasoning-Action) model, where the language model autonomously reasones and decides which tool to invoke next. While this approach is flexible, it is prone to instability in handling complex tasks with multiple turns and steps due to excessively long reasoning chains. The second category relies on manually predefined fixed workflows, which, while ensuring task execution stability, struggles to adapt to the dynamic and uncertain nature of natural language input. Therefore, in scenarios where multi-turn dialogue drives complex task execution, a new task processing solution is urgently needed. Summary of the Invention
[0005] This application provides a task processing method, apparatus, electronic device, storage medium, and program product to improve the accuracy and stability of task execution in scenarios where complex tasks are driven by multi-turn dialogues.
[0006] This application provides a task processing method applied to an intelligent agent system. The method includes: responding to receiving task request information input by a user in the current interaction round, identifying task attribute information corresponding to the task request information, the task attribute information including: target task intent information, target session identifier, process name of the target task process, and task execution parameters; determining a task execution strategy for executing the target task process in the current interaction round based on the task attribute information, a first storage system, and a second storage system, wherein the first storage system stores the session context corresponding to at least one session identifier, and the second storage system stores at least one session identifier and a task execution graph corresponding to the process name of at least one task process associated with each session identifier; the task execution strategy is used to instruct the execution of the target task process according to the target task execution graph, the target task execution graph including the task context of each of multiple task nodes in the target task process and the execution order dependency relationship between task nodes; executing the target task process according to the task execution strategy; responding to ending the current interaction round, outputting the execution result of the current interaction round; updating the target session context corresponding to the target session identifier in the first storage system based on the task request information and execution result of the current interaction round; and updating the target task execution graph in the second storage system based on the task context of each task node executed in the current interaction round.
[0007] This application embodiment also provides a task processing device applied to an intelligent agent system. The device includes: a user interaction layer for receiving task request information input by a user in the current interaction round; a task orchestration layer for, in response to receiving the task request information input by the user in the current interaction round, identifying task attribute information corresponding to the task request information, the task attribute information including: target task intent information, target session identifier, process name of the target task flow, and task execution parameters; and determining a task execution strategy for executing the target task flow in the current interaction round based on the task attribute information, a first storage system, and a second storage system, wherein the first storage system stores at least one session identifier corresponding to each session context, and the second storage system stores at least one session identifier and the associated information for each session identifier. The system includes: a task execution graph corresponding to the name of at least one task flow; a task execution strategy to instruct the execution of the target task flow according to the target task execution graph, which includes the task context of each of the multiple task nodes in the target task flow and the execution order dependencies between the task nodes; a task execution layer for executing the target task flow according to the task execution strategy; an output layer for outputting the execution result of the current interaction round in response to its termination; a state management layer for providing a first storage system and a second storage system; updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round; and updating the target task execution graph in the second storage system based on the task context of each task node executed in the current interaction round.
[0008] This application also provides an electronic device, including: a memory and a processor; the memory for storing a computer program; and the processor coupled to the memory for executing the computer program to perform steps in a task processing method.
[0009] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps in a task processing method.
[0010] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to implement the steps in a task processing method.
[0011] The technical solution provided in this application embodiment enables the intelligent agent system to maintain the session context and the task execution graph carrying the task context by constructing a dual storage system. After receiving the task requirement information of the current interaction round from the user, the system dynamically generates a task execution strategy adapted to the current interaction round based on the identified task intent information, session identifier, process name, and task execution parameters, etc. This effectively addresses the execution chaos problem under diverse interaction scenarios and avoids the problem that traditional solutions can only rerun the entire process once the task flow is interrupted. At the same time, by decoupling the storage of the session context and the task context, the system significantly reduces context pollution and improves the accuracy of task state tracking and response generation quality. Thus, in the execution of complex tasks driven by multiple rounds of interaction, the system enhances the execution stability and accuracy of the intelligent agent system's task flow. Attached Figure Description
[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a task processing method provided in an embodiment of this application; Figure 2 A flowchart illustrating another task processing method provided in this application embodiment; Figure 3 A flowchart illustrating another task processing method provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a task processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] The following is a description of some terms used in the embodiments of this application: A language model (LM) is a model that learns general language structures and knowledge through unsupervised or self-supervised pre-training on large-scale text data. Language model architectures include, but are not limited to: bidirectional encoder representation from transformers (BERT), autoregressive language models, and generative pre-trained transformers (GPT). The Transformer module, in particular, is a neural network structure based on a self-attention mechanism, which significantly improves model performance through parallel processing and self-attention.
[0015] Large Language Models (LLMs), also known as large-scale language models, refer to a class of natural language processing models with an extremely large number of parameters. LLMs are typically based on deep learning architectures, especially the Transformer architecture, which learns the complex structure of language and rich contextual information through pre-training on massive amounts of text data. The Transformer architecture addresses the bottleneck problem of traditional neural network models when processing long sequences by introducing a self-attention mechanism, and its highly parallelizable nature greatly improves training efficiency. The Transformer architecture includes either an encoder or a decoder.
[0016] Large language models can be general-purpose large language models with a huge number of parameters. Preferably, the parameter size of a large language model meets the requirements of a lightweight large language model. Relatively speaking, the parameter size of a general-purpose large language model is much larger than that of a lightweight large language model; general-purpose large language models have a larger number of parameters, while lightweight large language models have a smaller number of parameters. The parameter size of a lightweight large language model can be less than 1 billion parameters, and preferably less than 500 million parameters.
[0017] A knowledge base (KB) is an information system or data collection used to store and organize information. It can save, manage, and access structured or unstructured information.
[0018] Agent systems are core technological components used to extend the capabilities of language models (such as LLMs). Their core idea is to enable language models not only to "answer questions" but also to "perform tasks." Agent systems achieve autonomous decision-making, task planning, and execution by integrating external tools and services. Agent systems can be single-agent systems or multi-agent systems; there are no restrictions on which.
[0019] A multi-agent system is an architecture in which multiple agents work together, each with independent responsibilities and communicating and collaborating through standardized protocols. It is suitable for handling complex, cross-domain task processes.
[0020] The technical solutions of this application and how they solve the aforementioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The technical solutions provided by each embodiment of this application are described in detail below with reference to the accompanying drawings.
[0021] Figure 1 A flowchart illustrating a task processing method provided in an embodiment of this application. See also... Figure 1 The method may include the following steps: 101. In response to receiving the task request information input by the user in the current interaction round, identify the task attribute information corresponding to the task request information. The task attribute information includes: target task intent information, target session identifier, target task process name and task execution parameters.
[0022] In this embodiment, the task processing method can be executed by an intelligent agent system. In different application scenarios, the intelligent agent system can perform different tasks, including but not limited to: fault diagnosis tasks, inspection analysis tasks, process approval tasks, information aggregation tasks, work order processing tasks, and knowledge retrieval tasks.
[0023] In practical applications, users can interact with the intelligent agent system in multiple rounds. In each round, the user inputs the task requirement information for that round on the intelligent agent system's interface. The intelligent agent system interprets the intent of this task requirement information and identifies the corresponding task attribute information. Task attribute information is related to the task flow associated with the task requirement information. Here, the task flow associated with the task requirement information of the current round is referred to as the target task flow. The task attribute information of the target task flow includes, but is not limited to: target task intent information, target session identifier, the flow name of the target task flow, and task execution parameters.
[0024] In practical applications, target task intent information describes the core operational purpose or task orientation expressed by the user in the current interaction round, and is a key semantic label for the intelligent agent system to understand "what the user wants to do". Based on whether the target task intent information is related to a new task or an existing task, it can be divided into new task intent and existing task continuation intent.
[0025] A new task (denoted as NEW_REQUEST) is intended to indicate that a new task process needs to be executed from scratch. When a user initiates a new task request, it means that a completely new task process needs to be planned and executed from the beginning. For example, a user says, "I want to book a flight to attraction A." In this case, the intelligent agent system will initiate a new task process, assign a new session ID, and, based on the user's current task requirements, gradually collect information and execute task operations from the first step of the task process.
[0026] Existing task continuation intents are used to instruct the continuation of tasks that have not yet been completed. Existing task continuation intents include, but are not limited to, clarification or supplementation intents, correction intents, follow-up intents, etc. Task context refers to a set of contextual information related to the execution status, input parameters, output parameters, dependencies, and runtime behavior of a task process within its lifecycle.
[0027] The supplementary explanation intent is used to instruct users to supplement or refine information within the existing task context. The intelligent agent system should continue execution based on the currently executed task flow and session state, rather than initiating a new task flow or resetting the task flow. Supplementary explanation intents typically appear when users believe that the previously provided information is incomplete, inaccurate, or requires further clarification of details. For example, a user might add during a flight booking process, "Oh, I also need economy class." This input does not initiate a new task request, but rather refines the cabin preference parameter based on the existing task flow. By supporting supplementary explanation intents, the intelligent agent system can flexibly respond to users' progressive information disclosure, achieving more natural and efficient multi-round task collaboration.
[0028] In this context, a correction intent indicates that the user is revising previously provided information or selections. When a correction intent is detected, the intelligent agent system needs to roll back and reset all or part of the affected task nodes, clear the intermediate states generated based on the erroneous premises, and re-execute subsequent processes starting from the corrected parameters. For example, in the process of booking a flight ticket, the user previously selected "flight number 5101" and then entered: "No, I want flight number 1832." At this time, the intelligent agent system should recognize this as a correction intent; reset the state of "flight selection" and its subsequent dependent steps to "not executed"; update the task execution parameter: selected_flight="1832"; and re-trigger the execution processes of steps S4 (payment step) and S5 (ticketing step).
[0029] In this context, "follow-up" intent refers to a user requesting additional information related to a task result already returned by the agent system. This type of interaction does not involve advancing the task flow or modifying parameters; therefore, the system does not need to re-execute any steps in the task flow, but only needs to generate a response based on the current task context or the already generated result. For example, after receiving a flight booking confirmation, a user might ask, "What is the gate for that flight?" For such a request, the agent system only needs to retrieve or call information related to the completed task (such as flight number, airport data, etc.) and answer based on the existing task context, without rerunning the entire booking process.
[0030] In this embodiment, the target session identifier is the session identifier (Session ID) corresponding to the target task flow. The session identifier is a key metadata in the agent system used to uniquely identify an end-to-end task session. It is usually represented as a globally unique string or token, which is automatically generated by the agent system when the user initiates a new task (NEW_REQUEST) intent and runs through the entire lifecycle of the new task flow until the task flow is completed, canceled, or timed out.
[0031] In this embodiment, the process name of the target task process is a unique identifier for the target task process. The process name of the target task process includes, but is not limited to: ticket booking task process, fault diagnosis task process, inspection and analysis task process, process approval task process, information aggregation task process, work order processing task process, and knowledge retrieval task process. Optionally, the target task process may use various unique identifiers such as semantic name, process number, and unique identifier.
[0032] In this embodiment, the task execution parameters of the target task flow refer to the structured key information extracted from the task requirement information input by the user in the current interaction round through semantic understanding and context analysis. As input conditions for task flow execution, the task execution parameters directly drive the logical judgments, service calls, or status updates of relevant steps in the target task flow.
[0033] 102. Based on task attribute information, the first storage system, and the second storage system, determine the task execution strategy for executing the target task flow in the current interaction round. The first storage system stores the session context corresponding to at least one session identifier, and the second storage system stores at least one session identifier and the task execution graph corresponding to the flow name of at least one task flow associated with each session identifier. The task execution strategy is used to instruct the execution of the target task flow according to the target task execution graph. The target task execution graph includes the task context of each of the multiple task nodes in the target task flow and the execution order dependency relationship between the task nodes.
[0034] In this embodiment, the first storage system and the second storage system are two independent storage systems; the first storage system is a storage system specifically used to store session context; the second storage system is a storage system specifically used to store task context. The first storage system or the second storage system includes, but is not limited to, message queues, relational databases, and distributed key-value storage systems.
[0035] In this embodiment, a dedicated first storage system is used to store the dialogue context, which can reduce the probability of the dialogue context being contaminated by other contexts and improve the stability and accuracy of task execution.
[0036] In practical applications, the dialogue context associated with each session identifier is used to fully record the dialogue content of that session in multiple rounds of interaction. The dialogue context associated with each session identifier includes, but is not limited to: the session identifier, the identifier of each interaction round, the task requirement information (which can be regarded as task question information) entered by the user in each round of interaction, the response information of the agent to the task requirement information generated in that interaction round, and other optional interaction metadata (such as intent type, timestamp, etc.).
[0037] In this embodiment, a dedicated second storage system is used to store the task context, which can reduce the probability of the task context being contaminated by other contexts and improve the stability and accuracy of task execution.
[0038] In practical applications, the session identifier, task flow name, and task execution graph are associated and saved in a second storage system. The task context saved in the task execution graph of the same task flow under different session identifiers may be different, and the same session identifier and the same task flow name are associated with a unique task execution graph. As multiple rounds of interaction occur, the state of the task execution graph will be continuously updated and saved to reflect the latest task progress.
[0039] In this embodiment, a task execution graph is a graph structure used to record and display key information during task execution. For example, a task execution graph includes the task context of each of the multiple task nodes in the task flow, as well as the execution order dependencies between the task nodes.
[0040] In this embodiment, each task node corresponds to a task step in the task flow, and the task context of a task node can describe the task context of the corresponding task step. The task context of a task node includes, but is not limited to, the following attribute information: Node ID: Uniquely identifies each step in the task flow.
[0041] Step Description: A brief description of the function or purpose of the current task step, such as "get itinerary" or "query flights".
[0042] Execution Status: Indicates the current status of a task step, such as "Not Started", "In Progress", "Completed", "Failed", etc.
[0043] Execution Result: Records the output results after the task steps are executed, such as flight query results, payment transaction IDs, etc.
[0044] Task Parameters: Input parameters related to the task steps, such as departure point, destination, flight number, etc.
[0045] Next Node IDs: Lists the node IDs of all possible subsequent task steps, establishing the execution order dependencies between task steps through these node IDs.
[0046] Optionally, the task execution graph can be stored in the second storage system as a directed acyclic graph (DAG) for easy recording and backtracking. The execution order dependencies between task nodes can be represented by edges in the DAG, where each edge points from one task node to another, explicitly indicating the next step to be executed after the previous step is completed.
[0047] In this embodiment, the intelligent agent system can determine the task execution strategy for executing the target task process in the current interaction round based on task attribute information, the first storage system, and the second storage system. The task execution strategy is the supporting rule required to execute the task process. The task execution strategy is used to instruct the execution of the target task process according to the target task execution graph. The target task execution graph includes the task context of each of the multiple task nodes in the target task process and the execution order dependency relationship between the task nodes.
[0048] In practical applications, intelligent agent systems can input task attribute information into a language model, which then combines information from the first and second storage systems to perform reasoning, dynamically and accurately generating the task execution strategy for the current interaction round. Through a multi-source context-driven language model reasoning mechanism, the intelligent agent system's understanding ability, execution accuracy, and user experience in real and complex scenarios can be improved.
[0049] In practical applications, task execution strategies are dynamically adjusted based on the target task intent information. Through this intent-driven, differentiated task execution strategy generation mechanism, the intelligent agent system can accurately respond to the user's real needs in multiple rounds of interaction, ensuring the correctness of task flow execution and the efficiency of task completion, and solving the problem of execution chaos in various interaction scenarios such as new tasks, user supplementary explanations, corrections, and follow-up questions.
[0050] 103. Execute the target task process according to the task execution strategy.
[0051] 104. In response to the end of the current interaction round, output the execution result of the current interaction round.
[0052] In this embodiment, the intelligent agent system executes the target task process according to the determined task execution strategy.
[0053] Once the processing logic for the current interaction round is completed, the current interaction round ends. The intelligent agent system encapsulates the execution result of the current interaction round and can output it through the interactive interface, thereby completing the closed loop of this round of human-machine collaborative task.
[0054] In practical applications, intelligent agent systems can call language models to generate the execution results of the current interaction round based on the task requirements information, execution process information of each task node, and execution results of the current interaction round, without any restrictions.
[0055] 105. Based on the task requirements and execution results of the current interaction round, update the target session context corresponding to the target session identifier in the first storage system.
[0056] 106. Update the target task execution graph in the second storage system based on the task context of each task node that has been executed in the current interaction round.
[0057] There are no restrictions on the execution order of steps 105 and 106.
[0058] Specifically, the task requirement information and execution result of the current interaction round are used as the session context of the current interaction round, and written into the target session context corresponding to the target session identifier in the first storage system, thereby achieving continuous accumulation of dialogue history and maintenance of semantic coherence. The latest task context of each task node executed in the current interaction round is obtained, and the current task context of the corresponding task node in the target task execution graph of the second storage system is synchronously updated to the latest task context of each obtained task node, ensuring that the task execution graph always accurately reflects the actual progress of the task flow. Thus, through the collaborative update mechanism of the dual storage systems, strong consistency between session state and task state is achieved, effectively preventing problems such as process disorder or duplicate execution caused by context loss, state asynchrony, or lag in the task execution graph, and improving the stability, accuracy, and traceability of task execution in multi-round task interactions.
[0059] The technical solution provided in this application embodiment enables the intelligent agent system to maintain the session context and the task execution graph carrying the task context by constructing a dual storage system. After receiving the task requirement information of the user's current interaction round, the system dynamically generates a task execution strategy adapted to the current interaction round based on the identified task intent information, session identifier, process name, and task execution parameters, effectively addressing the execution chaos problem under diverse interaction scenarios. At the same time, by decoupling the storage of the session context and the task context, the system significantly reduces context pollution and improves the accuracy of task state tracking and response generation quality. Thus, in the execution of complex tasks driven by multiple rounds of interaction, the system enhances the execution stability and accuracy of the intelligent agent system's task execution process.
[0060] The following is combined Figure 2This section introduces the scenario of continuing the execution of an already executed task. In this scenario, the implementation of "determining the task execution strategy for the target task process in the current interaction round based on task attribute information, the first storage system, and the second storage system" is as follows: "If the target task intent information indicates to continue executing the unfinished target task process, then search for the target session context corresponding to the target session identifier in the first storage system; search for the target task execution graph corresponding to the target session identifier in the second storage system based on the target session identifier and the process name of the target task process; and determine the task execution strategy for continuing the execution of the target task process in the current interaction round based on the target task intent information, the target session context, the target task execution graph, and the task execution parameters."
[0061] Figure 2 A flowchart illustrating a task processing method provided in an embodiment of this application. See also... Figure 2 The method may include the following steps: 201. In response to receiving the task request information input by the user in the current interaction round, identify the task attribute information corresponding to the task request information. The task attribute information includes: target task intent information, target session identifier, target task process name and task execution parameters.
[0062] Specifically, for details regarding step 201, please refer to step 101 in the aforementioned embodiments.
[0063] 202. If the target task intent information indicates to continue executing the unfinished target task process, then search for the target session context corresponding to the target session identifier in the first storage system.
[0064] In this embodiment, if the target task intent information indicates to continue executing the unfinished target task process, the target session context corresponding to the target session identifier is searched in the first storage system according to the target session identifier.
[0065] 203. Based on the target session identifier and the process name of the target task flow, find the target task execution graph corresponding to the target session identifier in the second storage system.
[0066] In this embodiment, the target task execution graph is searched in the second storage system based on the target session identifier and the process name of the target task flow. The target task execution graph is the task execution graph that matches the target session identifier and the process name of the target task flow. The target task execution graph includes the task context of each of the multiple task nodes in the target task flow and the execution order dependency relationship between the task nodes.
[0067] 204. Based on the target task intent information, target session context, target task execution graph, and task execution parameters, determine the task execution strategy for continuing to execute the target task process in the current interaction round.
[0068] In practical applications, intelligent agent systems can input target task intent information, target session context, target task execution graph, and task execution parameters into a language model for reasoning. This enables them to dynamically and accurately generate task execution strategies for the current interaction round. Through a multi-source context-driven language model reasoning mechanism, the intelligent agent system's understanding ability, execution accuracy, and user experience in real and complex scenarios can be improved.
[0069] In practical applications, task execution strategies are dynamically adjusted based on the target task intent information. Through this intent-driven, differentiated task execution strategy generation mechanism, the intelligent agent system can accurately respond to the user's real needs in multiple rounds of interaction, ensuring the correctness of task flow execution and task completion efficiency, and solving the problem of execution chaos in various interaction scenarios such as user supplementary explanations, corrections, and follow-up questions.
[0070] In some optional embodiments, the implementation of the task execution strategy for continuing to execute the target task process in the current interaction round, based on the target task intent information, target session context, target task execution graph, and task execution parameters, is as follows: if the target task intent information is a supplementary explanation intent, then the starting task node for continuing to execute the target task process in the current interaction round is determined based on the target session context, target task execution graph, and task execution parameters; a first task execution strategy is generated, which is used to indicate that the target task process should continue to be executed from the starting task node according to the execution order dependency.
[0071] Specifically, the first task execution strategy for supplementing the intended explanation can be called the continuation execution strategy. By integrating various pieces of information, the starting task node for continuing the target task flow in the current interaction round is determined. This starting task node is the first task node in the current interaction round to resume the target task flow. Based on the execution order dependencies defined in the target task execution graph, starting from the starting task node, subsequent unfinished task nodes are sequentially advanced until the end of the current interaction round. Through this continuation execution mechanism, process breakpoints can be accurately located and execution seamlessly resumed as the user gradually provides information, improving the coherence and execution efficiency of multi-round task interactions.
[0072] In practical applications, the starting task node of the current interaction round can be the direct successor node of the last completed task node in the previous interaction round; if no task node has been completed in the previous interaction round, the starting task node of the current interaction round can be the first task node in the target task execution graph, without any restrictions.
[0073] In some optional embodiments, the implementation of the task execution strategy for continuing the execution of the target task process in the current interaction round, based on the target task intent information, target session context, target task execution graph, and task execution parameters, is as follows: If the target task intent information is a correction intent, then the starting task node for continuing the execution of the target task process in the current interaction round is determined based on the target session context, target task execution graph, and task execution parameters; a second task execution strategy is generated, which is used to instruct the resetting of the task context of the target task execution graph from the starting task node and its subsequent task nodes, and to continue the execution of the target task process from the starting task node according to the execution order dependency.
[0074] Specifically, the second task execution strategy, which addresses the correction intent, can be called a re-execution strategy. It integrates various information to determine the starting task node for continuing the target task flow in the current interaction round. This starting task node is the first task node in the current interaction round to resume execution of the target task flow. The task context of the target task execution graph, starting from the starting task node and all subsequent task nodes, is reset. This restores the task context (including execution status, intermediate results, bound task execution parameters, etc.) of the target task execution graph from the starting task node and all subsequent task nodes to its initial state before execution, thereby clearing invalid task context caused by previous erroneous input. Based on the execution order dependencies defined in the target task execution graph, subsequent unfinished task nodes are sequentially advanced from the starting task node until the end of the current interaction round. Through this re-execution strategy mechanism, when the user corrects historical input, the process breakpoints that need to be rolled back can be accurately located, the affected downstream states can be thoroughly cleaned up, and task execution can be seamlessly restarted. This effectively avoids state pollution or process disorder caused by local errors, improving the coherence and execution efficiency of multi-round task interactions.
[0075] In some optional embodiments, the implementation of the task execution strategy for continuing to execute the target task process in the current interaction round is as follows, based on the target task intent information, target session context, target task execution graph, and task execution parameters: if the target task intent information is a follow-up inquiry intent, then a third task execution strategy is generated, which is used to instruct the generation of the execution result of the current interaction round based on the target session context, target task execution graph, and task execution parameters.
[0076] Specifically, regarding the follow-up inquiry intent, the third task execution strategy can be viewed as a strategy that generates answers solely based on the existing context. As a specific mode of interaction between the user and the intelligent agent system, the follow-up inquiry intent generates the execution result of the current interaction round based only on the existing target session context, the state information in the target task execution graph, and the parsed task execution parameters, without re-triggering or re-running any task nodes in the target task execution graph. This achieves efficient, low-latency responses, flexibly supports detailed follow-up inquiries about task results, and enhances the naturalness of the interaction and the user experience.
[0077] 205. Execute the target task process according to the task execution strategy.
[0078] 206. In response to the end of the current interaction round, output the execution result of the current interaction round; 207. Based on the task requirements and execution results of the current interaction round, update the target session context corresponding to the target session identifier in the first storage system; 208. Update the target task execution graph in the second storage system based on the task context of each task node that has been executed in the current interaction round.
[0079] In this embodiment, the agent system continues to execute the target task flow according to the determined task execution strategy. For example, the agent system drives the task execution engine to perform corresponding operations on the target task flow: If the target task intent information is supplementary explanation intent, then the target task process will continue to advance from the determined starting task node according to the execution order dependency; If the intention is to correct, the task context of the starting task node and its subsequent task nodes (or the affected task nodes) is reset to the initial state, and the subsequent task flow is re-executed from the starting task node. If the intention is to inquire further, no task node will be re-executed. Instead, the execution result of the current interaction round will be generated based solely on the existing session context, the state of the task execution graph, and the historical execution results.
[0080] Regardless of the strategy employed, once the processing logic of the current interaction round is completed, the intelligent agent system ends the current interaction round, encapsulates the execution result of the current interaction round, and can output it through the interactive interface, thereby completing the closed loop of this round of human-machine collaborative task.
[0081] Specifically, for details regarding steps 205-208, please refer to steps 103-106 in the aforementioned embodiments, which will not be repeated here.
[0082] In some optional embodiments, before updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round, the method further includes: determining whether the target task intent information is a correction intent; if the target task intent information is not a correction intent, performing the step of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round; if the target task intent information is a correction intent, then after the user confirms that the execution result of the current interaction round is correct, performing the step of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round.
[0083] Specifically, when the target task intent information is a correction intent, if the user confirms that the execution result of the current interaction round is incorrect, the step of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round will not be executed; nor will the step of updating the target task execution graph in the second storage system based on the task context of each task node executed in the current interaction round be executed. If the target task intent information is a correction intent, after the user confirms that the execution result of the current interaction round is correct, the steps of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round, and updating the target task execution graph in the second storage system based on the task context of each task node executed in the current interaction round will be executed.
[0084] In this embodiment, in the scenario of correcting intent, the intelligent agent system adopts an isolated re-execution mechanism to ensure state consistency. Only when the re-execution is successful and the user confirms that the new execution result is correct will the intelligent agent system perform context synchronization update, which effectively avoids the pollution of the original task state by the half-execution result and improves the stability and accuracy of the intelligent agent system in executing tasks.
[0085] because The technical solution provided in this application embodiment enables the intelligent agent system to maintain the session context and the task execution graph carrying the task context by constructing a dual storage system. After receiving the task requirement information of the current interaction round from the user, the system dynamically generates a task execution strategy adapted to the current interaction round based on the identified task intent information, session identifier, process name, and task execution parameters, etc. This effectively addresses the execution chaos problem under diverse interaction scenarios and avoids the problem that traditional solutions can only rerun the entire process once the task flow is interrupted. At the same time, by decoupling the storage of the session context and the task context, the system significantly reduces context pollution and improves the accuracy of task state tracking and response generation quality. Thus, in the execution of complex tasks driven by multiple rounds of interaction, the system enhances the execution stability and accuracy of the intelligent agent system's task flow.
[0086] The following is combined Figure 3 The new task execution scenario is introduced. In the new task execution, the implementation of "determining the task execution strategy for executing the target task flow in the current interaction round based on task attribute information, the first storage system, and the second storage system" is as follows: "If the target task intent information indicates the start of target task flow execution, then the initial state target task execution graph of the target task flow is retrieved from the cache system based on the flow name of the target task flow. The initial state target task execution graph records the task execution status of multiple task nodes in the target task flow as 'not executed'; a fourth task execution strategy is generated based on the target task intent information, the initial state target task execution graph, and task execution parameters; the fourth task execution strategy is used to indicate the start of target task flow execution from the first task node in the initial state target task execution graph; the fourth task execution strategy is also used to indicate the generation of the target session context corresponding to the target session identifier based on the task requirement information and execution results of the current interaction round and save it to the first storage system; the fourth task execution strategy is also used to write the task context of each task node already executed in the current interaction round into the initial state target task execution graph to obtain the target task execution graph and save it to the second storage system." Figure 3 A flowchart illustrating another task processing method provided in an embodiment of this application. This method is applied to an intelligent agent system; see [link to relevant documentation]. Figure 3 The method may include the following steps: 301. In response to receiving the task request information input by the user in the current interaction round, identify the task attribute information corresponding to the task request information. The task attribute information includes: target task intent information, target session identifier, target task process name and task execution parameters.
[0087] Specifically, for details regarding step 301, please refer to step 101 in the aforementioned embodiments.
[0088] 302. If the target task intent information indicates that the target task process should be started, then the initial state target task execution graph of the target task process is retrieved from the cache system according to the process name of the target task process. The initial state target task execution graph records that the task execution status of multiple task nodes in the target task process is not executed.
[0089] In this embodiment, the initial task execution graph of the task flow is cached in advance in the caching system, and the task flow in document form is automatically converted into an executable graph structure, providing a unified carrier for the continuous execution of multiple rounds of tasks. This reduces the workload of manually hard-coding the task flow, effectively reduces unnecessary repetitive task planning, reduces the resource consumption of the intelligent agent system, and makes task execution more standardized, reusable and scalable.
[0090] Specifically, the caching system is used to cache the initial state task execution graph of at least one task flow. The initial state task execution graph is a task execution graph in its initial state, where the task execution status of each task node in the initial state task execution graph is "not yet started". For any task flow, the intelligent agent system can call the language model to perform task planning based on the flow description text of the task flow, and obtain the initial state task execution graph of the task flow.
[0091] A task flow description clearly expresses the multiple task steps included in the task flow and the execution order dependencies between these task steps. A task flow description typically includes the following elements: task objective, task step list, execution order dependencies between steps, execution conditions and constraints, and exception handling logic. The task step list details the specific task steps that need to be executed in the task flow. The execution order dependencies clarify which task steps must be completed before starting, for example, "Step B must be executed after Step A succeeds," or "Which task steps can be executed in parallel." Execution conditions include preconditions, required tools, and input / output requirements.
[0092] In this embodiment, the initial state task execution graph of the task flow may include node information for multiple task nodes. The node information for any given task node may include, but is not limited to: node identifier, step description, step execution status, step execution result, task execution parameters, and node identifiers for subsequent task nodes. Specifically, the step execution status of a task node in the initial state task execution graph is "not yet started." The step execution result of a task node is initialized to "empty" (e.g., null), indicating that the task node has not yet been executed and therefore has not generated any output, return value, log, status code, or structured result. The task execution parameters of a task node are initialized to "empty," indicating that in the initial stage of the flow, the runtime input parameters required by the task node have not yet been injected.
[0093] In this embodiment, if the target task intent information indicates that the target task process should be started, the initial state target task execution graph of the target task process is searched from the cache system according to the process name of the target task process. The initial state target task execution graph refers to the initial state task execution graph corresponding to the target task process. The initial state target task execution graph records that the task execution status of multiple task nodes in the target task process is not executed.
[0094] 303. Generate the fourth task execution strategy based on the target task intent information, the initial target task execution graph, and the task execution parameters.
[0095] In practical applications, the intelligent agent system can call the language model to generate a fourth task execution strategy based on the target task intent information, the initial target task execution graph, and the task execution parameters. The fourth task execution strategy is used to indicate that the target task process should start from the first task node in the initial target task execution graph. The fourth task execution strategy is also used to indicate that the target session context corresponding to the target session identifier should be generated based on the task requirement information and execution results of the current interaction round and saved to the first storage system. The fourth task execution strategy is also used to write the task context of each task node that has been executed in the current interaction round into the initial target task execution graph to obtain the target task execution graph and save it to the second storage system.
[0096] Specifically, through the fourth task execution strategy, the intelligent agent system can sequentially execute the target task process starting from the first task node of the initial target task execution graph, and simultaneously achieve dual management of the session context and task context during execution: on the one hand, based on the task requirement information and execution results of the current interaction round, it dynamically generates a target session context bound to the target session identifier and persists it to the first storage system, ensuring the semantic coherence and meaning of multi-turn dialogues. Figure 1 On the one hand, it ensures consistency; on the other hand, it writes the task context of the task nodes that have been executed in this round into the initial target task execution graph in real time, generates a target task execution graph that reflects the latest progress and saves it to the second storage system, thereby realizing structured tracking of task progress, interruption recovery and audit backtracking. This effectively solves the problem that traditional intelligent agent systems "can remember chat but cannot explicitly remember task progress". While ensuring execution consistency, it reduces redundant planning and storage overhead, and enhances the reliability, efficiency and scalability of intelligent agent systems in complex, multi-round task scenarios.
[0097] 304. Execute the target task process according to the fourth task execution strategy.
[0098] 305. In response to the end of the current interaction round, output the execution result of the current interaction round.
[0099] 306. Based on the task requirements and execution results of the current interaction round, update the target session context corresponding to the target session identifier in the first storage system.
[0100] 307. Update the target task execution graph in the second storage system based on the task context of each task node that has been executed in the current interaction round.
[0101] Specifically, the intelligent agent system starts executing the target task process from the first task node in the initial target task execution graph. After the current interaction round ends, it generates the target session context corresponding to the target session identifier based on the task requirement information and execution result of the current interaction round and saves it to the first storage system to update the target session context corresponding to the target session identifier in the first storage system. It writes the task context of each task node executed in the current interaction round into the initial target task execution graph to obtain the target task execution graph and saves it to the second storage system to update the target task execution graph in the second storage system.
[0102] For details regarding steps 305-307, please refer to steps 104-106 in the aforementioned embodiments, which will not be repeated here.
[0103] The technical solution provided in this application pre-caches the initial task execution graph of the task flow in the caching system, automatically converting the document-based task flow into an executable graph structure. This provides a unified carrier for the continuous execution of subsequent multi-round tasks, reducing the workload of manually hard-coding the task flow, effectively reducing unnecessary repetitive task planning, lowering the resource consumption of the intelligent agent system, and enabling task execution to have better standardization, reusability, and scalability. The intelligent agent system maintains the session context and the task execution graph carrying the task context by constructing a dual storage system. After receiving the task requirement information of the user's current interaction round, it dynamically generates a task execution strategy adapted to the current interaction round based on the identified task intent information, session identifier, process name, and task execution parameters, effectively addressing the execution chaos problem under diverse interaction scenarios. At the same time, by decoupling the storage of the session context and task context, context pollution is significantly reduced, improving the accuracy of task state tracking and response generation quality. Thus, in the execution of complex tasks driven by multi-round interactions, the execution stability and accuracy of the intelligent agent system's task flow are enhanced.
[0104] In some optional embodiments, the intelligent agent system may further: obtain the current process description text and the current toolset information to be called corresponding to at least one task process; for any task process, generate a content identifier for the task process based on the current process description text and the current toolset information to be called; perform task planning based on the current process description text and the current toolset information to be called to obtain the initial state task execution graph of the task process; and associate and save the process name, content identifier and initial state task execution graph of the task process to the cache system.
[0105] Specifically, the current process description text of the task flow not only defines the task steps and their execution order, but also records the current toolset information that needs to be called during the execution of the task flow. The current toolset information includes information about at least one tool. For example, in the description text of the "ticket booking process", it will be clearly indicated that tool A (such as flight query interface) and tool B (such as payment processing service) need to be called to complete the complete operation from query to order placement.
[0106] In this embodiment, by combining the current process description text of the task flow with the information of the current toolset to be invoked, a unique content identifier is generated. This identifier drives task planning and cache management, achieving precise version control and efficient reuse of the initial state task execution graph. On one hand, it ensures that task planning is only re-performed when the current process description text or current toolset information changes, avoiding invalid calculations and reducing model calls and latency overhead caused by repeated planning. On the other hand, by combining the process name, content identifier, and initial state task execution... Figure 3 The associated data is stored in the caching system, which supports fast retrieval and consistency verification, enhancing the adaptability, reliability and execution efficiency of the intelligent agent system in dynamic tool environments.
[0107] In practical applications, there are no restrictions on how the content identifier for the task flow is generated. For example, the current flow description text of the task flow and the information of the current toolset to be called can be concatenated to obtain the concatenated text, and the semantic vector of the concatenated text can be used as the content identifier for the task flow. Alternatively, the semantic vectors corresponding to the current flow description text and the current toolset information to be called can be obtained, and then concatenated to obtain the content identifier for the task flow.
[0108] In some optional embodiments, the method for generating the content identifier of the task flow based on the current flow description text of the task flow and the current toolset information to be called is as follows: perform standardization processing on the current flow description text of the task flow and the current toolset information to be called respectively; perform hash operation on the standardized current flow description text of the task flow and the current toolset information to be called to generate the content identifier of the task flow.
[0109] Specifically, the current process description text is standardized, including but not limited to: standardizing line breaks, removing extra whitespace, and standardizing keyword capitalization and formatting. The current toolset information is also standardized, including but not limited to: sorting by tool name in lexicographical order, standardizing tool version representation, and mapping tool aliases or abbreviations to their full names. Then, the standardized process description text and toolset information are combined to obtain a combined result; a hash operation is performed on this combined result, and the resulting hash value serves as the content identifier for the task process.
[0110] In this embodiment, by standardizing the process description text and toolset information respectively, and then generating content identifiers through hash operations, misjudgments caused by non-semantic differences are effectively eliminated; this ensures that as long as there is any substantial change in the process logic or tool dependency, the content identifier will change accordingly, thereby providing an accurate and reliable basis for judging the validity of the caching system.
[0111] In some optional embodiments, the intelligent agent system may also: periodically detect whether the content identifier of the task flow has changed; if a change in the content identifier of the task flow is detected, return to the step of performing task planning based on the current flow description text of the task flow and the current toolset information to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps.
[0112] In practical applications, after the process name, content identifier, and initial state task execution graph of the task flow are associated and saved to the caching system, it is also possible to periodically check whether the content identifier of the task flow has changed. If a change in the content identifier of the task flow is detected, it indicates that the current process description text or the required toolset information has been updated, and the process is automatically replanned: the initial state task execution graph is regenerated based on the latest process description text and / or the latest current toolset information, and the content identifier associated with the process name and the initial state task execution graph in the caching system are updated. This effectively avoids execution errors or inconsistencies caused by changes in the task flow or tools, while taking into account both execution efficiency and adaptability.
[0113] In some optional embodiments, the method of generating a content identifier for the task flow by hashing the current flow description text of the standardized task flow and the information of the current toolset to be called includes: determining the importance level of the current flow description text of the task flow based on multi-dimensional importance assessment data, which includes at least two of the following: the task type of the task flow, the number of steps in the current flow description text of the task flow, the historical usage frequency of the task flow, and whether the task flow contains preset key action keywords; determining whether the importance level of the current flow description text of the task flow meets the importance level requirements; if the importance level requirements are met, hashing the current flow description text of the standardized task flow to obtain a first content identifier; hashing the information of the current toolset to be called in the standardized task flow to obtain a second content identifier; and generating the content identifier of the task flow based on the first and second content identifiers. If the importance level requirements are not met, hashing the current flow description text of the standardized task flow and the information of the current toolset to be called in the standardized task flow to generate the content identifier of the task flow.
[0114] Specifically, a multi-dimensional and quantifiable evaluation mechanism is used to assess the importance of the current process description text of a task flow. Multi-dimensional importance assessment data includes, but is not limited to: the task type of the task flow, the number of steps in the current process description text, the historical usage frequency of the task flow, and whether the task flow contains preset key action keywords.
[0115] It is worth noting that considering multi-dimensional importance assessment data such as the task type of the task process, the number of steps in the current process description text, the historical usage frequency of the task process, and whether the task process contains preset key action keywords, can collaboratively characterize the service criticality, execution complexity, reusability potential, and operational risks of the task process from different perspectives, thereby providing strong support for the reliability and stability of task execution.
[0116] For example, if the task type in the workflow is a relatively important task such as payment, approval, or identity authentication, the importance of the current workflow description text is higher; the number of steps in the workflow description text reflects the complexity and execution cost of the workflow; the more steps in the workflow description text, the higher the importance of the current workflow description text; the higher the historical usage frequency of the current workflow description text, the more likely the task workflow is to have reuse value, and the higher the importance of the current workflow description text; the more the task workflow contains preset key action keywords, the higher the importance of the current workflow description text, such as keywords that represent operational risks, such as "transfer," "delete," and "sign."
[0117] Optionally, a mapping relationship between the scoring items of each dimension and the importance score can be established. When evaluating the importance of the current process description text, the importance score of each dimension is determined based on the multi-dimensional importance assessment data and the mapping relationship between the scoring items of each dimension and the importance score. Various operations such as weighted summation or averaging of the importance scores of each dimension of the current process description text are performed to obtain the importance of the current process description text (usually expressed in the form of a numerical score).
[0118] For example, the mapping relationship between the rating items of each dimension and the importance score is as follows: Task type scoring items: The importance score for high-criticality types (such as payment) is mapped to 0.9, and the importance score for ordinary types (such as query) is mapped to 0.3; The importance score for steps numbered 10 or more is 0.8; the importance score for steps numbered less than 10 is 0.2. Historical usage frequency rating: High-frequency cases (100 times / month or more) are assigned an importance score of 0.8; medium-frequency cases (10 to 99 times / month) are assigned an importance score of 0.5; and low-frequency cases (less than 10 times / month) are assigned an importance score of 0.2. Key Action Keyword Scoring Item: If any keyword exists, the importance score is mapped to 0.7; otherwise, it is 0.
[0119] When assessing the importance of the current process description text, the intelligent agent system determines the importance score of each dimension's scoring item based on multi-dimensional assessment data and corresponding mapping relationships, and aggregates the data using methods such as weighted summation to obtain the importance of the current process description text.
[0120] Optionally, a scoring model can be used to evaluate the importance of the current process description text based on multi-dimensional importance assessment data. The scoring model is a neural network model with scoring functionality obtained through model training. Neural network models include, but are not limited to, Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM).
[0121] When training the scoring model, a training dataset can be collected. This dataset may include multi-dimensional importance assessment data and expected importance levels. In each round of model training, the training data is input into the scoring model obtained from the previous round, and the predicted importance level output by the scoring model is obtained. The loss value of the training data is calculated based on the error information between the expected importance level and the predicted importance level. The loss values of all training data in this round are then weighted and summed or averaged to obtain the total loss value for this round of model training. This total loss value is then used to adjust the model parameters of the scoring model obtained from the previous round, generating the current scoring model. Multiple rounds of model training are repeated until a satisfactory scoring model is obtained.
[0122] In this embodiment, any loss function can be used to determine the loss value of the training data. Such loss functions include, but are not limited to: mean squared error loss function, L2 loss function (also known as Euclidean distance), L1 loss function (Manhattan distance), cross-entropy loss function, softmax loss function, and Focal loss function, which is primarily used to address the imbalance between easy and difficult samples.
[0123] When using a loss function to determine the loss value for training data, the expected total score is input as the true value, and the predicted total score is input as the predicted value. The loss function calculates the loss value for the training data based on the input true and predicted values. For more information on how loss functions calculate loss values, please refer to the relevant technical documentation.
[0124] In this embodiment, importance requirements are set as needed. For example, if the importance of the current process description text is greater than the set importance score, then the importance requirement is met; otherwise, it is not met. As another example, if the importance of the current process description text falls within the set importance score range, then the importance requirement is met; otherwise, it is not met.
[0125] In this embodiment, it is determined whether the importance level of the current process description text of the task flow meets the importance level requirements; if it does not meet the requirements, there is no need to design hierarchical content identification. If it does meet the requirements, then hierarchical content identification is designed.
[0126] In this embodiment, by introducing a multi-dimensional importance assessment, a refined version management strategy is enabled for high-value, highly reusable, or high-risk task processes. Based on a layered content identifier design, the first content identifier represents the process logic (including step sequence, conditional branches, and action descriptions), and the second content identifier represents tool dependencies, thereby achieving accurate identification and differentiated response to change types.
[0127] In some optional embodiments, if a change in the content identifier of the task flow is detected, the process returns to the step of performing task planning based on the current flow description text of the task flow and the required current toolset information to obtain the initial state task execution graph of the task flow, and the subsequent steps include: if a change in the first content identifier of the task flow is detected, the process returns to the step of performing task planning based on the current flow description text of the task flow and the required current toolset information to obtain the initial state task execution graph of the task flow, and the subsequent steps; if the first content identifier of the task flow has not changed but the second content identifier has changed, the process determines whether the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow; if the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, the process updates the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information.
[0128] Specifically, if the first content identifier changes, it indicates that the task flow logic has been substantially modified (e.g., adding / deleting steps, adjusting the execution order, modifying judgment conditions, etc.). At this time, the original initial state task execution diagram can no longer accurately reflect the current flow logic. The intelligent agent system will re-execute the complete task planning process: perform task planning based on the latest current flow description text and the latest current toolset information, generate the latest initial state task execution diagram, and update the content identifiers and initial state task execution diagram in the cache system so that subsequent task execution will be based on the latest initial state task execution diagram.
[0129] If the first content identifier of the task flow remains unchanged but the second content identifier changes, it indicates that the flow logic of the task flow remains the same, and only the toolset it depends on has been updated (such as tool version upgrades, API replacements, new tool registrations, etc.). In this case, the agent system does not immediately trigger a full replanning. Instead, based on the updated current toolset information, it updates the tool information bound to the corresponding task nodes in the initial task execution graph, without changing the step descriptions, dependencies, and execution states of the task nodes. This lightweight tool binding update achieves hot adaptation, significantly reducing computational overhead and response latency.
[0130] In this embodiment, based on the hierarchical content identifier design, a full replanning is triggered when the process logic represented by the first content identifier changes, and a local tool binding update is performed when the tool dependency represented by the second content identifier changes. Thus, while ensuring the consistency and reliability of the core task process execution, unnecessary computational overhead is effectively avoided, and the resource utilization efficiency, response performance and scalability of the intelligent agent system are improved.
[0131] In some optional embodiments, before updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information, the method further includes: determining whether the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow; if the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, then the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information is executed; if the updated current toolset information is incompatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, then a compatibility repair strategy is executed to adjust the updated current toolset information until the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, and then the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information is executed.
[0132] Specifically, in the tool compatibility assessment phase, the intelligent agent system first traverses each task node in the initial task execution graph, extracting the functional requirements declared by each task node during the task planning phase. These requirements include, but are not limited to: the logical name of the required tool, input or output data format requirements, supported operational semantics (such as "supports cross-border payments" or "can recognize documents"), tool version constraints, etc. Subsequently, the intelligent agent system matches and verifies the functional requirements of each task node with the updated current toolset information. If the updated tool information matches the functional requirements of the corresponding task node, the updated tool information is considered compatible, representing a compatible change. If the updated tool information does not match the functional requirements of the corresponding task node, the updated tool information is considered incompatible, representing an incompatible change. If determined to be a compatible change, the intelligent agent system directly executes a lightweight tool binding update. If determined to be an incompatible change, a compatibility repair strategy is used to repair the updated current toolset information until the updated tool information is compatible with the functional requirements of the corresponding task node. The compatibility repair strategy includes, but is not limited to: selecting alternative tools, tool version rollback, manual repair, etc.
[0133] In this embodiment, to enhance the agent system's adaptability to dynamic changes in the tool environment while ensuring the reliability and consistency of task execution, a tool compatibility verification and repair mechanism is introduced before updating the tool binding of the initial state task execution graph based on the updated current toolset information. This mechanism not only determines whether the change is safe but also provides compatibility repair strategies in incompatible scenarios, preventing task interruption or execution errors due to missing tools or interface incompatibility.
[0134] Figure 4 This is a schematic diagram of a task processing device provided in an embodiment of this application. The task processing device is applied to an intelligent agent system, and its constituent modules can be software and / or hardware components. See also... Figure 4 The task processing device may include: a user interaction layer 41, a task orchestration layer 42, a task execution layer 43, a state management layer 44, and an output layer 45; through the layered design, the external natural language interaction and the internal task execution state are decoupled.
[0135] Among them, the user interaction layer 41 is the interface between the intelligent agent system and the end user. It is responsible for receiving the user's natural language input (such as text, voice, etc.) and presenting the output results of the intelligent agent system in a user-friendly way. The task orchestration layer 42 is responsible for task orchestration, including but not limited to: task identification and decomposition, task planning, state tracking, collaborating with a language model (LLM) to complete intent clarification, contextual reasoning, or dynamic task generation, etc. The task execution layer 43 is responsible for calling specific tools or services to complete various sub-tasks according to the execution plan generated by the task orchestration layer 42. The state management layer 44 is used to uniformly maintain various contextual information such as dialogue context and task context throughout the entire task lifecycle; The output layer 45 is responsible for transforming the task execution results into the final user-facing response, including but not limited to: result integration and formatting, natural language generation, multimodal output rendering, etc.
[0136] In this embodiment, the task processing device is integrated into the intelligent agent system, and the various components of the task processing device work together to complete the task processing.
[0137] Specifically, the user interaction layer 41 is used to receive task requirement information input by the user in the current interaction round; The task orchestration layer 42 is used to respond to the task request information input by the user in the current interaction round, identify the task attribute information corresponding to the task request information, and the task attribute information includes: target task intent information, target session identifier, process name of target task flow, and task execution parameters; based on the task attribute information, the first storage system, and the second storage system, determine the task execution strategy for executing the target task flow in the current interaction round, wherein the first storage system stores the session context corresponding to at least one session identifier, and the second storage system stores at least one session identifier and the task execution graph corresponding to the process name of at least one task flow associated with each session identifier; the task execution strategy is used to instruct the execution of the target task flow according to the target task execution graph, the target task execution graph including the task context of each of the multiple task nodes in the target task flow and the execution order dependency relationship between the task nodes; Task execution layer 43 is used to execute the target task process according to the task execution strategy; Output layer 45 is used to output the execution result of the current interaction round in response to the end of the current interaction round; The state management layer 44 is used to provide the first storage system and the second storage system; based on the task requirement information and execution results of the current interaction round, it updates the target session context corresponding to the target session identifier in the first storage system; and updates the target task execution graph in the second storage system based on the task context of each task node that has been executed in the current interaction round.
[0138] Optionally, when the task orchestration layer 42 determines the task execution strategy for executing the target task flow in the current interaction round based on the task attribute information, the first storage system, and the second storage system, it specifically performs the following: if the target task intent information indicates to continue executing the unfinished target task flow, it searches for the target session context corresponding to the target session identifier in the first storage system; it searches for the target task execution graph corresponding to the target session identifier in the second storage system based on the target session identifier and the flow name of the target task flow; and it determines the task execution strategy for continuing to execute the target task flow in the current interaction round based on the target task intent information, the target session context, the target task execution graph, and the task execution parameters.
[0139] Optionally, when the task orchestration layer 42 determines the task execution strategy for continuing the execution of the target task flow in the current interaction round based on the target task intent information, target session context, target task execution graph, and task execution parameters, it is specifically used for: If the target task intent information is a supplementary explanation intent, then the starting task node for continuing the target task flow in the current interaction round is determined based on the target session context, the target task execution graph, and the task execution parameters; a first task execution strategy is generated, which instructs the target task flow to continue execution from the starting task node according to the execution order dependency; and / or, if the target task intent information is a correction intent, then the starting task node for continuing the target task flow in the current interaction round is determined based on the target session context, the target task execution graph, and the task execution parameters; a second task execution strategy is generated, which instructs the task context of the target task execution graph from the starting task node and its subsequent task nodes to be reset, and the target task flow to continue execution from the starting task node according to the execution order dependency; and / or, if the target task intent information is a follow-up intent, then a third task execution strategy is generated, which instructs the execution result of the current interaction round to be generated based on the target session context, the target task execution graph, and the task execution parameters.
[0140] Optionally, before updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round, the state management layer 44 is further configured to: determine whether the target task intent information is a correction intent; if the target task intent information is not a correction intent, execute the step of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round; if the target task intent information is a correction intent, then after the user confirms that the execution result of the current interaction round is correct, execute the step of updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round.
[0141] Optionally, when the task orchestration layer 42 determines the task execution strategy for executing the target task flow in the current interaction round based on the task attribute information, the first storage system, and the second storage system, it is specifically used for: if the target task intent information indicates the start of executing the target task flow, then searching for the initial state target task execution graph of the target task flow in the cache system according to the flow name of the target task flow, the initial state target task execution graph records the task execution status of multiple task nodes in the target task flow as not executed; generating a fourth task execution strategy based on the target task intent information, the initial state target task execution graph, and task execution parameters; the fourth task execution strategy is used to indicate that the target task flow should start executing from the first task node in the initial state target task execution graph; the fourth task execution strategy is also used to indicate that the target session context corresponding to the target session identifier should be generated based on the task requirement information and execution results of the current interaction round and saved to the first storage system; the fourth task execution strategy is also used to write the task context of each task node that has been executed in the current interaction round into the initial state target task execution graph to obtain the target task execution graph and save it to the second storage system.
[0142] Optionally, the task orchestration layer 42 is also used to: obtain the current process description text and the current toolset information to be called corresponding to at least one task process; for any task process, generate the content identifier of the task process based on the current process description text and the current toolset information to be called; perform task planning based on the current process description text and the current toolset information to be called to obtain the initial state task execution graph of the task process; and associate and save the process name, content identifier and initial state task execution graph of the task process to the cache system.
[0143] Optionally, the task orchestration layer 42 is also used to: periodically detect whether the content identifier of the task flow has changed; if the content identifier of the task flow has changed, return to execute the steps of task planning based on the current flow description text of the task flow and the current toolset information to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps.
[0144] Optionally, when the task orchestration layer 42 generates the content identifier of the task flow based on the current flow description text of the task flow and the current toolset information to be called, it is specifically used to: perform standardization processing on the current flow description text of the task flow and the current toolset information to be called respectively; and perform hash operation on the standardized current flow description text of the task flow and the current toolset information to be called to generate the content identifier of the task flow.
[0145] Optionally, when the task orchestration layer 42 performs a hash operation on the current process description text of the standardized task flow and the information of the current toolset to be called, and generates the content identifier of the task flow, it is specifically used for: determining the importance level of the current process description text of the task flow based on multi-dimensional importance assessment data, which includes at least two of the following: the task type of the task flow, the number of steps in the current process description text of the task flow, the historical usage frequency of the task flow, and whether the task flow contains preset key action keywords; determining whether the importance level of the current process description text of the task flow meets the importance level requirements; if it meets the importance level requirements, then performing a hash operation on the current process description text of the standardized task flow to obtain a first content identifier; performing a hash operation on the information of the current toolset to be called in the standardized task flow to obtain a second content identifier; and generating the content identifier of the task flow based on the first content identifier and the second content identifier.
[0146] Optionally, if the task orchestration layer 42 detects a change in the content identifier of the task flow, it returns to the step of performing task planning based on the current flow description text of the task flow and the information of the current toolset to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps. Specifically, if a change in the first content identifier of the task flow is detected, it returns to the step of performing task planning based on the current flow description text of the task flow and the information of the current toolset to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps; if the first content identifier of the task flow has not changed but the second content identifier has changed, it updates the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information.
[0147] Optionally, before updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information, the task orchestration layer 42 is further configured to: determine whether the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow; if the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, then execute the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information; if the updated current toolset information is incompatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, then execute a compatibility repair strategy to adjust the updated current toolset information until the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, and execute the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information.
[0148] The detailed implementation methods and beneficial effects of each component module in the task processing device of this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.
[0149] In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, in the embodiments of this application, "first," "second," "third," etc., are only used to distinguish the content of different objects and have no other special meaning.
[0150] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.
[0151] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 106 can be device A; or the execution subject of steps 101 to 103 can be device A, and the execution subject of steps 104 to 106 can be device B; and so on.
[0152] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 401, 402, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0153] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52; Memory 51 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0154] Processor 52, coupled to memory 51, is used to execute computer programs in memory 51 for: performing steps in a task processing method.
[0155] Optional, such as Figure 5 As shown, the electronic device also includes other components such as a communication component 53, a display 54, a power supply component 55, and an audio component 56. Figure 5 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 5 The components shown. Additionally... Figure 5The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. The electronic device in this embodiment can be a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a desktop computer, laptop computer, or smartphone, it may include... Figure 5 The components within the dashed box; if the electronic device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., it may be omitted. Figure 5 The component within the dashed box.
[0156] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0157] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G (2nd Generation), 3G (3rd Generation), 4G (4th Generation) / LTE (long Term Evolution), 5G (5th Generation), or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0158] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0159] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0160] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0161] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium may be volatile, non-volatile, or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, digital video disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium.
[0162] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.
[0163] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0164] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A task processing method, characterized in that, Applied to intelligent agent systems, the method includes: In response to receiving task request information input by the user in the current interaction round, the system identifies the task attribute information corresponding to the task request information. The task attribute information includes: target task intent information, target session identifier, process name of target task flow, and task execution parameters. Based on the task attribute information, the first storage system, and the second storage system, a task execution strategy is determined for executing the target task flow in the current interaction round. The first storage system stores the session context corresponding to at least one session identifier, and the second storage system stores at least one session identifier and a task execution graph corresponding to the flow name of at least one task flow associated with each session identifier. The task execution strategy is used to instruct the execution of the target task flow according to the target task execution graph, which includes the task context of each of the multiple task nodes in the target task flow and the execution order dependencies between the task nodes. The target task process is executed according to the described task execution strategy; In response to the end of the current interaction round, the execution result of the current interaction round is output; Based on the task requirements and execution results of the current interaction round, update the target session context corresponding to the target session identifier in the first storage system; The target task execution graph in the second storage system is updated based on the task context of each task node that has been executed in the current interaction round.
2. The method according to claim 1, characterized in that, Based on the task attribute information, the first storage system, and the second storage system, determine the task execution strategy for executing the target task flow in the current interaction round, including: If the target task intent information indicates to continue executing the unfinished target task process, then search for the target session context corresponding to the target session identifier in the first storage system; Based on the target session identifier and the process name of the target task flow, search for the target task execution graph corresponding to the target session identifier in the second storage system; Based on the target task intent information, the target session context, the target task execution graph, and the task execution parameters, a task execution strategy is determined to continue executing the target task process in the current interaction round.
3. The method according to claim 2, characterized in that, Based on the target task intent information, the target session context, the target task execution graph, and the task execution parameters, a task execution strategy is determined to continue executing the target task flow in the current interaction round, including at least one of the following: If the target task intent information is a supplementary explanation intent, then the starting task node for continuing the target task process in the current interaction round is determined based on the target session context, the target task execution graph, and the task execution parameters. Generate a first task execution strategy, which is used to instruct the execution of the target task process to continue from the starting task node according to the execution order dependency; And / or, If the target task intent information is a correction intent, then the starting task node for continuing to execute the target task process in the current interaction round is determined based on the target session context, the target task execution graph, and the task execution parameters. A second task execution strategy is generated, which is used to instruct the task context of the starting task node and its subsequent task nodes in the target task execution graph to be reset, and to continue the execution of the target task process from the starting task node according to the execution order dependency. And / or, If the target task intent information is a follow-up intent, a third task execution strategy is generated. The third task execution strategy is used to instruct the generation of the execution result of the current interaction round based on the target session context, the target task execution graph, and the task execution parameters.
4. The method according to claim 3, characterized in that, Before updating the target session context corresponding to the target session identifier in the first storage system based on the task requirement information and execution result of the current interaction round, the method further includes: Determine whether the target task intent information is a corrective intent; If the target task intent information is not a correction intent, the step of updating the target session context corresponding to the target session identifier in the first storage system is performed based on the task requirement information and execution result of the current interaction round. If the target task intent information is a correction intent, then after the user confirms that the execution result of the current interaction round is correct, the step of updating the target session context corresponding to the target session identifier in the first storage system according to the task requirement information and execution result of the current interaction round is executed.
5. The method according to claim 1, characterized in that, Based on the task attribute information, the first storage system, and the second storage system, determine the task execution strategy for executing the target task flow in the current interaction round, including: If the target task intent information indicates that the target task process should be started, then the initial state target task execution graph of the target task process is retrieved from the cache system according to the process name of the target task process. The initial state target task execution graph records that the task execution status of multiple task nodes in the target task process is not executed. Based on the target task intent information, the initial target task execution graph, and the task execution parameters, a fourth task execution strategy is generated; the fourth task execution strategy is used to indicate that the target task process should be executed starting from the first task node in the initial target task execution graph. The fourth task execution strategy is also used to instruct the generation of a target session context corresponding to the target session identifier based on the task requirement information and execution result of the current interaction round, and to save it to the first storage system; The fourth task execution strategy is also used to write the task context of each task node that has been executed in the current interaction round into the initial state target task execution graph to obtain the target task execution graph and save it to the second storage system.
6. The method according to claim 5, characterized in that, Also includes: Obtain the current process description text and the current toolset information to be called for each of at least one task process; For any given task flow, generate a content identifier for the task flow based on the current flow description text and the information of the current toolset to be invoked. Based on the current process description text of the task flow and the information of the current toolset to be called, task planning is performed to obtain the initial state task execution diagram of the task flow. The process name, content identifier, and initial state task execution graph of the task flow are associated and saved to the cache system.
7. The method according to claim 6, characterized in that, Also includes: Periodically check whether the content identifier of the task flow has changed; If a change in the content identifier of the task flow is detected, the process returns to the step of performing task planning based on the current flow description text of the task flow and the current toolset information to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps.
8. The method according to claim 6, characterized in that, Based on the current process description text of the task flow and the information of the current toolset to be invoked, a content identifier for the task flow is generated, including: The current process description text of the task flow and the information of the current toolset to be invoked are respectively standardized. A hash operation is performed on the current process description text of the standardized task flow and the current toolset information to be called to generate the content identifier of the task flow.
9. The method according to claim 8, characterized in that, A hash operation is performed on the current process description text of the standardized task flow and the current toolset information to be invoked to generate the content identifier of the task flow, including: The importance of the current process description text of the task process is determined based on multi-dimensional importance assessment data, which includes at least two of the following: the task type of the task process, the number of steps in the current process description text of the task process, the historical usage frequency of the task process, and whether the task process contains preset key action keywords. Determine whether the importance level of the current process description text of the task flow meets the importance level requirements; If the importance requirement is met, then a hash operation is performed on the current process description text of the standardized task flow to obtain the first content identifier. A hash operation is performed on the current toolset information to be invoked in the standardized task flow to obtain a second content identifier; The content identifier of the task flow is generated based on the first content identifier and the second content identifier.
10. The method according to claim 9, characterized in that, If a change in the content identifier of the task flow is detected, the process returns to the step of performing task planning based on the current flow description text of the task flow and the information of the current toolset to be invoked, to obtain the initial state task execution graph of the task flow, and the subsequent steps include: If a change in the first content identifier of the task flow is detected, the execution will return to the step of performing task planning based on the current flow description text of the task flow and the current toolset information to be called, to obtain the initial state task execution graph of the task flow and its subsequent steps. If it is detected that the first content identifier of the task flow has not changed but the second content identifier has changed, then the tool information bound to the corresponding task node in the initial state task execution graph of the task flow is updated based on the updated current toolset information.
11. The method according to claim 10, characterized in that, Before updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information, the process also includes: Determine whether the updated current toolset information is compatible with the functional requirements of the corresponding task nodes in the initial state task execution graph of the task flow; If the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, then the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information is executed. If the updated current toolset information is incompatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, a compatibility repair strategy is executed to adjust the updated current toolset information until the updated current toolset information is compatible with the functional requirements of the corresponding task node in the initial state task execution graph of the task flow, and the step of updating the tool information bound to the corresponding task node in the initial state task execution graph of the task flow based on the updated current toolset information is executed.
12. A task processing device, characterized in that, The device, applied to an intelligent agent system, includes: The user interaction layer is used to receive task requirement information input by the user in the current interaction round; A task orchestration layer is used to respond to task request information input by the user in the current interaction round, identify task attribute information corresponding to the task request information, the task attribute information including: target task intent information, target session identifier, target task flow name, and task execution parameters; and determine a task execution strategy for executing the target task flow in the current interaction round based on the task attribute information, a first storage system, and a second storage system, wherein the first storage system stores the session context corresponding to at least one session identifier, and the second storage system stores at least one session identifier and a task execution graph corresponding to the flow name of at least one task flow associated with each session identifier; the task execution strategy is used to instruct the execution of the target task flow according to the target task execution graph, the target task execution graph including the task context of each of the multiple task nodes in the target task flow and the execution order dependencies between the task nodes; The task execution layer is used to execute the target task process according to the task execution strategy. The output layer is used to output the execution result of the current interaction round in response to the end of the current interaction round; A state management layer is used to provide a first storage system and a second storage system; based on the task requirement information and execution results of the current interaction round, it updates the target session context corresponding to the target session identifier in the first storage system; and updates the target task execution graph in the second storage system based on the task context of each task node executed in the current interaction round.
13. An electronic device, characterized in that, include: Memory and processor; Memory, used to store computer programs; The processor is coupled to memory for executing a computer program to perform the steps of the method of any one of claims 1-11.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of any one of the methods of claims 1-11.
15. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of any one of claims 1-11.
Citation Information
Patent Citations
System and methods for upsampling of decompressed data after lossy compression using a neural network
US12058333B1
Continual selection of scenarios based on identified tags describing contextual environment of a user for execution by an artificial intelligence model of the user by an autonomous personal companion
US20190065960A1