Task processing method, workflow processing method, computing device, storage medium and program product

By generating and executing scripts in the target execution environment to invoke the target tools, the problem of context data bloat is solved, fine-grained control of context data is achieved, and the stability and quality of task processing are improved.

CN122064401APending Publication Date: 2026-05-19HANGZHOU ALIBABA INT INTERNET IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU ALIBABA INT INTERNET IND CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In multi-round, long-term, complex tasks, as the number of interaction rounds increases, the expansion of contextual data leads to diffused model attention, resulting in illusions or ignoring key instructions, thus affecting the quality of task processing.

Method used

By acquiring the context data of the target task, generating the target script using the processing model, executing the script in the target execution environment to call the target tool, and only returning the final tool execution result, the intermediate results are avoided from being directly injected into the context, thus achieving fine-grained control over the context data.

Benefits of technology

It effectively suppresses attention diffusion and hallucination, improves the stability and quality of task processing, and ensures that the model always performs inference based on highly relevant contextual data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064401A_ABST
    Figure CN122064401A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method, a workflow processing method, computing equipment, a computer readable storage medium and a computer program product. The task processing method comprises the steps of obtaining target context data corresponding to a target task; using the first processing model to respond to the target context data, executing a task processing operation, and determining at least one target tool and processing parameters involved in the task processing operation; utilizing the first processing model to generate a target script according to the at least one target tool and the processing parameters; the target script is executed in the target execution environment, so that the target script calls at least one target tool in sequence to execute processing operation for the processing parameters, and a tool execution result is obtained; and continuing to execute the task processing operation by utilizing the first processing model according to the tool execution result. According to the technical scheme provided by the embodiment of the invention, the task processing quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a task processing method, a workflow processing method, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the development of artificial intelligence technology, context engineering has become a core technology for interacting with models. Context engineering uses engineering methods to dynamically and accurately build and provide relevant and high-quality context data for models. Context data typically includes system prompts, task instructions, and historical interaction data, which is generated from multiple rounds of operations performed by the model.

[0003] However, when dealing with complex, long-term tasks with multiple rounds, as the number of interaction rounds increases, historical interaction data continues to accumulate, leading to a continuous expansion of context data. This expansion of context data can cause the model's attention to become diffuse, making it prone to illusions or ignoring key instructions, thus affecting the quality of task processing. Summary of the Invention

[0004] This application provides a task processing method, a workflow processing method, a computing device, a computer-readable storage medium, and a computer program product.

[0005] Firstly, this application provides a task processing method, including: Obtain the target context data corresponding to the target task; The first processing model responds to the target context data, performs task processing operations, and determines at least one target tool and processing parameters involved in the task processing operations. Using the first processing model, a target script is generated based on the at least one target tool and the processing parameters; The target script is executed in the target execution environment, so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and obtains the tool execution result; Based on the results of the tool's execution, the first processing model is used to continue the task processing operation.

[0006] Secondly, this application provides a workflow processing method applied to a target intelligent module, the method comprising: Obtain the target context data corresponding to the workflow processing task; Utilizing a first processing model in response to the target context data, a workflow processing operation is performed, and at least one target tool and processing parameters involved in the workflow processing operation are determined; The first processing model is used to generate a target script based on the at least one target tool and the processing parameters; The target script is executed in a sandbox environment, so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and obtains the tool execution results; Based on the results of the tool's execution, the workflow processing operation is then performed using the first processing model.

[0007] Thirdly, this application provides a task processing method applied to a target intelligent module, the method comprising: Obtain the target context data corresponding to the target task; In response to the target context data, at least one subtask of the target task division is identified; Determine the sub-context data that matches each of the at least one sub-task from the target context data; The sub-intelligent modules corresponding to each of the at least one sub-tasks are invoked to process their respective sub-context data using the second processing model in order to obtain the execution result of at least one sub-task. The first processing model is used to perform task processing operations based on the target context data and the execution results of at least one subtask.

[0008] Fourthly, this application provides a task processing method, including: Obtain the target context data corresponding to the target task; the target context data includes resource identifiers of multiple resources; Utilizing a first processing model in response to the target context data, a task processing operation is performed, and at least one target resource involved in the task processing operation is determined; Retrieve the resource description information of each of the at least one target resource from the stored data; The resource description information of the at least one target resource is loaded into the target context data to update the target context data; The task processing operation continues to be performed using the first processing model in response to the updated target context data.

[0009] Fifthly, this application provides a task processing method, including: Obtain the original context data corresponding to the target task; the original context data includes the first historical interaction data corresponding to the most recent N rounds of operations and the second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations; Extract key interaction data from the second historical interaction data; the amount of key interaction data is less than that of the second historical interaction data. The original context data is compressed based on the key interaction data to obtain the target context data corresponding to the current round of operation of the target task; The first processing model responds to the target context data and performs task processing operations.

[0010] Sixthly, this application provides a computing device, including a processing component and a storage component; The storage component stores a computer program; the computer program is invoked and executed by the processing component to implement the task processing method provided in the first aspect above, or to implement the workflow processing method provided in the second aspect above, or to implement the task processing method provided in the third aspect above, or to implement the task processing method provided in the fourth aspect above, or to implement the task processing method provided in the fifth aspect above.

[0011] In a seventh aspect, this application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processing component, it implements the task processing method provided in the first aspect above, or the workflow processing method provided in the second aspect above, or the task processing method provided in the third aspect above, or the task processing method provided in the fourth aspect above, or the task processing method provided in the fifth aspect above.

[0012] Eighthly, this application provides a computer program product, including a computer program or instructions, which, when executed by a processing component, implement the task processing method provided in the first aspect above, or implement the workflow processing method provided in the second aspect above, or implement the task processing method provided in the third aspect above, or implement the task processing method provided in the fourth aspect above, or implement the task processing method provided in the fifth aspect above.

[0013] In this embodiment, target context data corresponding to the target task is obtained, and a first processing model is used to execute task processing operations in response to the target context data, determining the target tools and processing parameters involved. A target script is then generated based on the target tools and processing parameters. The target script is executed in the target execution environment to sequentially call the target tools to complete processing operations and obtain tool execution results. Finally, the first processing model continues to execute task processing operations based on the tool execution results. This approach decentralizes complex toolchain calls and intermediate data processing to a single execution of the target script in the target execution environment, returning only the final tool execution result to the first processing model. This avoids context pollution and a sharp increase in data volume caused by directly injecting intermediate tool execution results into the context. Through this procedural tool call context governance method, fine-grained control of context data is achieved, isolating large-scale data processing from model inference at the source. This avoids context bloat in multi-round interactions, allowing the first processing model to always perform inference based on context data highly relevant to the target task execution, effectively suppressing attention diffusion and illusion generation, thereby improving task processing quality.

[0014] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0015] 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 This is a system architecture diagram applicable to a practical application of the embodiments of this application; Figure 2 A flowchart of an embodiment of a task processing method provided in this application; Figure 3 A schematic diagram of the structure of the first processing model provided in this application; Figure 4 This is a flowchart illustrating the interaction process of tool calls in related technologies; Figure 5 An interactive flowchart of the task processing method provided in the embodiments of this application; Figure 6 A flowchart of an embodiment of a workflow processing method provided in this application; Figure 7 A flowchart of another embodiment of a task processing method provided in this application; Figure 8 A flowchart of another embodiment of a task processing method provided in this application; Figure 9A flowchart of another embodiment of a task processing method provided in this application; Figure 10 A schematic diagram of the structure of one embodiment of a task processing device provided in this application; Figure 11 A schematic diagram of the structure of one embodiment of a workflow processing apparatus provided in this application; Figure 12 A schematic diagram of another embodiment of a task processing apparatus provided in this application; Figure 13 A schematic diagram of another embodiment of a task processing apparatus provided in this application; Figure 14 A schematic diagram of another embodiment of a task processing apparatus provided in this application; Figure 15 A schematic diagram of the structure of a computing device provided in this application. Detailed Implementation

[0016] 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.

[0017] 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.

[0018] The technical solutions of this application embodiment can be applied to task processing scenarios based on artificial intelligence models.

[0019] As described in the background section, as the number of interaction rounds increases, the context data input to the model will continue to expand. However, the amount of data that the model can process is limited. Excessive context data will lead to higher inference costs, greater latency, and noise interference, ultimately affecting the model's processing performance and causing poor task processing quality.

[0020] In the process of developing this application, the inventors discovered that the continuous expansion of context data is due to two main reasons. First, with numerous interaction rounds, historical interaction data accumulates within the context data. Second, current model task processing often leverages the Model Context Protocol (MCP) to access numerous tools, enhancing their capabilities. Tools typically refer to external computing resources, such as interfaces or components, that can be invoked by the model to perform corresponding operations. To facilitate tool invocation, it's often necessary to configure tool descriptions for all tools in the system prompts. Furthermore, the execution results returned by each tool also need to be exposed to the model as historical interaction data. Additionally, when processing tasks, the model often loads the required external data into the context data. A large volume of this external data also contributes to the context data expansion.

[0021] Taking workflow processing as an example, there is an increasing number of visual orchestration tools available for workflow orchestration. These tools provide a visual interface for editing the elements that make up the workflow. These elements can include nodes or edges, where nodes encapsulate operations and edges define the execution order between nodes. To facilitate workflow generation, debugging, or rewriting, these tools can integrate intelligent plugins. These plugins automatically generate, debug, or rewrite workflows based on user-input natural language task instructions using an AI model. In workflow processing scenarios, tasks such as workflow debugging or rewriting require loading workflow data into context data. However, workflow data often contains hundreds of nodes and edges, resulting in a massive amount of data that can quickly exhaust the model's processing capacity, severely compressing the inference space. Furthermore, if the model needs to access numerous tools (such as node queries, model downloads, and canvas operations) via MCP, directly exposing all tool descriptions and return results to the LLM would cause "definition explosion + intermediate result pollution," leading to a rapid loss of context control. Furthermore, workflow debugging tasks often require a long process of "error reporting → analysis → partial repair → re-running". Historical interaction data (including tool execution results, etc.) accumulates continuously, making it easy to lose the initial constraints or key clues of the model, ignore the latest instructions or key states, and produce illusory responses that are irrelevant to the task. As a result, the intelligent plugin is ultimately unable to handle the fine control of complex graphical workflows, which ultimately affects the quality of workflow processing.

