Tool intelligent scheduling method and device, equipment, medium and program product

By constructing a directed acyclic tool dependency graph and a resource locator container, the problems of disordered toolchain execution order and loss of resource location information in existing technologies are solved, and reliable execution of tool calls in complex scenarios is achieved.

CN123178016APending Publication Date: 2026-11-27CHINA SOUTHERN POWER GRID DIGITAL GRID GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611604755.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-16
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing automation solutions cannot adapt to the operational needs of complex scenarios, and cannot accurately sort out the process logic and dependencies of dedicated toolchains, resulting in disordered execution order and loss of resource location information. In particular, the execution is unreliable when multiple stages of iteration and multiple solutions are executed in parallel.

Method used

By acquiring the capability declarations of specialized tools, a directed acyclic tool dependency graph is constructed. Based on the intent recognition results, an ordered execution plan is generated. Resource locator containers are used to ensure the explicit expression of input-output dependencies and strict adherence to the execution order.

Benefits of technology

It achieves reliability and robustness in tool invocation and execution under complex scenarios, avoids missing steps and resource location errors, and ensures the integrity and accuracy of tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178016A_ABST
    Figure CN123178016A_ABST
Patent Text Reader

Abstract

The application relates to a tool intelligent scheduling method and device, equipment, medium and program product, in particular to the technical field of computing task automation arrangement. The method comprises the following steps: acquiring the capability declaration of each special tool; in response to a tool dependency graph update instruction, scanning each capability declaration, and constructing a directed acyclic tool dependency graph based on the matching relationship between the resource type of the output resource declaration and the resource type of the input resource declaration of each capability declaration; in response to a natural language instruction input by a user, performing intent recognition on the natural language instruction to obtain an intent recognition result; determining an anchor node matched with the intent recognition result from the tool dependency graph, and performing bidirectional derivation along the directed edges of the tool dependency graph starting from the anchor node as a starting point to obtain a complete execution chain for the natural language instruction; and performing topological sorting on all nodes contained in the complete execution chain to generate an ordered execution scheme. The method can realize automatic arrangement and reliable execution of special tools.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated orchestration technology for computing tasks, and in particular to a tool intelligent scheduling method, apparatus, device, medium, and program product. Background Technology

[0002] With the iterative development of natural language understanding-based intelligent computing model technology, related technologies have gradually seen the emergence of automated solutions that drive intelligent agents based on intelligent computing models. These solutions decompose user intentions and automatically call specialized tools to complete tasks, effectively avoiding some of the drawbacks of manual operation.

[0003] However, existing automation solutions still suffer from core technological deficiencies and cannot adapt to the operational needs of complex scenarios. Existing intelligent computing models lack standardized and structured understanding of the process logic and dependencies of dedicated toolchains, failing to accurately identify the preconditions, outputs, and upstream / downstream coupling relationships of each process. This makes them highly susceptible to problems such as omitted steps, disordered execution order, and loss of intermediate resource location information during automated execution. Especially in complex scenarios involving multi-stage iterations and parallel execution of multiple solutions, existing solutions cannot guarantee the reliability of tool call execution sequences, frequently resulting in execution chain breaks, failed resource location information transmission, and unreliable execution results. Summary of the Invention

[0004] Therefore, it is necessary to provide a tool intelligent scheduling method, device, equipment, medium, and program product that can realize the automatic orchestration and reliable execution of special tools to address the above-mentioned technical problems.

[0005] Firstly, this application provides a tool-based intelligent scheduling method, including:

[0006] Obtain the capability declarations of each specialized tool; the capability declarations include at least one of output resource declarations, input resource declarations, and function type declarations; the output resource declarations are used to declare the resource types output after the corresponding specialized tool is executed; the input resource declarations are used to declare the input resource types required before the corresponding specialized tool is executed; and the function type declarations are used to declare the function types provided by the corresponding specialized tool.

[0007] In response to the tool dependency graph update command, each of the capability declarations is scanned, and a directed acyclic tool dependency graph is constructed based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationships between each special tool;

[0008] In response to a natural language instruction input by the user, intent recognition is performed on the natural language instruction to obtain an intent recognition result;

[0009] From the tool dependency graph, an anchor node matching the intent recognition result is determined, and bidirectional derivation is performed along the directed edges of the tool dependency graph starting from the anchor node to obtain a complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes.

[0010] The nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

[0011] In one embodiment, determining the anchor node matching the intent recognition result from the tool dependency graph includes:

[0012] The operation type in the intent recognition result is matched with the function type declaration of each capability declaration, and the matching tool set is determined based on the matching result; the operation type refers to the type of behavior extracted from the natural language instruction that represents the user's expected behavior.

[0013] In the tool dependency graph, each node corresponding to the matching tool set is used as an anchor node.

[0014] In one embodiment, the method further includes:

[0015] When the natural language instruction is identified to contain dispatch execution semantics, multiple target objects are extracted from the dispatch execution semantics; the dispatch execution semantics refers to the semantic expression of executing the same execution content with different target objects respectively;

[0016] The ordered execution scheme is instantiated into multiple sub-execution schemes; each sub-execution scheme corresponds to a target object and contains the same sequence of execution steps.

[0017] Each of the sub-execution schemes is allocated an independent resource storage space in the resource locator container, and each of the resource storage spaces is used to store the intermediate resource locators generated during the execution of the corresponding sub-execution scheme.

[0018] In one embodiment, the method further includes:

[0019] A corresponding resource locator container is created for the session that issues the natural language command; the resource locator container maintains the mapping relationship between resource types and resource locators in a key-value pair structure;

[0020] During the execution of the ordered execution scheme, for any tool node, before the tool node is executed, the required input resource type is determined according to the input resource declaration in the capability declaration of the tool node, the resource locator corresponding to the resource type is queried from the resource locator container, and the queried resource locator is injected into the tool node as an input parameter;

[0021] After the tool node completes its execution, the resource locators corresponding to each resource type output by the tool node are extracted, and the extracted resource locators are registered to the resource locator container according to the predefined mapping rules; wherein, the predefined mapping rules define the mapping relationship between the output resource types and the key names in the resource locator container.

[0022] In one embodiment, the method further includes:

[0023] Resource access constraints are imposed on each tool node; the resource access constraints are used to prevent each tool node from inferring or searching for the required resource locators on its own, and the input resource locators of each tool node are obtained only through the injection mechanism of the resource locator container.

[0024] In one embodiment, the method further includes:

[0025] Each tool node is executed sequentially according to the topological order in the ordered execution scheme.

[0026] When the execution failure of the target tool node is detected, starting from the target tool node, trace back along the directed edges of the tool dependency graph to its direct upstream tool node.

[0027] Starting from the direct upstream tool node, traverse its downstream branches to find whether there are other tool nodes that declare the same output resource type as the target tool node.

[0028] If they exist, the other tool nodes are identified as candidate replacement nodes for the target tool node;

[0029] For each candidate replacement node, verify whether the input resource type declared in its input resource declaration has been produced and registered to the resource locator container by the preceding steps completed in the current ordered execution scheme. The candidate replacement nodes that pass the verification are determined as available replacement nodes.

[0030] The available alternative node is inserted into the position of the target tool node in the ordered execution scheme, the topological sort of each downstream tool node of the available alternative node is recalculated, and an updated ordered execution scheme is generated.

[0031] Secondly, this application also provides a tool intelligent scheduling device, comprising:

[0032] The acquisition module is used to acquire the capability declarations of each dedicated tool; the capability declaration includes at least one of output resource declaration, input resource declaration, and function type declaration; the output resource declaration is used to declare the resource type output after the corresponding dedicated tool is executed; the input resource declaration is used to declare the input resource type required before the corresponding dedicated tool is executed; and the function type declaration is used to declare the function type provided by the corresponding dedicated tool.

[0033] A construction module is used to respond to a tool dependency graph update command, scan each of the capability declarations, and construct a directed acyclic tool dependency graph based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each dedicated tool, and the directed edges represent the input-output dependency relationships between each dedicated tool;

[0034] An intent recognition module is used to respond to a natural language command input by a user, perform intent recognition on the natural language command, and obtain an intent recognition result;

[0035] The derivation module is used to determine the anchor node that matches the intent recognition result from the tool dependency graph, and to perform bidirectional derivation along the directed edges of the tool dependency graph starting from the anchor node to obtain the complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream supporting nodes of the anchor node, and all downstream dependent nodes;

[0036] The generation module is used to perform topological sorting on all nodes contained in the complete execution chain to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0038] Obtain the capability declarations of each specialized tool; the capability declarations include at least one of output resource declarations, input resource declarations, and function type declarations; the output resource declarations are used to declare the resource types output after the corresponding specialized tool is executed; the input resource declarations are used to declare the input resource types required before the corresponding specialized tool is executed; and the function type declarations are used to declare the function types provided by the corresponding specialized tool.

[0039] In response to the tool dependency graph update command, each of the capability declarations is scanned, and a directed acyclic tool dependency graph is constructed based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationships between each special tool;

