Task execution method and device and electronic equipment
By constructing a task semantic graph and a multi-agent execution framework, the problems of low efficiency and insufficient inter-system collaboration caused by manual configuration in existing office task processing systems are solved, achieving a high degree of automation and efficient collaboration in task execution.
Patent Information
- Application Number
- CN202510792835.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-10-28
AI Technical Summary
Existing office task processing systems rely on manual configuration and are unable to cope with the diversity and variability of task requirements. Process templates are difficult to reuse, resulting in low office efficiency and a lack of collaboration between systems. Manual coordination and data transfer are required, increasing communication and execution costs.
By extracting key task information through intent recognition, constructing a task semantic graph, generating an execution flowchart and adding metadata information, and utilizing a multi-agent task execution framework and graph neural network, the automated execution of tasks can be achieved.
It realizes the structured representation of unstructured task requests, clarifies execution dependencies and paths, improves the accuracy and efficiency of task execution, supports cross-system collaboration and dynamic adjustment, and enhances the automation level of office automation.
Smart Images

Figure CN120849032A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a task execution method, apparatus, and electronic device. Background Art
[0002] With the rapid development of digital office solutions for enterprises, more and more organizations are incorporating key business activities such as task management, approval processes, document preparation, and customer information processing into digital systems.
[0003] Existing office task processing relies on manual configuration. Whether it is a process engine based on Business Process Model and Notation (BPMN) or a task process module of a low-code platform, most office workflows still require manual planning of the process structure in advance, making it difficult to cope with the diversity and variability of task requirements. Especially in project-based organizations and temporary task collaboration, process templates are difficult to reuse and task dependencies are unclear, resulting in low office efficiency. Summary of the Invention
[0004] This invention provides a task execution method, apparatus, and electronic device to improve processing efficiency in office task handling.
[0005] This invention provides a task execution method, comprising the following steps: The task processing request is subjected to intent recognition, multiple key task information is extracted, and a task semantic graph is constructed based on the multiple key task information. The task semantic graph is constructed based on multiple key task information as nodes and the semantic associations between the key task information as edges. Based on the execution dependencies and execution paths of each node in the task semantic graph, an execution flowchart for the task processing request is constructed, and metadata information of each node is added to each node in the execution flowchart to obtain an execution flowchart with added metadata information. The metadata information is used as an execution index for the node execution process. The task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
[0006] According to a task execution method provided by the present invention, intent recognition is performed on a task processing request, and multiple key task information is extracted, including: The task processing request is input into a multimodal large language model to obtain the intent recognition result output by the multimodal large language model. The multimodal large language model is trained based on the task processing request sample and the intent information label of the task processing request sample. Keyword extraction is performed on the intent recognition results to obtain key information for the multiple tasks.
[0007] According to a task execution method provided by the present invention, the step of constructing an execution flowchart of the task processing request based on the execution dependencies and execution paths of each node in the task semantic graph includes: Based on graph neural networks, dependency prediction is performed on each node in the task semantic graph to determine the execution dependency of each node in the task semantic graph. Based on the execution dependencies and execution paths of each node in the task semantic graph, a directed acyclic graph of the task processing request is constructed, and the directed acyclic graph is used as the execution flowchart.
[0008] According to a task execution method provided by the present invention, the metadata information of the node is determined based on execution index information, interface call information, and task parameter information.
[0009] According to a task execution method provided by the present invention, the execution index information is used to schedule agents used in the task execution process from a multi-agent task execution framework, wherein the multi-agent task execution framework is constructed based on agents with different task processing functions; The interface call information is used to determine the external interfaces called during the task execution process; The task parameter information is used to determine the execution parameters that the task execution process depends on.
[0010] According to a task execution method provided by the present invention, the execution flow of a single node in the execution flow diagram with added metadata information includes: Based on the interface call information in the metadata, determine whether the node needs to call an external interface to execute. If it is determined that an external interface needs to be called, the external interface is called, and the task corresponding to the node is executed based on the execution parameters determined in the task parameter information. If it is determined that no external interface needs to be called, the target agent for the node to be executed is determined from the multi-agent task execution framework based on the node's execution index information, and the target agent in the multi-agent task execution framework is called to execute the task corresponding to the node based on the execution parameters determined in the task parameter information.
[0011] According to a task execution method provided by the present invention, the step of executing the task based on the execution flowchart with added metadata information and determining the execution result of the task processing request further includes: During the task execution process based on the execution flowchart with added metadata information, node feedback information of the node execution process is obtained. The node feedback information includes execution status information, task progress information, upstream and downstream feedback information, and external feedback information. Based on the feedback information from the nodes, the structure of the execution flowchart is adjusted.
[0012] According to a task execution method provided by the present invention, after obtaining node feedback information during node execution, the method further includes: If, based on node feedback information, it is determined that the execution flowchart includes abnormal nodes that cannot be completed; Based on the node feedback information of the abnormal node, adjust the metadata information of the abnormal node.
[0013] The present invention also provides a task execution device, comprising the following modules: The semantic graph construction module is used to identify the intent of the task processing request, extract multiple key information of the task, and construct a task semantic graph based on the multiple key information of the task. The task semantic graph is constructed based on multiple key information of the task as nodes and the semantic association between the key information of the task as edges. The execution flow determination module is used to construct the execution flow diagram of the task processing request based on the execution dependency relationship and execution path of each node in the task semantic graph, and add the node's metadata information to each node in the execution flow diagram to obtain the execution flow diagram with added metadata information. The metadata information is used as the execution index of the node execution process. The execution module is used to execute tasks based on the execution flowchart with added metadata information and determine the execution result of the task processing request.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the task execution method as described above.
[0015] The task execution method, apparatus, and electronic device provided by this invention accurately extract key task information and construct a task semantic graph through intent recognition, realizing a structured representation of unstructured task requests and providing a foundation for subsequent automated execution. The execution flowchart constructed based on the task semantic graph not only clarifies the execution dependencies and paths of each node but also provides execution indexes for node execution by adding metadata information, achieving a high degree of automation in task execution and greatly improving the accuracy and efficiency of the automated task execution process. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the task execution method provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the task execution process provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the task execution device provided by the present invention.
[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] With the rapid development of digital office solutions in enterprises, more and more organizations are integrating key business activities such as task management, approval processes, document preparation, and customer information processing into digital systems. However, workflow management systems based on these methods still face many technical limitations and practical bottlenecks. On the one hand, process construction relies on manual configuration. Whether it is a traditional BPMN-based process engine or a task flow module of a low-code platform, most office workflows in these methods still require manual planning of the process structure in advance, making it difficult to cope with the diversity and variability of task requirements; especially in project-based organizations and temporary task collaboration, process templates are difficult to reuse and task dependencies are unclear, resulting in low office efficiency.
[0023] On the other hand, there is a lack of inter-system collaboration. The office systems used in these approaches often consist of multiple information silos. For example, Enterprise Resource Planning (ERP) systems handle finance and human resources, Customer Relationship Management (CRM) systems handle customer relationships, Office Automation (OA) systems handle approvals and collaboration, and email / instant messaging platforms handle message delivery. These systems lack a unified task-driven logic and cannot automatically respond to or collaboratively execute a complete business process. They often require manual data transfer, coordination across multiple departments, and manual triggering of nodes, significantly increasing communication and execution costs.
[0024] To address the shortcomings of related methods, this invention provides a task execution method. Figure 1 This is a flowchart illustrating the task execution method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 110: Perform intent recognition on the task processing request, extract multiple key task information, and construct a task semantic graph based on the multiple key task information. The task semantic graph is constructed based on multiple key task information as nodes and semantic associations between key task information as edges. Step 120: Based on the execution dependencies and execution paths of each node in the task semantic graph, construct the execution flowchart of the task processing request, and add metadata information of each node in the execution flowchart to obtain the execution flowchart with added metadata information. The metadata information is used as the execution index of the node execution process. Step 130: Execute the task based on the execution flowchart with added metadata information, and determine the execution result of the task processing request.
[0025] The execution subject of the task execution method provided by this invention can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), or personal computer (PC), etc. This invention does not impose specific limitations.
[0026] The technical solution of the present invention will be described in detail below using the example of a computer executing the task execution method provided by the present invention.
[0027] In step 110, the intent of the task processing request is identified, and multiple key task information is extracted.
[0028] Intent recognition is the first step in processing task requests, and its purpose is to understand the true intent behind the user's request. In office workflow automation scenarios, users may input task requests in the form of natural language, voice, or documents. It is necessary to accurately identify the core intent in these requests, such as "initiate an approval process" or "query customer information".
[0029] The intent recognition process for task processing requests can be implemented based on a task intent recognition and semantic graph construction module. This module uses a multimodal large language model (such as a dedicated large language model for task intent recognition) to understand unstructured inputs such as text, speech, or accompanying images. Through multiple rounds of semantic extraction and contextual reasoning, it can extract key elements such as task objectives, participating entities, time constraints, dependent events, and expected results, thereby accurately understanding the user's intent.
[0030] Based on intent recognition, it is necessary to further extract multiple key task information. This key information includes, but is not limited to, task objectives (such as "completing budget approval"), participating roles (such as "finance manager", "department head", "general manager"), time requirements (such as "must be completed by tomorrow"), and execution constraints (such as "must be signed by the department head and the general manager").
[0031] Specifically, large language models (such as dedicated large language models for task intent recognition) can perform multi-layer semantic analysis on the input information to identify these key information. In addition, voice input can be converted into text, or task information can be extracted from images (such as identifying key fields from approval forms) to achieve multimodal task access, thereby extracting key task information more comprehensively.
[0032] The task semantic graph is constructed based on extracted key task information, representing the semantic relationships between task units in a graph structure. In this graph, each key task information is considered a node, and the semantic relationships between these key task information are connected by edges. Combining the defined nodes and edges constructs a complete task semantic graph. This graph clearly displays the semantic relationships between key task information, providing a foundation for subsequent flowchart generation.
[0033] Understandably, constructing a task semantic graph enables a more comprehensive understanding of the overall structure of a task and the relationships between its various parts. Through the task semantic graph, dependencies and parallel relationships between tasks can be automatically analyzed.
[0034] In step 120, based on the execution dependencies of each node and the execution path of each node in the task semantic graph generated in step 110, an execution flowchart for the task processing request is constructed.
[0035] Execution dependency refers to the sequential relationship between nodes in a task semantic graph. For example, in an approval process, the "department head approval" node must be executed after the "submit approval application" node, which constitutes an execution dependency. Execution dependencies are determined by analyzing the semantic associations and business logic rules between nodes in the task semantic graph. For example, if the graph contains the semantic association "node A must start after node B completes," then the execution dependency of node A on node B can be identified.
[0036] An execution path refers to the sequence of nodes traversed from the start node to the end node of a task, according to the execution dependencies. A task may have multiple execution paths, depending on the different branches and conditions of the task.
[0037] Optionally, graph algorithms (such as depth-first search, breadth-first search, etc.) combined with business rules can be used to plan the execution path. First, starting from the starting node of the task semantic graph, other nodes are traversed step by step along the execution dependencies until the ending node is reached, forming an initial execution path. Then, considering the possible parallel execution, conditional branches, and other situations in the task, the initial execution path is optimized and expanded to obtain multiple execution paths.
[0038] The defined execution dependencies and planned execution paths are presented in the form of a graph structure to generate an execution flowchart. The execution flowchart can use a directed acyclic graph (DAG) structure to represent the execution paths and dependencies between tasks.
[0039] Add corresponding metadata information to each node in the execution flowchart. The metadata information acts as an execution index during the node execution process, providing support for the node's execution process, accurately locating the node, determining the node's execution method, obtaining the resources required for node execution, and monitoring the node's execution status.
[0040] Specifically, during task execution, each node can be accurately scheduled and executed based on its metadata information in the execution flowchart. For example, task executors or agents can be assigned based on their responsibilities, task progress can be reasonably arranged based on the estimated execution time, the correct order of task execution can be ensured based on the set of dependent nodes, and the task execution status can be monitored in real time using a status listener.
[0041] In step 130, the task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
[0042] The execution flowchart with added metadata information is analyzed to understand the task content, execution dependencies, execution path, and metadata information of each node in the flowchart.
[0043] Based on the parsed information, execute the processing procedure for the corresponding task in the task processing request.
[0044] Optionally, the specific execution flow of the task can be as follows: Figure 2 The task execution flow diagram provided by this invention specifically includes: Task intent input and semantic parsing. In the initial stage, users describe their office needs in natural language, such as: "Please initiate a budget approval process, with the finance manager in charge, requiring the signatures of the department head and the general manager." The system first parses the input information through the task intent recognition module.
[0045] Based on a built-in large language model, the system performs multi-layered semantic analysis on the entire natural language passage, identifying task verbs (initiation), task type (budget approval), key roles (finance manager, supervisor, general manager), constraints (sequential execution, signature required), and expected outcome (approval completion). The system also supports converting voice input to text or extracting task information from images (such as identifying key fields from approval form PDFs), enabling multimodal task access. After parsing, a task semantic graph is automatically constructed, with nodes including task objectives, role entities, time nodes, and constraints. Nodes are linked by directed edges labeled with relationships such as "belongs to," "executor," and "predependencies." This graph serves as the foundational representation structure for task decomposition and flowchart generation.
[0046] Flowchart generation and topology modeling. After the task semantic graph is completed, it is input into the flowchart generation and task topology optimization module. This module is responsible for translating the abstract task semantic graph into a structured flowchart, using graph neural networks (such as GNN) to predict dependencies, and further determining which tasks have serial dependencies, which can be executed concurrently, and which nodes need to wait for external signals to trigger.
[0047] The system uses a preset template matching mechanism to find similar industry task patterns (such as the "three-level approval" pattern and the "department-legal-archiving" pattern) and then adapts the process to fit the current task context. The final output flowchart is presented as a Directed Acyclic Graph (DAG), with each node containing metadata such as task identifier, execution role, estimated time, execution constraints, and proxy flag.
[0048] In particular, the flowchart supports a "dynamic node slot" mechanism: for some nodes, the system reserves an "empty slot" structure (such as "may require risk control review"), and the system adaptively inserts nodes according to the subsequent process running status to achieve process evolution.
[0049] Process node role binding and intelligent agent task scheduling. After the flowchart is generated, the execution preparation phase begins. Each node in the flowchart is first bound to a responsible role (such as a department head, system approval interface, or automation assistant agent). Role allocation is intelligently assigned based on multiple factors such as organizational structure chart, permission table, and user historical preferences. The system can automatically determine whether a task should be completed by a human or can be executed by AI.
[0050] Once node binding is complete, the system launches the multi-agent collaborative execution engine. Each task node is assigned to an agent with corresponding capabilities (such as writing, filling out forms, validating, controlling, and supervising). Agents communicate using message negotiation and a blackboard mechanism, supporting the following two collaborative modes: Parallel collaboration: Multiple independent tasks are executed simultaneously by different agents, improving efficiency; Collaborative review: Multiple agents take turns proposing solutions and providing feedback to improve the quality of recommendations.
[0051] When a node agent detects insufficient input or abnormal upstream or downstream logic, it can trigger a backtracking mechanism (such as requesting the preceding node to supplement data) or request to call the "auxiliary planning agent" to fine-tune the process segment.
[0052] Cross-system interaction and data-driven execution. During task execution, many nodes involve interfacing with external systems, such as submitting payment orders in an ERP system, creating approval processes on an OA platform, and updating customer status in a CRM system. At this point, the flowchart nodes will call the cross-system adaptation module to translate the operational intent generated by the intelligent agent into actual executable Application Programming Interface (API) requests, RPA instructions, or Webhook trigger logic.
[0053] For example, in budget approval tasks, the form autofill agent can recognize fields such as "project name", "budget amount", and "payment time", call the ERP system API interface to automatically fill in and submit the form; if the target system does not have an API, the system will use an RPA robot to simulate mouse and keyboard operations to complete the task input on the page.
[0054] All cross-system operations have operation log recording, rollback capabilities, and error retry mechanisms to ensure that the interaction process with external platforms is traceable and business compliant.
[0055] Adaptive process evolution and state-aware feedback. During process execution, the system collects various information in real time, including task node status, user feedback, and external system events. The process scheduling engine evaluates the rationality of the current execution path through its built-in policy network and value network. Process evolution logic is triggered if the following conditions occur: Key approver unable to execute due to absence from post → Automatically replaced by proxy approver role in the process; If a task at a certain node fails multiple times, the system inserts an "anomaly repair sub-process," such as initiating manual confirmation. External trigger event changes → such as restarting the archiving process after a change in contract status, modify the flowchart structure.
[0056] The process evolution module employs an "incremental change" mechanism: only affected sub-branches are adjusted without disrupting the main process structure, ensuring uninterrupted process operation. Each flowchart evolution generates a version snapshot for easy historical tracking and review.
[0057] Structured output and summary report generation. Once the process is complete, the system enters the results summary stage. Process execution data includes: executor of each node, execution time, whether it was completed by AI, input and output content, problem nodes, and exception handling paths, etc.
[0058] The system invokes the structured archiving module to automatically generate a complete process execution report. This report may include: the approval chain and actual path diagram; text generated at each stage (such as contracts, opinions, and notices) and an execution summary; a comparison of AI suggestions and manual modifications; the evolution history of process adjustments; and operation logs and security indicators for auditing purposes.
[0059] The report can be exported in structured format (JSON / XML) and readable format (PDF / HTML), and supports automatic push to specified email addresses, OA archives, or knowledge base systems, ensuring the availability, traceability, and auditability of business process data.
[0060] The task execution method provided by this invention accurately extracts key task information through intent recognition and constructs a task semantic graph, realizing a structured representation of unstructured task requests and laying the foundation for subsequent automated execution. The execution flowchart constructed based on the task semantic graph not only clarifies the execution dependencies and paths of each node but also provides execution indexes for node execution by adding metadata information, achieving a high degree of automation in task execution and greatly improving the accuracy and efficiency of the automated task execution process.
[0061] In one embodiment, intent recognition is performed on a task processing request to extract multiple key task information, including: inputting the task processing request into a multimodal large language model to obtain the intent recognition result output by the multimodal large language model, wherein the multimodal large language model is trained based on a task processing request sample and the intent information labels of the task processing request sample; and extracting keywords from the intent recognition result to obtain the multiple key task information.
[0062] When a task processing request is received, it is input into the multimodal large language model. The model selects the appropriate processing module for preprocessing based on the modality type of the request (text, speech, image, etc.), such as converting speech to text or extracting key information from images. It is understandable that task processing requests may have multiple modalities, such as text, speech, or image content.
[0063] The multimodal large language model is trained using collected task processing request samples and their intent information labels. During training, the multimodal large language model continuously adjusts its internal parameters to learn the mapping relationship between task processing requests and intent information, thereby improving the accuracy of intent recognition.
[0064] Natural language processing techniques are used to extract keywords from the intent recognition results. Through methods such as part-of-speech tagging, named entity recognition, and dependency parsing, key nouns, verbs, and adjectives in the intent recognition results are identified as keywords, yielding key information for multiple tasks.
[0065] In one embodiment, constructing an execution flowchart for the task processing request based on the execution dependencies and execution paths of each node in the task semantic graph includes: predicting the dependencies of each node in the task semantic graph based on a graph neural network to determine the execution dependencies of each node in the task semantic graph; constructing a directed acyclic graph of the task processing request based on the execution dependencies and execution paths of each node in the task semantic graph, and using the directed acyclic graph as the execution flowchart.
[0066] Graph Neural Networks (GNNs) are deep learning models used to process graph-structured data. By propagating information across the graph structure, they are able to learn complex representations of nodes and edges, capturing dependencies between nodes and the topological features of the graph.
[0067] Graph neural networks can be trained using labeled task semantic graph samples. Labels typically indicate whether execution dependencies exist between nodes. During training, the graph neural network learns the mapping relationship between node features and execution dependencies by continuously adjusting its model parameters.
[0068] The task semantic graph of the task processing request is input into the trained graph neural network, and the network will output the prediction results of the dependency relationship between each node pair.
[0069] A directed acyclic graph (DAG) is a graph structure that is directional and contains no cycles. In a DAG, the edges between nodes represent directional dependencies, and it is impossible to return to a node from any node via any edge.
[0070] Using a Directed Acyclic Graph (DAG) as an execution flowchart can clearly represent the execution order and dependencies between tasks, avoiding problems such as circular dependencies and deadlocks. Furthermore, DAGs support complex logic such as parallel execution and conditional branching, making them adaptable to various complex office task scenarios.
[0071] Based on the dependency prediction results, the execution dependencies between nodes in the task semantic graph are determined, and these dependencies are represented as edges in a Directed Acyclic Graph (DAG). Simultaneously, nodes in the task semantic graph are retained as nodes in the DAG to obtain the execution flowchart of the task processing request.
[0072] In one embodiment, the metadata information of the node is determined based on execution index information, interface call information, and task parameter information; The execution index information is used to schedule the agents used in the task execution process from the multi-agent task execution framework, which is built based on agents with different task processing functions; The interface call information is used to determine the external interfaces called during the task execution process; The task parameter information is used to determine the execution parameters that the task execution process depends on.
[0073] The multi-agent task execution framework is a comprehensive platform integrating various intelligent agents with different task processing capabilities. These agents each possess unique characteristics and excel at handling different types of tasks, such as text generation, data validation, and API calls. By integrating these agents into a single framework, automated task allocation and collaborative execution can be achieved, improving the efficiency and accuracy of task processing.
[0074] Each agent possesses different capabilities and responsibilities, and can be scheduled to execute corresponding sub-tasks based on task node characteristics. For example, the text generation agent is responsible for drafting approval opinions or email notifications, the data entry agent is responsible for filling out forms in HR, finance, and CRM systems, and the execution monitoring agent continuously tracks the status of task nodes. The engine employs an adversarial collaboration mechanism: some agents propose initial solutions, while other agents challenge and provide feedback, forming a closed loop of reasoning and verification to avoid path drift and low-quality responses. Simultaneously, agents possess local memory and reflective capabilities; when task failure or unreasonable logical jumps are detected, they can automatically invoke rollback strategies or plan corrective processes to ensure a closed task chain, stable collaboration, and semantic consistency.
[0075] Execution index information is a crucial component of node metadata, used to schedule agents required for task execution within the multi-agent task execution framework. Before task execution, the execution index information quickly locates agents with the appropriate processing capabilities and assigns them to the current node for task execution. This agent-based task allocation method not only improves the flexibility of task processing but also enables the system to easily handle complex and ever-changing task requirements.
[0076] Interface call information is a crucial part of the node's metadata, used to identify the external interfaces invoked during task execution. It typically includes detailed information such as the interface name, address, request method, and parameter format. During task execution, requests are automatically constructed and sent to external systems based on this interface call information, enabling data exchange and collaborative task completion.
[0077] Task parameter information is a key component of node metadata used to determine the execution parameters that the task execution process depends on. Before task execution, corresponding task parameters are configured for each node based on the task's requirements and context. These parameters serve as inputs to the task execution, guiding each step of the task's operation.
[0078] The node's metadata information, by integrating execution index information, interface call information, and task parameter information, provides comprehensive guidance and support for the task execution process. This information ensures that tasks can be executed efficiently and accurately.
[0079] In one embodiment, the execution flow of a single node in the execution flow diagram with added metadata information includes: determining whether the node needs to call an external interface for execution based on the interface call information; if it is determined that an external interface needs to be called, calling the external interface and executing the task corresponding to the node based on the execution parameters determined in the task parameter information; if it is determined that an external interface does not need to be called, determining the target agent for the node to be executed from the multi-agent task execution framework based on the node's execution index information, and calling the target agent to execute the task corresponding to the node based on the execution parameters determined in the task parameter information.
[0080] In the execution flowchart with added metadata, each node represents a specific task execution step in the task execution process.
[0081] Before execution, a node first parses the interface call information in its metadata. This information details whether the node needs to interact with external systems during execution, and specifically which external interfaces need to be called.
[0082] If a node determines that it needs to call an external interface, it constructs the corresponding request and sends it to the external system based on the interface address, request method, parameter format, etc., in the metadata information. After the external interface call is successful, the node will use the execution parameters determined in the task parameter information to execute the specific task logic. These parameters may include input data, configuration options, etc., which together determine the execution method and result of the task. After the external interface execution is completed, the node will receive and process the returned result data.
[0083] If a node determines that it does not need to call an external interface, it parses the execution index information from the metadata. This information is used to locate the target agent with the corresponding processing capabilities within the multi-agent task execution framework. Based on the execution index information, the node determines the target agent required to execute the current task. After determining the target agent, the node invokes that agent and passes the execution parameters determined in the task parameter information. Upon receiving the parameters, the agent executes the corresponding task according to its internal preset task processing logic and returns the execution result to the node.
[0084] Optionally, during interaction with external interfaces, the operational instructions involved in the task flow are integrated with the external system interface to achieve true automated collaboration between systems. Instructions generated by the intelligent agent can be translated into operational instructions recognizable by the target system (such as creating a new approval form, sending a reminder, or retrieving customer data), and executed by calling APIs or through RPA methods that simulate human operation. Furthermore, status events from external systems (such as approval rejection or customer status updates) can be monitored, and these events can be used as feedback inputs to drive real-time adjustments and improvements to the process.
[0085] In one embodiment, the execution of a task based on the execution flowchart with added metadata information, and the determination of the execution result of the task processing request, further includes: during the task execution based on the execution flowchart with added metadata information, obtaining node feedback information of the node execution process, the node feedback information including execution status information, task progress information, upstream and downstream feedback information, and external feedback information; and adjusting the structure of the execution flowchart based on the node feedback information.
[0086] During task execution based on the execution flowchart with added metadata, the system continuously monitors and acquires execution feedback information from each node. This feedback information is crucial for evaluating task execution and optimizing the flowchart structure.
[0087] Execution status information characterizes whether a node has successfully completed its task, including success, failure, and partial success. Task progress information characterizes the percentage of task completion or specific progress of a node. Upstream and downstream feedback information characterizes the execution results, data, or status information passed to downstream nodes after the upstream node completes its execution, as well as the downstream nodes' dependencies on the upstream node's execution results, such as what data or status information they need from the upstream node. External feedback information characterizes the status changes of external systems (such as ERP, CRM, etc.) related to the node's task.
[0088] After receiving feedback information from nodes, the system dynamically adjusts the structure of the execution flowchart based on this information to optimize task execution efficiency and improve adaptability and fault tolerance. Specifically, for nodes that fail, the system analyzes the reasons for failure and decides whether to retry, skip, or replace the node based on the situation. For example, if an approval node fails because the approver is unavailable, the node can be automatically skipped or replaced with another approver. For nodes with excessively long execution times, the system analyzes the reasons (such as insufficient resources or algorithm complexity) and attempts to shorten the execution time by optimizing the algorithm and increasing resources.
[0089] A dynamic update mechanism is employed, allowing for real-time adjustments to the flowchart structure during process execution. This mechanism ensures flexible responses to various unforeseen circumstances and changing requirements. Each time the flowchart structure is adjusted, version information before and after the adjustment is recorded. This helps track historical changes to the flowchart and allows for rollback to previous versions when necessary.
[0090] In one embodiment, after obtaining node feedback information during node execution, the method further includes: if, based on the node feedback information, it is determined that the execution flowchart includes an abnormal node that cannot complete execution; and based on the node feedback information of the abnormal node, adjusting the metadata information of the abnormal node.
[0091] When monitoring and analyzing the execution flowchart based on node feedback information, an adjustment process is initiated once an abnormal node that cannot be completed is detected. Specifically, the node feedback information of the abnormal node is analyzed. This information may cover the reasons for the execution failure (such as insufficient resources, failed API calls, permission issues, etc.), the execution status (such as partially completed, not executed at all), and other relevant contextual data. Based on this detailed feedback information, targeted adjustments are made to the metadata information of the abnormal node. For example, execution strategies may be modified, API call parameters may be updated, execution resources may be reallocated, or task dependencies may be adjusted to ensure that the abnormal node can be handled normally, the flowchart can continue to execute, and the automation level and fault tolerance of the overall office process are improved.
[0092] The task execution device provided by the present invention is described below. The task execution device described below and the task execution method described above can be referred to in correspondence.
[0093] like Figure 3 As shown, the device includes: The semantic graph construction module 310 is used to identify the intent of the task processing request, extract multiple key information of the task, and construct a task semantic graph based on the multiple key information of the task. The task semantic graph is constructed based on multiple key information of the task as nodes and the semantic association between the key information of the task as edges. The execution flow determination module 320 is used to construct an execution flow chart of the task processing request based on the execution dependency relationship and execution path of each node in the task semantic graph, and add metadata information of each node in the execution flow chart to obtain an execution flow chart with added metadata information. The metadata information is used as an execution index for the node execution process. The execution module 330 is used to execute tasks based on the execution flowchart with added metadata information and determine the execution result of the task processing request.
[0094] The task execution device provided by this invention accurately extracts key task information and constructs a task semantic graph through intent recognition, realizing a structured representation of unstructured task requests and providing a foundation for subsequent automated execution. The execution flowchart constructed based on the task semantic graph not only clarifies the execution dependencies and paths of each node but also provides execution indexes for node execution by adding metadata information, achieving a high degree of automation in task execution and greatly improving the accuracy and efficiency of the automated task execution process.
[0095] In one embodiment, the semantic graph construction module 310 is specifically used for: The process of identifying the intent of the task processing request and extracting multiple key task information includes: The task processing request is input into a multimodal large language model to obtain the intent recognition result output by the multimodal large language model. The multimodal large language model is trained based on the task processing request sample and the intent information label of the task processing request sample. Keyword extraction is performed on the intent recognition results to obtain key information for the multiple tasks.
[0096] In one embodiment, the execution flow determination module 320 is specifically used for: The step of constructing an execution flowchart for the task processing request based on the execution dependencies and execution paths of each node in the task semantic graph includes: Based on graph neural networks, dependency prediction is performed on each node in the task semantic graph to determine the execution dependency of each node in the task semantic graph. Based on the execution dependencies and execution paths of each node in the task semantic graph, a directed acyclic graph of the task processing request is constructed, and the directed acyclic graph is used as the execution flowchart.
[0097] In one embodiment, the execution flow determination module 320 is further specifically used for: The metadata information of the node is determined based on execution index information, interface call information, and task parameter information.
[0098] In one embodiment, the execution flow determination module 320 is further specifically used for: The execution index information is used to schedule the agents used in the task execution process from the multi-agent task execution framework, which is built based on agents with different task processing functions; The interface call information is used to determine the external interfaces called during the task execution process; The task parameter information is used to determine the execution parameters that the task execution process depends on.
[0099] In one embodiment, the execution flow determination module 320 is further specifically used for: The execution flow of a single node in the execution flow diagram with added metadata information includes: Based on the interface call information, determine whether the node needs to call an external interface to execute; If it is determined that an external interface needs to be called, the external interface is called, and the task corresponding to the node is executed based on the execution parameters determined in the task parameter information. If it is determined that no external interface needs to be called, the target agent for the node to be executed is determined from the multi-agent task execution framework based on the node's execution index information, and the target agent is called to execute the task corresponding to the node based on the execution parameters determined in the task parameter information.
[0100] In one embodiment, the execution module 330 is specifically used for: The step of executing the task based on the execution flowchart with added metadata information and determining the execution result of the task processing request further includes: During the task execution process based on the execution flowchart with added metadata information, node feedback information of the node execution process is obtained. The node feedback information includes execution status information, task progress information, upstream and downstream feedback information, and external feedback information. Based on the feedback information from the nodes, the structure of the execution flowchart is adjusted.
[0101] In one embodiment, the execution module 330 is further configured to: After obtaining the node feedback information during the node execution process, the method further includes: If, based on node feedback information, it is determined that the execution flowchart includes abnormal nodes that cannot be completed; Based on the node feedback information of the abnormal node, adjust the metadata information of the abnormal node.
[0102] Figure 4 An example of a physical structure diagram of an electronic device is shown below. Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a task execution method. This method includes: identifying the intent of a task processing request, extracting multiple key task information, and constructing a task semantic graph based on the multiple key task information. The task semantic graph is constructed based on multiple key task information as nodes and semantic associations between the key task information as edges. Based on the execution dependencies and execution paths of each node in the task semantic graph, an execution flowchart for the task processing request is constructed, and metadata information of each node is added to each node in the execution flowchart to obtain an execution flowchart with added metadata information. The metadata information is used as an execution index for the node execution process. The task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
[0103] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the task execution method provided by the above methods, the method including: performing intent recognition on a task processing request, extracting multiple key task information, and constructing a task semantic graph based on the multiple key task information, the task semantic graph being constructed based on multiple key task information as nodes and semantic associations between key task information as edges; Based on the execution dependencies and execution paths of each node in the task semantic graph, an execution flowchart for the task processing request is constructed, and metadata information of each node is added to each node in the execution flowchart to obtain an execution flowchart with added metadata information. The metadata information is used as an execution index for the node execution process. The task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
[0105] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a task execution method provided by the above methods. The method includes: identifying the intent of a task processing request, extracting multiple key task information, and constructing a task semantic graph based on the multiple key task information, wherein the task semantic graph is constructed based on multiple key task information as nodes and semantic associations between key task information as edges. Based on the execution dependencies and execution paths of each node in the task semantic graph, an execution flowchart for the task processing request is constructed, and metadata information of each node is added to each node in the execution flowchart to obtain an execution flowchart with added metadata information. The metadata information is used as an execution index for the node execution process. The task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
[0106] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A task execution method, characterized in that, include: The task processing request is subjected to intent recognition, multiple key task information is extracted, and a task semantic graph is constructed based on the multiple key task information. The task semantic graph is constructed based on multiple key task information as nodes and the semantic associations between the key task information as edges. Based on the execution dependencies and execution paths of each node in the task semantic graph, an execution flowchart for the task processing request is constructed, and metadata information of each node is added to each node in the execution flowchart to obtain an execution flowchart with added metadata information. The metadata information is used as an execution index for the node execution process. The task is executed based on the execution flowchart with added metadata information, and the execution result of the task processing request is determined.
2. The task execution method according to claim 1, characterized in that, The process of identifying the intent of the task processing request and extracting multiple key task information includes: The task processing request is input into a multimodal large language model to obtain the intent recognition result output by the multimodal large language model. The multimodal large language model is trained based on the task processing request sample and the intent information label of the task processing request sample. Keyword extraction is performed on the intent recognition results to obtain key information for the multiple tasks.
3. The task execution method according to claim 1, characterized in that, The step of constructing an execution flowchart for the task processing request based on the execution dependencies and execution paths of each node in the task semantic graph includes: Based on graph neural networks, dependency prediction is performed on each node in the task semantic graph to determine the execution dependency of each node in the task semantic graph. Based on the execution dependencies and execution paths of each node in the task semantic graph, a directed acyclic graph of the task processing request is constructed, and the directed acyclic graph is used as the execution flowchart.
4. The task execution method according to claim 1, characterized in that, The metadata information of the node is determined based on execution index information, interface call information, and task parameter information.
5. The task execution method according to claim 4, characterized in that, The execution index information is used to schedule the agents used in the task execution process from the multi-agent task execution framework, which is built based on agents with different task processing functions; The interface call information is used to determine the external interfaces called during the task execution process; The task parameter information is used to determine the execution parameters that the task execution process depends on.
6. The task execution method according to claim 5, characterized in that, The execution flow of a single node in the execution flow diagram with added metadata information includes: Based on the interface call information in the metadata, determine whether the node needs to call an external interface to execute. If it is determined that an external interface needs to be called, the external interface is called, and the task corresponding to the node is executed based on the execution parameters determined in the task parameter information. If it is determined that no external interface needs to be called, the target agent for the node to be executed is determined from the multi-agent task execution framework based on the node's execution index information, and the target agent in the multi-agent task execution framework is called to execute the task corresponding to the node based on the execution parameters determined in the task parameter information.
7. The task execution method according to claim 1, characterized in that, The step of executing the task based on the execution flowchart with added metadata information and determining the execution result of the task processing request further includes: During the task execution process based on the execution flowchart with added metadata information, node feedback information of the node execution process is obtained. The node feedback information includes execution status information, task progress information, upstream and downstream feedback information, and external feedback information. Based on the feedback information from the nodes, the structure of the execution flowchart is adjusted.
8. The task execution method according to claim 7, characterized in that, After obtaining the node feedback information during the node execution process, the method further includes: If, based on node feedback information, it is determined that the execution flowchart includes abnormal nodes that cannot be completed; Based on the node feedback information of the abnormal node, adjust the metadata information of the abnormal node.
9. A task execution device, characterized in that, include: The semantic graph construction module is used to identify the intent of the task processing request, extract multiple key information of the task, and construct a task semantic graph based on the multiple key information of the task. The task semantic graph is constructed based on multiple key information of the task as nodes and the semantic association between the key information of the task as edges. The execution flow determination module is used to construct the execution flow diagram of the task processing request based on the execution dependency relationship and execution path of each node in the task semantic graph, and add the node's metadata information to each node in the execution flow diagram to obtain the execution flow diagram with added metadata information. The metadata information is used as the execution index of the node execution process. The execution module is used to execute tasks based on the execution flowchart with added metadata information and determine the execution result of the task processing request.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the task execution method as described in any one of claims 1 to 8.
Citation Information
Cited By
AI SRE-oriented operation and maintenance right management and control method and system
CN122226525A