[0022] To ensure model processing effectiveness and improve task processing instructions, the inventors, after a series of studies, proposed the technical solution of this application embodiment. In this embodiment, by acquiring target context data corresponding to the target task, a first processing model responds to the target context data to execute task processing operations and determines the target tools and processing parameters involved; then, a target script is generated based on the target tools and processing parameters; the target script is executed in the target execution environment to sequentially call target tools to complete processing operations and obtain tool execution results; finally, the first processing model continues to execute task processing operations based on the tool execution results. This approach decentralizes complex toolchain calls and large-scale intermediate data processing to a single execution of the target script in the target execution environment, returning only the final tool execution result to the first processing model. This avoids rapid context pollution and a sharp increase in tokens caused by directly injecting intermediate tool execution results into the context. Through this programmatic tool call context governance method, fine-grained control of context data is achieved, isolating large-scale data processing processes from model inference from the source, avoiding context bloat in multi-round interactions, and ensuring that the model always infers based on context data strongly related to the target task processing. This effectively suppresses attention diffusion and illusion generation, thereby improving the stability and quality of long-term complex task processing.

[0023] Figure 1 This is a system architecture diagram applicable to a practical application of the embodiments of this application, such as... Figure 1 As shown, the system architecture can consist of a client 101 and a server 102. The server 102 can deploy at least one intelligent module, such as the target intelligent module or at least one sub-intelligent module interacting with the target intelligent module as described in the corresponding embodiments below. An intelligent module can refer to an agent system based on an Artificial Intelligence (AI) model, capable of performing task processing. It can perceive the environment, set goals, plan actions, invoke tools, execute responses, and reflect on its own actions to achieve task processing. In practical applications, this intelligent module can be an AI Agent.

[0024] In this system, client 101 and server 102 can establish a connection via a network. The network provides a communication link between client 101 and server 102. The network can include various connection types, such as wired, wireless, or fiber optic cables. Client 101 can interact with server 102 via the network to receive or send messages, such as sensing user input, providing user-inputted task instructions to server 102, and displaying task processing results from server 102.

[0025] The client 101 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5) application, or a mini-program (also known as a lightweight application) or a cloud application. The client 101 can be deployed on electronic devices and needs to rely on the device to run or some apps on the device to run.

[0026] In practical applications, such as in workflow processing scenarios, this client 101 can also be deployed as a smart plugin in visual orchestration tools, etc.

[0027] The server 102 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0028] It should be understood that Figure 1 The number of client and server instances shown is merely illustrative. Depending on implementation needs, there can be any number of client and server instances.

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] The implementation details of the technical solutions in the embodiments of this application are described in detail below.

[0031] Figure 2 This is a flowchart of an embodiment of a task processing method provided in this application. The task processing method can be executed by a server, specifically by a target intelligent module running on the server. Figure 2 The task processing method shown may include the following steps: 201: Obtain the target context data corresponding to the target task.

[0032] 202: Utilize the first processing model in response to target context data to perform task processing operations and determine at least one target tool and processing parameters involved in the task processing operations.

[0033] The target task can include specific tasks initiated by the client that need to be processed by an artificial intelligence model. For example, in a workflow processing scenario, the target task can include workflow generation, debugging, or rewriting tasks.

[0034] Target context data can include a set of input information that provides the foundation for the AI ​​model to process tasks, such as system prompts and task instructions; it can also include multi-round historical interaction data. System prompts can be used to define the AI ​​model's role and behavioral norms, for example, instructing the AI ​​model to act as a task execution assistant for reasoning; task instructions can refer to a specific description of the target task, usually expressing the user's intent in natural language; historical interaction data can include, for example, historical task instructions from each round, historical task processing results, and tool call logs (such as tool call records and tool execution results).

[0035] In embodiments of this application, target context data can be loaded from storage media or memory.

[0036] After obtaining the target context data, the first processing model can be used to respond to the target context data, perform task processing operations, and determine at least one target tool and processing parameters involved in the task processing operations.

[0037] The first processing model can be an artificial intelligence-based language model (LM) or a multimodal model (MIM), etc. The embodiments of this application do not limit the number of model parameters supported by the model, with the goal of meeting actual needs.

[0038] In one optional implementation, such as Figure 3As shown, the first processing model may include, for example, an input layer (Input) 10, an encoder (Encoder) 20, a decoder (Decoder) 30, and an output layer (Output) 40. It may also include a self-attention layer and a feed-forward neural network, etc., which are not limited in this application. The input layer is used to receive data input. In this embodiment, the input layer can receive target context data as data input. The encoder is mainly used to convert the input data (usually in sequence form) into a vector representation. This process can capture the semantic features of the input data. The decoder is responsible for converting the intermediate representation generated by the encoder into output data (usually in sequence form). The output layer is used to output data, such as the task execution result. A self-attention layer is a mechanism that allows the model to pay attention to other positions in the sequence to better encode the current position information. The feed-forward neural network can perform nonlinear transformations on the output of the self-attention layer to enhance the model's expressive power. The various parts work together, enabling the model built upon them to perform well in various complex processing tasks, such as natural language processing, computer vision, speech recognition, machine translation, text summarization, and intelligent question answering.

[0039] In embodiments of this application, the first processing model can respond to target context data and parse system prompts, task instructions, etc., based on its semantic understanding capabilities, thereby performing task processing operations, such as identifying task requirements and formulating an execution plan. During the execution of the task processing operation, the first processing model can further determine at least one target tool involved in the task processing operation and its corresponding processing parameters.

[0040] Here, the target tool can refer to a predefined externally callable resource used to perform specific operations that the first processing model itself cannot directly complete, such as a data query interface, a calculation function, or an external API; the processing parameters can refer to the input information required by the target tool, such as parameter values ​​and configuration options. The first processing model can infer at least one target tool and its processing parameters required to perform the target task from the target context data. For example, when the task involves data processing, it can determine to use a data analysis tool and specify the input dataset as the processing parameters.

[0041] 203: Using the first processing model, generate a target script based on at least one target tool and processing parameters.

[0042] The target script can be program code generated by the first processing model and runnable in the target execution environment. The target script can be written in a scripting language, such as Python script or other similar executable code. Its main function is to organize the tool calling logic involved in the task processing operation into a complete, sequentially executed program, thereby realizing the batch and orderly calling of at least one target tool.

[0043] In one implementation of this application, the system prompt data of the target context data may include the tool definition of all tools, i.e., tool description information, which may include the tool's name, function description, input parameter format, output structure, and calling convention, etc.

[0044] The first processing model can, based on the tool description information and processing parameters of at least one target tool, utilize its code generation capabilities to transform the call requirements for at least one target tool into a script structure, thereby generating a target script. For example, the target script can contain function declarations for tool calls, parameter assignments, and control logic for the call order. Processing parameters can be embedded in the target script as input data, such as function parameter values ​​or variable assignments, while the target tool can correspond to specific call statements within the script.

[0045] 204: Execute the target script in the target execution environment so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters and obtain the tool execution results.

[0046] The target execution environment refers to the environment used to run the target script. This environment can be an isolated environment, such as a sandbox container or a virtual machine. By executing the target script in the target execution environment, the execution of the target script can be prevented from affecting the first processing model.

[0047] In the embodiments of this application, after the target script is generated, it can be submitted to the target execution environment for execution. The target script can sequentially call at least one target tool in the order of invocation. When each target tool is called, it can receive processing parameters as input to guide the tool in performing specific processing operations.

[0048] In one implementation, as the target script is executed step by step, each target tool will generate intermediate output results after completing its own operation in the target execution environment. The aforementioned tool execution results may refer to the final summary result generated by summarizing multiple intermediate output results in the target execution environment after the target script runs as a whole, and the tool result obtained from the final summary will be output.

[0049] In another implementation, the target script calls at least one target tool in a predetermined calling order. The processing parameters can be used as input parameters for the first called target tool, and the execution result of the first target tool is used as an intermediate execution result to determine or as input parameters for the next target tool, and so on, until the last target tool completes its operation. The final tool execution result can be the execution result of the last target tool, while the intermediate execution results only circulate in the target execution environment and are not passed through to the first processing model.

[0050] 205: Based on the tool's execution results, continue to perform task processing operations using the first processing model.

[0051] In embodiments of this application, the first processing model can integrate the tool execution results into the current target context data and continue task processing operations using the updated target context data. For example, the first processing model can parse the tool execution results, such as analyzing the task progress, success indicators, or potential problems reflected in the tool execution results, and then generate the next action accordingly, such as outputting the final task answer or proposing further optimization suggestions.

[0052] The following describes the tool invocation method in the task processing method provided in the embodiments of this application, in conjunction with the tool invocation methods in related technologies.

[0053] Figure 4 This is a flowchart illustrating the interaction process of tool calls in related technologies. Figure 4 In this example, we will take workflow debugging as an example. In workflow debugging, artificial intelligence models can be integrated into visual orchestration tools as intelligent plugins.