[0040] In response to a natural language instruction input by the user, intent recognition is performed on the natural language instruction to obtain an intent recognition result;

[0041] From the tool dependency graph, an anchor node matching the intent recognition result is determined, and bidirectional derivation is performed along the directed edges of the tool dependency graph starting from the anchor node to obtain a complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes.

[0042] The nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0044] Obtain the capability declarations of each specialized tool; the capability declarations include at least one of output resource declarations, input resource declarations, and function type declarations; the output resource declarations are used to declare the resource types output after the corresponding specialized tool is executed; the input resource declarations are used to declare the input resource types required before the corresponding specialized tool is executed; and the function type declarations are used to declare the function types provided by the corresponding specialized tool.

[0045] In response to the tool dependency graph update command, each of the capability declarations is scanned, and a directed acyclic tool dependency graph is constructed based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationships between each special tool;

[0046] In response to a natural language instruction input by the user, intent recognition is performed on the natural language instruction to obtain an intent recognition result;

[0047] From the tool dependency graph, an anchor node matching the intent recognition result is determined, and bidirectional derivation is performed along the directed edges of the tool dependency graph starting from the anchor node to obtain a complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes.

[0048] The nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

[0049] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0050] Obtain the capability declarations of each specialized tool; the capability declarations include at least one of output resource declarations, input resource declarations, and function type declarations; the output resource declarations are used to declare the resource types output after the corresponding specialized tool is executed; the input resource declarations are used to declare the input resource types required before the corresponding specialized tool is executed; and the function type declarations are used to declare the function types provided by the corresponding specialized tool.

[0051] In response to the tool dependency graph update command, each of the capability declarations is scanned, and a directed acyclic tool dependency graph is constructed based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationships between each special tool;

[0052] In response to a natural language instruction input by the user, intent recognition is performed on the natural language instruction to obtain an intent recognition result;

[0053] From the tool dependency graph, an anchor node matching the intent recognition result is determined, and bidirectional derivation is performed along the directed edges of the tool dependency graph starting from the anchor node to obtain a complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes.

[0054] The nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

[0055] The aforementioned intelligent scheduling methods, devices, equipment, media, and program products, because the capability declarations of each specialized tool uniformly describe the output resource type, input resource type, and function type of the tool using a standardized data structure, enable a structured understanding of the capability boundaries of each tool. Based on this, by scanning each capability declaration and automatically constructing a directed acyclic tool dependency graph based on the matching relationship between output resource types and input resource types, the preconditions, output results, and upstream and downstream coupling relationships between tools are explicitly and structurally solidified in the graph structure, avoiding the deficiency of lacking a structured understanding of toolchain dependencies. When the user inputs natural language commands, through... By identifying anchor nodes through intent recognition and performing bidirectional derivation along the tool dependency graph starting from these anchor nodes, the complete execution chain is ensured to cover all tool nodes required to achieve the user task, eliminating the risk of missing steps from the derivation mechanism. Furthermore, the complete execution chain is topologically sorted to generate an ordered execution scheme, ensuring that the execution order of each tool node strictly follows the input-output dependency relationship, thus eliminating the problem of disordered execution order from the execution scheduling level. The technical solution of this application can automatically anchor and bidirectionally derive a complete execution chain covering the entire task lifecycle based on the intent recognition results, autonomously plan a complete and ordered tool call execution sequence, and realize the automatic orchestration and reliable execution of dedicated tools. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a flowchart illustrating the intelligent tool scheduling method in one embodiment;

[0058] Figure 2 This is a schematic diagram of the structure of a tool dependency graph automatically constructed based on capability declarations in one embodiment.

[0059] Figure 3 This is a flowchart illustrating the steps of determining the anchor node that matches the intent recognition result from the tool dependency graph in one embodiment.

[0060] Figure 4 This is a flowchart illustrating the process from user natural language commands to an ordered execution scheme in one embodiment;

[0061] Figure 5 This is a schematic diagram illustrating the interaction relationship between the resource locator container and the tool node in one embodiment.

[0062] Figure 6 This is a structural block diagram of a tool intelligent scheduling device in one embodiment;

[0063] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0065] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various objects, but these objects are not limited by these terms. These terms are only used to distinguish the first object from the second object. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0066] Professional analysis work such as power system numerical simulation, safety detection, performance evaluation, and operation mode evaluation relies on the collaborative use of specialized tools from multiple fields, process orchestration, and automated execution.

[0067] In typical business scenarios for power system operation mode analysis, personnel need to rely on a series of specialized computing tools to complete the assessment of the power grid's operating status. The specific process includes: first, modifying the data using domain-specific tools; then, sequentially performing multiple calculation steps such as steady-state analysis, single-dimensional fault set generation, single-dimensional scan execution, multi-dimensional fault set generation, multi-dimensional scan execution, multi-scenario generation, and transient assessment. Strict input-output dependencies exist between each calculation step.

[0068] In the traditional manual operation mode, the entire analysis process needs to be completed manually by business personnel. The entire process relies on manual control of process details. The specific pain points are concentrated in four dimensions: First, it is necessary to memorize the input and output dependencies of all special tools; second, it is necessary to manually complete the transfer and docking of resource locators for intermediate results of each step; third, it is necessary to manually verify the consistency between the input parameters of each step and the output parameters of the previous step; and fourth, after the task is completed, it is necessary to manually check and locate the faulty steps one by one.

[0069] With the development of intelligent computing model technology with natural language understanding capabilities, intelligent solutions have emerged that drive intelligent agents based on such models, automatically deconstructing user intents and enabling autonomous tool invocation. However, these solutions have shortcomings: intelligent computing models cannot form a structured and standardized understanding of the dependencies of dedicated toolchains, which easily leads to problems such as missed steps, disordered execution order, and loss of resource location information. Especially in complex scenarios involving multi-stage iterations and parallel execution of multiple solutions, intelligent computing models struggle to autonomously plan accurate tool invocation execution sequences.

[0070] To address the aforementioned issues, one technical solution involves workflow orchestration based on a rules engine. The implementation logic of this solution is as follows: Operations and maintenance personnel pre-analyze all dedicated tools involved in each business scenario and their input-output dependencies. A directed acyclic graph (DAG) description file is then written using a workflow definition language (such as a structured markup language). This file defines the node name, input parameter source, output parameter destination, and standardized execution order for each tool node. Once the description file is completed, it is deployed to the workflow engine. The workflow engine loads the description file and calls the tools sequentially according to the predefined order. When a user executes a business task, the corresponding business scenario is matched, and the appropriate workflow template is triggered, allowing the tools to be scheduled for computational jobs according to the predefined order.

[0071] The shortcomings of this solution are as follows: First, the workflow templates need to be manually pre-written, and a new template needs to be added for each new business scenario, and the maintenance cost increases exponentially with the complexity of the business; Second, it cannot respond to unstructured and personalized work instructions in natural language input by users; Third, the workflow templates are fixed and cannot be dynamically adjusted according to the intermediate execution results.

[0072] Another technical solution is a reasoning-action loop based on an intelligent computing model. The implementation logic of this solution is as follows: After receiving a user instruction, the intelligent computing model, based on the instruction content and a list of dedicated tools, infers which tool should be invoked. After the tool completes the computational task, the intelligent computing model obtains the execution result of that tool and adds it to the session window that issued the user instruction. Based on the updated context information of this window, the intelligent computing model performs reasoning again to determine the next tool to be invoked or to confirm that the task has been completed. This iterative process of "reasoning—action—result observation" continues until the model outputs a termination signal.

[0073] The shortcomings of this approach are as follows: First, the reasoning process of the intelligent computing model is prone to cognitive illusions, such as fabricating non-existent tools and customizing parameter settings; second, the lack of structured dependency constraints may lead to errors in the execution order of steps; third, resource location information is easily lost or confused during the reasoning process, especially in complex tasks that span multiple steps; and fourth, for scenarios where multiple solutions are executed in parallel, the intelligent computing model cannot autonomously distinguish between "serial nested execution" and "parallel independent execution".

[0074] Another technical solution is a service registration and invocation scheme based on a unified tool protocol. The implementation logic of this scheme is as follows: developers write standardized interface descriptions (including tool name, function description, input parameter format, and output parameter format) for each tool according to the unified tool protocol, and register these descriptions with the service registry center. When executing a task, the intelligent computing model queries the service registry center for available dedicated tools and their interface descriptions, selects the matching tool according to the current task requirements, assembles the invocation parameters according to the interface description, initiates the invocation through a unified application programming interface gateway, and receives the standardized format return results.

[0075] The shortcomings of this solution are as follows: First, simply standardizing the interface only solves the problem of tool discovery and invocation, but does not solve the problem of dependency orchestration between tools; second, it lacks a unified entry mechanism, and intelligent computing models may bypass the tool registry and try to write their own code directly; third, it does not take into account the constraints specific to professional fields (such as specific character encoding, special format data files cannot be directly processed by general text tools, etc.).

[0076] This application addresses the deficiencies in related technologies and mainly solves the following problems:

