Information processing method, information processing system, and information interaction system
By automatically generating scheduling graphs of tool nodes and data/resource dependencies, the problem of low efficiency in manual orchestration during the coordinated use of multiple tools is solved, achieving efficient and accurate task execution.
Patent Information
- Application Number
- CN202610993971.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the reliance on manual orchestration in multi-tool coordination scenarios leads to low task orchestration efficiency and may result in parameter configuration or process logic errors, leading to an increased failure rate.
By acquiring task information from business requests, an initial scheduling graph of tool nodes and data dependency edges is generated, resource dependency edges are added, node management information is configured, an execution scheduling graph is automatically generated, the execution timing of tool nodes is determined and managed, and resource access conflicts are avoided.
It significantly improves task orchestration efficiency and execution accuracy; structured task orchestration enhances task execution efficiency and performance.
Smart Images

Figure CN123114569A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of computer technology, and in particular to information processing methods, information processing systems, and information interaction systems. Background Technology
[0002] With the rapid development of artificial intelligence technology, the automated execution of various complex tasks often requires the use of multiple tools. However, in scenarios where multiple tools are used in coordination, it is often necessary to manually break down complex tasks and determine the arrangement of each sub-task and the corresponding tools.
[0003] Manual task orchestration is not only labor-intensive but also time-consuming, resulting in low efficiency. Furthermore, human error can lead to parameter configuration or process logic errors, increasing the task failure rate. Therefore, an effective solution is urgently needed to address these issues. Summary of the Invention
[0004] In view of this, embodiments of this specification provide information processing methods. One or more embodiments of this specification also relate to information processing systems, information interaction systems, information processing devices, a computing device, an electronic device, a computer-readable storage medium, and a computer program product, in order to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, an information processing method is provided, comprising: Obtain the business request associated with the target business, and determine the task information of the target task corresponding to the business request; Based on the task information, the target tool for executing the target task is determined, and an initial scheduling graph is generated consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes. Based on the resource access information corresponding to the tool node, add resource dependency edges to the initial scheduling graph to generate an intermediate scheduling graph. Configure node control information for the tool node in the intermediate scheduling graph according to the preset node configuration rules to generate an execution scheduling graph. The target task is executed according to the execution schedule diagram, and the execution result is used as a response to the business request.
[0006] According to a second aspect of the embodiments described herein, an information processing system is provided, applied to an intelligent module, the intelligent module including a planning unit, a compilation unit, and an execution unit; The planning unit is used to determine the target tool for executing the target task based on the task information of the target task corresponding to the business request, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes. The compilation unit is used to add resource dependency edges to the initial scheduling graph according to the resource access information corresponding to the tool node, generate an intermediate scheduling graph, configure node control information for the tool node in the intermediate scheduling graph according to preset node configuration rules, and generate an execution scheduling graph. The execution unit is used to execute the target task according to the execution scheduling diagram and use the execution result as a response to the business request.
[0007] According to a third aspect of the embodiments described herein, an information interaction system is provided, including a server and a client; The client is used to send a business request related to the target business to the server; The server is configured to: determine the task information of the target task corresponding to the business request; determine the target tool for executing the target task based on the task information, and generate an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes; add resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool nodes to generate an intermediate scheduling graph; configure node control information for the tool nodes in the intermediate scheduling graph according to preset node configuration rules to generate an execution scheduling graph; execute the target task according to the execution scheduling graph, and send the execution result to the client.
[0008] According to a fourth aspect of the embodiments of this specification, an information processing apparatus is provided, comprising: The acquisition module is configured to acquire business requests associated with the target business and determine the task information of the target task corresponding to the business request; The planning module is configured to determine the target tool for executing the target task based on the task information, and generate an initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes; The compilation module is configured to add resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool nodes, generate an intermediate scheduling graph, configure node control information for the tool nodes in the intermediate scheduling graph according to preset node configuration rules, and generate an execution scheduling graph. The execution module is configured to execute the target task according to the execution scheduling graph and use the execution result as a response to the business request.
[0009] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, they implement the steps of the above-described information processing method.
[0010] According to a sixth aspect of the embodiments described herein, an electronic device is provided, comprising: A memory and a processor, the memory and the processor being connected via a bus; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above-described information processing method.
[0011] According to a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0012] According to an eighth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0013] The information processing method provided in this embodiment obtains the business request associated with the target business and determines the task information of the target task corresponding to the business request. Based on the task information, it determines the target tool required to execute the target task and generates an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. For the initial scheduling graph, resource dependency edges are added to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the target task is executed according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The resulting execution result serves as the response to the aforementioned business request. Using the technical solution provided in this embodiment, a graph-based task orchestration can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, the structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of an information processing method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating an information processing method provided in one embodiment of this specification; Figure 2a This is a schematic diagram of a first intermediate scheduling diagram provided in one embodiment of this specification; Figure 2bThis is a schematic diagram of a second intermediate scheduling diagram provided in one embodiment of this specification; Figure 2c This is an execution scheduling diagram for configuring node resource management information, provided in one embodiment of this specification. Figure 2d This is an execution scheduling diagram for configuring node rate control information provided in one embodiment of this specification; Figure 2e This is an execution scheduling diagram for configuring node failure management information provided in one embodiment of this specification; Figure 3 This is a flowchart illustrating the processing procedure of an information processing method provided in one embodiment of this specification. Figure 4 This is a schematic diagram of the structure of an information processing system provided in one embodiment of this specification; Figure 5 This is a schematic diagram of the structure of an information interaction system provided in one embodiment of this specification; Figure 6 This is a schematic diagram of the structure of an information processing device provided in one embodiment of this specification; Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification; Figure 8 This is a structural block diagram of an electronic device provided in one embodiment of this specification. Detailed Implementation
[0015] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0016] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0017] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0018] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.
[0019] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0020] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0021] Large Language Model (LLM) Large language models are deep neural network models trained on massive amounts of text data. They typically possess natural language understanding, generation, and reasoning capabilities.
[0022] Intelligent agent An intelligent agent is an entity that can perceive its environment and make autonomous decisions and actions. During task execution, an intelligent agent can determine the next action through reasoning and optimize its decision-making behavior based on the execution results.
[0023] Tools Tools refer to external modules encapsulated as standardized interfaces that endow intelligent agents with various capabilities. For example, standardized interfaces can be search interfaces, database interfaces, file system interfaces, various business APIs, computation functions, etc., enabling intelligent agents to obtain the ability to search for information, access databases, access files, perform business operations, and perform computational operations by calling these interfaces. It should be noted that this embodiment only provides an example of a tool; in actual processing, a tool can be any external interface corresponding to an intelligent agent, and this embodiment does not impose any limitations.
[0024] Side effect Side effects refer to modifications to the external environment or data caused by a tool performing a task. For example, a tool that returns information without changing the external environment, such as a query, search, or data calculation, is considered a tool without side effects. However, actions such as sending emails, modifying data in a database, creating orders, or modifying files will affect the external environment and change its original state; these are tools that produce side effects.
[0025] Idempotency operations Idempotent operations are those that, when performed once or multiple times, maintain a consistent effect on the external environment. For example, the delete operation is an idempotent operation.
[0026] Direct Preference Optimization (DPO) DPO is an algorithm that optimizes a model based on constructed preference data. It can skip the training phase of the reward model and adjust the model's parameters by constructing preference data pairs (i.e., positive and negative samples), thereby increasing the probability of generating positive results and decreasing the probability of generating negative results.
[0027] When using intelligent agents to perform complex tasks, a large language model can be used for step-by-step reasoning to progressively determine the tools to be invoked. In practice, after determining a tool invocation, the result of that invocation is obtained before proceeding to the next inference operation to determine the next tool invocation, and so on, until the task is completed. However, in this approach, the intelligent agent can only know the local processing state during the execution of complex tasks and cannot plan the global task execution, which may lead to resource access conflicts or even execution failure. Furthermore, this method has a long execution time and low efficiency.
[0028] Alternatively, a large language model can be used to generate code that calls tools based on the task, and this code can then be executed to invoke various tools to perform the task. While this approach can express complex control logic, it offers excessive freedom, potentially including arbitrary branches, loops, state modifications, and external scheduling within the code. This can also pose significant security risks during code execution.
[0029] This specification provides an information processing method, and also relates to an information processing system, an information interaction system, an information processing device, a computing device, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0030] See Figure 1 The diagram shown illustrates the information processing method provided in this embodiment. It acquires business requests related to a target business and determines the task information of the target task corresponding to the business request. Based on the task information, it determines the target tool required to execute the target task and generates an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. For the initial scheduling graph, it adds resource dependency edges to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, it configures node control information for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, it executes the target task according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on node control information. The resulting execution result serves as the response to the aforementioned business request. Using the technical solution provided in this embodiment, a graph-based task orchestration can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0031] See Figure 2 , Figure 2A flowchart of an information processing method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0032] Step S202: Obtain the business request associated with the target business, and determine the task information of the target task corresponding to the business request.
[0033] The information processing method provided in this embodiment can be applied to any scenario that requires calling multiple tools to perform various business operations. For example, it may be necessary to generate data analysis reports based on data in a database and send email notifications; or to generate user-recommended content, such as product recommendations, transportation recommendations, hotel recommendations, etc. Furthermore, it can be used to create personalized plans for users, such as diet plans, exercise plans, etc. It should be noted that the application scenarios of this embodiment can be determined by relevant technical personnel according to actual circumstances, and this embodiment does not impose any limitations.
[0034] Specifically, the target business refers to the transaction that the user requests and needs to process. A business request refers to the data used to characterize the target business. The target task refers to the task objective that needs to be ultimately achieved after parsing the business request. Task information refers to a collection of various data used to describe the task, which may include the task type, input and output data, execution constraints, etc. This embodiment is only for illustrative purposes; in actual processing, any information related to the target task can be referred to as task information.
[0035] Based on this, users can send business requests related to target services through the client. After obtaining the business requests related to target services, the task information of the target task corresponding to the business request can be determined. In actual processing, a smart agent can obtain the business request, and then the smart agent can parse the business request to obtain the target task and its corresponding task information.
[0036] Step S204: Determine the target tool for executing the target task based on the task information, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes.
[0037] Specifically, a target tool refers to the tool required to perform a target task. One task can correspond to one tool or multiple tools. The actual number of target tools is determined by the complexity of the target task. This embodiment does not limit the number of target tools. A tool node is a node constructed based on the information corresponding to the tool. A tool node can include the tool's identifier, input and output parameters, upstream data dependencies, side effect types, etc. A data dependency edge is an edge formed based on the data dependencies between tools. For example, if the input of tool A depends on the output of tool B, then a data dependency edge is constructed between the node corresponding to tool A and the node corresponding to tool B. The initial scheduling graph is a graph constructed from tool nodes and data dependency edges. The initial scheduling graph can be in the form of a Plan Intermediate Representation (PlanIR). PlanIR is a data structure used to describe a plan. PlanIR can be in JSON format or other formats. This embodiment does not limit the format.
[0038] The PlanIR is explained in JSON format. The following is an example of a PlanIR: { "nodes":[ { "id":"string", "function":"string", "parameters":{ "param_name":"value_or_ref", "$ref":["node_id","field_path"] }, "effect":{ "side_effect":"pure", "environment":"local" }, "resources":[ {"resource":"string","access":"R"} ], "retry_policy":{ "max_retries":3, "backoff_gamma":2.0, "retry_on":["error_class"], "fallback":null }, "idempotency_key":null, "output_schema":"type_expr", "latency_estimate":0.0, "cost_estimate": 0.0 } ], "edges":[ {"from":"string","to":"string","type":"data"} ] } The above illustrates an example of PlanIR, where "nodes" represents the included nodes; "edges" represents the edges corresponding to the nodes, i.e., the connections between nodes; "id" represents the node's identifier; "function" represents the name of the function to be executed by the node, which can be understood as the corresponding tool; "parameters" represents the node's parameters; "effect" represents the node's side effects, i.e., environmental impact information; "resources" represents the resources to be accessed, i.e., resource access information; "retry_policy" represents retry information, where "max_retries" represents the number of retries, i.e., the number of allowed retries; "backup" represents the number of retries; and "backup" represents the number of retries allowed. "ff_gamma" represents the exponential backoff factor, indicating the retry interval. For example, if the exponential backoff factor is 2, the waiting time for each retry is twice the waiting time of the previous retry. "retry_on" indicates the error types that are allowed to be retried. "fallback" represents the fallback strategy for retrying, i.e., the fallback strategy after a retry failure. "idempotency_key" represents the idempotency key, i.e., idempotency information. "output_schema" represents the data structure output by the node. "latency_estimate" represents the predicted execution time of the subtask corresponding to the node. "cost_estimate" represents the cost of resources that the node is expected to consume.
[0039] Based on this, the target tool for executing the objective task can be determined according to the task information. A tool list can be pre-set, which includes various sets of tools that may be called. By matching the objective task with each tool in the tool set, the target tool required to execute the objective task is determined. Then, tool nodes are generated according to the tool information corresponding to the target tool, and data dependency edges are generated according to the data dependencies between the tools, thus obtaining the initial scheduling graph.
[0040] The initial scheduling graph can take the form of a PlanIR, which includes node information for each tool node and the data dependencies between nodes. Node information can include the tool's identifier, input and output parameters, upstream data dependencies, side effect types, etc. Data dependency edges can represent the data dependencies between various tools.
[0041] Furthermore, a toolchain management library can be set up, which stores toolchain units, that is, a set of tools that can be reused, each toolchain unit corresponding to a toolchain unit. During the generation of the initial scheduling graph, the toolchain unit can be treated as a node. In this embodiment, the specific implementation is as follows: Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; construct tool nodes based on the tool information, construct toolchain nodes based on the toolchain information, and construct data dependency edges based on the data dependency relationship between the target tool and the target toolchain unit; generate an initial scheduling graph based on the tool nodes, the toolchain nodes, and the data dependency edges.
[0042] Specifically, tool information refers to information related to the target tool, which may include the tool's identifier, input and output parameters, upstream data dependencies, and side effect types. A toolchain management library is a database that manages multiple toolchain units. A toolchain unit is a reusable tool call flow extracted from historically successfully executed task traces. A toolchain unit can consist of multiple tools, with execution order and mechanisms between them; each toolchain unit is treated as an execution unit. Toolchain information refers to the information corresponding to a toolchain unit. A toolchain node is a node constructed based on a toolchain unit; during execution, a toolchain node is executed as a whole.
[0043] Based on this, the target task can be determined according to the task information. Then, the tool information of the target tools to execute the target task can be determined from the list of available toolchains. Furthermore, the toolchain management library can be used to filter target toolchain units that can execute the target task or its subtasks, and the toolchain information corresponding to the target toolchain unit can be read. Then, tool nodes and toolchain nodes are constructed based on the tool information, and the toolchain unit is presented as a whole in the graph. This means packaging the execution flow of the various tools included in the toolchain unit to obtain reusable skills. Next, data dependency edges are constructed based on the data dependencies between the target tools and the target toolchain units. Specifically, based on each tool node and each toolchain node, the data dependencies between nodes are determined, including the data dependencies between tool nodes, between toolchain nodes, and between each tool node and each toolchain node, and data dependency edges are constructed. Finally, an initial scheduling graph is generated based on the tool nodes, toolchain nodes, and data dependency edges. The generation of the initial scheduling graph can be performed by a planner in the agent or generated by a planning model, which can be a large language model.
[0044] For example, suppose the target tools are tools A1, A2, A3, and A4, and the target toolchain units are toolchain units B1 and B2. Generate tool nodes a1, a2, a3, a4, b1, and b2. Assume that the input data of toolchain unit B1 depends on the output data of tool A2, and establish data dependency edges between toolchain nodes b1 and a2. Finally, generate the initial scheduling graph.
[0045] In summary, toolchain units stored in the toolchain management library can be reused as nodes in the graph, which can simplify the graph's complexity, thereby improving task execution efficiency and saving computing resources.
[0046] Furthermore, toolchain units can be extracted from historical execution results. In this embodiment, the specific implementation is as follows: Determining any toolchain unit in the toolchain management library includes: acquiring multiple first historical execution scheduling graphs; determining the usage frequency of nodes in the multiple first historical execution scheduling graphs based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs; filtering execution scheduling subgraphs in the multiple first historical execution scheduling graphs based on the usage frequency of nodes in the multiple first historical execution scheduling graphs; generating a toolchain unit based on the execution scheduling subgraphs; and storing the toolchain unit in the toolchain management library.
[0047] Specifically, the first historical execution scheduling graph refers to the historically generated execution scheduling graph. The first historical execution result refers to the execution result corresponding to the historically generated execution scheduling graph, which can include the execution status of each node in the execution scheduling graph, including whether the node's execution was successful or failed, the input and output data types of the tool corresponding to the node, the resource access information of the node, etc. The node usage frequency refers to the frequency with which the tool corresponding to the node is called, which can be represented by the number of times the tool corresponding to the node appears in multiple historical execution scheduling graphs. The execution scheduling subgraph refers to the subgraph corresponding to the high-frequency toolchain extracted from the historical execution scheduling graph.
[0048] Based on this, the determination of any toolchain unit in the toolchain management library can be achieved by acquiring multiple first historical execution schedule graphs. The number of graphs acquired can be determined by relevant technical personnel based on actual circumstances. For example, 100 execution schedule graphs can be accumulated before this operation is performed. Alternatively, a time period can be set, such as a week or a month. Upon reaching the time period, the execution schedule graphs within that time period are acquired as multiple first historical execution schedule graphs. Based on the first historical execution results corresponding to the multiple first historical execution schedule graphs, the usage frequency of nodes in each first historical schedule graph is statistically analyzed. Then, based on the statistical results, execution schedule subgraphs are selected from the multiple first historical execution schedule graphs. That is, execution schedule subgraphs with higher frequency of occurrence can be selected based on the frequency of nodes. These subgraphs correspond to tool execution flows, and the overall frequency of these tool execution flows is high across multiple first historical execution schedule graphs, thus they are selected as execution schedule subgraphs. One type of execution schedule subgraph can be understood as a similar skill. PrefixSpan can be used to identify high-frequency tool execution flows, and then these instances can be verified to be consistent in input / output type signatures, parameter references, and resource consumption. If they are consistent, they are considered to be similar skills. Finally, toolchain units are generated based on the execution scheduling subgraph and stored in the toolchain management library.
[0049] Furthermore, some tool nodes may correspond to tools that are not the same type of tool but belong to the same category, such as the SearchEmail and SearchSlack tools. Although these two tools are different, they have similar structures. In this case, they can be summarized as SearchInterface tools, or parameterized templates, and treated as a single tool when calculating frequency.
[0050] For example, suppose the call pattern of "searching for orders - querying users - generating replies" occurs frequently, it can be used to form an execution scheduling subgraph. Based on this execution scheduling subgraph, toolchain units can be generated and stored in the toolchain management library.
[0051] In summary, we can filter out successfully executed and frequently occurring execution scheduling subgraphs from the historical execution scheduling graph, thereby generating reusable toolchain units. This ensures that the toolchain units are sets of tools with a high probability of use, and thus guarantees the quality of the toolchain units.
[0052] Furthermore, after extracting a toolchain unit, before adding it to the toolchain management library, it can be tested. Only after passing the test can it be stored in the toolchain management library. In this embodiment, the specific implementation is as follows: Before storing the toolchain unit in the toolchain management library, the method further includes: performing quality testing and performance testing on the toolchain unit; and if the quality test results meet the quality conditions and the performance test results meet the performance conditions, then executing the step of storing the toolchain unit in the toolchain management library; wherein the quality test includes at least one of standard testing, boundary testing, and error testing, and the performance test includes shadow mode testing and / or canary release testing.
[0053] Specifically, quality testing refers to performing quality-related tests on toolchain units, that is, testing whether the toolchain units can correctly execute their corresponding subtasks. Performance testing refers to performing performance-related tests on toolchain units, that is, testing whether using the toolchain units can improve performance. Quality conditions refer to the quality standards corresponding to the tests. Performance conditions refer to the performance standards corresponding to the tests. Standard testing refers to testing with input data that meets the requirements of the toolchain units. Boundary testing refers to testing with boundary data required by the toolchain units. Error testing refers to testing with input data that does not meet the requirements of the toolchain units. Shadow mode testing refers to testing that uses toolchain units to generate graphs, but the actual execution still uses atomic tools. Canary release testing refers to testing that uses toolchain units incrementally.
[0054] Therefore, toolchain units can be tested in various ways before being stored in the toolchain management repository. Quality and performance tests can be performed on toolchain units. Only if the quality test results meet the quality requirements and the performance test results meet the performance requirements can the unit be stored in the toolchain management repository. Quality testing can include standard testing, boundary testing, and error testing. It can also include any one or two of these; the specific tests included can be determined by relevant technical personnel based on the actual situation, and this implementation does not impose any limitations. Performance testing can include shadow mode testing and / or canary release testing.
[0055] In actual implementation, standard testing, boundary testing, and error testing can be performed on the toolchain management unit. That is, the toolchain unit is tested using standard data that meets the input conditions, boundary data that meets the corresponding input conditions, and error data that does not meet the input conditions, respectively, and the test results are obtained. A test pass threshold greater than or equal to a specified threshold can be set as meeting quality conditions. For example, a standard test pass threshold greater than 95%, a boundary test pass threshold greater than 90%, and an error test pass threshold of 100% can be considered a successful test.
[0056] After passing quality testing, performance testing can be performed, specifically shadow mode testing. During the initial scheduling graph generation, this toolchain unit can be used as a node. However, in actual execution, this node still falls back to the atomic tool decomposition and execution. Three types of metrics are collected: the frequency of selecting the toolchain unit in the initial scheduling graph generation, the theoretical performance improvement relative to actual execution, and the counterfactual success rate (i.e., "would it succeed if this toolchain unit were actually called?"). Calling the toolchain unit means executing its corresponding subtasks as a whole, without decomposing it. Thresholds for these three metrics exceeding a specified threshold can be set to meet performance requirements. Subsequently, the toolchain unit undergoes an in-machine gray-scale phase, initially used on a small number of tasks. Once its stability meets requirements, its usage is expanded, and stability is tested again. Finally, if stability remains consistently met, the toolchain unit can be stored in the toolchain management library.
[0057] For example, suppose there exists a toolchain unit tool node a5 → tool node a6 → tool node a7. Standard testing, boundary testing, and error testing are performed on it. Quality conditions are set with a standard test pass threshold greater than 95%, a boundary test pass threshold greater than 90%, and an error test pass threshold of 100%. If the standard test pass threshold is 96% and the result is greater than 95%, the boundary test pass threshold is 92% and the result is greater than 90%, and the error test pass threshold is 100%, then the performance test is passed. Next, shadow mode testing is performed. The frequency of selecting this toolchain unit in the initial scheduling graph, the theoretical performance improvement rate relative to actual execution, and the counterfactual success rate all meet the mode conditions. Finally, canary release testing is performed. Its stability meets the performance conditions. Tool node a5 → tool node a6 → tool node a7 are then stored in the toolchain management repository.
[0058] In summary, conducting comprehensive testing on toolchain units before storing them in the toolchain management library ensures the quality of each toolchain unit within the library. This leads to better execution of the scheduling graph generated using these toolchain units, resulting in higher execution efficiency. In this way, agents can continuously accumulate reusable toolchain units from historical tasks without compromising overall performance due to the proliferation of unverified toolchain units.
[0059] Furthermore, after generating the initial scheduling graph, there may be instances where the information corresponding to a node is incomplete. For example, environmental impact information or resource access type information may be empty. To ensure correctness in subsequent orchestration, information can be added to these nodes. In this embodiment, the specific implementation method is as follows: After generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: updating the first environmental impact information to write operation information when the first environmental impact information corresponding to the tool node in the initial scheduling graph is empty; and updating the first resource access type information to external resource type when the first resource access type information corresponding to the tool node in the initial scheduling graph is empty.
[0060] Specifically, the first environmental impact information refers to the case where the environmental impact information is empty; environmental impact information can also be referred to as side effects. Write operation information refers to operations that affect the external environment, and can correspond to the hype information associated with tools that produce side effects. The first resource access type information refers to the type of resource access, which can include external resource types and internal resource types. External resource types refer to resource types that the system itself does not possess; for example, external resources could be external databases, etc.
[0061] Based on this, after generating the initial scheduling graph, the environmental impact information and resource access type information corresponding to the tool nodes in the initial scheduling graph can be detected. If the environmental impact information is empty, it can be updated to write operation information. If the resource access type information is empty, it can be updated to external resource type. In addition, based on the accumulated execution results of the execution scheduling graph, for tools that are "defaulted to write operation information without environmental impact information" and whose execution results in the execution scheduling graph all show "read-only operations" within a set time range, the environmental impact information can be updated from "write operation information" to "read operation information".
[0062] For example, assuming the environmental impact information of the tool corresponding to tool node a8 is empty, this environmental impact information is recorded as write operation information. Assuming the resource access type information is empty, this resource access type information is recorded as external resource information.
[0063] In summary, for tool nodes with uncertain environmental impact and resource access type information, they are recorded as external resources and as write operation information. This ensures that a conservative processing strategy is adopted when processing these nodes subsequently, preventing execution errors and guaranteeing performance.
[0064] Furthermore, after generating the initial scheduling graph, the initial scheduling graph can be verified. In this embodiment, the specific implementation method is as follows: After generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: detecting whether the initial scheduling graph satisfies the directed acyclic condition; for the first tool node and the second tool node with established data dependency edges in the initial scheduling graph, determining whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition; detecting whether the tool node information corresponding to the tool node satisfies the verification condition; and, if the directed acyclic condition is satisfied, and / or, if the data dependency condition is satisfied, and / or, if the verification condition is satisfied, performing the step of adding resource dependency edges to the initial scheduling graph according to the resource access information corresponding to the tool node to generate an intermediate scheduling graph.
[0065] Specifically, the directed acyclic condition refers to the conditions that satisfy the requirements of a directed acyclic graph. The first tool node is one of the nodes with which a data dependency edge is established. The second tool node is another node with which a data dependency edge is established. The data dependency condition refers to the conditions that satisfy the data dependency relationship; for example, the data dependency condition could be that the input data of one node depends on the output data of another node. The validation condition refers to the conditions that various information in the tool node information meets the requirements. Tool node information refers to the information corresponding to the tool node, which may include the tool's identifier, input and output parameters, upstream data dependencies, side effect types, etc.
[0066] Based on this, after generating the initial scheduling graph, it can be inspected. The inspection can include multiple dimensions: checking if the initial scheduling graph satisfies the directed acyclic condition; determining whether the tools corresponding to the first and second tool nodes with data-dependent edges in the initial scheduling graph satisfy the data dependency condition, i.e., whether the input data of one tool depends on the output data of the other tool; checking whether the tool node information corresponding to the tool node satisfies the verification condition, such as whether the resource access information of the tool node covers the resources it may actually access, whether the side effect information (i.e., environmental impact information) conforms to the predefined hierarchy; and whether idempotent keys or equivalent control mechanisms are provided for non-pure computational operations, etc. One or more of the above dimensions can be selected for inspection. If the inspection results meet the corresponding conditions, the subsequent operation steps are executed, i.e., step S206. That is, if the directed acyclic condition is met, and / or if the data dependency condition is met, and / or if the verification condition is met, the process of adding resource-dependent edges to the initial scheduling graph based on the resource access information corresponding to the tool nodes to generate an intermediate scheduling graph is executed.
[0067] For example, suppose an initial scheduling graph X is generated. X is then checked for whether it satisfies the directed acyclic condition, the data dependency condition, and the verification condition for the tool node information. Assuming that the directed acyclic condition, the data dependency condition, and the verification condition are satisfied, step S206 is executed after the checks are passed.
[0068] In summary, after generating the initial scheduling graph, it can be checked to ensure its accuracy, providing a quality foundation for the subsequent generation of intermediate and execution scheduling graphs, thereby resulting in a better final execution scheduling graph.
[0069] Furthermore, an initial scheduling graph can be generated using the planning model, and then the planning model can be optimized based on the execution results. In this embodiment, the specific implementation is as follows: An initial scheduling graph is generated using a planning model, consisting of tool nodes corresponding to the target tool and data dependency edges between nodes.
[0070] Specifically, the planning model refers to the model used to generate an initial scheduling graph based on the task information corresponding to the business request. The planning model can be a large language model.
[0071] Based on this, the planning model is used to determine the target tool for executing the target task according to the task information, and an initial scheduling graph is generated consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes. Alternatively, the planning model can also generate an initial scheduling graph based on the target tool for executing the target task and the toolchain units in the toolchain management library. For specific generation methods, please refer to the above content, which will not be repeated here.
[0072] For example, based on the planning model Q, the target tools are determined as tools A9, A10, A11, and A12. The planning model Q generates an initial scheduling graph X based on these four tools and the data dependencies between them.
[0073] In summary, the initial scheduling graph can be generated automatically through the model, thus improving the efficiency of initial scheduling graph generation.
[0074] Step S206: Add resource dependency edges to the initial scheduling graph according to the resource access information corresponding to the tool node, generate an intermediate scheduling graph, configure node control information for the tool nodes in the intermediate scheduling graph according to the preset node configuration rules, and generate an execution scheduling graph.
[0075] Specifically, resource access information refers to information related to the resources that the tool corresponding to the tool node needs to access. For example, it may include resource access type information, indicating whether the accessed resource is external or internal, as well as resource access address information, environmental impact information, etc. Resource dependency edges refer to serial or parallel edges constructed for nodes with resource access conflicts based on the resource access information. Tool nodes with resource access conflicts can refer to tool nodes accessing the same resource. An intermediate scheduling graph is a graph with added resource dependency edges based on the initial scheduling graph. Preset node configuration rules refer to various rules pre-defined for tool nodes, such as failure mechanisms and rules set for special types of nodes. "Preset" means pre-setting, that is, pre-setting different rules for different types of tool nodes before the execution of the subtask corresponding to the tool node, so as to configure them to the tool nodes when generating the execution scheduling graph. The preset stage can be before generating the execution scheduling graph, before obtaining the business request, or before constructing the initial and intermediate scheduling graphs. The specific preset stage can be determined by relevant technical personnel according to the actual situation, and this embodiment does not limit it. Node control information refers to the information configured for tool nodes according to the node configuration rules. An execution scheduling graph is a graph that is built upon an intermediate scheduling graph and configured with node control information for each tool node. Execution scheduling graphs can be used to execute target tasks.
[0076] Based on this, after obtaining the initial scheduling graph, which includes basic information about tool nodes and data dependencies between them, resource dependency edges are added to the initial scheduling graph according to the resource access information of the tool nodes, generating an intermediate scheduling graph. That is, for multiple tool nodes accessing the same resource, a serial or parallel mechanism is added; this step is called adding resource dependency edges, thus obtaining the intermediate scheduling graph. Next, node management information is configured for each tool node in the intermediate scheduling graph according to preset node configuration rules. Different node management information can be configured for different types of nodes to ensure the stability and efficiency of tool execution. Finally, an execution scheduling graph, i.e., the executable graph, is generated. After obtaining the intermediate scheduling graph, information can be added to it, including the start time schedule for each node, which is generated based on the resource dependency edges and data dependency edges in the intermediate scheduling graph. Runtime coordination mechanisms are then added, such as lock management mechanisms, token bucket mechanisms, circuit breaker mechanisms, and compensation mechanisms, etc. Finally, the execution scheduling graph is obtained.
[0077] Furthermore, based on the resource access type and resource access address information in the resource access information, resource dependency edges can be added to the initial scheduling graph to obtain an intermediate scheduling graph. In this embodiment, the specific implementation is as follows: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, at least two tool nodes are selected where the second resource access type information is an external resource type and the first resource access address information is the same. The second environmental impact information corresponding to the at least two tool nodes is determined, and it is determined whether the second environmental impact information is read operation information. If yes, parallel resource dependency edges are added to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph. If no, the execution order corresponding to the at least two tool nodes is determined, and serial resource dependency edges are added to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
[0078] Specifically, the second resource access type information refers to the resource access type information of the external resource type. The first resource access address information refers to the address information corresponding to the resource when multiple tools access the same resource. At least two tool nodes refer to tool nodes that satisfy the condition of accessing external resources and accessing the same external resource. The second environmental impact information refers to the environmental impact information corresponding to the tool nodes that satisfy the condition of accessing external resources and accessing the same external resource. Parallel resource dependency edges refer to resource dependency edges established between tool nodes corresponding to tools designated as capable of parallel execution. Serial resource dependency edges refer to resource dependency edges established between tool nodes corresponding to tools designated as capable of serial execution.
[0079] Based on this, according to the resource access information corresponding to each tool node in the initial scheduling graph, at least two tool nodes with the same resource access type (external resource type) and resource access address information can be selected. This means selecting multiple tool nodes that access external resources and access the same resource. There may be multiple groups of tool nodes, each group accessing the same external resource. In this case, the following operations can be performed on each group of tool nodes. Each group of tool nodes can be considered as at least two tool nodes. Determine the environmental impact information corresponding to each of the at least two tool nodes and determine if they are both read operations. If so, add parallel resource dependency edges to the at least two tool nodes. Since their resource access is read-only, it will not affect the external resource, so they can be executed synchronously. If not, indicate that at least one of the at least two tool nodes has a write operation, meaning the external resource will be changed due to the invocation of tools corresponding to one or more tool nodes. At this point, the execution order of the at least two tool nodes can be determined, and serial resource dependency edges can be added to the at least two tool nodes in the initial scheduling graph according to the execution order, generating an intermediate scheduling graph. Furthermore, for tools that do not access the same resource, i.e., two tools access different external resources, if there is no data dependency relationship between them, i.e., no data dependency edge is established between the corresponding tool nodes, parallel resource dependency edges can be added as needed.
[0080] For example, such as Figure 2a The intermediate scheduling graph shown assumes that the tools corresponding to tool nodes a13 and a14 access the same external resource, and both are read operations. Parallel resource dependency edges can be added to tool nodes a13 and a14 to obtain the intermediate scheduling graph. For example... Figure 2b The intermediate scheduling diagram shown assumes that the tools corresponding to tool nodes a15, a16, and a17 access the same external resource, and the operation of the tool corresponding to tool node a15 is a write operation, which can be sorted. Assuming the sorting result is tool nodes a15, a16, and a17, a serial resource dependency edge is added to tool nodes a15, a16, and a17 in this order.
[0081] In summary, by adding serial or parallel dependency edges to each tool node based on data dependency edges, the execution efficiency of tasks can be improved while ensuring the accuracy of task execution.
[0082] Furthermore, after generating and constructing serial resource dependency edges and / or parallel resource dependency edges, further checks can be performed to determine whether the parallel resource dependency edges are correct. In this embodiment, the specific implementation is as follows: In the case that the intermediate scheduling graph includes the parallel resource dependency edge, the method further includes: determining the third tool node and the fourth tool node corresponding to the parallel resource dependency edge, and determining the third environmental impact information and the second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and the third resource access address information corresponding to the fourth tool node; if the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, the method of configuring node control information for the tool nodes in the intermediate scheduling graph according to the preset node configuration rules and generating an execution scheduling graph is executed.
[0083] Specifically, the third tool node refers to one of the tool nodes that has a parallel resource dependency edge. The fourth tool node refers to another tool node that has a parallel resource dependency edge. The third environmental impact information refers to the environmental impact information corresponding to the third tool node. The second resource access address information refers to the resource access address information corresponding to the third tool node. The fourth environmental impact information refers to the environmental impact information corresponding to the fourth tool node. The third resource access address information refers to the resource access address information corresponding to the fourth tool node.
[0084] Based on this, after generating the intermediate scheduling graph, parallel resource dependency edges can be detected, according to the mechanism for establishing parallel resource dependency edges in this embodiment. For nodes with established parallel resource dependency edges, there are two scenarios: one is that the accessed resources are mutually exclusive, and the other is that they access the same external resource, but both are read operations. Based on this mechanism, parallel resource dependency edges in the intermediate scheduling graph can be detected. Specifically, the third and fourth tool nodes corresponding to the established parallel resource dependency edges are determined, and the third environmental impact information and second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and third resource access address information corresponding to the fourth tool node, are determined. If the second resource access address information and the third resource access address information are different, i.e., the accessed resources are mutually exclusive, or if the second resource access address information and the third resource access address information are the same and the third and fourth environmental impact information are both read operation information, then satisfying one of these two scenarios indicates that the parallel resource dependency edge is correctly established, i.e., it passes the detection, and then the subsequent processing steps for generating the execution scheduling graph continue.
[0085] For example, suppose tool nodes a18 and a19 establish a parallel resource dependency edge, and both tool nodes a18 and a19 access the same external resource. However, the environmental impact information for tool node a18 is a read operation, while the environmental impact information for tool node a19 is a write operation. The conditions of "mutually exclusive access to resources" and "access to the same external resource, but both are read operations" are not met, indicating that the parallel resource dependency edge is incorrectly established, meaning the intermediate scheduling graph fails the test.
[0086] In summary, the nodes that establish parallel resource dependency edges can be further verified to ensure the correctness of the establishment of parallel resource dependency edges, thereby ensuring the correct execution of the target task.
[0087] Furthermore, after obtaining the intermediate scheduling graph, node management information can be configured for each tool node in the intermediate scheduling graph to manage the tools corresponding to the tool nodes from various dimensions. The resource access order of nodes can be controlled. In this embodiment, the specific implementation method is as follows: In the intermediate scheduling graph, multi-resource tool nodes are selected, and at least two resources corresponding to the multi-resource tool nodes are sorted to obtain resource access order information corresponding to the at least two resources. Node resource control information is determined based on the resource access order information, and the node resource control information is configured to the multi-resource tool nodes to generate an execution scheduling graph. During the execution of the target task according to the execution scheduling graph, when a subtask corresponding to a multi-resource tool node in the execution scheduling graph is executed, the process includes: invoking the multi-resource tool corresponding to the multi-resource tool node, and accessing the at least two resources sequentially according to the node resource control information.
[0088] Specifically, a multi-resource tool node refers to a node corresponding to a tool that needs to access multiple resources. "At least two resources" refers to the resources that the multi-resource tool node needs to access. Resource access order information refers to the order information obtained after sorting the resources to be accessed. Node resource management information refers to information that manages the order of resource access. A multi-resource tool is a tool that needs to access multiple resources.
[0089] Based on this, multi-resource tool nodes are selected in the intermediate scheduling graph; these are the tool nodes corresponding to tools that need to access multiple resources. If multiple multi-resource tool nodes exist, for each multi-resource tool node, at least two resources corresponding to that multi-resource tool node are sorted, i.e., the multiple resources that the multi-resource tool node needs to access are sorted. The sorting method can be based on global resource identifiers or lexicographical order. This sorting result is used as the resource access order information. Then, node resource control information is determined based on the resource access order information, and the node resource control information is configured to the multi-resource tool nodes to generate an execution scheduling graph. During the execution of the target task according to the execution scheduling graph, when the subtasks corresponding to the multi-resource tool nodes in the execution scheduling graph are executed, the multi-resource tools corresponding to the multi-resource tool nodes are called, and at least two corresponding resources are accessed in sequence according to the node resource control information.
[0090] For example, such as Figure 2c As shown, suppose a multi-resource tool node a20 needs to access multiple resources, namely resources c1, c2, c3 and c4. The resources are sorted, and the sorting result is resources c1, c2, c3 and c4. During execution, the multi-resource tool A20 corresponding to the multi-resource tool node a20 is called to access resources c1, c2, c3 and c4 in sequence.
[0091] In summary, for tool nodes that need to access multiple resources, node resource management information can be configured to access resources in sequence, thereby avoiding resource access errors.
[0092] Furthermore, node resource control information can be determined based on lock management information. In this embodiment, the specific implementation is as follows: The step of determining node resource control information based on the resource access order information includes: determining lock management information based on the resource access order information, and using the lock management information as node resource control information; wherein, the step of calling the multi-resource tool corresponding to the multi-resource tool node and accessing the at least two resources sequentially according to the node resource control information includes: calling the multi-resource tool corresponding to the multi-resource tool node and accessing the at least two resources sequentially according to the lock management mechanism corresponding to the lock management information, wherein the lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
[0093] Specifically, lock management information refers to the information corresponding to the lock mechanism.
[0094] Based on this, the lock management information can be determined according to the resource access sequence information, and the lock management information is taken as the node resource management and control information. During the execution process, the multi-resource tool corresponding to the multi-resource tool node can be called to access the at least two resources in sequence according to the lock management mechanism corresponding to the lock management information, wherein the lock management mechanism is configured to lock a first resource of the at least two resources when accessing the first resource, and release the lock after the access is completed.
[0095] In the specific execution process, when the multi-resource tool node executes the corresponding subtask, it can apply for locks of the corresponding number of resources in ascending order according to the lexicographical order corresponding to the global identifier of the resource. After acquiring the locks, the corresponding operation is started to be executed, and after the execution is completed, all the locks are released uniformly. If all the locks are not acquired within a preset time (for example, 5 seconds), the already held locks can be released, and retries are performed with exponential backoff. When the multi-resource tool node follows this mechanism, circular waiting can be avoided, so as to ensure that no deadlock occurs.
[0096] For example, assume that the subtask corresponding to the multi-resource tool node is "e-commerce order creation". The corresponding tool function is CreateOrder, and the tool corresponding to this multi-resource tool node needs to access 4 resources: reading user_account_db (verifying the account and the sign-in location), writing order_db (generating an order record), writing inventory_db (deducting inventory), and writing payment_service (initiating a deduction). The four resources can be sorted as inventory_db<order_db<payment_service<user_account_db, according to the global order _lock to apply for four locks in ascending order, start execution after all the locks are obtained, and release all the locks uniformly after completion.
[0097] In conclusion, locking according to the resource sequence can avoid deadlocks, which ensures the correctness and standardization of resource access.
[0098] Further, the resource access rate of the node can be managed and controlled. In this embodiment, the specific implementation manner is as follows: Screening a current-limiting tool node in the intermediate scheduling graph, and determining the access rate constraint information of the external resource corresponding to the current-limiting tool node; generating node rate management and control information according to the access rate constraint information, and configuring the node rate management and control information to the current-limiting tool node to generate an execution scheduling graph; wherein, in the process of executing the target task according to the execution scheduling graph, when the subtask corresponding to the current-limiting tool node in the execution scheduling graph is executed, the process includes: calling the current-limiting tool corresponding to the current-limiting tool node, and accessing the external resource according to the node rate management and control information.
[0099] Specifically, a rate-limiting tool node refers to a tool node that imposes rate limits on the external resources it accesses. Access rate constraint information refers to the rate limits imposed on external resources. Node rate control information refers to information that controls the rate of resource access. A rate-limiting tool is a tool that imposes rate limits on the external resources it accesses.
[0100] Based on this, rate-limiting tool nodes are selected in the intermediate scheduling graph, that is, tool nodes that access external resources with rate limits are selected. If multiple rate-limiting tool nodes exist, for each rate-limiting tool node, the access rate constraint information of the external resource corresponding to that rate-limiting tool node is determined, that is, the rate limit of the external resource. Node rate control information is generated based on this access rate constraint information and configured to the rate-limiting tool node, generating an execution scheduling graph. During the execution of the target task according to the execution scheduling graph, when the subtask corresponding to the rate-limiting tool node in the execution scheduling graph is executed, the rate-limiting tool corresponding to the rate-limiting tool node is invoked to access the external resource according to the node rate control information.
[0101] For example, such as Figure 2d As shown, assuming that external resource c5 has access rate constraint information, tool node a21 needs to access external resource c5. Node rate control information can be configured for tool node a21 according to the access rate constraint information.
[0102] In summary, for resources with rate limits, node rate control information can be configured for the corresponding tool nodes to ensure that access to the resource does not exceed its limit, thereby avoiding the crash of external resources and improving execution stability.
[0103] Furthermore, node rate control information can be determined based on token bucket information. In this embodiment, the specific implementation is as follows: The step of generating node rate control information based on the access rate constraint information includes: determining token bucket information based on the access rate constraint information and using the token bucket information as node rate control information; wherein, the step of calling the rate limiting tool corresponding to the rate limiting tool node to access the external resource based on the node rate control information includes: generating tokens in the token bucket based on the access rate constraint information according to the token bucket mechanism corresponding to the token bucket information, allocating a first token selected in the token bucket to the rate limiting tool node, calling the rate limiting tool corresponding to the rate limiting tool node, and accessing the external resource based on the first token.
[0104] Specifically, token bucket information refers to the restrictions used to control the frequency of requests to external resources. A token is an identifier that allows a request to be executed. The first token is the token assigned to the multi-resource tool node.
[0105] Based on this, token bucket information is determined according to access rate constraint information, and this token bucket information is used as node rate control information. During execution, tokens in the token bucket can be generated based on the access rate constraint information according to the token bucket mechanism corresponding to the token bucket information, and the first token selected in the token bucket can be assigned to the rate limiting tool node. The rate limiting tool corresponding to the rate limiting tool node is then invoked, and external resources are accessed based on the first token.
[0106] In the actual execution process, for each external resource r with a rate limit, a time-varying number of tokens Tokens_r(t) can be maintained. Tokens can be generated according to the rate L_r (the upper limit is the bucket capacity B_r). Each request consumes 1 token. If the number of tokens in the token bucket is less than 1, the request will be blocked until the token bucket is replenished with tokens.
[0107] Using the previous example, a token is generated in the token bucket based on the access rate constraint information corresponding to external resource c5. When the subtask corresponding to tool node a21 is executed, it checks whether there is a token in the token bucket. If there is, the token is obtained to access external resource c5. If there is no token, it waits until a new token is generated in the token bucket.
[0108] In summary, the token bucket rate limiting mechanism can be used to control the request frequency and avoid exceeding the access limits of external resources.
[0109] Furthermore, the failure mechanism of nodes can be controlled. In this embodiment, the specific implementation method is as follows: For the tool nodes in the intermediate scheduling graph, node failure management information is configured, including circuit breaker information, compensation information, and / or retry information. During the execution of the target task according to the execution scheduling graph, if it is determined that the subtask corresponding to the failed tool node has failed, the following steps are taken: controlling the failed tool corresponding to the failed tool node to execute the target task according to the node failure management information.
[0110] Specifically, node failure control information refers to execution information in the event of a tool failure corresponding to a node. Circuit breaker information refers to the operation information that stops access when a tool task corresponding to a tool node fails. Circuit breaker information may also include a cool-off period; after triggering the stop-access operation, a cool-off period begins, and retrying occurs after the cool-off period ends, i.e., the corresponding operation is re-executed. Compensation information refers to compensation operations in the event of a tool task failure corresponding to a tool node. For example, for reversible write operations, compensation actions are generated; for irreversible external operations, such as sending emails or initiating payments, audit information is recorded and automatic re-execution is prevented. Retry information refers to the rules for re-execution after a failure. Retry information can specify the number of allowed re-executions; for example, retry information can specify that execution is allowed to be retried three times after a failure, and if all three attempts fail, the subtask is stopped. Furthermore, retry information may include preset retry types, i.e., operations that only retry under certain conditions. Retry information may also include an exponential backoff factor to specify the retry interval; for example, if the exponential backoff factor is 2, the waiting time for each retry is twice the waiting time of the previous retry.
[0111] Based on this, node failure control information can be configured for each tool node in the intermediate scheduling diagram. This information includes circuit breaker information, compensation information, and / or retry information. During the execution of the target task according to the execution scheduling diagram, if the subtask corresponding to a failed tool node fails, the failed tool corresponding to that node is controlled to execute the target task according to the node failure control information. Circuit breaker information can be triggered when the request execution failure rate exceeds a threshold, thus stopping access to the resource. Specifically, when the failure rate of the sliding window exceeds a threshold, a circuit breaker can be triggered. After triggering the circuit breaker, a cooling-off period can be entered, after which the task can be retried. Compensation information can be related to remedial operations after execution failure. For example, for reversible write operations, compensation actions can be generated; for irreversible external operations, such as sending emails or initiating payments, audit information can be recorded and automatic re-execution can be avoided. If a tool node is configured with retry information, then in the event of a tool node failure, the subtask can be retried according to the retry information. Specifically, the retry information can be a threshold number, indicating the allowed number of retry attempts. If the number of retry attempts is less than or equal to the threshold number, the execution succeeds, and the next subtask proceeds. If the number of retry attempts reaches the threshold number, the subtask execution stops, and an error message is generated. Node failure management information can include any one of circuit breaker information, compensation information, and retry information, or any two of these, or all three. In practice, the specific types of information included in the node failure management information can be determined by relevant technical personnel based on the actual situation; this embodiment does not impose any limitations.
[0112] For example, suppose the tool's corresponding operation is creating an order. The compensation information could be deleting the order record if the creation fails. For irreversible operations like sending emails, a record could be used to mark the operation. Furthermore, such as... Figure 2e As shown, node failure management information can be configured for each tool node, and an execution scheduling graph can be generated.
[0113] In summary, configuring a failure management mechanism for tool nodes can significantly enhance the fault tolerance of task execution and ensure the stability of task execution.
[0114] Step S208: Execute the target task according to the execution scheduling diagram, and use the execution result as a response to the service request.
[0115] Specifically, the execution result refers to the outcome of executing the target task according to the execution schedule.
[0116] Based on this, the target task is executed according to the execution scheduling graph, and the execution result is used as a response to the business request. Furthermore, the execution result can be stored so that, based on this execution result and multiple historical execution results, the graph generation process can be optimized for performance or reusable toolchain operations can be extracted.
[0117] Furthermore, when the initial scheduling diagram is generated based on the planning model, after the target task is executed according to the execution scheduling diagram, the planning model can be optimized based on the execution results corresponding to the historical execution scheduling diagram and the execution results corresponding to several previous historical execution scheduling diagrams. In this embodiment, the specific implementation method is as follows: After executing the target task according to the execution scheduling diagram, the method further includes: obtaining the second historical execution results corresponding to the multiple second historical execution scheduling diagrams, and optimizing the planning model based on the second historical execution results.
[0118] Specifically, the second historical execution scheduling diagram refers to the execution scheduling diagram after execution is completed. The second historical execution scheduling diagram may be the same as or different from the first historical execution scheduling diagram; this embodiment does not impose any limitations on this. The second historical execution result refers to the execution result corresponding to the second historical execution scheduling diagram.
[0119] Based on this, after executing the target task according to the execution scheduling diagram, the execution scheduling diagram becomes a historical execution scheduling diagram. The execution results corresponding to the historical execution scheduling diagram and the historical execution results corresponding to the previous historical execution scheduling diagrams are obtained. The planning model for generating the initial scheduling diagram is optimized based on the historical execution results.
[0120] In practice, DPO (Device Processing Objectives) can be used to optimize the planning model. After accumulating the execution results (also known as task trajectories) of a batch of completed execution schedules, a comprehensive score can be assigned to them, i.e., a comprehensive reward can be constructed. This comprehensive reward consists of four parts: success rate, total time, total cost, and number of retries. Then, preference pairs are constructed based on the comprehensive reward, i.e., selecting the high-reward trajectory τ under the "same task". + and low reward trajectory τ - Then, the DPO loss is used to update the planning model that generates the PlanIR, with the reference model being the checkpoint fixed in the previous training round. That is, the execution steps are to score the trajectory according to the comprehensive reward, construct preference pairs, and use DPO to improve the planning model's ability to generate a better PlanIR.
[0121] For example, assuming there are 100 execution scheduling graphs, the corresponding execution results are used to construct high-reward trajectories and low-reward trajectories to optimize the planning model Q, resulting in planning model Q'. Subsequently, planning model Q' is used to generate PlanIR.
[0122] In summary, the execution results of historical execution scheduling graphs can be used to optimize the planning model, thereby continuously improving the performance of the planning model and generating higher quality initial scheduling graphs.
[0123] Furthermore, to ensure that tool nodes with side effects are executed repeatedly and in case of execution errors, idempotency information can be added to this type of tool node. In this embodiment, the specific implementation is as follows: When the environmental impact subtask corresponding to the environmental impact tool node in the execution scheduling graph is executed, it is determined whether the environmental impact tool node has an idempotent identifier generated based on idempotent information, wherein the environmental impact tool node is configured with the idempotent information; if not, the environmental impact tool corresponding to the environmental impact tool node is invoked to execute the environmental impact subtask; if yes, the fifth tool node is selected in the execution scheduling graph, and the subtask corresponding to the fifth tool node is executed.
[0124] Specifically, an environmental impact tool node refers to a tool node that executes a corresponding subtask that affects the environment; it can be understood as a tool node with side effects. An environmental impact subtask is a subtask that, after execution, affects the environment. Idempotency information refers to the information configured for the environmental impact tool node. Idempotency information can be an idempotency key, indicating that after executing an environmental impact subtask, a corresponding identifier needs to be generated according to the rules defined by the idempotency key. An idempotency identifier is an identifier generated according to the rules corresponding to the idempotency key. An environmental impact tool refers to the tool that needs to be invoked to execute an environmental impact subtask. The fifth tool node refers to the next or more tool nodes to be executed, excluding the environmental impact tool node, selected according to the execution scheduling graph.
[0125] Based on this, an environmental impact tool node can be understood as a tool node corresponding to an operation that has an impact on the environment. For example, it can be a tool node corresponding to a non-pure computational operation. To avoid errors caused by repeated execution of subtasks corresponding to environmental impact tool nodes, idempotency information, i.e., idempotency keys, can be configured for environmental impact tool nodes during the generation of the initial scheduling graph. This is used to generate an idempotency identifier according to the rules defined by the idempotency key after the subtasks corresponding to the environmental impact tool node are executed, so as to indicate that the task has been executed and does not need to be executed again.
[0126] During the execution of subtasks corresponding to each tool node according to the execution scheduling diagram, if the currently executing tool node is an environmental impact tool node, meaning that the environmental impact subtask corresponding to this tool node has been executed, it is determined whether this environmental impact tool node has an idempotent flag generated based on idempotent information. If an idempotent flag exists, it indicates that the environmental impact subtask corresponding to this tool node has already been executed, meaning that the environmental impact subtask does not need to be re-executed. Therefore, according to the execution scheduling diagram, the fifth tool node to be executed is selected, and the subtask corresponding to the fifth tool node is executed. It should be noted that there can be one or more fifth tool nodes, representing tool nodes to be executed; the specific number of tool nodes is determined by the execution scheduling diagram. If no idempotent flag exists, it means that the subtask corresponding to this environmental impact tool node has not been executed, and the environmental impact tool corresponding to the environmental impact tool node is invoked to execute the corresponding environmental impact subtask.
[0127] For example, suppose the environmental impact tool node is a node that sends recommendation emails. It is configured with an idempotent key hash(U123 + date), meaning that after executing the corresponding environmental impact subtask, an idempotent identifier is generated based on the user ID and the current date. If the environmental impact subtask corresponding to the tool node has been executed, and the tool node already has an idempotent identifier, indicating that the email has been sent, the tool node is skipped, and the subtasks of other tool nodes are executed.
[0128] In summary, configuring idempotent information for environmental impact tool nodes prevents subtasks that impact the environment from being executed repeatedly, thus ensuring the reliability and stability of the target task execution.
[0129] The information processing method provided in this embodiment obtains the business request associated with the target business and determines the task information of the target task corresponding to the business request. Based on the task information, it determines the target tool required to execute the target task and generates an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. For the initial scheduling graph, resource dependency edges are added to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the target task is executed according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The resulting execution result serves as the response to the aforementioned business request. Using the technical solution provided in this embodiment, a graph-based task orchestration can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, the structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0130] The following is in conjunction with the appendix Figure 3 Taking the application of the information processing method provided in this specification in a scenario where multiple tools are invoked to perform complex tasks as an example, the information processing method will be further explained. Figure 3 A flowchart illustrating the processing steps of an information processing method provided in one embodiment of this specification is shown, specifically including the following steps.
[0131] Step S302: Obtain the business request associated with the target business, and determine the task information of the target task corresponding to the business request.
[0132] Step S304: Determine the target tool for executing the target task based on the task information, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes.
[0133] Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; construct tool nodes based on the tool information, construct toolchain nodes based on the toolchain information, and construct data dependency edges based on the data dependency relationship between the target tool and the target toolchain unit; generate an initial scheduling graph based on the tool nodes, the toolchain nodes, and the data dependency edges.
[0134] Determining any toolchain unit in the toolchain management library includes: obtaining multiple first historical execution scheduling graphs; Based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs, the usage frequency of the nodes in the multiple first historical execution scheduling graphs is determined; based on the usage frequency of the nodes in the multiple first historical execution scheduling graphs, execution scheduling subgraphs are selected from the multiple first historical execution scheduling graphs; toolchain units are generated based on the execution scheduling subgraphs, and the toolchain units are stored in the toolchain management library.
[0135] Before storing the toolchain unit in the toolchain management library, the method further includes: performing quality testing and performance testing on the toolchain unit; and if the quality test results meet the quality conditions and the performance test results meet the performance conditions, then executing the step of storing the toolchain unit in the toolchain management library; wherein the quality test includes at least one of standard testing, boundary testing, and error testing, and the performance test includes shadow mode testing and / or canary release testing.
[0136] Step S306: If the first environmental impact information corresponding to a tool node in the initial scheduling graph is empty, update the first environmental impact information to write operation information.
[0137] Step S308: If the first resource access type information corresponding to a tool node in the initial scheduling graph is empty, update the first resource access type information to an external resource type.
[0138] Step S310: Detect whether the initial scheduling graph satisfies the directed acyclic condition. For the first tool node and the second tool node with data dependency edges established in the initial scheduling graph, determine whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition. Detect whether the tool node information corresponding to the tool node satisfies the verification condition.
[0139] Step S312: If the directed acyclic condition is satisfied, and / or if the data dependency condition is satisfied, and / or if the verification condition is satisfied, execute the process of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph.
[0140] Step S314: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, filter out at least two tool nodes whose second resource access type information is an external resource type and whose first resource access address information is the same.
[0141] Step S316: Determine the second environmental impact information corresponding to the at least two tool nodes respectively, and determine whether the second environmental impact information is read operation information.
[0142] Step S318: If yes, add parallel resource dependency edges to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph; if no, determine the execution order corresponding to the at least two tool nodes, and add serial resource dependency edges to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
[0143] In the case that the intermediate scheduling graph includes the parallel resource dependency edge, the process further includes: determining the third tool node and the fourth tool node corresponding to the parallel resource dependency edge, and determining the third environmental impact information and the second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and the third resource access address information corresponding to the fourth tool node; if the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, the process of configuring node control information for the tool nodes in the intermediate scheduling graph according to the preset node configuration rules and generating an execution scheduling graph is executed.
[0144] Step S320: Configure node control information for the tool nodes in the intermediate scheduling diagram according to the preset node configuration rules, and generate an execution scheduling diagram.
[0145] The step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: filtering multi-resource tool nodes in the intermediate scheduling graph and sorting at least two resources corresponding to the multi-resource tool nodes to obtain resource access order information corresponding to the at least two resources; determining node resource control information based on the resource access order information and configuring the node resource control information to the multi-resource tool nodes to generate an execution scheduling graph; wherein, during the execution of the target task according to the execution scheduling graph, when a subtask corresponding to a multi-resource tool node in the execution scheduling graph is executed, the step includes: calling the multi-resource tool corresponding to the multi-resource tool node and accessing the at least two resources in sequence according to the node resource control information.
[0146] The step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: filtering rate-limiting tool nodes in the intermediate scheduling graph and determining the access rate constraint information of the external resources corresponding to the rate-limiting tool nodes; generating node rate control information based on the access rate constraint information and configuring the node rate control information to the rate-limiting tool nodes to generate an execution scheduling graph; wherein, during the execution of the target task according to the execution scheduling graph, when the subtask corresponding to the rate-limiting tool node in the execution scheduling graph is executed, it includes: calling the rate-limiting tool corresponding to the rate-limiting tool node and accessing the external resources according to the node rate control information.
[0147] The step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: configuring node failure control information for tool nodes in the intermediate scheduling graph, wherein the node failure control information includes circuit breaker information, compensation information and / or retry information; wherein, during the execution of the target task according to the execution scheduling graph, if it is determined that the subtask corresponding to the failed tool node has failed, the step includes: controlling the failed tool corresponding to the failed tool node to execute the target task according to the node failure control information.
[0148] The step of determining node resource control information based on the resource access order information includes: determining lock management information based on the resource access order information, and using the lock management information as node resource control information; wherein, the step of calling the multi-resource tool corresponding to the multi-resource tool node and accessing the at least two resources sequentially according to the node resource control information includes: calling the multi-resource tool corresponding to the multi-resource tool node and accessing the at least two resources sequentially according to the lock management mechanism corresponding to the lock management information, wherein the lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
[0149] The step of generating node rate control information based on the access rate constraint information includes: determining token bucket information based on the access rate constraint information and using the token bucket information as node rate control information; wherein, the step of calling the rate limiting tool corresponding to the rate limiting tool node to access the external resource based on the node rate control information includes: generating tokens in the token bucket based on the access rate constraint information according to the token bucket mechanism corresponding to the token bucket information, allocating a first token selected in the token bucket to the rate limiting tool node, calling the rate limiting tool corresponding to the rate limiting tool node, and accessing the external resource based on the first token.
[0150] Step S322: Execute the target task according to the execution scheduling diagram, and use the execution result as a response to the service request.
[0151] The step of generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes includes: generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes using a planning model; after executing the target task according to the execution scheduling graph, the step further includes: obtaining second historical execution results corresponding to multiple second historical execution scheduling graphs, and optimizing the planning model based on the second historical execution results.
[0152] The above process is illustrated with an example: Assuming the target task is "personalized recommendations + email notifications", PlanIR includes the following six nodes: n1 is GetUserProfile, which queries behavioral data and user email data. The parameter is {user_id: "U123"}, the side effect is (read, external), the resource is [(user_db, R)], and idempotent keys are not required.
[0153] n2 is GetOrderHistory, which queries orders from the last 30 days, with the parameter user_id: "U123"}, side effects (read, external), and resources [(order_db, R)].
[0154] n3 is RankProducts, which performs recommendation ranking based on behavioral data and historical orders (that is, inferring user preference data from user behavior data, and then generating recommendation ranking based on preference data and historical order data). The parameters are {profile: $ref(n1), orders: $ref(n2, "items")}. It has a side effect (pure, local) and does not consume external resources.
[0155] n4 is CheckInventory, which verifies the inventory of candidate products. The parameters are {product_ids: $ref(n3, "top_k.ids")}, side effects (read, external), and resources [(inventory_db, R)].
[0156] n5 is SendEmail, which sends a recommendation email. The parameters are {to: $ref(n1, "email"), items: $ref(n4, "available")}, side effects (write, external), resources [(email_service, W)], and idempotent key hash(U123 + date).
[0157] n6 is LogRecommendation, which writes recommendation logs. The parameters are {user_id: "U123", items: $ref(n3)}, side effects (write, external), resources [(rec_log_db, W)], and idempotent key hash(U123 + ts).
[0158] The node relationships are as follows: In terms of data dependencies, n1 and n2 have no upstream dependencies and can start simultaneously; n3 depends on the output of n1 and n2; n4 depends on the candidate product IDs output by n3; n5 depends on n1 (retrieving email addresses) and n4 (retrieving available products); n6 depends on the sorting results of n3. In terms of resource dependencies, n1, n2, and n4 are all read-only and access different databases, so they do not conflict with each other; n5 and n6 write to different external resources (email_service and rec_log_db), which also do not conflict.
[0159] The execution plan can be as follows: n1 and n2 are executed in parallel; n3 is executed after both are completed; n4 follows immediately; and finally n5 and n6 are executed in parallel.
[0160] The information processing method provided in this embodiment obtains the business request associated with the target business and determines the task information of the target task corresponding to the business request. Based on the task information, it determines the target tool required to execute the target task and generates an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. For the initial scheduling graph, resource dependency edges are added to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the target task is executed according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The resulting execution result serves as the response to the aforementioned business request. Using the technical solution provided in this embodiment, a graph-based task orchestration can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, the structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0161] This specification also provides an information processing system 400, such as Figure 4 As shown, the information processing system is applied to the intelligent module, which includes a planning unit 410, a compilation unit 420, and an execution unit 430. The planning unit 410 is used to determine the target tool for executing the target task based on the task information of the target task corresponding to the business request, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes. The compilation unit 420 is used to add resource dependency edges to the initial scheduling graph according to the resource access information corresponding to the tool node, generate an intermediate scheduling graph, configure node control information for the tool node in the intermediate scheduling graph according to preset node configuration rules, and generate an execution scheduling graph. The execution unit 430 is used to execute the target task according to the execution scheduling diagram and use the execution result as a response to the service request.
[0162] Specifically, the intelligent module can be an intelligent agent, and the information processing system can be applied to the intelligent module. The planning unit can be the planner within the intelligent agent, the compilation unit can be the compiler within the intelligent agent, and the execution unit can be the executor of the intelligent agent. In this case, additional detection units can be used to perform the detection of the initial and intermediate scheduling graphs. The extraction of toolchain units and the dimensioning of the toolchain management library can be performed by other toolchain management units.
[0163] In an optional embodiment, the step of determining the target tool for executing the target task based on the task information and generating an initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes includes: Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; Based on the tool information, construct tool nodes; based on the toolchain information, construct toolchain nodes; and based on the data dependency relationship between the target tool and the target toolchain unit, construct data dependency edges. An initial scheduling graph is generated based on the tool nodes, the toolchain nodes, and the data dependency edges.
[0164] In an optional embodiment, determining any toolchain unit in the toolchain management library includes: Obtain multiple first-historical execution scheduling graphs; Based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs, the usage frequency of the nodes in the multiple first historical execution scheduling graphs is determined; Based on the usage frequency of nodes in the plurality of first historical execution scheduling graphs, an execution scheduling subgraph is selected from the plurality of first historical execution scheduling graphs; Toolchain units are generated based on the execution scheduling subgraph, and the toolchain units are stored in the toolchain management library.
[0165] In an optional embodiment, before storing the toolchain unit in the toolchain management library, the method further includes: The toolchain unit is subjected to quality and performance testing. If the quality test results meet the quality conditions and the performance test results meet the performance conditions, the step of storing the toolchain unit in the toolchain management library is executed. The quality test includes at least one of standard test, boundary test and error test, and the performance test includes shadow mode test and / or canary release test.
[0166] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: If the first environmental impact information corresponding to a tool node in the initial scheduling graph is empty, the first environmental impact information will be updated to write operation information. If the first resource access type information corresponding to a tool node in the initial scheduling graph is empty, the first resource access type information will be updated to an external resource type.
[0167] In an optional embodiment, the step of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph includes: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, at least two tool nodes are selected where the second resource access type information is an external resource type and the first resource access address information is the same. Determine the second environmental impact information corresponding to the at least two tool nodes respectively, and determine whether the second environmental impact information is read operation information; If so, add parallel resource dependency edges to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph; If not, determine the execution order of the at least two tool nodes, and add serial resource dependency edges to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
[0168] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, multi-resource tool nodes are selected, and at least two resources corresponding to the multi-resource tool nodes are sorted to obtain resource access order information corresponding to the at least two resources. Node resource management information is determined based on the resource access order information, and the node resource management information is configured to the multi-resource tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the multi-resource tool node in the execution scheduling diagram is executed, the following applies: The multi-resource tool corresponding to the multi-resource tool node is invoked, and the at least two resources are accessed sequentially according to the node resource management information.
[0169] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, filter rate limiting tool nodes and determine the access rate constraint information of the external resources corresponding to the rate limiting tool nodes; Node rate control information is generated based on the access rate constraint information, and the node rate control information is configured to the rate limiting tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the rate limiting tool node in the execution scheduling diagram is executed, the following applies: The rate limiting tool corresponding to the rate limiting tool node is invoked to access the external resources based on the node rate control information.
[0170] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: For the tool nodes in the intermediate scheduling graph, configure node failure management information, wherein the node failure management information includes circuit breaker information, compensation information and / or retry information; In the process of executing the target task according to the execution scheduling diagram, when it is determined that the subtask corresponding to the failed tool node has failed to execute, the following situations are included: The failure tool corresponding to the failure tool node is controlled to execute the target task according to the node failure control information.
[0171] In an optional embodiment, determining node resource control information based on the resource access order information includes: Based on the resource access order information, lock management information is determined, and the lock management information is used as node resource control information; The step of invoking the multi-resource tool corresponding to the multi-resource tool node, and accessing the at least two resources sequentially according to the node resource management information, includes: The multi-resource tool corresponding to the multi-resource tool node is invoked to access the at least two resources in sequence according to the lock management mechanism corresponding to the lock management information. The lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
[0172] In an optional embodiment, generating node rate control information based on the access rate constraint information includes: Based on the access rate constraint information, the token bucket information is determined, and the token bucket information is used as node rate control information; The step of invoking the rate limiting tool corresponding to the rate limiting tool node and accessing the external resource according to the node rate control information includes: Based on the token bucket mechanism corresponding to the token bucket information, a token in the token bucket is generated based on the access rate constraint information, and the first token selected in the token bucket is assigned to the rate limiting tool node. The rate limiting tool corresponding to the rate limiting tool node is then invoked to access the external resource based on the first token.
[0173] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: Detect whether the initial scheduling graph satisfies the directed acyclic condition; For the first tool node and the second tool node with data dependency edges established in the initial scheduling graph, determine whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition. Check whether the tool node information corresponding to the tool node meets the verification conditions; If the directed acyclic condition is met, and / or if the data dependency condition is met, and / or if the verification condition is met, the process of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph is executed.
[0174] In an optional embodiment, if the intermediate scheduling graph includes the parallel resource dependency edges, it further includes: The third and fourth tool nodes corresponding to the parallel resource dependency edges are determined, and the third environmental impact information and second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and third resource access address information corresponding to the fourth tool node are determined. If the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address information are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, then the processing step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph is executed.
[0175] In an optional embodiment, generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes includes: An initial scheduling graph is generated using a planning model, consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. After executing the target task according to the execution scheduling diagram, the process further includes: Obtain the second historical execution results corresponding to multiple second historical execution scheduling graphs, and optimize the planning model based on the second historical execution results.
[0176] In an optional embodiment, during the execution of the target task, the method further includes: When the environmental impact subtask corresponding to the environmental impact tool node in the execution scheduling graph is executed, it is determined whether the environmental impact tool node has an idempotent identifier generated based on idempotent information, wherein the environmental impact tool node is configured with the idempotent information; If not, invoke the environmental impact tool corresponding to the environmental impact tool node to execute the environmental impact subtask; If so, select the fifth tool node in the execution scheduling graph and execute the subtask corresponding to the fifth tool node.
[0177] The information processing system provided in this embodiment has a planning unit that determines the target tools required to execute the target task based on the task information of the target task corresponding to the task request, and generates an initial scheduling graph consisting of tool nodes corresponding to the target tools and data dependency edges between nodes. The compilation unit adds resource dependency edges to the initial scheduling graph based on the resource access information of the tool nodes, obtaining an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the execution unit executes the target task according to the execution scheduling graph; that is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The resulting execution result serves as the response to the aforementioned business request. Using the information processing system provided in this embodiment, task orchestration in graph form can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0178] This specification also provides an information interaction system 500. Considering the large number of model parameters in large models and the limited computing resources of mobile terminals, the intelligent agent can be deployed on a server in the server 510. The server can connect to one or more clients 520 via a local area network (LAN), a wide area network (WAN), the Internet, or other types of data networks. The clients 520 may include, but are not limited to, smartphones, tablets, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. The clients 520 can interact with users through a graphical user interface to invoke the intelligent agent, thereby implementing the methods provided in the embodiments of this specification.
[0179] In the embodiments of this specification, the system consisting of a client device and a server can perform the following steps: the client device sends a service request related to the target service to the server. The server generates an initial scheduling diagram, an intermediate scheduling diagram, and an execution scheduling diagram, and executes the task. It should be noted that, provided the client device's operating resources can meet the deployment and operation conditions of the intelligent agent, the embodiments of this application can be performed on the client device.
[0180] like Figure 5 As shown, the information interaction system includes a server 510 and a client 520; The client 520 is used to send a business request related to the target business to the server; The server 510 is configured to: determine the task information of the target task corresponding to the business request; determine the target tool for executing the target task based on the task information; generate an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes; add resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool nodes to generate an intermediate scheduling graph; configure node control information for the tool nodes in the intermediate scheduling graph according to preset node configuration rules to generate an execution scheduling graph; execute the target task according to the execution scheduling graph; and send the execution result to the client.
[0181] In an optional embodiment, the step of determining the target tool for executing the target task based on the task information and generating an initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes includes: Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; Based on the tool information, construct tool nodes; based on the toolchain information, construct toolchain nodes; and based on the data dependency relationship between the target tool and the target toolchain unit, construct data dependency edges. An initial scheduling graph is generated based on the tool nodes, the toolchain nodes, and the data dependency edges.
[0182] In an optional embodiment, determining any toolchain unit in the toolchain management library includes: Obtain multiple first-historical execution scheduling graphs; Based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs, the usage frequency of the nodes in the multiple first historical execution scheduling graphs is determined; Based on the usage frequency of nodes in the plurality of first historical execution scheduling graphs, an execution scheduling subgraph is selected from the plurality of first historical execution scheduling graphs; Toolchain units are generated based on the execution scheduling subgraph, and the toolchain units are stored in the toolchain management library.
[0183] In an optional embodiment, before storing the toolchain unit in the toolchain management library, the method further includes: The toolchain unit is subjected to quality and performance testing. If the quality test results meet the quality conditions and the performance test results meet the performance conditions, the step of storing the toolchain unit in the toolchain management library is executed. The quality test includes at least one of standard test, boundary test and error test, and the performance test includes shadow mode test and / or canary release test.
[0184] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: If the first environmental impact information corresponding to a tool node in the initial scheduling graph is empty, the first environmental impact information will be updated to write operation information. If the first resource access type information corresponding to a tool node in the initial scheduling graph is empty, the first resource access type information will be updated to an external resource type.
[0185] In an optional embodiment, the step of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph includes: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, at least two tool nodes are selected where the second resource access type information is an external resource type and the first resource access address information is the same. Determine the second environmental impact information corresponding to the at least two tool nodes respectively, and determine whether the second environmental impact information is read operation information; If so, add parallel resource dependency edges to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph; If not, determine the execution order of the at least two tool nodes, and add serial resource dependency edges to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
[0186] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, multi-resource tool nodes are selected, and at least two resources corresponding to the multi-resource tool nodes are sorted to obtain resource access order information corresponding to the at least two resources. Node resource management information is determined based on the resource access order information, and the node resource management information is configured to the multi-resource tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the multi-resource tool node in the execution scheduling diagram is executed, the following applies: The multi-resource tool corresponding to the multi-resource tool node is invoked, and the at least two resources are accessed sequentially according to the node resource management information.
[0187] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, filter rate limiting tool nodes and determine the access rate constraint information of the external resources corresponding to the rate limiting tool nodes; Node rate control information is generated based on the access rate constraint information, and the node rate control information is configured to the rate limiting tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the rate limiting tool node in the execution scheduling diagram is executed, the following applies: The rate limiting tool corresponding to the rate limiting tool node is invoked to access the external resources based on the node rate control information.
[0188] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: For the tool nodes in the intermediate scheduling graph, configure node failure management information, wherein the node failure management information includes circuit breaker information, compensation information and / or retry information; In the process of executing the target task according to the execution scheduling diagram, when it is determined that the subtask corresponding to the failed tool node has failed to execute, the following situations are included: The failure tool corresponding to the failure tool node is controlled to execute the target task according to the node failure control information.
[0189] In an optional embodiment, determining node resource control information based on the resource access order information includes: Based on the resource access order information, lock management information is determined, and the lock management information is used as node resource control information; The step of invoking the multi-resource tool corresponding to the multi-resource tool node, and accessing the at least two resources sequentially according to the node resource management information, includes: The multi-resource tool corresponding to the multi-resource tool node is invoked to access the at least two resources in sequence according to the lock management mechanism corresponding to the lock management information. The lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
[0190] In an optional embodiment, generating node rate control information based on the access rate constraint information includes: Based on the access rate constraint information, the token bucket information is determined, and the token bucket information is used as node rate control information; The step of invoking the rate limiting tool corresponding to the rate limiting tool node and accessing the external resource according to the node rate control information includes: Based on the token bucket mechanism corresponding to the token bucket information, a token in the token bucket is generated based on the access rate constraint information, and the first token selected in the token bucket is assigned to the rate limiting tool node. The rate limiting tool corresponding to the rate limiting tool node is then invoked to access the external resource based on the first token.
[0191] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: Detect whether the initial scheduling graph satisfies the directed acyclic condition; For the first tool node and the second tool node with data dependency edges established in the initial scheduling graph, determine whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition. Check whether the tool node information corresponding to the tool node meets the verification conditions; If the directed acyclic condition is met, and / or if the data dependency condition is met, and / or if the verification condition is met, the process of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph is executed.
[0192] In an optional embodiment, if the intermediate scheduling graph includes the parallel resource dependency edges, it further includes: The third and fourth tool nodes corresponding to the parallel resource dependency edges are determined, and the third environmental impact information and second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and third resource access address information corresponding to the fourth tool node are determined. If the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address information are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, then the processing step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph is executed.
[0193] In an optional embodiment, generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes includes: An initial scheduling graph is generated using a planning model, consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. After executing the target task according to the execution scheduling diagram, the process further includes: Obtain the second historical execution results corresponding to multiple second historical execution scheduling graphs, and optimize the planning model based on the second historical execution results.
[0194] In an optional embodiment, during the execution of the target task, the method further includes: When the environmental impact subtask corresponding to the environmental impact tool node in the execution scheduling graph is executed, it is determined whether the environmental impact tool node has an idempotent identifier generated based on idempotent information, wherein the environmental impact tool node is configured with the idempotent information; If not, invoke the environmental impact tool corresponding to the environmental impact tool node to execute the environmental impact subtask; If so, select the fifth tool node in the execution scheduling graph and execute the subtask corresponding to the fifth tool node.
[0195] The information interaction system provided in this embodiment involves a client sending a business request related to a target service to a server. The server determines the task information of the target task corresponding to the business request. Based on the task information, the server determines the target tool required to execute the target task and generates an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. For the initial scheduling graph, resource dependency edges are added to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the target task is executed according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The execution result is then sent to the client. Using the information interaction system provided in this embodiment, task orchestration in graph form can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0196] Corresponding to the above method embodiments, this specification also provides embodiments of an information processing apparatus. Figure 6 A schematic diagram of the structure of an information processing apparatus according to one embodiment of this specification is shown. Figure 6 As shown, the device includes: The acquisition module 602 is configured to acquire the business request associated with the target business and determine the task information of the target task corresponding to the business request; The planning module 604 is configured to determine the target tool for executing the target task based on the task information, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes; Compilation module 606 is configured to add resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool nodes, generate an intermediate scheduling graph, configure node control information for the tool nodes in the intermediate scheduling graph according to preset node configuration rules, and generate an execution scheduling graph. The execution module 608 is configured to execute the target task according to the execution scheduling diagram and use the execution result as a response to the service request.
[0197] In an optional embodiment, the step of determining the target tool for executing the target task based on the task information and generating an initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes includes: Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; Based on the tool information, construct tool nodes; based on the toolchain information, construct toolchain nodes; and based on the data dependency relationship between the target tool and the target toolchain unit, construct data dependency edges. An initial scheduling graph is generated based on the tool nodes, the toolchain nodes, and the data dependency edges.
[0198] In an optional embodiment, determining any toolchain unit in the toolchain management library includes: Obtain multiple first-historical execution scheduling graphs; Based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs, the usage frequency of the nodes in the multiple first historical execution scheduling graphs is determined; Based on the usage frequency of nodes in the plurality of first historical execution scheduling graphs, an execution scheduling subgraph is selected from the plurality of first historical execution scheduling graphs; Toolchain units are generated based on the execution scheduling subgraph, and the toolchain units are stored in the toolchain management library.
[0199] In an optional embodiment, before storing the toolchain unit in the toolchain management library, the method further includes: The toolchain unit is subjected to quality and performance testing. If the quality test results meet the quality conditions and the performance test results meet the performance conditions, the step of storing the toolchain unit in the toolchain management library is executed. The quality test includes at least one of standard test, boundary test and error test, and the performance test includes shadow mode test and / or canary release test.
[0200] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: If the first environmental impact information corresponding to a tool node in the initial scheduling graph is empty, the first environmental impact information will be updated to write operation information. If the first resource access type information corresponding to a tool node in the initial scheduling graph is empty, the first resource access type information will be updated to an external resource type.
[0201] In an optional embodiment, the step of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph includes: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, at least two tool nodes are selected where the second resource access type information is an external resource type and the first resource access address information is the same. Determine the second environmental impact information corresponding to the at least two tool nodes respectively, and determine whether the second environmental impact information is read operation information; If so, add parallel resource dependency edges to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph; If not, determine the execution order of the at least two tool nodes, and add serial resource dependency edges to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
[0202] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, multi-resource tool nodes are selected, and at least two resources corresponding to the multi-resource tool nodes are sorted to obtain resource access order information corresponding to the at least two resources. Node resource management information is determined based on the resource access order information, and the node resource management information is configured to the multi-resource tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the multi-resource tool node in the execution scheduling diagram is executed, the following applies: The multi-resource tool corresponding to the multi-resource tool node is invoked, and the at least two resources are accessed sequentially according to the node resource management information.
[0203] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, filter rate limiting tool nodes and determine the access rate constraint information of the external resources corresponding to the rate limiting tool nodes; Node rate control information is generated based on the access rate constraint information, and the node rate control information is configured to the rate limiting tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the rate limiting tool node in the execution scheduling diagram is executed, the following applies: The rate limiting tool corresponding to the rate limiting tool node is invoked to access the external resources based on the node rate control information.
[0204] In an optional embodiment, the step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: For the tool nodes in the intermediate scheduling graph, configure node failure management information, wherein the node failure management information includes circuit breaker information, compensation information and / or retry information; In the process of executing the target task according to the execution scheduling diagram, when it is determined that the subtask corresponding to the failed tool node has failed to execute, the following situations are included: The failure tool corresponding to the failure tool node is controlled to execute the target task according to the node failure control information.
[0205] In an optional embodiment, determining node resource control information based on the resource access order information includes: Based on the resource access order information, lock management information is determined, and the lock management information is used as node resource control information; The step of invoking the multi-resource tool corresponding to the multi-resource tool node, and accessing the at least two resources sequentially according to the node resource management information, includes: The multi-resource tool corresponding to the multi-resource tool node is invoked to access the at least two resources in sequence according to the lock management mechanism corresponding to the lock management information. The lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
[0206] In an optional embodiment, generating node rate control information based on the access rate constraint information includes: Based on the access rate constraint information, the token bucket information is determined, and the token bucket information is used as node rate control information; The step of invoking the rate limiting tool corresponding to the rate limiting tool node and accessing the external resource according to the node rate control information includes: Based on the token bucket mechanism corresponding to the token bucket information, a token in the token bucket is generated based on the access rate constraint information, and the first token selected in the token bucket is assigned to the rate limiting tool node. The rate limiting tool corresponding to the rate limiting tool node is then invoked to access the external resource based on the first token.
[0207] In an optional embodiment, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, the method further includes: Detect whether the initial scheduling graph satisfies the directed acyclic condition; For the first tool node and the second tool node with data dependency edges established in the initial scheduling graph, determine whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition. Check whether the tool node information corresponding to the tool node meets the verification conditions; If the directed acyclic condition is met, and / or if the data dependency condition is met, and / or if the verification condition is met, the process of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph is executed.
[0208] In an optional embodiment, if the intermediate scheduling graph includes the parallel resource dependency edges, it further includes: The third and fourth tool nodes corresponding to the parallel resource dependency edges are determined, and the third environmental impact information and second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and third resource access address information corresponding to the fourth tool node are determined. If the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address information are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, then the processing step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph is executed.
[0209] In an optional embodiment, generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes includes: An initial scheduling graph is generated using a planning model, consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. After executing the target task according to the execution scheduling diagram, the process further includes: Obtain the second historical execution results corresponding to multiple second historical execution scheduling graphs, and optimize the planning model based on the second historical execution results.
[0210] In an optional embodiment, during the execution of the target task, the method further includes: When the environmental impact subtask corresponding to the environmental impact tool node in the execution scheduling graph is executed, it is determined whether the environmental impact tool node has an idempotent identifier generated based on idempotent information, wherein the environmental impact tool node is configured with the idempotent information; If not, invoke the environmental impact tool corresponding to the environmental impact tool node to execute the environmental impact subtask; If so, select the fifth tool node in the execution scheduling graph and execute the subtask corresponding to the fifth tool node.
[0211] The information processing apparatus provided in this embodiment acquires business requests related to target services and determines the task information of the target tasks corresponding to the business requests. Based on the task information, it determines the target tools required to execute the target tasks and generates an initial scheduling graph consisting of tool nodes corresponding to the target tools and data dependency edges between nodes. For the initial scheduling graph, resource dependency edges are added to the tool nodes based on their resource access information to obtain an intermediate scheduling graph, thereby avoiding resource access conflicts when tools access resources. Furthermore, node control information is configured for each tool node in the intermediate scheduling graph to obtain an execution scheduling graph. Finally, the target task is executed according to the execution scheduling graph. That is, the execution timing of each tool node can be determined based on data dependency edges and resource dependency edges, and the execution of each tool is controlled based on the node control information. The resulting execution result serves as the response to the aforementioned business request. Using the information processing apparatus provided in this embodiment, task orchestration in graph form can be automatically generated, significantly improving the efficiency of task orchestration. Furthermore, structured task orchestration can increase the interpretability and accuracy of task execution. In addition, setting data dependency edges, resource dependency edges, and node control information can further improve the execution efficiency and performance of tasks.
[0212] The above is an illustrative scheme of an information processing device according to this embodiment. It should be noted that the technical solution of this information processing device and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the information processing device, please refer to the description of the technical solution of the information processing method described above.
[0213] Figure 7 A structural block diagram of a computing device 700 provided according to one embodiment of this specification is shown.
[0214] The computing device 700 includes: Memory 710 and processor 720; The memory 710 is used to store computer programs / instructions, and the processor 720 is used to execute the computer programs / instructions, which, when executed by the processor 720, implement the steps of the information processing method.
[0215] In one or more embodiments of this specification, the computing device can be understood as an integrated smart terminal, including but not limited to a server, desktop computer, PC (Personal Computer), all-in-one model machine, mobile phone, tablet computer or other portable smart terminal, etc., and the computing device may have the model described in the above embodiments of this application pre-installed.
[0216] Specifically, this computing device can pre-install various types of models, including but not limited to models in natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model selection. In different product forms, this computing device can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, this computing device also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other model types), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, this computing device can also create applications based on models, providing API (Application Programming Interface) calling capabilities. Users can call models into created applications through the API interface, and application management tools are also provided to manage and monitor the applications.
[0217] Furthermore, the computing device can also include data management (supporting the creation and management of model tuning datasets), a training center (providing abundant training resources to help users learn and master AI (Artificial Intelligence) technology), and basic control capabilities (providing enterprise-level basic control capabilities to ensure the security and efficient operation of the system). Through the above functions, it provides a comprehensive and integrated device for AI development, training, deployment, and application.
[0218] Figure 8 A structural block diagram of an electronic device 800 provided according to one embodiment of this specification is shown.
[0219] The memory 810 and the processor 820 are connected via a bus 830. The memory 810 is used to store computer programs / instructions, and the processor 820 is used to execute the computer programs / instructions, which, when executed by the processor 820, implement the steps of the method.
[0220] Specifically, the components of the electronic device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.
[0221] Electronic device 800 also includes access device 840, which enables electronic device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. Access device 840 may include one or more of any type of wired or wireless network interface (e.g., network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Wi-MAX (Worldwide Interoperability for Microwave Access) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, and so on.
[0222] In one embodiment of this specification, the above-described components of the electronic device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the electronic device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0223] Electronic device 800 can be any type of stationary or mobile electronic device, including mobile computers or mobile electronic devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable electronic devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary electronic devices such as desktop computers or personal computers (PCs). Electronic device 800 can also be a mobile or stationary server.
[0224] The above is an illustrative scheme of an electronic device according to this embodiment. It should be noted that the technical solution of this electronic device and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the electronic device, please refer to the description of the technical solution of the information processing method described above.
[0225] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0226] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the information processing method described above.
[0227] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the information processing method described above.
[0228] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the information processing method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the information processing method described above.
[0229] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0230] The computer program / instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0231] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0232] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0233] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An information processing method, comprising: Obtain the business request associated with the target business, and determine the task information of the target task corresponding to the business request; Based on the task information, the target tool for executing the target task is determined, and an initial scheduling graph is generated consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes. Based on the resource access information corresponding to the tool node, add resource dependency edges to the initial scheduling graph to generate an intermediate scheduling graph. Configure node control information for the tool node in the intermediate scheduling graph according to the preset node configuration rules to generate an execution scheduling graph. The target task is executed according to the execution schedule diagram, and the execution result is used as a response to the business request.
2. The information processing method according to claim 1, wherein determining the target tool for executing the target task based on the task information and generating an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes includes: Based on the task information, determine the tool information of the target tool for executing the target task, and read the toolchain information corresponding to the target toolchain unit associated with the target task from the toolchain management library; Based on the tool information, construct tool nodes; based on the toolchain information, construct toolchain nodes; and based on the data dependency relationship between the target tool and the target toolchain unit, construct data dependency edges. An initial scheduling graph is generated based on the tool nodes, the toolchain nodes, and the data dependency edges.
3. The information processing method according to claim 2, wherein determining any toolchain unit in the toolchain management library includes: Obtain multiple first-historical execution scheduling graphs; Based on the first historical execution results corresponding to the multiple first historical execution scheduling graphs, the usage frequency of the nodes in the multiple first historical execution scheduling graphs is determined; Based on the usage frequency of nodes in the plurality of first historical execution scheduling graphs, an execution scheduling subgraph is selected from the plurality of first historical execution scheduling graphs; Toolchain units are generated based on the execution scheduling subgraph, and the toolchain units are stored in the toolchain management library.
4. The information processing method according to claim 3, further comprising, before storing the toolchain unit in the toolchain management library: The toolchain unit is subjected to quality and performance testing. If the quality test results meet the quality conditions and the performance test results meet the performance conditions, the step of storing the toolchain unit in the toolchain management library is executed. The quality test includes at least one of standard test, boundary test and error test, and the performance test includes shadow mode test and / or canary release test.
5. The information processing method according to claim 1, after generating the initial scheduling graph consisting of the tool nodes corresponding to the target tool and the data dependency edges between the nodes, further includes: If the first environmental impact information corresponding to a tool node in the initial scheduling graph is empty, the first environmental impact information will be updated to write operation information. If the first resource access type information corresponding to a tool node in the initial scheduling graph is empty, the first resource access type information will be updated to an external resource type.
6. The information processing method according to claim 1, wherein adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph includes: Based on the resource access information corresponding to the tool nodes in the initial scheduling graph, at least two tool nodes are selected where the second resource access type information is an external resource type and the first resource access address information is the same. Determine the second environmental impact information corresponding to the at least two tool nodes respectively, and determine whether the second environmental impact information is read operation information; If so, add parallel resource dependency edges to the at least two tool nodes in the initial scheduling graph to generate an intermediate scheduling graph; If not, determine the execution order of the at least two tool nodes, and add serial resource dependency edges to the at least two tool nodes in the initial scheduling graph according to the execution order to generate an intermediate scheduling graph.
7. The information processing method according to claim 1, wherein configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, multi-resource tool nodes are selected, and at least two resources corresponding to the multi-resource tool nodes are sorted to obtain resource access order information corresponding to the at least two resources. Node resource management information is determined based on the resource access order information, and the node resource management information is configured to the multi-resource tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the multi-resource tool node in the execution scheduling diagram is executed, the following applies: The multi-resource tool corresponding to the multi-resource tool node is invoked, and the at least two resources are accessed sequentially according to the node resource management information.
8. The information processing method according to claim 1, wherein configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: In the intermediate scheduling graph, filter rate limiting tool nodes and determine the access rate constraint information of the external resources corresponding to the rate limiting tool nodes; Node rate control information is generated based on the access rate constraint information, and the node rate control information is configured to the rate limiting tool node to generate an execution scheduling graph; Specifically, during the execution of the target task according to the execution scheduling diagram, when the subtask corresponding to the rate limiting tool node in the execution scheduling diagram is executed, the following applies: The rate limiting tool corresponding to the rate limiting tool node is invoked to access the external resources based on the node rate control information.
9. The information processing method according to claim 1, wherein configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph includes: For the tool nodes in the intermediate scheduling graph, configure node failure management information, wherein the node failure management information includes circuit breaker information, compensation information and / or retry information; In the process of executing the target task according to the execution scheduling diagram, when it is determined that the subtask corresponding to the failed tool node has failed to execute, the following situations are included: The failure tool corresponding to the failure tool node is controlled to execute the target task according to the node failure management information.
10. The information processing method according to claim 7, wherein determining node resource control information based on the resource access order information includes: Based on the resource access order information, lock management information is determined, and the lock management information is used as node resource control information; The step of invoking the multi-resource tool corresponding to the multi-resource tool node, and accessing the at least two resources sequentially according to the node resource management information, includes: The multi-resource tool corresponding to the multi-resource tool node is invoked to access the at least two resources in sequence according to the lock management mechanism corresponding to the lock management information. The lock management mechanism is used to lock the first resource when accessing the first resource among the at least two resources, and to release the lock after the access is completed.
11. The information processing method according to claim 8, wherein generating node rate control information based on the access rate constraint information comprises: Based on the access rate constraint information, the token bucket information is determined, and the token bucket information is used as node rate control information; The step of invoking the rate limiting tool corresponding to the rate limiting tool node and accessing the external resource according to the node rate control information includes: Based on the token bucket mechanism corresponding to the token bucket information, a token in the token bucket is generated based on the access rate constraint information, and the first token selected in the token bucket is assigned to the rate limiting tool node. The rate limiting tool corresponding to the rate limiting tool node is then invoked to access the external resource based on the first token.
12. The information processing method according to any one of claims 1 to 11, after generating the initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes, further comprising: Detect whether the initial scheduling graph satisfies the directed acyclic condition; For the first tool node and the second tool node with data dependency edges established in the initial scheduling graph, determine whether the tool corresponding to the first tool node and the tool corresponding to the second tool node satisfy the data dependency condition. Check whether the tool node information corresponding to the tool node meets the verification conditions; If the directed acyclic condition is met, and / or if the data dependency condition is met, and / or if the verification condition is met, the process of adding resource dependency edges to the initial scheduling graph based on the resource access information corresponding to the tool node to generate an intermediate scheduling graph is executed.
13. The information processing method according to claim 6, wherein if the intermediate scheduling graph includes the parallel resource dependency edge, it further includes: The third and fourth tool nodes corresponding to the parallel resource dependency edges are determined, and the third environmental impact information and second resource access address information corresponding to the third tool node, as well as the fourth environmental impact information and third resource access address information corresponding to the fourth tool node are determined. If the second resource access address information and the third resource access address information are different, or if the second resource access address information and the third resource access address information are the same and the third environmental impact information and the fourth environmental impact information are both read operation information, then the processing step of configuring node control information for tool nodes in the intermediate scheduling graph according to preset node configuration rules and generating an execution scheduling graph is executed.
14. The information processing method according to any one of claims 1 to 11, wherein generating an initial scheduling graph consisting of tool nodes corresponding to the target tool and data dependency edges between nodes comprises: An initial scheduling graph is generated using a planning model, consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. After executing the target task according to the execution scheduling diagram, the process further includes: Obtain the second historical execution results corresponding to multiple second historical execution scheduling graphs, and optimize the planning model based on the second historical execution results.
15. The information processing method according to claim 1, wherein during the execution of the target task, the method further includes: When the environmental impact subtask corresponding to the environmental impact tool node in the execution scheduling graph is executed, it is determined whether the environmental impact tool node has an idempotent identifier generated based on idempotent information, wherein the environmental impact tool node is configured with the idempotent information; If not, invoke the environmental impact tool corresponding to the environmental impact tool node to execute the environmental impact subtask; If so, select the fifth tool node in the execution scheduling graph and execute the subtask corresponding to the fifth tool node.
16. An information processing system applied to an intelligent module, the intelligent module comprising a planning unit, a compilation unit, and an execution unit; The planning unit is used to determine the target tool for executing the target task based on the task information of the target task corresponding to the business request, and generate an initial scheduling graph consisting of the tool node corresponding to the target tool and the data dependency edges between the nodes. The compilation unit is used to add resource dependency edges to the initial scheduling graph according to the resource access information corresponding to the tool node, generate an intermediate scheduling graph, configure node control information for the tool node in the intermediate scheduling graph according to preset node configuration rules, and generate an execution scheduling graph. The execution unit is used to execute the target task according to the execution scheduling diagram and use the execution result as a response to the business request.
17. An information interaction system, comprising a server and a client; The client is used to send a business request related to the target business to the server; The server is used to determine the task information of the target task corresponding to the business request; Based on the task information, a target tool for executing the target task is determined, and an initial scheduling graph is generated consisting of tool nodes corresponding to the target tool and data dependency edges between nodes. Based on the resource access information corresponding to the tool nodes, resource dependency edges are added to the initial scheduling graph to generate an intermediate scheduling graph. Node control information is configured for the tool nodes in the intermediate scheduling graph according to preset node configuration rules to generate an execution scheduling graph. The target task is executed according to the execution scheduling graph, and the execution result is sent to the client.
18. An electronic device comprising: A memory and a processor, the memory and the processor being connected via a bus; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 15.
19. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.
20. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.