[0054] like Figure 4As shown, tool invocation methods in related technologies typically employ a multi-round interaction model. In this model, the smart plugin interacts directly with external tools through successive tool calls. Taking checking the status of all nodes in a workflow as an example, the smart plugin first determines that all nodes need to be checked (401), and then obtains the complete large JSON containing 1000 nodes returned by the tool by calling the get_nodes() tool (402) (403), causing the context token to rise sharply. Subsequently, the smart plugin needs to analyze the JSON in the bloated context and decide on the next step, such as repeatedly calling check_status(node_i) to check the status of each node. This process requires multiple round-trips: each time a tool is called, the return is waited for, the result is analyzed, and the next call is planned. Since the intermediate results returned in each round (such as detailed node JSON or status logs) are directly injected into the context, and the loop logic is controlled sequentially by the smart plugin, the multi-round interaction overhead is large and the context is quickly polluted.

[0055] In order to solve Figure 4 The technical problems with the tool invocation method shown are as follows: Figure 5 An interactive flowchart of the task processing method provided in an embodiment of this application is shown. Figure 5 The tool invocation method provided in this application embodiment can be illustrated by taking a workflow debugging scenario as an example. In the workflow debugging scenario, the first processing model can be integrated into the visual orchestration tool in the form of an intelligent plugin.

[0056] The task processing method provided in this application submits a complex toolchain to the target execution environment for execution, and completes batch processing with only one target script submission, thereby greatly optimizing context governance and execution efficiency.

[0057] like Figure 5 As shown, the smart plugin does not directly call the tool, but generates the target script (501) based on at least one target tool and processing parameters.

[0058] Subsequently, the target script can be submitted to the target execution environment (502) for execution. The target script can then sequentially call at least one target tool to perform processing operations on the processing parameters, obtaining the tool execution results. The target script calls the target tool (e.g., get_nodes() Local Call) (503), and large-scale intermediate data (e.g., a complete JSON containing 1000 nodes) circulates only within the target execution environment (Large JSON InMemory) (504), ultimately generating the tool execution results.

[0059] from Figure 5It can be seen that the tool invocation process only requires a single interaction (1 Turn), and the invocation and execution logic of the target tool are completed entirely within the target execution environment.

[0060] Finally, the smart plugin directly obtains the final tool execution result (505) and can continue to perform task processing operations based on the tool execution result.

[0061] In this embodiment, by acquiring the target context data corresponding to the target task, a first processing model is used to execute task processing operations in response to the target context data, and the target tools and processing parameters involved are determined. Then, a target script is generated based on the target tools and processing parameters. The target script is executed in the target execution environment to sequentially call the target tools to complete the processing operations and obtain the tool execution results. Finally, the first processing model continues to execute task processing operations based on the tool execution results. This approach decentralizes complex toolchain calls and large-scale intermediate data processing to a single execution of the target script in the target execution environment, returning only the final tool execution result to the first processing model. This avoids rapid context pollution and a sharp increase in tokens caused by directly injecting intermediate tool execution results into the context. Through this programmatic tool call context governance method, fine-grained control of context data is achieved, isolating large-scale data processing from model inference from the source. This avoids context expansion in multi-round interactions, ensuring that the model always performs inference based on high-density, relevant context, effectively suppressing attention diffusion and illusion generation, thereby improving the stability and quality of task processing.

[0062] In some embodiments, executing a target script in a target execution environment, so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters, and obtaining the tool execution results can be specifically implemented as follows: The target script is executed in the target execution environment, so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters, and generates tool execution results according to at least one data field specified by the first data structure.

[0063] The first data structure can be a predefined output specification format, which can be used to constrain the structure and content of the tool's execution results. The first data structure can be implemented as a JSON object template, a dictionary structure, or a similar data description language. Its function is to specify at least one data field that the tool's execution results must include or are allowed to include, thereby ensuring the conciseness and relevance of the returned information. These data fields can include necessary information such as key status indicators, summary metrics, error summaries, or decision recommendations, while excluding unnecessary intermediate result data or detailed logs.

[0064] In the embodiments of this application, after executing the target script in the target execution environment, at least one intermediate output result corresponding to each target tool can be obtained. Then, according to at least one data field specified by the first data structure, the corresponding field content is extracted from at least one intermediate output result to generate the tool execution result.

[0065] In the embodiments of this application, by compressing the tool execution results into information containing only the fields necessary for decision-making according to the first data structure, not only is the size of the returned data reduced, and the amount of context data is further reduced, but the efficiency and accuracy of subsequent interpretation by the first processing model are also improved.

[0066] In some embodiments, determining at least one target tool involved in a task processing operation can specifically be implemented by: determining, from the target context data, at least one target tool involved in the task processing operation, the invocation order of at least one target tool, processing parameters, and a first data structure.

[0067] The order of invocation can refer to the sequential relationship between at least one target tool during execution.

[0068] In some embodiments, generating a target script using a first processing model based on at least one target tool and processing parameters can be specifically implemented as follows: using the first processing model, generating a target script based on at least one target tool, a calling order, processing parameters, and a first data structure; the calling order is used for the target script to call at least one target tool sequentially, and the processing parameters are used as input parameters for the first called target tool.

[0069] In embodiments of this application, the first processing model, by parsing the target context data, can not only identify at least one required target tool and its corresponding processing parameters, but also further determine the calling order of at least one target tool and a first data structure. For example, the first processing model can infer the dependencies between tools based on the semantics of the task instructions, thereby determining the calling order; for instance, in scenarios requiring multi-step processing, the data acquisition tool is executed first, followed by the calculation tool.

[0070] In the process of generating the target script using the first processing model, the calling order can be transformed into the script's execution control logic, and the processing parameters can be used as the initial input of the target script, such as being assigned to the calling parameters of the first target tool, thereby starting the entire tool calling chain; the first data structure can be used to filter the intermediate result data of at least one target tool to obtain a simplified tool execution result; or, the first data structure can be used to filter the execution result of the last target tool in the calling order to obtain the tool execution result.

[0071] The way this tool generates execution results ensures that the target script can not only call the tool correctly and orderly, but also takes into account parameter passing and result standardization, thus ensuring the continuity of the execution process and the consistency of the output.

[0072] In some embodiments, the method may further include: in response to target context data, identifying at least one subtask of the target task division; determining subcontext data matching each of the at least one subtask from the target context data; and invoking the sub-intelligent modules corresponding to each of the at least one subtask to process their respective subcontext data using a second processing model to obtain the execution result of at least one subtask.

[0073] In the embodiments of this application, the target intelligence module can analyze the target task to determine that the target task can be divided into at least one subtask. The subtask can be a task decomposed from the overall target task; for example, in a workflow processing scenario, the target task can be broken down into subtasks such as error analysis and repair, and structure rewriting.

[0074] Sub-context data can refer to context data that is highly related to a specific subtask and is extracted from the overall target context data. This sub-context data may include, for example, task instructions, necessary status data and related prompts for the subtask, while excluding content that is unrelated to other subtasks.

[0075] By defining corresponding sub-context data for subtasks, we can ensure that the processing environment of each subtask is more focused and lightweight. For example, by filtering or reorganizing, matching parts can be selected from the original context data, thereby avoiding redundant transmission of the overall context.

[0076] Subsequently, at least one sub-intelligent module corresponding to each sub-task can be invoked to process the respective sub-context data using the second processing model in order to obtain the execution result of at least one sub-task.

[0077] Here, a sub-intelligent module refers to an intelligent module specifically designed for a particular type of sub-task, whose function is to focus on processing a certain type of task. The second processing model can be implemented as the same model as the first processing model, or it can be implemented as a different model than the first processing model.

[0078] The target intelligence module can pass sub-context data to the corresponding sub-intelligence module so that the second processing model can perform corresponding processing operations in response to the sub-context data, such as inference, tool invocation or result generation, and finally obtain the sub-task execution result corresponding to each sub-task. The sub-task execution result can be a structured output or an intermediate state summary.

[0079] In some embodiments, the process of continuing to perform task processing operations based on the tool's execution result using the first processing model can be specifically implemented as follows: Based on the execution results of at least one subtask and the tool execution results, the task processing operation is continued using the first processing model.

[0080] In the embodiments of this application, the first processing model can integrate the execution results of at least one subtask and the execution results of the tool into the current target context data, and continue to perform task processing operations using the updated target context data.

[0081] Therefore, the reasoning ability of the first processing model can be fully utilized to determine that the execution results of subtasks and the execution results of tools are coordinated and invoked, so as to perform subsequent processing operations more accurately.

[0082] In some embodiments, determining the task instruction matching at least one subtask from the target context data can be specifically implemented as follows: For any subtask, a data filter is used to filter the target context data to remove historical interaction data. Then, from the removed target context data, the subcontext data that matches the task description information of the corresponding sub-intelligent module is determined.

[0083] The data filter can be a processing component used to filter target context data. This processing component can remove redundant information in the target context data that is not related to the current subtask, i.e., historical interaction data, thereby reducing data noise and reducing the amount of context data.

[0084] The data filter can be implemented in a hard-coded manner, such as a predefined filtering script, which automatically performs data filtering operations based on preset rules; or it can be implemented as a callable tool, such as a function module or interface, to support more flexible configuration and dynamic adjustment.

[0085] In embodiments of this application, for any subtask, the data filter can be used to filter the target context data. For example, in one possible implementation, the data filter can identify and remove historical interaction data to prevent this content from interfering with the processing of the subtask. The target context data obtained after removal can be more concise intermediate data, and then matching parts can be extracted from this intermediate set according to the task description information of the sub-intelligent module corresponding to the subtask. The task description information can refer to predefined normative content describing the functions and processing scope of the sub-intelligent module, such as role descriptions and input requirements indicating that the module is good at "data analysis" or "error diagnosis". This matching process can be based on semantic relevance or rule matching, for example, prioritizing the retention of task instructions, state variables, or background data that are highly consistent with the task description information, thereby generating sub-context data.