[0077] 1. Execution order errors caused by missing tool dependencies: There are strict input-output dependencies among the various specialized tools involved in professional operation analysis (data modification, steady-state analysis, single-dimensional fault set generation, single-dimensional scan execution, multi-dimensional fault set generation, multi-dimensional scan execution, multi-scenario generation, transient evaluation, index calculation, etc.). For example, multi-dimensional fault set generation must depend on the output of single-dimensional fault set. The relevant technical solutions cannot express this dependency in a structured way and force the agent to comply with it, resulting in disordered execution order and intermediate results that cannot be passed to downstream steps.

[0078] 2. Insufficient autonomous planning capability of intelligent computing models in complex multi-stage scenarios: When user instructions include multiple execution requirements (such as "adjust a key parameter to multiple target values ​​and determine whether it is stable") or compound tasks (such as "generate boundary data first, and then modify and verify based on the boundary data"), intelligent computing models cannot correctly identify task boundaries, decompose them into reasonable sub-step sequences, and ensure that each execution is based on the correct source data, often resulting in nesting errors, incorrect resource location information, and other problems.

[0079] 3. Loss and confusion of resource location information during cross-step transmission: In a multi-step execution chain, the resource locator of the output result of each step needs to be referenced in subsequent steps. Related solutions lack a systematic resource locator maintenance mechanism, requiring downstream steps to locate the position of the upstream output result themselves. This can easily lead to incorrect input due to inference errors, or incorrectly superimposing subsequent operations onto the results of previous operations in multiple execution scenarios.

[0080] This application abstracts and models each specialized computing capability as a standardized "capability contract / capability declaration," using structured metadata to standardize the input conditions, output content, responsive intents, or achievable functions of that capability. The capability declaration uniformly describes the tool's output resource type, input resource type, and function type using a standardized data structure. By scanning each capability declaration and based on the matching relationship between output and input resource types, a directed acyclic tool dependency graph can be automatically constructed. When a user inputs a natural language command, an anchor node is determined through intent recognition. Starting from the anchor node, bidirectional deduction is performed along the tool dependency graph to generate an ordered execution plan. By explicitly stating the capability declaration, dependencies are transformed from implicit to explicit structured expression. The orchestration process is verifiable and traceable, avoiding the illusionary reasoning of intelligent computing models. From intent recognition to anchor node matching to tool dependency graph topology deduction, every step of the transformation from unstructured natural language to a structured execution chain is verifiable, eliminating the uncertainty of autonomous reasoning in intelligent computing models. By establishing a session-level resource locator container and an "injection-registration" mechanism, the input resource locators for each tool node are obtained only through the injection mechanism of the resource locator container. This eliminates resource locator inference errors at the architectural level, ensuring deterministic correctness of input location at each step in the multi-step execution chain. When a target tool node fails, an available alternative node providing the same output is automatically retrieved from the tool dependency graph, enabling dynamic routing adjustments. Single-point failures do not interrupt the entire process, improving robustness under complex operating conditions.

[0081] In one exemplary embodiment, such as Figure 1As shown, a tool intelligent scheduling method is provided. This embodiment illustrates the method applied to a terminal, but it is understood that the method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0082] Step 101: Obtain the capability statements for each specialized tool.

[0083] A capability declaration includes at least one of an output resource declaration, an input resource declaration, and a function type declaration; the output resource declaration is used to declare the resource type output after the corresponding special tool is executed; the input resource declaration is used to declare the input resource type required before the corresponding special tool is executed; and the function type declaration is used to declare the function type provided by the corresponding special tool.

[0084] Step 102: In response to the tool dependency graph update instruction, scan each capability declaration and construct a directed acyclic tool dependency graph based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration.

[0085] The nodes of the tool dependency graph correspond to each specialized tool, and the directed edges represent the input-output dependencies between the specialized tools.

[0086] When constructing a directed acyclic tool dependency graph, for any two tool nodes corresponding to special tools, if the output resource type declared in the output resource declaration of the first tool node matches the input resource type declared in the input resource declaration of the second tool node, or if there is a pre-defined semantic mapping relationship between the output resource type and the input resource type, a directed edge is established from the first tool node to the second tool node. The directed edge represents the output resource of the first tool node as the input resource of the second tool node. All tool nodes and their directed edges together constitute the directed acyclic tool dependency graph.

[0087] Reference Figure 2 The diagram shown is a schematic representation of the tool dependency graph automatically constructed based on capability declarations, as provided in this application. Figure 2As shown, the tool dependency graph contains six domain-specific tool nodes arranged in a directed acyclic pattern, namely tool A to tool F. Tool A (output resource type: modified data file) serves as the root node, and its output points to tools B (input resource type: data file; output resource type: steady-state analysis result), C (input resource type: data file; output resource type: single-dimensional fault set), and E (input resource type: data file, single-dimensional fault set; output resource type: single-dimensional scan result), respectively. The output resource type (single-dimensional fault set) of tool C matches the input resource types of tools D (input resource type: data file, single-dimensional fault set; output resource type: multi-dimensional fault set) and E, respectively, thus establishing directed edges from tool C to tools D and E. Similarly, the output resource type (single-dimensional scan result) of tool E matches the input resource type of tool F (input resource type: single-dimensional scan result; output resource type: index calculation result), thus establishing a directed edge from tool E to tool F. Therefore, based on the resource type matching relationship between the output resource declaration and the input resource declaration in the capability declaration of each special tool, a directed acyclic tool dependency graph is automatically constructed to represent the input-output dependency relationship and execution order between each special tool.

[0088] Specifically, the tool dependency graph update instruction can be triggered in the following scenarios: When the system starts or restarts, the tool dependency graph update instruction is automatically generated, triggering a scan of all capability declarations and the construction of the tool dependency graph; when a new professional domain-specific tool is added to the system or an existing specialized tool is removed from the system, the tool dependency graph update instruction is generated, triggering a scan of incremental capability declarations and a partial update of the tool dependency graph; when the capability declaration of a registered specialized tool undergoes a version change, the tool dependency graph update instruction is generated, triggering a rescan of the changed specialized tool's capability declaration and a topology recalculation of the tool dependency graph.

[0089] The function type declaration is used to declare the function type provided by the corresponding dedicated tool, as well as the set of natural language keywords used to trigger that function type. For example, natural language keywords may include "modify", "scan", "metric calculation", etc.

[0090] In one alternative implementation, the capability declaration also includes version identification information; when a dedicated tool is updated, the historical version capability declaration of the dedicated tool is retained to ensure compatibility with downstream tool nodes that depend on the output resource types declared in the historical version output resource declaration.

[0091] Step 103: In response to the natural language command input by the user, perform intent recognition on the natural language command to obtain the intent recognition result.

[0092] In this step, in response to the natural language command input by the user, intent recognition is performed on the natural language command to obtain the intent recognition result.

[0093] Step 104: From the tool dependency graph, determine the anchor node that matches the intent recognition result, and starting from the anchor node, perform bidirectional derivation along the directed edges of the tool dependency graph to obtain the complete execution chain for the natural language instruction.

[0094] The complete execution chain includes all the tool nodes required to complete the task corresponding to the natural language instruction. All tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes.

[0095] In this step, the intent recognition results are matched with the capability claims of each specialized tool to determine the anchor tool node that matches the intent recognition results. Starting from the anchor tool node, bidirectional derivation is performed along the directed edges of the tool dependency graph to obtain the complete execution chain for the natural language command.

[0096] Step 105: Perform topological sorting on all nodes in the complete execution chain to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to a call to a dedicated tool.

[0097] Each execution step in the ordered execution plan must include at least a step identifier, the node identifier of the corresponding special tool, input resource location information, and output resource location information.

[0098] Unlike traditional workflow engines that require manual pre-writing of directed acyclic graph description files, this application achieves intent-driven dynamic tool combination through capability declarations; the tool dependency graph is automatically constructed based on capability declarations and dynamically infers and generates ordered execution schemes in response to user natural language commands, eliminating the need for manual pre-definition of workflow templates for each business scenario.

[0099] In one exemplary embodiment, the intelligent scheduling method of this application is applied to a scenario of professional system operation mode analysis. The capability declarations for each specialized tool are as follows:

[0100] In the capability declaration of the data modification tool, the output resource declaration states that the output resource type is "modified data file", the input resource declaration states that the input resource type is "data file", and the function type declaration states that the function type corresponds to the set of natural language keywords including "modify", "shutdown", and "adjust".

[0101] In the capability declaration of the steady-state analysis tool, the output resource declaration states that the output resource type is "steady-state analysis result", the input resource declaration states that the input resource type is "data file", and the function type declaration states that the function type corresponds to the set of natural language keywords including "steady-state analysis" and "benchmark verification".

[0102] In the capability declaration of the single-dimensional fault set generation tool, the output resource declaration declares the output resource type as "single-dimensional fault set", the input resource declaration declares the input resource type as "data file", and the function type declaration declares the function type corresponding to the set of natural language keywords including "single-dimensional scan" and "safety verification".