[0086] Through the targeted data filtering operations described above, context isolation and information simplification can be achieved for each sub-intelligent module. Each sub-intelligent module only receives context data highly relevant to its task execution, enhancing the targeting of its processing. Furthermore, since the target intelligent module only needs to perform intent recognition and task distribution based on data filtering, without needing to maintain context data during the execution of sub-tasks, the risk of context bloat for the target intelligent module is reduced.

[0087] In some embodiments, in response to target context data, identifying at least one subtask of the target task division can specifically be implemented by: performing intent recognition on the task instructions of the target task in the context data to determine at least one subtask.

[0088] In the embodiments of this application, an artificial intelligence model can be used to perform semantic understanding of task instructions expressed in natural language to achieve intent recognition. The artificial intelligence model for achieving intent recognition can be implemented as a first processing model, but is not limited to this; it can also be implemented by an independent intent recognition model.

[0089] In the embodiments of this application, the artificial intelligence model can be used to parse task instructions, and then its reasoning ability can be used to identify at least one subtask that the target task can be divided into. For example, the target task can be a comprehensive task, and the corresponding subtasks can include data preparation tasks, analysis and calculation tasks, result verification tasks, etc.

[0090] By recognizing the intent of task instructions, the target task can be intelligently decomposed, thus providing a clear division of labor for subsequent multi-agent collaboration and improving the structuring and efficiency of complex task processing.

[0091] In some embodiments, calling the sub-intelligent module corresponding to each subtask to process its respective sub-context data using the second processing model to obtain the execution result of at least one subtask can be specifically implemented as follows: for any subtask, calling the sub-intelligent module corresponding to the subtask to process the sub-context data corresponding to the subtask using the second processing model, and obtaining the execution result of the subtask according to at least one data field specified by the second data structure corresponding to the subtask.

[0092] The second data structure can refer to the output specification predefined for a specific subtask or sub-intelligent module, which is used to constrain the composition and content of the subtask execution result.

[0093] The second data structure can be implemented in the form of a structured data template, such as a JSON object or a dictionary schema. Its purpose is to specify at least one required data field in the subtask execution result. These data fields may include, for example, error type identifiers, key object references, status snapshots or summary metrics, while excluding redundant detailed logs or complete historical records.

[0094] In embodiments of this application, after performing inference based on sub-context data, the second processing model can generate inference results according to the requirements of the second data structure. For example, the second data structure can be a JSON object in the form of EscalationData, which contains predefined fields such as {error_type, node_id, workflow_snapshot_id}, used to efficiently transmit task status, such as error type (error_type), related node identifier (node_id), and workflow snapshot identifier (workflow_snapshot_id), rather than transparently transmitting the complete dialogue history or intermediate details.

[0095] This structured delivery method ensures that the results are highly condensed, retaining only the state information necessary for collaboration, thereby avoiding context pollution and improving the efficiency of interaction between agents.

[0096] In some embodiments, determining at least one target tool involved in a task processing operation can specifically be implemented as follows: based on target context data, identifying the operation object involved in the task processing operation; searching for at least one candidate tool that matches the object type of the operation object; and from at least one candidate tool, determining at least one target tool that matches the target context data based on tool description information.

[0097] The operation object can refer to a specific entity or data element that needs to be processed in the task processing operation. For example, in a workflow processing task, the operation object can be a node, a connection, a canvas structure, etc.

[0098] The object type can refer to the category attribute corresponding to the operation object, which is used to describe the category of the operation object, such as node type, connection type, canvas structure type, etc.

[0099] Tool description information can refer to predefined information used to describe the function of a tool. For example, it may include tool identifier (i.e., tool name), function description information (tool purpose and applicable scenarios expressed in natural language), parameter specification information (type and format of input parameters and structure of output parameters, etc.). Its purpose is to provide a reference for tool selection for the first processing model.

[0100] In embodiments of this application, the first processing model can first identify the operation objects involved in the task processing operation based on the target context data. For example, by semantic parsing of the target task instructions, it can extract implicit or explicit entities from the target task instructions, such as identifying the specific object to be queried or edited from the natural language description. Subsequently, the first processing model can search for at least one candidate tool that matches the object type of the operation object. Here, candidate tools refer to a preliminarily selected set of potentially available tools.

[0101] To facilitate quick location, each tool can be standardized in name according to the object type of the object it operates on, such as by using a specific prefix. For example, the prefix "node_query_" indicates a tool for querying nodes, or the prefix "workflow_edit_" indicates a tool for editing workflows. This naming convention helps to narrow the search scope and improve matching efficiency.

[0102] Based on this, the final target tool can be determined from the candidate tools according to the tool description information. For example, the first processing model can compare the relevance of the tool description information with the target context data, such as matching the semantic consistency between the tool's functional description information and parameter specification information and the target task instructions. The target task instructions can be user input instructions from the current round, such as directly expressed natural language requirements, or intermediate instructions generated by the first processing model based on the previous round of task processing operations, such as sub-target descriptions generated by the previous round of inference. Through this semantic matching or keyword association method, at least one target tool that meets the current task requirements can be selected, ensuring that the selected tool is both type-matched and functionally adapted, thus improving the accuracy and efficiency of tool selection.

[0103] In some embodiments, determining at least one target tool involved in a task processing operation can specifically be implemented as: determining at least one first tool required for the task processing operation; and determining at least one target tool from the at least one first tool to implement a predetermined type of operation.

[0104] The first tool can be an available tool identified during the task processing operation.

[0105] Predefined type operations can include a class of task operations with specific execution attributes. These operations are suitable for batch or programmatic processing to avoid frequent interactions. For example, predefined type operations can include deterministic operations, which refer to operations that produce identical outputs given the same input conditions, and whose behavior is predictable and reproducible. Examples include pure logical processing that does not involve randomness or additional reasoning, such as data sorting operations (e.g., sorting a list in ascending order according to fixed rules, resulting in the same result each time the same list is input), filtering operations (e.g., filtering a dataset according to defined criteria, returning the same subset each time the same input is input), and other operations such as pagination, aggregation, and conditional numerators.

[0106] The first processing model can first determine at least one primary tool required for the task processing operation based on the target context data, for example, by semantically parsing the task instructions to identify all possible tool candidates. Subsequently, the first processing model can further filter from these primary tools to select at least one target tool that implements the predetermined type of operation. For example, the first processing model can evaluate the functional characteristics of each primary tool, such as determining whether it is primarily used to perform deterministic operations, thereby selecting the target tool. This filtering process can be based on predefined attributes of the tool or contextual inference; for example, tools involving loop traversal, conditional judgments, or data transformations can be marked as target tools, while tools requiring deep model inference can be reserved for other processing paths.

[0107] By differentiating the execution characteristics of tools, task planning can be optimized, allowing specific types of operations to be submitted to the target tool for processing. This saves computational resources of the first processing model and further reduces the context.

[0108] In some embodiments, the target context data includes tool identifiers for multiple tools; After determining at least one first tool required for the task processing operation as described above, the method may further include: Based on the tool identifier of at least one first tool, retrieve the tool description information of each of the at least one first tool from the stored data; load the tool description information of the at least one first tool into the target context data to update the target context data.

[0109] In embodiments of this application, the target context data may include tool identifiers for multiple tools. Each tool identifier is a unique identifier for each tool, which may exist in string form, such as a tool name or coded ID. Its purpose is to concisely reference the tool without directly carrying complete tool details. Initially, the target context data only contains these tool identifiers, such as multiple tool identifiers matching the current task or target intelligence module, thereby avoiding loading the complete definitions of all tools at once.

[0110] The tool description information refers to the pre-stored information that details the function of the tool. This tool description information may include a description of the tool's function (the purpose and applicable scenarios expressed in natural language), parameter specifications (the definition of input and output types), and other calling guidelines, such as execution constraints or example usage. It is stored in a separate database or repository to support dynamic access.

[0111] After the first processing model determines at least one first tool required for the task, it can invoke the tool search component and retrieve the corresponding tool description information from the stored data based on the identifiers of these tools.

[0112] The tool search component can be a dedicated retrieval module or function that can quickly locate and obtain tool description information through identifier matching, such as achieving efficient searching based on indexes or query interfaces.

[0113] Subsequently, the retrieved tool description information can be injected into the current target context data for updating, for example by appending or replacing to expand the context content, so that the first processing model can fully refer to these details in subsequent inference without having to carry all possible tool definitions from the beginning.

[0114] Based on this, the target context can maintain only a lightweight list of tool identifiers, while detailed tool descriptions can be introduced only when explicitly needed by the task. This effectively controls the size of the context data and improves scalability and inference efficiency. Furthermore, each sub-intelligent module only loads a set of tool identifiers highly relevant to its function. For example, a debugging-specific sub-intelligent module only includes identifiers for diagnostic and repair tools, without loading style recommendation or domain-irrelevant tool identifiers. This fundamentally reduces the volume of tool definitions in the context data, ensuring that the initial context remains concise and highly relevant.

[0115] In some embodiments, obtaining the target context data corresponding to the target task can be specifically implemented as follows: Obtain the original context data corresponding to the target task; the original context data includes historical interaction data, which includes the first historical interaction data corresponding to the most recent N rounds of operations and the second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations; extract key interaction data from the second historical interaction data; the data volume of the key interaction data is less than that of the second historical interaction data; compress the original context data based on the key interaction data to obtain the target context data corresponding to the current round of operations of the target task.

[0116] In the embodiments of this application, the original context data may refer to the complete set of input information corresponding to the target task. The set of input information may include system prompts, current task instructions, and accumulated historical interaction data, etc., to provide the model with a comprehensive reasoning background.

[0117] Historical interaction data can refer to records generated by historical rounds of operations, such as model output, tool call results, or intermediate state logs. The first historical interaction data corresponds to the most recent records of the last N rounds of operations (N is a preset positive integer), and these records can be retained due to their high timeliness. The second historical interaction data corresponds to older records from earlier rounds, which are usually larger in volume and have relatively low relevance to the target task being executed.

[0118] Key interaction data can refer to key information extracted from the second historical interaction data. The amount of this key information is significantly smaller than the original second historical interaction data. Its role is to preserve the core elements of task continuity. For example, it may include the first user instruction (as an initial intention anchor point to prevent early goals from being forgotten) and a summary or key fragments of the most recent N rounds of interaction.

[0119] In the embodiments of this application, raw context data is first obtained, for example, it can be loaded from memory, storage, or dialogue history. Then, an extraction operation is performed on the second historical interaction data, such as through rule filtering or model-assisted summarization, retaining only high-value information to form key interaction data. This extraction process ensures effective reduction of data volume while maintaining key clues for the task. Based on this, a compression operation is performed, for example, combining and recombining the key interaction data with system prompts, current task instructions, and the first historical interaction data to form the target context data for the current round. This data serves as a simplified input for model inference.

[0120] Based on this, intelligent compression of historical context data can ensure that the context data remains continuous and focused in multi-round task processing, while controlling the size of the context data to avoid the processing burden caused by its expansion.

[0121] In some embodiments, the raw context data also includes system prompt data and target task instructions corresponding to the current round of operations.

[0122] The system prompt data can be pre-defined guiding information used to define the roles, behavioral norms, and overall reasoning principles of the first processing model. This system prompt data can be in the form of natural language prompts, for example.

[0123] The target task instruction can refer to the specific task description in the current round of operation. It can be expressed in natural language, such as expressing clear operational requirements or target intentions. Its role is to provide direct driving signals for the reasoning in this round.

[0124] In some embodiments, compressing the original context data based on key interaction data to obtain the target context data corresponding to the current round of operations for the target task can be specifically implemented as follows: Based on system prompt data, the first historical task instruction in the second historical interaction data, the target task instruction, the first historical interaction data, and key interaction data, construct the target context data for the current round of operations.

[0125] In the embodiments of this application, system prompt data can be retained intact as the basic framework to maintain the role consistency of the first processing model; simultaneously, the first historical task instruction in the second historical interaction data is extracted as a long-term anchor point to ensure that the original direction of the task is not lost; the current target task instruction is directly incorporated to reflect the latest requirements of this round; the first historical interaction data is retained completely or preferentially due to its recent relevance; key interaction data serves as a condensed supplement to earlier history, such as a summary of status or key event records. This data can be combined into new target context data, for example, arranged logically as system prompts, anchor instructions, key interaction summaries, recent interactions, and current task instructions, thereby achieving a significant reduction in data volume while maintaining task continuity and the integrity of key information.

[0126] By compressing the context data, the first processing model can perform reliable inference based on high-density, focused target context data. This helps alleviate the attention diffusion problem in long-term tasks and improves the overall processing stability.

[0127] In some embodiments, extracting key interaction data from the second historical interaction data can be specifically implemented as follows: Determine whether the original context data has reached the preset data length. If so, use the information generation model to generate key interaction data based on the second historical interaction data.

[0128] The preset data length can be measured by metrics such as the number of tokens (the basic word segmentation units used by the model when processing natural language text), message rounds, or data byte size, serving as a criterion for triggering compression to prevent excessive context expansion. For example, the number of tokens can be set to an upper limit of 80% of the model's context window; the number of message rounds refers to the number of complete round trips during a dialogue, usually calculated in units of "one round," such as when a user enters a message and receives a response from the model, which counts as one round. Based on this, the context size can be assessed by counting the number of message rounds in the original context data, for example, with a preset threshold of 20 rounds (i.e., if more than 20 rounds of interaction are exceeded, key interaction data generation is triggered); the data byte size refers to the storage volume of the original context data, which can be calculated in bytes (Byte). The preset data length can be set to, for example, several megabytes (MB). If the storage volume of the original context data exceeds the preset data length, the information generation model can be used to generate key interaction data based on the second historical interaction data.

[0129] Information generation models can be auxiliary artificial intelligence models specifically designed for text summarization or information extraction. These models can be lightweight pre-trained models with low computational cost and strong context processing capabilities, such as large language models with a small parameter scale or dedicated summarization generators, thereby efficiently generating condensed outputs while retaining the essential content of the original information.

[0130] In the embodiments of this application, a threshold judgment can first be performed, such as assessing the overall length of the original context data or focusing on assessing the cumulative scale of historical interaction data to determine whether a preset data length has been reached. If the judgment result is negative, the second historical interaction data can be directly retained without further extraction; if the judgment result is positive, an information generation model can be used to process the second historical interaction data. This information generation model can generate key interaction data based on the input of the second historical interaction data, such as extracting high-value summary content through summary generation technology. This summary content typically includes a task status summary, a set of unresolved issues, and a brief record of key events or decisions, thereby achieving significant data compression while ensuring that the core clues of the task are not lost.

[0131] In embodiments of this application, to further enhance the professionalism and decision-making quality of the first processing model in specific task scenarios, some embodiments may further include: Domain knowledge related to the target task is encapsulated to generate skills in order to build a knowledge base.

[0132] The target context data includes skill identifiers for multiple skills.

[0133] Skills can be reusable and callable units that encapsulate domain knowledge. Skills can exist as independent modules and function to transform scattered expert experience into standardized and searchable resources, such as detailed guidance descriptions, parameter templates, or executable fragments, so that the first processing model can call them on demand during task processing.

[0134] Domain knowledge can refer to the professional knowledge or experience data accumulated in a specific field.

[0135] The process of encapsulating and generating skills can involve organizing these domain knowledge units into independent skill units, along with metadata such as skill names, descriptions of applicable scenarios, and prerequisites. This metadata is used for subsequent matching and retrieval. When building a knowledge base, these skill units are stored in independent resource repositories, forming a scalable knowledge collection.

[0136] Furthermore, the target context data can include skill identifiers for multiple skills. A skill identifier is a unique reference marker for each skill, typically existing as a concise string or ID, such as a skill name or code. This allows the context data to maintain only a lightweight directory list, rather than directly loading the complete content of the skills. This design is similar to the way tool identifiers are handled, where only a skill directory and metadata summary, such as a list of skills and a brief overview of their applicable scenarios, are retained in the system prompt data. This maintains the lightweight and highly relevant nature of the context, avoiding the increased load caused by injecting all domain knowledge at once.

[0137] In some embodiments, determining at least one domain knowledge involved in the task processing operation can be specifically implemented as follows: From multiple skills, determine at least one skill that matches the target context data based on the skill description information; Based on the skill identifier of at least one skill, load domain knowledge from at least one skill from the knowledge base into the target context data to update the target context data.

[0138] Among them, skill description information can refer to the normative content in skill metadata, such as the applicable scenarios, dependent conditions, or functional summaries of natural language expressions, which are used for semantic matching.

[0139] In embodiments of this application, the first processing model can first scan the descriptive information of available skills and compare its relevance with target context data (such as current task instructions or status), for example, by keyword association or semantic similarity evaluation, to select at least one skill with the highest matching degree. Subsequently, based on the identifier of the selected skill, the corresponding domain knowledge is extracted from the knowledge base and loaded, such as injecting detailed experience guidance, parameter templates, or accompanying scripts into the current context, thereby updating the target context data so that the model can directly refer to this professional knowledge in subsequent reasoning.

[0140] This enables skills to be acquired on demand, keeping contextual data lightweight, while detailed domain knowledge is only referenced when it is strongly relevant to the task. This not only enriches the knowledge support of the corresponding intelligent modules, but also effectively controls the scale of the context, improving the targeting and stability of task processing.

[0141] The following section uses a workflow processing scenario as an example to introduce the technical solution of this application. Figure 6 This is a flowchart of one embodiment of a workflow processing method provided in this application, which can be applied to a target intelligent module.

[0142] This workflow processing method can Figure 2 The general task processing method illustrated is applied to specific workflow-related tasks, including workflow orchestration tasks (e.g., automatically generating new workflows from natural language descriptions), workflow debugging tasks (e.g., identifying and fixing errors in existing workflows), or workflow rewriting tasks (e.g., making partial adjustments or optimizations to existing workflows based on user needs). Thus, the collaboration between the first processing model and external tools can efficiently handle complex workflow data and operational logic while effectively managing contextual load.

[0143] Figure 6 The workflow processing method shown may include the following steps: 601: Retrieve the target context data corresponding to the workflow processing task; 602: Utilize the first processing model in response to target context data to perform workflow processing operations and determine at least one target tool and processing parameters involved in the workflow processing operations; 603: Using the first processing model, generate a target script based on at least one target tool and processing parameters; 604: The target script is executed in a sandbox environment, so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters and obtain the tool execution results; 605: Based on the tool's execution results, continue executing workflow processing operations using the first processing model.

[0144] Based on the above Figure 2 In addition to the task processing method provided in the embodiments, this application also provides a workflow processing method, which can be applied to the intelligent plug-in scenario in the visual workflow orchestration tool, such as the intelligent assistant of node-based AI generation tools like ComfyUI.