[0103] In the capability declaration of the multi-dimensional fault set generation tool, the output resource declaration declares the output resource type as "multi-dimensional fault set", the input resource declaration declares the input resource types as "data file" and "single-dimensional fault set", and the function type declaration declares the function type corresponding to the natural language keyword set as "multi-dimensional scan".

[0104] In the capability declaration of the single-dimensional scanning execution tool, the output resource declaration states that the output resource type is "single-dimensional scanning result", the input resource declaration states that the input resource types include "data file" and "single-dimensional fault set", and the function type declaration states that the function type corresponds to the set of natural language keywords including "single-dimensional scanning".

[0105] In the capability declaration of the indicator calculation tool, the output resource declaration declares the output resource type as "indicator calculation result", the input resource declaration declares the input resource type as "single-dimensional scan result", and the function type declaration declares the function type corresponding to the natural language keyword set including "indicator", "load", and "stability margin".

[0106] When the intelligent tool scheduling system in the terminal starts, it scans each capability declaration and automatically constructs a directed acyclic tool dependency graph based on the resource type matching relationship between each output resource declaration and the input resource declaration.

[0107] When a user inputs the natural language command "Disconnect a critical component, perform a single-dimensional security scan within this partition, and calculate metrics," the system performs intent recognition on the natural language command, extracting the intent elements: the target object is "a critical component," the operation type set includes "disconnect," "single-dimensional scan," and "metric calculation," and the parameter constraint set includes "this partition." Subsequently, the system matches each operation type in the operation type set with the function type declaration in each capability declaration, obtaining matching tool nodes: "disconnect" matches to the data modification tool, "single-dimensional scan" matches to both the single-dimensional fault set generation tool and the single-dimensional scan execution tool, and "metric calculation" matches to the metric calculation tool. Using the matched tool nodes as anchor nodes, bidirectional derivation is performed along the directed edges in the tool dependency graph to obtain the complete execution chain: data modification tool → single-dimensional fault set generation tool → single-dimensional scan execution tool → metric calculation tool. The complete execution chain is topologically sorted to generate an ordered execution plan. The system then schedules and executes the following steps in sequence: Step 1: A data modification tool is invoked to disconnect a critical component and obtain the power system operating status data after disconnection, which serves as the modified data file. Step 2: The modified data file is input into a single-dimensional fault set generation tool, which generates a single-dimensional fault set based on the modified data file. Step 3: The single-dimensional fault set is input into a single-dimensional scan execution tool, which performs a security scan on a specified partition based on the single-dimensional fault set to generate a single-dimensional scan result. Step 4: An indicator calculation tool calculates indicators based on the single-dimensional scan result to obtain the indicator calculation result.

[0108] In another exemplary embodiment, the intelligent scheduling method of this application is applied to a multi-voltage-level power grid collaborative analysis scenario. Collaborative analysis needs to be performed on a hierarchical power grid including a 500kV main grid, a 220kV ring network, and a 110kV distribution network. There are strict input-output dependencies between the power flow calculation tools for different voltage levels: the execution of the 220kV ring network power flow calculation tool must be based on the equivalent output results of the 500kV main grid power flow calculation tool, and the execution of the 110kV distribution network power flow calculation tool must be based on the equivalent output results of the 220kV ring network power flow calculation tool.

[0109] The following is a declaration of the configuration capabilities for power flow calculation tools at each voltage level:

[0110] In the capability declaration of the 500kV main grid power flow calculation tool, the output resource declaration declares the output resource type as "500kV equivalent results", and the input resource declaration declares the input resource type as "full network data file".

[0111] In the capability declaration of the 220kV ring network power flow calculation tool, the output resource declaration declares the output resource type as "220kV equivalent result", and the input resource declaration declares the input resource type as "500kV equivalent result".

[0112] In the capability declaration of the 110kV distribution network power flow calculation tool, the output resource declaration declares the output resource type as "110kV calculation result", and the input resource declaration declares the input resource type as "220kV equivalent result".

[0113] In the capability declaration of the network-wide indicator aggregation tool, the output resource declaration states that the output resource type is "collaborative analysis report", and the input resource declaration states that the input resource types include "500kV equivalent results", "220kV equivalent results" and "110kV calculation results".

[0114] When the system starts, it scans all capability declarations and automatically constructs a directed acyclic tool dependency graph based on the resource type matching relationship between each output resource declaration and the input resource declaration. The tool dependency graph forms a serial execution chain of "500kV main grid power flow calculation tool → 220kV ring network power flow calculation tool → 110kV distribution network power flow calculation tool → network-wide index summary tool".

[0115] When a user inputs the natural language command "Perform multi-level voltage collaborative analysis of the entire network", the system performs intent recognition on the natural language command and extracts the intent elements. The system then matches each operation type in the operation type set with the function type declaration in the capability declaration of the power flow calculation tool for each voltage level to determine the matched tool nodes for each voltage level.

[0116] Using the matched tool nodes as anchor nodes, bidirectional derivation is performed along directed edges in the tool dependency graph to obtain a complete execution chain covering the entire cycle of multi-level voltage collaborative analysis. The complete execution chain is then topologically sorted to generate an ordered execution scheme; the ordered execution scheme includes the following execution steps:

[0117] Step 1: Call the 500kV main grid power flow calculation tool to perform power flow calculation and generate 500kV equivalent results;

[0118] Step 2: Call the 220kV ring network power flow calculation tool, and based on the 500kV equivalent results, perform the 220kV ring network power flow calculation to produce the 220kV equivalent results;

[0119] Step 3: Call the 110kV distribution network power flow calculation tool, and based on the 220kV equivalent results, perform 110kV distribution network power flow calculation to produce 110kV calculation results;

[0120] Step 4: Call the network index aggregation tool, and based on the 500kV equivalent results, 220kV equivalent results and 110kV calculation results, perform network index aggregation and generate a multi-level voltage collaborative analysis report.

[0121] In another exemplary embodiment, the intelligent scheduling method of this application is applied to a scenario of comparative evaluation of power grid operation modes. It is necessary to perform safety assessments on two typical operating sections: the summer peak mode and the winter low-peak mode, and compare the differences in safety margins under the two modes. The power flow data files for the two operating modes are different (corresponding to different load levels and grid structures), but the required evaluation process is the same, both requiring the sequential invocation of data loading tools, steady-state analysis tools, safety scanning tools, and index calculation tools.

[0122] When a user inputs the natural language command "Compare the security assessment results of the summer major mode and the winter minor mode," the system performs intent recognition on the command. Based on the capability declarations of each specialized tool, the system performs bidirectional derivation in the tool dependency graph, starting from the matched anchor node, to obtain a complete execution chain. The complete execution chain is then topologically sorted to generate an ordered execution plan. Based on the summer major mode and the winter minor mode, the ordered execution plan is instantiated into two independent sub-execution plans: the summer major mode sub-execution plan and the winter minor mode sub-execution plan; each sub-execution plan contains the same sequence of execution steps.

[0123] The system executes each step of the summer mode execution plan in sequence: calling the data loading tool to load summer load and network data, and generating a summer mode data file; calling the steady-state analysis tool to perform steady-state analysis based on the summer mode data file; calling the safety scanning tool to perform a safety scan based on the steady-state analysis results; and calling the index calculation tool to calculate the summer safety margin based on the safety scan results.

[0124] The system executes each step of the winter small-scale method execution plan sequentially: It calls the data loading tool to load winter load and network structure data, generating a winter mode data file; and calls the steady-state analysis tool to perform steady-state analysis based on the winter mode data file. When a steady-state analysis tool failure is detected (e.g., DC power flow calculation fails to converge), the system initiates a dynamic routing switchover process: starting from the steady-state analysis tool node, it traces backward along the tool dependency graph to its direct upstream tool node, traverses downstream branches to find candidate alternative nodes that declare the same output resource type (e.g., Newton-Raphson power flow calculation tools), inserts the verified candidate alternative nodes into the position of the steady-state analysis tool node in the winter small-scale method execution plan, recalculates the topology order of downstream tool nodes, and continues execution. Then, it calls the safety scanning tool and index calculation tool to complete the winter safety margin calculation.

[0125] After both the summer large-scale sub-execution plan and the winter small-scale sub-execution plan have been completed, the system will import the safety margins generated by each sub-execution plan into the comparison and summary engine to generate an operational mode comparison and evaluation report that includes the comparison results of summer and winter safety margins.

[0126] The intelligent tool scheduling method provided in this application achieves a structured understanding of the capability boundaries of each tool by uniformly describing the output resource type, input resource type, and function type of each tool using a standardized data structure in the capability declarations of each dedicated tool. Based on this, a directed acyclic tool dependency graph is automatically constructed by scanning each capability declaration and based on the matching relationship between output resource types and input resource types. This explicitly and structurally solidifies the preconditions, output results, and upstream and downstream coupling relationships between tools within the graph structure, avoiding the deficiency of lacking a structured understanding of toolchain dependencies. When a user inputs a natural language command, intent recognition is used to... Anchor nodes are identified, and bidirectional derivation is performed along the tool dependency graph starting from these anchor nodes. This ensures that the complete execution chain covers all tool nodes required to achieve the user task, eliminating the risk of missing steps from the derivation mechanism. Furthermore, the complete execution chain is topologically sorted to generate an ordered execution scheme, ensuring that the execution order of each tool node strictly follows the input-output dependency relationship, thus eliminating the problem of disordered execution order from the execution scheduling level. The technical solution of this application can automatically anchor and bidirectionally derive a complete execution chain covering the entire task lifecycle based on the intent recognition results, autonomously plan a complete and ordered tool call execution sequence, and realize the automatic orchestration and reliable execution of dedicated tools.