[0145] First, obtain the target context data corresponding to the workflow processing task. This step is the same as or similar to the general task processing method. The target context data includes system prompts, the current instructions of the workflow processing task (such as the user's natural language description of the requirements), and relevant status information, such as the current workflow JSON description or historical operation records, thereby providing the reasoning basis for the first processing model to process workflows.

[0146] Next, the first processing model responds to the target context data, executes workflow processing operations, and determines at least one target tool and processing parameters involved in the workflow processing operations. The first processing model analyzes the target context data to understand the specific requirements of the workflow task, such as identifying operations like querying nodes, editing connections, or executing workflows, and plans tool call paths accordingly, determining suitable external tools (such as node query tools, workflow editing tools, or execution tools) and corresponding processing parameters (such as workflow paths, node identifiers, or configuration modifications).

[0147] Then, using the first processing model, a target script is generated based on at least one target tool and processing parameters. This script transforms the tool call logic of the workflow operation into executable code, such as a Python script containing node traversal, error checking, or parameter adjustment, ensuring that complex workflow processing logic can be executed in an orderly batch.

[0148] Subsequently, the target script is executed in the sandbox environment, which sequentially calls at least one target tool to perform processing operations on the processing parameters, obtaining the tool execution results. This sandbox environment provides an isolated and secure execution space where the script completes toolchain calls, such as traversing workflow nodes or simulating execution to aggregate diagnostic information, and finally returns a concise tool execution result, such as an error summary or modification suggestions, instead of directly returning large-scale intermediate data.

[0149] Finally, the first processing model continues to execute workflow processing operations based on the tool's execution results. After receiving the tool's execution results, the first processing model incorporates the update context and continues to advance the workflow tasks, such as generating the final workflow JSON, outputting the repair solution, or confirming the rewrite completion, thereby achieving task closure.

[0150] Through the workflow processing method described above, the aforementioned task processing mechanism is effectively applied in graphical workflow scenarios, enabling stable handling of massive workflow data, multiple tool calls, and long-term iterative tasks. This enhances the automation capabilities and reliability of intelligent plugins for workflow orchestration, debugging, or rewriting. Those skilled in the art will understand that this method can adjust tool definitions or script generation details according to the interface specifications of specific workflow tools to adapt to different visual orchestration environments.

[0151] Figure 7This is a flowchart illustrating another embodiment of a task processing method provided in this application. This task processing method can be executed by a server, specifically by a target intelligent module running on the server. Figure 7 The workflow processing method shown may include the following steps: 701: Obtain the target context data corresponding to the target task; 702: In response to target context data, identify at least one subtask of the target task division; 703: Determine at least one sub-context data matching each subtask from the target context data; 704: Call at least one sub-skill's corresponding sub-intelligent module to process its respective sub-context data using the second processing model to obtain at least one sub-skill execution result; 705: Utilize the first processing model to perform task processing operations based on the target context data and the execution results of at least one subtask.

[0152] In this embodiment, target context data corresponding to the target task is acquired; in response to the target context data, at least one subtask is identified as a subset of the target task; subcontext data matching each of the at least one subtask is determined from the target context data; sub-intelligent modules corresponding to each of the at least one subtask are invoked to process their respective subcontext data using a second processing model to obtain execution results for at least one subtask; and task processing operations are performed using a first processing model based on the target context data and the execution results of at least one subtask. This decomposes the complex target task into at least one relatively independent subtask, and constructs dedicated, simplified subcontext data for each subtask. The sub-intelligent modules can perform task processing based solely on the subcontext data and return the corresponding subtask execution results. Thus, the first processing model can continue task processing based on the execution results of at least one subtask. Through this multi-agent division of labor and subcontext isolation and transmission method, refined control of context data is achieved, ensuring that the first processing model always performs task processing based on high-density, relevant target context data. This effectively suppresses attention diffusion and illusion generation, thereby improving the stability and quality of complex task processing.

[0153] In some embodiments, the task processing method may further include: The first processing model responds to the target context data to perform task processing operations and determines at least one target tool and processing parameters involved in the task processing operations. Using the first processing model, a target script is generated based on the at least one target tool and the processing parameters. The target script is executed in the target execution environment to sequentially call the at least one target tool to perform processing operations on the processing parameters, obtaining tool execution results. Based on the tool execution results, the first processing model continues to execute the task processing operations.

[0154] In some embodiments, the task processing method may further include: Obtain the original context data corresponding to the target task; the original context data includes first historical interaction data corresponding to the most recent N rounds of operations and second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations; extract key interaction data from the second historical interaction data; the data volume of the key interaction data is less than that of the second historical interaction data; compress the original context data based on the key interaction data to obtain the target context data corresponding to the current round of operations of the target task; respond to the target context data using a first processing model and perform task processing operations.

[0155] In some embodiments, the target context data includes resource identifiers for multiple resources; The task processing method may further include: utilizing a first processing model in response to the target context data to perform a task processing operation and determine at least one target resource involved in the task processing operation; retrieving resource description information for each of the at least one target resource from stored data; loading the resource description information of the at least one target resource into the target context data to update the target context data; and utilizing the first processing model in response to the updated target context data to continue performing the task processing operation. In this embodiment, the resource may refer to the tools or skills described above.

[0156] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0157] Figure 8 This is a flowchart illustrating another embodiment of a task processing method provided in this application. This task processing method can be executed by a server, specifically by a target intelligent module running on the server. Figure 8 The workflow processing method shown may include the following steps: 801: Obtain the target context data corresponding to the target task; the target context data includes resource identifiers for multiple resources.

[0158] In this embodiment, the resources may refer to the tools or skills described above.

[0159] 802: Utilize the first processing model in response to target context data, perform task processing operations, and determine at least one target resource involved in the task processing operations; 803: Retrieve resource description information for at least one target resource from the stored data; 804: Load the resource description information of at least one target resource into the target context data to update the target context data; 805: Utilize the first processing model in response to the updated target context data to continue the task processing operation.

[0160] In this embodiment of the application, resources can refer to tools or skills, and correspondingly, resource description information can be tool description information and / or skill description information.

[0161] In this embodiment, by first using a first processing model to determine at least one target resource involved in the task processing operation from the target context, obtaining resource description information for each of the at least one target resource, and then loading the at least one resource description information into the target context data, the first processing model performs task processing based on the updated target context data. This avoids indiscriminately preloading all resource description information into the context data, fundamentally suppressing context inflation. In addition, it ensures that the updated target context data always maintains high information density and strong correlation with task processing, achieving refined control of context data. This allows the first processing model to always perform task processing based on high-density, relevant target context data, effectively suppressing attention diffusion and hallucinations, thereby improving the stability and quality of complex task processing.

[0162] In some embodiments, the task processing method may further include: The first processing model responds to the target context data to perform task processing operations and determines at least one target tool and processing parameters involved in the task processing operations. Using the first processing model, a target script is generated based on the at least one target tool and the processing parameters. The target script is executed in the target execution environment to sequentially call the at least one target tool to perform processing operations on the processing parameters, obtaining tool execution results. Based on the tool execution results, the first processing model continues to execute the task processing operations.

[0163] In some embodiments, the task processing method may further include: In response to the target context data, at least one subtask of the target task is identified; subcontext data matching each of the at least one subtask is determined from the target context data; the sub-intelligent modules corresponding to each of the at least one subtask are invoked to process their respective subcontext data using a second processing model to obtain the execution result of at least one subtask; and task processing operations are performed using a first processing model based on the target context data and the execution result of the at least one subtask.

[0164] In some embodiments, the task processing method may further include: Obtain the original context data corresponding to the target task; the original context data includes first historical interaction data corresponding to the most recent N rounds of operations and second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations; extract key interaction data from the second historical interaction data; the data volume of the key interaction data is less than that of the second historical interaction data; compress the original context data based on the key interaction data to obtain the target context data corresponding to the current round of operations of the target task; respond to the target context data using a first processing model and perform task processing operations.

[0165] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0166] Figure 9 This is a flowchart illustrating another embodiment of a task processing method provided in this application. This task processing method can be executed by a server, specifically by a target intelligent module running on the server. Figure 9 The workflow processing method shown may include the following steps: 901: Obtain the original context data corresponding to the target task; the original context data includes the first historical interaction data corresponding to the most recent N rounds of operations and the second historical interaction data corresponding to the historical rounds of operations other than the most recent N rounds of operations; 902: Extract key interaction data from the second historical interaction data; the amount of key interaction data is less than that of the second historical interaction data. 903: Compress the original context data based on key interaction data to obtain the target context data corresponding to the current round of operations for the target task; 904: Utilize the first processing model to respond to the target context data and perform task processing operations.

[0167] In this embodiment, raw context data is obtained, including first historical interaction data corresponding to the most recent N rounds of operations and second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds. Key interaction data is extracted from the raw context data, and the raw context data is compressed based on the key interaction data to obtain target context data. The compressed target context data is then used for task processing. Intelligent compression of the raw context data ensures that the context data maintains continuity and focus throughout multiple rounds of task processing, while controlling the size of the context data to avoid processing burden caused by expansion. This ensures that the first processing model always performs task processing based on high-density, relevant target context data, effectively suppressing attention diffusion and illusion, thereby improving the stability and quality of complex task processing.

[0168] In some embodiments, the task processing method may further include: using a first processing model to respond to the target context data, performing a task processing operation, and determining at least one target tool and processing parameters involved in the task processing operation; using the first processing model to generate a target script based on the at least one target tool and the processing parameters; executing the target script in a target execution environment so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, thereby obtaining tool execution results; and using the first processing model to continue executing the task processing operation based on the tool execution results.

[0169] In some embodiments, the task processing method may further include: In response to the target context data, at least one subtask of the target task is identified; subcontext data matching each of the at least one subtask is determined from the target context data; the sub-intelligent modules corresponding to each of the at least one subtask are invoked to process their respective subcontext data using a second processing model to obtain the execution result of at least one subtask; and task processing operations are performed using a first processing model based on the target context data and the execution result of the at least one subtask.

[0170] In some embodiments, the target context data includes resource identifiers for multiple resources; in this embodiment, resources may refer to the tools or skills described above.

[0171] The task processing method may further include: using a first processing model in response to the target context data, performing a task processing operation, and determining at least one target resource involved in the task processing operation; searching for resource description information of each of the at least one target resource from stored data; loading the resource description information of the at least one target resource into the target context data to update the target context data; and using the first processing model in response to the updated target context data to continue performing the task processing operation.