[0127] In one exemplary embodiment, such as Figure 3 As shown, step 104 includes steps 301 to 302. Wherein:

[0128] Step 301: Match the operation type in the intent recognition result with the function type declaration of each capability declaration, and determine the matching tool set based on the matching result;

[0129] Operation type refers to the type of behavior extracted from natural language instructions that represents the user's expected action.

[0130] Step 302: In the tool dependency graph, use each node corresponding to the matching tool set as the anchor node.

[0131] Reference Figure 4 The diagram shown illustrates the flow of the user's natural language commands to an ordered execution scheme provided in this application. Figure 4As shown, in response to user-input natural language commands, intent recognition is performed on the natural language commands, and structured intent elements are extracted. Intent elements include at least the target object, a set of operation types, and a set of parameter constraints. The operation types in the operation type set are matched with the function type declarations of each capability declaration to determine one or more matching candidate tools, resulting in a set of matching tools. Each node corresponding to the matching tool set serves as an anchor node. The anchor node acts as the unified entry point for the user's natural language command to access the tool dependency graph, and subsequent execution chain derivations all start from the anchor node. Starting from the anchor node, bidirectional derivation is performed along the directed edges of the tool dependency graph to obtain the complete execution chain for the natural language command. All nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme.

[0132] In one optional implementation, when the same operation type matches multiple capability declarations, the tool node corresponding to the function type declaration with the most matching keywords is determined as the anchor node; when the number of matching keywords is the same, the tool node corresponding to the function type declaration that is more relevant to the domain of the current session is determined as the anchor node.

[0133] In one optional implementation, when the same operation type matches multiple function type declarations successfully, for example, when the operation type as a composite semantic whole matches the first function type declaration successfully, and the sub-keyword in the operation type matches the second function type declaration successfully, the tool node corresponding to the first function type declaration is determined as the anchor node, so as to avoid the user's complex intent being degraded to the basic tool node.

[0134] A complex semantic whole refers to a complete action expression composed of multiple semantic units extracted from a user's natural language command, rather than a single independent basic semantic unit. For example, the operation type "single-dimensional security scan" extracted from a natural language command constitutes a complex semantic whole, while "scan" is only a sub-keyword within this complex semantic whole.

[0135] In one exemplary embodiment, the intelligent scheduling method of this application may further include the following steps:

[0136] When a natural language instruction is identified to contain dispatch execution semantics, multiple target objects are extracted from the dispatch execution semantics; dispatch execution semantics refers to the semantic expression of executing the same execution content with different target objects;

[0137] The ordered execution plan is instantiated into multiple sub-execution plans; each sub-execution plan corresponds to a target object and contains the same sequence of execution steps.

[0138] Each sub-execution scheme is allocated an independent resource storage space in the resource locator container, and each resource storage space is used to store the intermediate resource locators generated during the execution of the corresponding sub-execution scheme.

[0139] In this embodiment, when a natural language instruction is identified to contain dispatch execution semantics, multiple target objects are extracted from the dispatch execution semantics. Based on the multiple target objects, the ordered execution scheme is instantiated into multiple sub-execution schemes. Furthermore, each sub-execution scheme is allocated an independent resource storage space in a resource locator container. Each resource storage space is used to isolate and store intermediate resource locators generated during the execution of the corresponding sub-execution scheme, so as to prevent cross-contamination of resource location information between sub-execution schemes.

[0140] In this application, a resource locator refers to reference information that represents the storage location or access path of a resource. It is used to indicate the physical or logical storage location of the input resources or output resources required for the execution of a tool node, rather than the resource data content itself.

[0141] In one alternative implementation, intent recognition is performed within an intent recognition tool. This tool acts as the orchestration and routing layer, serving as the sole entry point for the user's natural language commands to access the intelligent scheduling system.

[0142] The intent recognition tool includes a natural language parsing template, which defines a set of rules for extracting structured intent elements from user natural language commands. The structured intent elements include at least the target object, a set of operation types, and a set of parameter constraints. The intent recognition tool also embeds a complex semantic pattern recognizer to detect compound semantic patterns, which include at least dispatch execution semantics, sequential execution semantics, and conditional execution semantics.

[0143] Dispatch execution semantics refers to the semantic expression of executing the same execution content with different target objects; for example, "perform security assessments on the summer large mode and the winter small mode respectively", or "adjust parameters to target values ​​A and B respectively". Sequential execution semantics refers to the semantic expression of instructing multiple execution content to be executed in a specific order; for example, "perform steady-state analysis first, then perform a security scan". Conditional execution semantics refers to the semantic expression of instructing the corresponding execution content to be triggered when a specific execution condition is met; for example, "if the steady-state calculation does not converge, switch to the alternative power flow algorithm".

[0144] All user natural language commands are processed through the intent recognition tool, and it is prohibited to bypass the intent recognition tool and directly call the underlying dedicated tools.

[0145] After each tool node completes its execution, the execution status and execution time of each tool node are collected, statistical information is generated and fed back to the intent recognition tool. The intent recognition tool adaptively adjusts the matching weight in the subsequent intent recognition process based on the statistical information. Specifically, for tool nodes with a historical execution success rate higher than a preset threshold, the matching priority of the function type declaration in their capability declaration is increased; for tool nodes with a historical execution failure rate higher than a preset threshold, the matching weight of the function type declaration in their capability declaration is decreased.

[0146] In one exemplary embodiment, the intelligent scheduling method of this application is applied to a multi-scheme parallel evaluation scenario in a professional system. Responding to the user's input natural language instruction "Based on boundary data, adjust a key parameter to a first target value and a second target value respectively, and determine whether it is stable," the system uses an intent recognition tool to perform intent recognition on the natural language instruction, extracting structured intent elements, including the target object "a key parameter," the operation type set "adjustment" and "stability judgment," and the parameter constraint set "first target value" and "second target value."

[0147] The complex semantic pattern recognizer embedded in the intent recognition tool detects natural language instructions containing the separator keyword "separately...to...", identifies them as dispatch execution semantics, and extracts multiple target objects from the dispatch execution semantics, including "first target value" and "second target value".

[0148] Each operation type in the operation type set is matched with the function type declaration in each capability declaration: "Adjustment" is matched with the data modification tool, and "Stability Judgment" is matched with the transient assessment tool. Using the matched tool nodes as anchor nodes, a bidirectional derivation is performed along the directed edges in the tool dependency graph to obtain the complete execution chain.

[0149] The complete execution chain undergoes multi-stage planning and topology sorting to generate an ordered execution plan. This ordered plan comprises a common pre-execution stage and independent execution stages. In the common pre-execution stage, a boundary extraction tool is invoked to generate boundary data, which serves as a common input resource for subsequent independent execution stages. In the independent execution stages, the ordered execution plan is instantiated into two independent sub-execution plans: sub-plan A corresponding to the first target value and sub-plan B corresponding to the second target value. Each sub-execution plan contains the same sequence of execution steps: sequentially invoking a data modification tool to adjust parameters and invoking a transient evaluation tool to determine stability.

[0150] In another exemplary embodiment, the intelligent scheduling method of this application is applied to a scenario of batch evaluation of transient stability under multiple operating conditions in power systems. Personnel need to perform transient stability evaluations on the same power grid model under different fault conditions, including three-phase short circuit, two-phase grounding, and single-phase grounding. Traditional methods require manually configuring each fault condition and starting simulation calculations one by one.

[0151] The capability declarations for each relevant tool are configured as follows: In the capability declaration of the transient assessment tool, the output resource declaration states that the output resource type is "transient assessment result", the input resource declaration states that the input resource types include "data file" and "fault scenario parameters", and the function type declaration states that the function type corresponds to the set of natural language keywords including "transient assessment" and "stability judgment"; In the capability declaration of the result summary tool, the output resource declaration states that the output resource type is "multi-condition comparison assessment report", and the input resource declaration states that the input resource type is "transient assessment result".

[0152] When the user inputs the natural language command "to perform transient stability assessments and summarize comparisons for three fault conditions: three-phase short circuit, two-phase grounding, and single-phase grounding respectively", the system uses an intent recognition tool to identify the intent of the natural language command. The complex semantic pattern recognizer embedded in the intent recognition tool detects the separation keyword "separately..." in the natural language command, identifies it as dispatch execution semantics, and extracts multiple target objects from the dispatch execution semantics, including the three fault conditions of "three-phase short circuit", "two-phase grounding", and "single-phase grounding".

[0153] Based on multiple target objects, the ordered execution plan is instantiated into three independent sub-execution plans: Sub-Plan 1 for a three-phase short-circuit fault, Sub-Plan 2 for a two-phase ground fault, and Sub-Plan 3 for a single-phase ground fault. Each sub-execution plan contains the same sequence of execution steps and is based on the same common input resource, namely, the power grid basic data.

[0154] Each sub-execution plan executes the following steps sequentially: It calls the data loading tool to load basic power grid data; it calls the fault scenario configuration tool to configure the fault scenario parameters for the corresponding fault condition; and it calls the transient assessment tool to perform a transient stability assessment based on the fault scenario parameters, generating transient assessment results. After each sub-execution plan is completed, it calls the result aggregation tool to obtain the transient assessment results for each condition, and aggregates them to generate a multi-condition comparative assessment report.

[0155] In yet another exemplary embodiment, the intelligent scheduling method of this application is applied to a multi-partition independent security scan scenario. For the same baseline data file, security scans need to be performed separately for different power supply partitions (partition A, partition B, and partition C), and the load margin of each partition needs to be calculated.

[0156] In response to the user's input natural language command "perform security scans and assess load margins for each partition", the system uses an intent recognition tool to perform intent recognition on the natural language command. The complex semantic pattern recognizer embedded in the intent recognition tool detects that the natural language command contains dispatch execution semantics, and extracts multiple target objects from the dispatch execution semantics, including partition A, partition B and partition C.

[0157] Based on multiple target objects, the ordered execution plan is instantiated into three independent sub-execution plans: sub-plan A corresponding to partition A, sub-plan B corresponding to partition B, and sub-plan C corresponding to partition C. Each sub-execution plan contains the same sequence of execution steps and is based on the same common input resource, namely the baseline data file.

[0158] Each sub-execution plan executes the following steps sequentially: It calls the data loading tool to load the baseline data file; it calls the security scanning tool to perform a security scan on the corresponding partition; and it calls the load margin calculation tool to calculate the load margin of the corresponding partition based on the security scan results. After each sub-execution plan has completed, it calls the multi-partition result aggregation tool to obtain the load margin corresponding to each partition and generates a multi-partition comparison and evaluation report.

[0159] In one exemplary embodiment, the intelligent scheduling method of this application may further include the following steps:

[0160] A corresponding resource locator container is created for each session that issues a natural language command; the resource locator container maintains the mapping relationship between resource types and resource locators in a key-value pair structure;

[0161] During the execution of the ordered execution scheme, for any tool node, before the tool node is executed, the required input resource type is determined according to the input resource declaration in the capability declaration of the tool node, the resource locator corresponding to the resource type is queried from the resource locator container, and the queried resource locator is injected into the tool node as an input parameter;

[0162] After the tool node completes its execution, the resource locators corresponding to each resource type output by the tool node are extracted, and the extracted resource locators are registered to the resource locator container according to the predefined mapping rules. The predefined mapping rules define the mapping relationship between the output resource types and the key names in the resource locator container.

[0163] In this embodiment, a corresponding resource locator container is created for the user session that issues natural language commands; the resource locator container is used to continuously record the resource location / location information generated during the execution of each tool node throughout the lifecycle of the user session.

[0164] During the execution of the ordered execution scheme, for each tool node, before the tool node is executed, the required input resource type is determined according to the input resource declaration in the tool node's capability declaration. The resource locator corresponding to the resource type is queried from the resource locator container, and the queried resource locator is injected into the tool node as an input parameter so that the tool node can obtain the corresponding input resource based on the resource locator.

[0165] After the tool node completes its execution, the resource locators corresponding to each resource type produced by the tool node are extracted, and the extracted resource locators are registered to the resource locator container according to the predefined mapping rules. The predefined mapping rules define the mapping relationship between the produced resource types and the key names in the resource locator container, and are used to classify and store the resource locators produced by the tool node to the corresponding key names for downstream tool nodes to query and call.

[0166] This embodiment establishes a session-level resource locator container, serving as the sole intermediary for resource locator exchange between tool nodes within the same user session. After an upstream tool node completes execution, it registers its generated resource locators into the resource locator container according to predefined mapping rules. Before execution, a downstream tool node queries the resource locator container for the resource locator corresponding to the required input resource type and injects it as a parameter into the downstream tool node. The queried resource locator is injected as an input parameter into the tool node; the injection process is completed automatically by the system. The tool node is unaware of the source of the resource locator acquisition and only needs to declare the input resource type in its capability declaration. The predefined mapping rules define the correspondence between generated resource types and key names in the resource locator container. The system queries the mapping rules based on the generated resource type declared in the capability declaration to determine the corresponding target key name and writes the resource locator into the value corresponding to the target key name.

[0167] The resource locator container maintains a key-value pair structure that maps resource types to resource locators. Resource types include at least: current data file resource locator, fault set resource locator, scan result resource locator, and metric calculation result resource locator. The resource locator container persists throughout the user session's lifecycle and is progressively updated as each tool node executes.

[0168] In one exemplary embodiment, the intelligent scheduling method of this application may further include the following steps:

[0169] Resource access constraints are imposed on each tool node; these constraints prevent tool nodes from inferring or searching for the required resource locators on their own, and the input resource locators for each tool node are obtained only through the injection mechanism of the resource locator container.

[0170] In this embodiment, resource access constraints are imposed on each tool node, forcing the input resource locators of each tool node to be obtained only through the injection mechanism of the resource locator container, thereby eliminating resource locator inference errors from the architectural level.

[0171] In an exemplary embodiment, the resource locator container also maintains a timestamp attribute and a reference count attribute for each resource locator mapping entry; the reference count attribute is used to record the number of times the corresponding resource locator is referenced. When a resource locator is no longer referenced in subsequent execution steps, and its corresponding resource file reaches a preset retention period, the resource locator container automatically triggers a resource reclamation mechanism, deletes the resource locator mapping entry, and releases its corresponding storage resources.

[0172] Reference Figure 5 The diagram illustrates the interaction between the resource locator container and the tool node provided in this application. As shown, the session-level resource locator container maintains resource locators for various resources in a key-value pair structure, including at least the current data file locator, fault set file locator, scan result locator, and indicator calculation result locator.

[0173] Each tool node follows a standardized input injection, execution, and output registration process:

[0174] Before execution, the data modification tool obtains the required resource locators through input injection. After execution, it updates the modified data file locators produced by output registration to the resource locator container.

[0175] Before execution, the fault set generation tool reads data file locators from the resource locator container through input injection. After execution, it writes the generated fault set file locators into the resource locator container through output registration.

[0176] Before execution, the scanning execution tool reads data file locators and fault set file locators from the resource locator container through input injection. After execution, it writes the generated scan result locators into the resource locator container through output registration.

[0177] Thus, the output resource locators of upstream tool nodes are registered and stored in the resource locator container, while the input resource locators of downstream tool nodes are obtained from the resource locator container through injection, thereby realizing the deterministic transmission of resource location information between tool nodes.

[0178] In one exemplary embodiment, the intelligent scheduling method of this application is applied to a multi-stage data pipeline processing scenario. In response to the user's input natural language command "clean and denoise the raw running data, then aggregate and calculate each indicator by region, and finally output a summary evaluation report," the system performs intent recognition and extracts intent elements from the natural language command. It then matches the operation type with the function type declaration in each capability declaration, identifying the data cleaning tool, region aggregation tool, and report generation tool as matching tool nodes.

[0179] The system creates a resource locator container for the user session and loads the resource locator of the original data file into the resource locator container during the initialization phase.

[0180] The system executes the following steps in sequence:

[0181] Step 1: Call the data cleaning tool: Before execution, inject the resource locator of the original data file into the resource locator container as an input parameter; after execution, register the cleaned data file resource locator into the resource locator container.

[0182] Step 2: Invoke the region aggregation tool: Before execution, inject the resource locators of the cleaned data files into the resource locator container as input parameters; at the same time, the resource locator container creates independent key segments according to the region identifier, including at least the location key for the aggregation result of region A and the location key for the aggregation result of region B, to ensure that the intermediate resources of each region aggregation task are isolated from each other; after execution, register the resource locators of each region aggregation result to the key segment of the corresponding region identifier.

[0183] Step 3: Call the report generation tool: Before execution, batch inject the resource locators of the aggregation results of each region into the resource locator container as input parameters; after execution, generate a summary evaluation report.

[0184] During the execution of the above steps, the system imposes resource access constraints on each tool node, prohibiting them from inferring or searching for resource locators on their own. It forces them to obtain input resource locators only through the injection mechanism of the resource locator container; any attempt to bypass the resource locator container and directly locate resources is intercepted at the architecture level. Therefore, the regional aggregation tool does not need to infer the storage location of the cleaned data files, and the report generation tool does not need to search the aggregation output of each region one by one. All resource locators are deterministically injected and transmitted through the resource locator container.

[0185] In another exemplary embodiment, the intelligent scheduling method of this application is applied to a cross-voltage level power grid collaborative analysis scenario. In the power grid operation mode analysis, after modifying the data file of the 500kV main grid, a safety scan of the 220kV ring network needs to be performed based on the latest 500kV equivalent results, and then the calculation of the 110kV local power grid needs to be performed based on the 220kV equivalent results. The data file paths at each level form a strict input-output dependency chain.