[0172] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0173] The following example illustrates a possible implementation of the task processing method provided in this application embodiment, with reference to a specific application scenario. This implementation is intended to help those skilled in the art understand the task processing method provided in this application embodiment, and is not intended to impose any improper limitations on it.

[0174] In one specific embodiment, taking the intelligent assistant in a visual workflow tool handling workflow debugging tasks as an example, the complete application process of the task processing method provided in this application embodiment is illustrated.

[0175] Suppose a user uploads a medium-to-large workflow with errors (the JSON description contains hundreds of nodes and connections) and enters a natural language command: "Help me fix this workflow, which reports an out-of-memory error at node X during execution, while maintaining the original style." First, acquire the target context data corresponding to the target task. This target context data initially includes system prompts (defined as a workflow expert assistant to guide behavioral norms), current target task instructions (user's natural language description), a summary of the current workflow status (path or snapshot identifier), and historical interaction records. Since the task involves multi-round, long-term debugging, the original context data has accumulated a significant amount of historical interactions. To avoid bloat, we can determine if the historical interaction data has reached a preset threshold (e.g., the number of tokens exceeds 80% of the window). If so, we trigger context data compression: retaining system prompts, the first user instruction (as the overall intent anchor: "Fix the workflow and maintain consistency"), and the most recent N rounds (e.g., 3 rounds) of high-value interactions; for earlier second-generation historical interaction data, we use a lightweight information generation model to extract key interaction data (including the current workflow status, unresolved error sets such as "memory overflow," and a summary of failed attempts such as "increasing batch size is ineffective"). Finally, we construct a streamlined target context data: system prompts + the first instruction anchor + key summaries + recent interactions, ensuring continuity and conserving tokens.

[0176] Next, the first processing model responds to the target context data and performs task processing operations.

[0177] The target intelligence module, through intent recognition, can determine that the target task involves multiple subtasks. Therefore, the target intelligence module can determine matching sub-context data for each subtask from the target context data: It uses a data filter (hard-coded filtering script) to remove irrelevant historical tool calls and redundant dialogues, retaining only highly relevant information (such as error-related instructions and workflow snapshots); based on the task description information of the corresponding sub-intelligent module (e.g., DebugAgent excels at "error analysis and repair"), it extracts matching content to form concise sub-context data. Simultaneously, it uses structured EscalationData (e.g., {error_type: "memory_overflow", node_id: "X", workflow_snapshot_id: "snap_001"}) to convey status.

[0178] The target intelligent module calls the corresponding sub-intelligent module: for example, handing over the "error diagnosis" sub-task to the error diagnosis sub-intelligent module. Each sub-intelligent module can only mount a set of tool identifiers related to its task processing, and the initial context only contains a directory of tool identifiers.

[0179] The first processing model can identify the operation object (e.g., node X and memory-related parameters) based on sub-context data and search for candidate tools that match the object type. Then, it determines the target tool based on the semantic matching between the tool description information and the sub-context (task instructions). At the same time, if deterministic operations are involved (such as traversing all nodes to filter errors), these are given priority as the target tool for programmatic processing.

[0180] Furthermore, the tool invocation order, processing parameters, and the first data structure (output template, specifying only required fields such as a summary of the error node list) can be determined. Then, the target script is generated, encapsulating loop iteration, conditional filtering, and error aggregation logic, with the processing parameters serving as the initial input.

[0181] The target script can be submitted to the sandbox environment provided by MCP Code Execution for execution. The sandbox runs in isolation, and the script calls the target tools (such as get_canvas_graph, check_nodes) in sequence. Large-scale intermediate data (such as full node JSON) only flows in the sandbox memory. After the target script finishes execution, it can follow the first data structure and generate only a simplified tool execution result (e.g., {error_nodes: [...], summary: "Memory overflow suggests quantization model"}).

[0182] If domain knowledge is required, detailed information about matching skills can be dynamically loaded from the skill catalog and injected into the sub-context data to guide decision-making. After the sub-task is completed, a structured second data structure result is returned to the target intelligence module.

[0183] The target intelligence module integrates the results of subtask execution and tool execution to continue overall task processing. For example, it combines diagnostic and optimization suggestions to generate a remediation plan. If further iteration is needed, the process can be repeated, triggering a new round of context data compression. Finally, the remediated workflow JSON and explanation are output to the user.

[0184] The task processing method provided in this application implements a four-layer context governance and multi-agent, MCP integrated collaborative working mechanism: L1 ensures that key clues are not lost in long dialogues through intelligent compression of context data; L2 generates a target script by calling at least one tool through programmatic tool invocation and executes the target script in the target execution environment, unloading a large amount of intermediate result data and deterministic logic; L3 achieves task isolation and streamlined handover by assigning subtasks in the target task to corresponding sub-intelligent modules for execution; L4 injects expert experience as needed. Through the four-layer context governance mechanism, the context data is always lightweight and highly relevant to the target task, supporting dozens of rounds of debugging without loss of control, significantly improving the stability and scalability of the workflow intelligent assistant.

[0185] Figure 10 This application provides a schematic diagram of the structure of one embodiment of a task processing apparatus, which may include: The first acquisition unit 1001 is used to acquire target context data corresponding to the target task; The first execution unit 1002 is used to perform task processing operations in response to target context data using the first processing model, and to determine at least one target tool and processing parameters involved in the task processing operations. The first generation unit 1003 is used to generate a target script based on at least one target tool and processing parameters using a first processing model. The second execution unit 1004 is used to execute the target script in the target execution environment, so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters and obtain the tool execution results; The third execution unit 1005 is used to continue the task processing operation based on the tool execution result using the first processing model.

[0186] Figure 10 The task processing device can perform Figure 2The implementation principle and technical effects of the task processing method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the task processing device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0187] Figure 11 This application provides a schematic diagram of the structure of one embodiment of a workflow processing apparatus, which may include: The second acquisition unit 1101 is used to acquire the target context data corresponding to the workflow processing task; The fourth execution unit 1102 is used to perform workflow processing operations in response to target context data using the first processing model, and to determine at least one target tool and processing parameters involved in the workflow processing operations; The second generation unit 1103 is used to generate a target script based on at least one target tool and processing parameters using the first processing model; The fifth execution unit 1104 is used to execute the target script in a sandbox environment, so that the target script sequentially calls at least one target tool to perform processing operations on the processing parameters and obtain the tool execution results; The sixth execution unit 1105 is used to continue executing workflow processing operations based on the tool execution results using the first processing model.

[0188] Figure 11 Workflow processing devices can perform Figure 6 The implementation principle and technical effects of the workflow processing method in the illustrated embodiments will not be repeated here. The specific methods by which each module and unit of the workflow processing device in the above embodiments performs operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0189] Figure 12 This is a schematic diagram of another embodiment of a task processing apparatus provided in this application. The apparatus may include: The third acquisition unit 1201 is used to acquire the target context data corresponding to the target task; The first identification unit 1202 is used to identify at least one subtask of the target task division in response to the target context data. The first determining unit 1203 is used to determine, from the target context data, at least one sub-context data matched by each sub-task; The first calling unit 1204 is used to call the sub-intelligent module corresponding to at least one subtask to process the sub-context data of each subtask using the second processing model in order to obtain the execution result of at least one subtask. The seventh execution unit 1205 is used to perform task processing operations based on the target context data and the execution results of at least one subtask using the first processing model.

[0190] Figure 12 The task processing device can perform Figure 7 The implementation principle and technical effects of the task processing method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the task processing device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0191] Figure 13 This is a schematic diagram of another embodiment of a task processing apparatus provided in this application. The apparatus may include: The fourth acquisition unit 1301 is used to acquire target context data corresponding to the target task; the target context data includes resource identifiers of multiple resources.

[0192] The eighth execution unit 1302 is used to perform task processing operations in response to target context data using the first processing model, and to determine at least one target resource involved in the task processing operations; The first search unit 1303 is used to search for resource description information of at least one target resource from the stored data; The information loading unit 1304 is used to load the resource description information of at least one target resource into the target context data to update the target context data; The ninth execution unit 1305 is used to continue executing task processing operations in response to the updated target context data using the first processing model.

[0193] Figure 13 The task processing device can perform Figure 8 The implementation principle and technical effects of the task processing method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the task processing device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0194] Figure 14 This is a schematic diagram of another embodiment of a task processing apparatus provided in this application. The apparatus may include: The fifth acquisition unit 1401 is used to acquire the original context data corresponding to the target task; the original context data includes the first historical interaction data corresponding to the most recent N rounds of operations and the second historical interaction data corresponding to the historical rounds of operations other than the most recent N rounds of operations; The data extraction unit 1402 is used to extract key interaction data from the second historical interaction data; the amount of key interaction data is less than that of the second historical interaction data. The data compression unit 1403 is used to compress the original context data based on key interaction data to obtain the target context data corresponding to the current round of operation of the target task; The tenth execution unit 1404 is used to respond to the target context data using the first processing model and perform task processing operations.

[0195] Figure 14 The task processing device can execute Figure 9 The implementation principle and technical effects of the task processing method described in the illustrated embodiments will not be repeated here. The specific methods by which each module and unit of the task processing device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0196] It should be noted that the technical solutions in this application are applicable to virtual network environments, and the users described generally refer to "virtual users." Real users can register user accounts on the server through registration to obtain user identities in the network environment. The same user account can log in to the server through different types of client terminals, enabling the server to identify the same user.

[0197] Interactions between the server and the user can be based on user accounts. The data received or sent by the server to the user is also based on the user account; in reality, the user's client, corresponding to the user account, receives or sends data to the server. Furthermore, users can also communicate with each other through their user accounts. Here, "user" can refer to an individual or an organization, such as a company; this application does not impose specific restrictions.