[0186] The system executes the following steps in sequence:

[0187] After the main grid modification tool is executed, the generated 500kV equivalent result resource locator will be registered to the resource locator container;

[0188] Before the ring network scanning tool is executed, the resource locator of the 500kV equivalent result is injected into the resource locator container as an input parameter, and a 220kV ring network safety scan is performed based on the 500kV equivalent result; after the execution is completed, the generated 220kV equivalent result resource locator is registered to the resource locator container.

[0189] Before the distribution network local calculation tool is executed, the resource locator of the 220kV equivalent result is injected into the resource locator container as an input parameter, and the 110kV local power grid calculation is performed based on the 220kV equivalent result; after the execution is completed, the resource locator of the output distribution network calculation result is registered to the resource locator container.

[0190] During the execution of the above steps, the system imposes resource access constraints on each level of tool nodes, prohibiting each tool node from searching or inferring upstream file paths on its own, and forcing it to obtain input resource locators only through the injection mechanism of the resource locator container.

[0191] In another exemplary embodiment, the intelligent scheduling method of this application is applied to a multi-stage assessment scenario of renewable energy absorption capacity. In power grid planning and analysis, load forecasting tools, renewable energy output scenario generation tools, power flow calculation tools, and absorption capacity assessment tools need to be called sequentially to perform multi-stage tasks. There are strict input-output dependencies between each stage, that is, the output file of the previous step is the mandatory input resource for the next step.

[0192] The system creates a resource locator container for user sessions, which serves as the sole intermediary for resource locator exchange between various tool nodes.

[0193] The system executes the following steps in sequence:

[0194] Step 1: Call the load forecasting tool to perform load forecasting and generate load forecasting results; register the resource locators of the load forecasting results to the resource locator container.

[0195] Step 2: Call the new energy output scenario generation tool: Before execution, inject the resource locator corresponding to the load prediction result into the resource locator container as input parameters; after execution, register the generated scenario generation result resource locator into the resource locator container.

[0196] Step 3: Call the power flow calculation tool: Before execution, inject the resource locator corresponding to the scene generation result into the resource locator container as input parameters; after execution, register the generated power flow calculation result resource locator into the resource locator container.

[0197] Step 4: Call the absorption capacity assessment tool: Before execution, inject the resource locator corresponding to the power flow calculation result into the resource locator container as input parameters; after execution, generate an absorption assessment report.

[0198] During the execution of the above steps, the system imposes resource access constraints on each tool node, prohibiting each tool node from inferring or searching for resource locators on its own, and forcing it to obtain the input resource locators only through the injection mechanism of the resource locator container.

[0199] In one exemplary embodiment, the intelligent scheduling method of this application may further include the following steps:

[0200] Execute each tool node sequentially according to the topological order in the ordered execution scheme;

[0201] When the execution failure of the target tool node is detected, trace back along the directed edges of the tool dependency graph from the target tool node to its direct upstream tool node.

[0202] Starting from the direct upstream tool node, traverse its downstream branches to find if there are other tool nodes that declare the same output resource type as the target tool node.

[0203] If they exist, other tool nodes will be identified as candidate replacement nodes for the target tool node;

[0204] For each candidate replacement node, verify whether the input resource type declared in its input resource declaration has been produced and registered to the resource locator container by the preceding steps already completed in the current ordered execution scheme. The candidate replacement nodes that pass the verification are determined as available replacement nodes.

[0205] Insert the available alternative nodes into the position of the target tool node in the ordered execution scheme, recalculate the topological sort of each downstream tool node of the available alternative nodes, and generate the updated ordered execution scheme.

[0206] In this embodiment, each tool node is scheduled and executed sequentially according to the topological order in the ordered execution scheme. When the execution failure of the target tool node is detected, an alternative path discovery process is initiated: starting from the target tool node, the process traces backward along the directed edges of the tool dependency graph to its direct upstream tool node; then, starting from the direct upstream tool node, the process traverses its corresponding downstream branches to search for other tool nodes that declare the same output resource type as the target tool node. If other tool nodes exist, they are identified as candidate alternative nodes for the target tool node.

[0207] The next step is the alternative path verification phase: For each candidate alternative node, the input resource types declared in its capability declaration are verified to ensure they have been generated and registered in the resource locator container by the preceding steps already completed in the current ordered execution plan. Candidate alternative nodes that pass the verification are then identified as available alternative nodes.

[0208] The next step is to reconstruct the execution path: insert the available alternative nodes into the position of the target tool node in the ordered execution scheme, and recalculate the topological order of each downstream tool node based on the input-output dependencies of the available alternative nodes to generate an updated ordered execution scheme. Starting from the available alternative nodes, the subsequent steps are scheduled and executed according to the topological order in the updated ordered execution scheme.

[0209] When multiple candidate replacement nodes pass the verification, the target replacement node is determined from the multiple candidate replacement nodes according to the preset node selection strategy. The preset node selection strategy includes at least one of the following: giving priority to the candidate replacement node with the latest version identifier in the capability declaration, and giving priority to the candidate replacement node with the highest number of successful executions in history.

[0210] This dynamic routing switching mechanism enables the tool dependency graph to not only exist as a static orchestration tool, but also to play the role of fault-tolerant infrastructure at runtime. When a single tool node fails to execute, it can automatically retrieve alternative paths and dynamically reconstruct the execution sequence to avoid interruption of the entire job process, thereby improving the execution robustness under complex working conditions.

[0211] Intelligent computing models refer to artificial intelligence models with natural language understanding and reasoning capabilities, including but not limited to large language models and multimodal models. In this application, the intelligent computing model serves as a front-end module for user interaction, used to receive natural language commands input by the user and forward them to the intent recognition tool to trigger subsequent processing flows. The intelligent computing model does not directly participate in core scheduling logic such as the construction of tool dependency graphs, bidirectional derivation of complete execution chains, injection and registration management of resource locator containers, and topological sorting of ordered execution schemes.

[0212] The technical solution of this application can achieve the following technical effects:

[0213] Automatically generate complete multi-step execution plans based on natural language commands: The system responds to the natural language commands input by the user, and through intent recognition, function type matching and bidirectional deduction of tool dependency graph, automatically generates a complete execution chain covering the entire task lifecycle and sorts it into an ordered execution plan, without the need for manual pre-writing of workflow templates or manual connection of specialized tools in various professional fields.

[0214] When a user instruction is identified to contain dispatch execution semantics, the ordered execution scheme is instantiated into multiple independent sub-execution schemes. Each sub-execution scheme is executed based on the same input resources, ensuring that each execution is based on the correct source data and is isolated from each other.

[0215] Reliable delivery of resource locators throughout the process: By establishing a session-level resource locator container, the output resource locators of upstream tool nodes are forced to register in the container, and the input resource locators of downstream tool nodes are injected from the container. Furthermore, tool nodes are prohibited from inferring or searching for resource locators on their own, thus eliminating the loss, confusion, and inference errors of resource locators during cross-step delivery at the architectural level.

[0216] Dynamic routing adjustments during execution improve system robustness: When a target tool node fails to execute, the system traces backward along the tool dependency graph from that tool node and traverses downstream branches to find alternative tool nodes that declare the same output resource type. After verification, the available alternative nodes are inserted into the ordered execution scheme and the downstream topology is reconstructed, realizing dynamic routing switching. This ensures that a single point of failure does not cause the entire process to be interrupted, thus making the tool dependency graph not only a static planning tool in the orchestration phase, but also a fault-tolerant infrastructure in the runtime phase.

[0217] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0218] Based on the same inventive concept, this application also provides a tool intelligent scheduling device for implementing the tool intelligent scheduling method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more tool intelligent scheduling device embodiments provided below can be found in the limitations of the tool intelligent scheduling method described above, and will not be repeated here.

[0219] In one exemplary embodiment, such as Figure 6 As shown, a tool intelligent scheduling device is provided, comprising: an acquisition module 601, a construction module 602, an intent recognition module 603, a deduction module 604, and a generation module 605, wherein:

[0220] The acquisition module 601 is used to acquire the capability declarations of each special tool; the capability declaration includes at least one of output resource declaration, input resource declaration and function type declaration; the output resource declaration is used to declare the resource type output after the corresponding special tool is executed; the input resource declaration is used to declare the input resource type required before the corresponding special tool is executed; and the function type declaration is used to declare the function type provided by the corresponding special tool.

[0221] Module 602 is used to respond to the tool dependency graph update command, scan each capability declaration, and construct a directed acyclic tool dependency graph based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationship between each special tool;

[0222] The intent recognition module 603 is used to respond to the natural language instructions input by the user, perform intent recognition on the natural language instructions, and obtain the intent recognition result;