[0198] It should be noted that some processes described in the above embodiments and accompanying drawings include multiple operations appearing in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear in this document, or they may be executed in parallel. The operation numbers, such as 2001, 202, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should also 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.

[0199] Figure 15 This is a schematic diagram of the structure of one embodiment of a computing device provided in this application. Figure 15As shown, in practice, the computing device may include a storage component 1501 and a processing component 1502.

[0200] Storage component 1501 is used to store computer programs and can be configured to store various other data to support operation on a computing device. Examples of this data include instructions for any application or method used to operate on the computing device, data structures, contact data, phone book data, messages, pictures, videos, etc.

[0201] Processing component 1502, coupled to storage component 1501, is used to execute computer programs in storage component 1501 for implementing, etc. Figure 2 The task processing method shown, or its implementation as follows Figure 6 The workflow processing method shown, or its implementation as follows Figure 7 The task processing method shown, or its implementation as follows Figure 8 The task processing method shown, or its implementation as follows Figure 9 The task processing method shown.

[0202] Furthermore, such as Figure 15 As shown, the computing device may also include other components such as a communication component 1503, a display component 1504, a power supply component 1505, and an audio component 1506. Figure 15 The diagram only shows some components and does not mean that the device includes only these components. Figure 15 The components shown. Additionally... Figure 15 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the computing device. The computing device in this embodiment can be a terminal device such as 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 computing device in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 15 The components within the dashed box; if the computing device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., then it may not include... Figure 15 The component within the dashed box.

[0203] The processing component described above includes one or more processors to execute computer instructions to complete all or part of the steps in the method described above. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the method described above.

[0204] The aforementioned storage components 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.

[0205] The aforementioned communication component is configured to facilitate wired or wireless communication between the device housing the communication component and other devices. The device housing the communication component can access wireless networks based on communication standards, such as mobile communication networks, 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.

[0206] The aforementioned display components may include 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.

[0207] 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.

[0208] 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.

[0209] 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 includes volatile or non-volatile components, or a combination thereof, and can 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), erasable programmable read-only memory (EPROM), 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-transmission medium.

[0210] Accordingly, this application also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, cause the processor 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. Furthermore, 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, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.

[0211] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0212] 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.

[0213] Finally, it should be noted that 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, The method includes: Obtain the target context data corresponding to the target task; The first processing model responds to the target context data, performs task processing operations, and determines at least one target tool and processing parameters involved in the task processing operations. Using the first processing model, a target script is generated based on the at least one target tool and the processing parameters; The target script is executed in the target execution environment, so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and obtains the tool execution result; Based on the results of the tool's execution, the first processing model is used to continue the task processing operation.

2. The method according to claim 1, characterized in that, The step of executing the target script in the target execution environment, so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and obtaining the tool execution result includes: The target script is executed in the target execution environment so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and generates tool execution results according to at least one data field specified by the first data structure.

3. The method according to claim 2, characterized in that, The tool for determining at least one target involved in the task processing operation includes: From the target context data, determine at least one target tool involved in the task processing operation, the invocation order of the at least one target tool, the processing parameters, and the first data structure; The step of generating a target script using the first processing model, based on the at least one target tool and processing parameters, includes: Using the first processing model, a target script is generated based on the at least one target tool, the calling order, the processing parameters, and the first data structure; the calling order is used for the target script to call the at least one target tool sequentially, and the processing parameters are used as input parameters for the first called target tool.

4. The method according to claim 1, characterized in that, The method further includes: In response to the target context data, at least one subtask of the target task division is identified; Determine the sub-context data that matches each of the at least one sub-task from the target context data; The sub-intelligent modules corresponding to each of the at least one sub-tasks are invoked to process their respective sub-context data using the second processing model in order to obtain the execution result of at least one sub-task. The step of continuing to execute the task processing operation based on the tool's execution result using the first processing model includes: The task processing operation is continued to be performed based on the execution results of the at least one subtask and the execution results of the tool using the first processing model.

5. The method according to claim 4, characterized in that, Determining the task instruction matched by each of the at least one subtask from the target context data includes: For any subtask, a data filter is used to filter the target context data to remove historical interaction data. Then, from the removed target context data, sub-context data that matches the task description information of the corresponding sub-intelligent module is determined.

6. The method according to claim 2, characterized in that, The step of identifying at least one subtask of the target task division in response to the target context data includes: Intent recognition is performed on the task instructions of the target task in the context data to determine at least one subtask.

7. The method according to claim 4, characterized in that, The step of calling the sub-intelligent modules corresponding to each of the at least one subtask to process their respective sub-context data using the second processing model to obtain the execution result of at least one subtask includes: For any subtask, the corresponding sub-intelligent module is invoked to process the sub-context data corresponding to the subtask using the second processing model, and the subtask execution result is obtained according to at least one data field specified by the second data structure corresponding to the subtask.

8. The method according to claim 1, characterized in that, The tool for determining at least one target involved in the task processing operation includes: Based on the target context data, identify the operation objects involved in the task processing operation; Find at least one candidate tool that matches the object type of the object being operated on; From the at least one candidate tool, at least one target tool that matches the target context data is determined based on the tool description information.

9. The method according to claim 1, characterized in that, The tool for determining at least one target involved in the task processing operation includes: Determine at least one first tool required for the task processing operation; Determine at least one target tool from the at least one first tool to perform a predetermined type of operation.

10. The method according to claim 9, characterized in that, The target context data includes tool identifiers for multiple tools; After determining at least one first tool required for the task processing operation, the method further includes: Based on the tool identifier of the at least one first tool, retrieve the tool description information of each of the at least one first tool from the stored data; The tool description information of the at least one first tool is loaded into the target context data to update the target context data.

11. The method according to claim 1, characterized in that, The acquisition of the target context data corresponding to the target task includes: Obtain the original context data corresponding to the target task; the original context data includes historical interaction data, which includes first historical interaction data corresponding to the most recent N rounds of operations and second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations; Extract key interaction data from the second historical interaction data; the amount of key interaction data is less than that of the second historical interaction data. The original context data is compressed based on the key interaction data to obtain the target context data corresponding to the current round of operation of the target task.

12. The method according to claim 11, characterized in that, The original context data also includes system prompt data and the target task instruction corresponding to the current round of operation; The step of compressing the original context data based on the key interaction data to obtain the target context data corresponding to the current round of operations for the target task includes: Based on the system prompt data, the first historical task instruction in the second historical interaction data, the target task instruction, the first historical interaction data, and the key interaction data, the target context data for the current round of operation is constructed.

13. The method according to claim 1, characterized in that, The method further includes: Encapsulate domain knowledge related to the target task to generate skills, in order to build a knowledge base; The target context data includes skill identifiers for multiple skills; The determination of at least one domain knowledge involved in the task processing operation includes: From multiple skills, at least one skill that matches the target context data is determined based on the skill description information; Based on the skill identifier of the at least one skill, the domain knowledge of the at least one skill is loaded from the knowledge base into the target context data to update the target context data.

14. A workflow processing method, characterized in that, Applied to a target intelligent module, the method includes: Obtain the target context data corresponding to the workflow processing task; Utilizing a first processing model in response to the target context data, a workflow processing operation is performed, and at least one target tool and processing parameters involved in the workflow processing operation are determined; The first processing model is used to generate a target script based on the at least one target tool and the processing parameters; The target script is executed in a sandbox environment, so that the target script sequentially calls the at least one target tool to perform processing operations on the processing parameters, and obtains the tool execution results; Based on the results of the tool's execution, the workflow processing operation is then performed using the first processing model.

15. A task processing method, characterized in that, Applied to a target intelligent module, the method includes: Obtain the target context data corresponding to the target task; In response to the target context data, at least one subtask of the target task division is identified; Determine the sub-context data that matches each of the at least one sub-task from the target context data; The sub-intelligent modules corresponding to each of the at least one sub-tasks are invoked to process their respective sub-context data using the second processing model in order to obtain the execution result of at least one sub-task. The first processing model is used to perform task processing operations based on the target context data and the execution results of at least one subtask.

16. A task processing method, characterized in that, include: Obtain the target context data corresponding to the target task; The target context data includes resource identifiers for multiple resources; Utilizing a first processing model in response to the target context data, a task processing operation is performed, and at least one target resource involved in the task processing operation is determined; Retrieve the resource description information of each of the at least one target resource from the stored data; The resource description information of the at least one target resource is loaded into the target context data to update the target context data; The task processing operation continues to be performed using the first processing model in response to the updated target context data.

17. A task processing method, characterized in that, include: Obtain the original context data corresponding to the target task; The original context data includes first historical interaction data corresponding to the most recent N rounds of operations and second historical interaction data corresponding to historical rounds of operations other than the most recent N rounds of operations. Extract key interaction data from the second historical interaction data; The amount of data in the key interaction data is less than that in the second historical interaction data; The original context data is compressed based on the key interaction data to obtain the target context data corresponding to the current round of operation of the target task; The first processing model responds to the target context data and performs task processing operations.

18. A computing device, characterized in that, This includes processing components and storage components; The storage component stores a computer program; the computer program is invoked and executed by the processing component to implement the task processing method as described in any one of claims 1 to 13, or to implement the workflow processing method as described in claim 14, or to implement the task processing method as described in claim 15, or to implement the task processing method as described in claim 16, or to implement the task processing method as described in claim 17.

19. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processing component, implements the task processing method as described in any one of claims 1 to 13, or the workflow processing method as described in claim 14, or the task processing method as described in claim 15, or the task processing method as described in claim 16, or the task processing method as described in claim 17.

20. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processing component, implement the task processing method as described in any one of claims 1 to 13, or implement the workflow processing method as described in claim 14, or implement the task processing method as described in claim 15, or implement the task processing method as described in claim 16, or implement the task processing method as described in claim 17.