[0223] The derivation module 604 is used to determine the anchor node that matches the intent recognition result from the tool dependency graph, and to perform bidirectional derivation along the directed edges of the tool dependency graph starting from the anchor node to obtain the complete execution chain for the natural language instruction. The complete execution chain includes all the tool nodes required to complete the task corresponding to the natural language instruction. All the tool nodes include the anchor node, all the upstream support nodes of the anchor node, and all the downstream dependency nodes.

[0224] The generation module 605 is used to perform topological sorting on all nodes in the complete execution chain to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a special tool.

[0225] In an exemplary embodiment, the derivation module 604 is specifically used for:

[0226] The operation type in the intent recognition result is matched with the function type declaration of each capability declaration, and the matching tool set is determined based on the matching result; the operation type refers to the type of behavior extracted from natural language instructions that represents the user's expected behavior.

[0227] In the tool dependency graph, each node corresponding to the matching tool set is used as the anchor node.

[0228] In one exemplary embodiment, the tool intelligent scheduling device is further used for:

[0229] When a natural language instruction is identified to contain dispatch execution semantics, multiple target objects are extracted from the dispatch execution semantics; dispatch execution semantics refers to the semantic expression of executing the same execution content with different target objects;

[0230] The ordered execution plan is instantiated into multiple sub-execution plans; each sub-execution plan corresponds to a target object and contains the same sequence of execution steps.

[0231] Each sub-execution scheme is allocated an independent resource storage space in the resource locator container, and each resource storage space is used to store the intermediate resource locators generated during the execution of the corresponding sub-execution scheme.

[0232] In one exemplary embodiment, the tool intelligent scheduling device is further used for:

[0233] A corresponding resource locator container is created for each session that issues a natural language command; the resource locator container maintains the mapping relationship between resource types and resource locators in a key-value pair structure;

[0234] During the execution of the ordered execution scheme, for any tool node, before the tool node is executed, the required input resource type is determined according to the input resource declaration in the capability declaration of the tool node, the resource locator corresponding to the resource type is queried from the resource locator container, and the queried resource locator is injected into the tool node as an input parameter;

[0235] After the tool node completes its execution, the resource locators corresponding to each resource type output by the tool node are extracted, and the extracted resource locators are registered to the resource locator container according to the predefined mapping rules. The predefined mapping rules define the mapping relationship between the output resource types and the key names in the resource locator container.

[0236] In one exemplary embodiment, the tool intelligent scheduling device is further used for:

[0237] Resource access constraints are imposed on each tool node; these constraints prevent tool nodes from inferring or searching for the required resource locators on their own, and the input resource locators for each tool node are obtained only through the injection mechanism of the resource locator container.

[0238] In one exemplary embodiment, the tool intelligent scheduling device is further used for:

[0239] Execute each tool node sequentially according to the topological order in the ordered execution scheme;

[0240] When the execution failure of the target tool node is detected, trace back along the directed edges of the tool dependency graph from the target tool node to its direct upstream tool node.

[0241] Starting from the direct upstream tool node, traverse its downstream branches to find if there are other tool nodes that declare the same output resource type as the target tool node.

[0242] If they exist, other tool nodes will be identified as candidate replacement nodes for the target tool node;

[0243] For each candidate replacement node, verify whether the input resource type declared in its input resource declaration has been produced and registered to the resource locator container by the preceding steps already completed in the current ordered execution scheme. The candidate replacement nodes that pass the verification are determined as available replacement nodes.

[0244] Insert the available alternative nodes into the position of the target tool node in the ordered execution scheme, recalculate the topological sort of each downstream tool node of the available alternative nodes, and generate the updated ordered execution scheme.

[0245] Each module in the aforementioned intelligent scheduling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0246] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a tool intelligent scheduling method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0247] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0248] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0249] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0250] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0251] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0252] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0253] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0254] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A tool intelligent scheduling method, characterized in that, The method includes: Obtain the capability declarations of each specialized tool; the capability declarations include at least one of output resource declarations, input resource declarations, and function type declarations; the output resource declarations are used to declare the resource types output after the corresponding specialized tool is executed; the input resource declarations are used to declare the input resource types required before the corresponding specialized tool is executed; and the function type declarations are used to declare the function types provided by the corresponding specialized tool. In response to the tool dependency graph update command, each of the capability declarations is scanned, and a directed acyclic tool dependency graph is constructed based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each special tool, and the directed edges represent the input-output dependency relationships between each special tool; In response to a natural language instruction input by the user, intent recognition is performed on the natural language instruction to obtain an intent recognition result; From the tool dependency graph, an anchor node matching the intent recognition result is determined, and bidirectional derivation is performed along the directed edges of the tool dependency graph starting from the anchor node to obtain a complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream support nodes of the anchor node, and all downstream dependent nodes. The nodes in the complete execution chain are topologically sorted to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

2. The method according to claim 1, characterized in that, The step of determining the anchor node that matches the intent recognition result from the tool dependency graph includes: The operation type in the intent recognition result is matched with the function type declaration of each capability declaration, and the matching tool set is determined based on the matching result; the operation type refers to the type of behavior extracted from the natural language instruction that represents the user's expected behavior. In the tool dependency graph, each node corresponding to the matching tool set is used as an anchor node.

3. The method according to claim 1 or 2, characterized in that, The method further includes: When the natural language instruction is identified to contain dispatch execution semantics, multiple target objects are extracted from the dispatch execution semantics; the dispatch execution semantics refers to the semantic expression of executing the same execution content with different target objects respectively; The ordered execution scheme is instantiated into multiple sub-execution schemes; each sub-execution scheme corresponds to a target object and contains the same sequence of execution steps. Each of the sub-execution schemes is allocated an independent resource storage space in the resource locator container, and each of the resource storage spaces is used to store the intermediate resource locators generated during the execution of the corresponding sub-execution scheme.

4. The method according to claim 1 or 2, characterized in that, The method further includes: A corresponding resource locator container is created for the session that issues the natural language command; the resource locator container maintains the mapping relationship between resource types and resource locators in a key-value pair structure; During the execution of the ordered execution scheme, for any tool node, before the tool node is executed, the required input resource type is determined according to the input resource declaration in the capability declaration of the tool node, the resource locator corresponding to the resource type is queried from the resource locator container, and the queried resource locator is injected into the tool node as an input parameter; After the tool node completes its execution, the resource locators corresponding to each resource type output by the tool node are extracted, and the extracted resource locators are registered to the resource locator container according to the predefined mapping rules; wherein, the predefined mapping rules define the mapping relationship between the output resource types and the key names in the resource locator container.

5. The method according to claim 4, characterized in that, The method further includes: Resource access constraints are imposed on each tool node; the resource access constraints are used to prevent each tool node from inferring or searching for the required resource locators on its own, and the input resource locators of each tool node are obtained only through the injection mechanism of the resource locator container.

6. The method according to claim 1 or 2, characterized in that, The method further includes: Each tool node is executed sequentially according to the topological order in the ordered execution scheme. When the execution failure of the target tool node is detected, starting from the target tool node, trace back along the directed edges of the tool dependency graph to its direct upstream tool node. Starting from the direct upstream tool node, traverse its downstream branches to find whether there are other tool nodes that declare the same output resource type as the target tool node. If they exist, the other tool nodes are identified as candidate replacement nodes for the target tool node; For each candidate replacement node, verify whether the input resource type declared in its input resource declaration has been produced and registered to the resource locator container by the preceding steps completed in the current ordered execution scheme. The candidate replacement nodes that pass the verification are determined as available replacement nodes. The available alternative node is inserted into the position of the target tool node in the ordered execution scheme, the topological sort of each downstream tool node of the available alternative node is recalculated, and an updated ordered execution scheme is generated.

7. A tool intelligent scheduling device, characterized in that, The device includes: The acquisition module is used to acquire the capability declarations of each dedicated tool; the capability declaration includes at least one of output resource declaration, input resource declaration, and function type declaration; the output resource declaration is used to declare the resource type output after the corresponding dedicated tool is executed; the input resource declaration is used to declare the input resource type required before the corresponding dedicated tool is executed; and the function type declaration is used to declare the function type provided by the corresponding dedicated tool. A construction module is used to respond to a tool dependency graph update command, scan each of the capability declarations, and construct a directed acyclic tool dependency graph based on the matching relationship between the resource types of the output resource declarations and the resource types of the input resource declarations of each capability declaration; the nodes of the tool dependency graph correspond to each dedicated tool, and the directed edges represent the input-output dependency relationships between each dedicated tool; An intent recognition module is used to respond to a natural language command input by a user, perform intent recognition on the natural language command, and obtain an intent recognition result; The derivation module is used to determine the anchor node that matches the intent recognition result from the tool dependency graph, and to perform bidirectional derivation along the directed edges of the tool dependency graph starting from the anchor node to obtain the complete execution chain for the natural language instruction; the complete execution chain includes all tool nodes required to complete the task corresponding to the natural language instruction, and all tool nodes include the anchor node, all upstream supporting nodes of the anchor node, and all downstream dependent nodes; The generation module is used to perform topological sorting on all nodes contained in the complete execution chain to generate an ordered execution scheme; each execution step in the ordered execution scheme corresponds to the invocation of a dedicated tool.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.