Tool plan execution method, apparatus, electronic device, and storage medium
By acquiring multi-source data context from large-scale computing systems, performing dual-channel correlation scoring and multi-level feasibility screening, generating tool candidate plans, and performing parameter verification and constraint solving, the accuracy and stability issues of tool invocation in existing technologies are solved, and the reliability and scalability of tool plan execution are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 国家超级计算天津中心
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies lack feasibility analysis mechanisms, have weak parameter solvability, multiple redundant tools, and lack objective trade-offs in the execution of tool plans in large-scale computing power systems, resulting in poor accuracy, stability, and scalability of tool invocation.
By acquiring multi-source data context of the target application scenario, performing dual-channel correlation scoring and multi-level feasibility screening, generating candidate plans for the tool, performing parameter value reasoning and legality verification, and finally solving constraints to generate the target plan for the tool.
It improves the accuracy, stability, and scalability of tool invocation, meeting the combined requirements of reliability and scalability for tool plan execution under large-scale computing power systems.
Smart Images

Figure CN122086574B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a tool plan execution method, apparatus, electronic device, and storage medium. Background Technology
[0002] In diverse scenarios such as operations and maintenance, knowledge Q&A, and task collaboration, tool-based task execution plays a crucial role. On the one hand, it can handle large-scale tasks with extremely high manual operation costs (such as cross-node batch restarts and high-dimensional data analysis). On the other hand, it can connect with external knowledge to improve the task accuracy and stability of tools within the domain.
[0003] The core objective of tool plan execution is to automatically identify when external capabilities are needed, which tools to select, and how to construct parameters to meet interface constraints. Related technologies employ methods such as enhanced retrieval / browsing and inference-action linkage, routing-based and centralized orchestration, and learning and training methods focused on interface call stability to achieve tool plan execution.
[0004] However, existing technologies lack feasibility analysis mechanisms, have weak parameter parsing capabilities, involve redundant tools, and suffer from a lack of objective trade-offs. This results in poor accuracy, stability, and scalability of tool invocation in corresponding scenarios, thus failing to meet the combined requirements of reliability and scalability in tool plan execution in those scenarios. Summary of the Invention
[0005] To address the aforementioned technical problems, this disclosure provides a tool plan execution method, apparatus, electronic device, and storage medium.
[0006] Firstly, this disclosure provides a tool plan execution method, including:
[0007] Obtain the first multi-source data context of the target application scenario, wherein the first multi-source data context is reference data used to evaluate the tools in the tool library, and the target application scenario is one of the operation and maintenance scenario, knowledge question and answer scenario, and task collaboration scenario. When the target application scenario is the operation and maintenance scenario, the first multi-source data context includes alarm information, operation and maintenance work order, anomaly diagnosis information, command output information, and operation and maintenance knowledge questions.
[0008] Based on the first multi-source data context, a dual-channel correlation score and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool;
[0009] Based on the comprehensive scores of the tools, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on the first tool plan generation model.
[0010] Based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the candidate plans of the tool to generate an executable plan for the tool.
[0011] The constraints of the executable plan of the tool are solved to obtain the target plan of the tool, and the target plan of the tool is executed to obtain the execution result of the tool plan of the target application.
[0012] Secondly, this disclosure provides a tool plan execution apparatus, comprising:
[0013] The first acquisition module is used to acquire the first multi-source data context of the target application scenario. The first multi-source data context is reference data used to evaluate the tools in the tool library. The target application scenario is one of the operation and maintenance scenario, knowledge question and answer scenario, and task collaboration scenario. When the target application scenario is the operation and maintenance scenario, the first multi-source data context includes alarm information, operation and maintenance work order, anomaly diagnosis information, command output information, and operation and maintenance knowledge questions.
[0014] The first determining module is used to perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library based on the first multi-source data context, and determine the comprehensive score of each tool.
[0015] The first generation module is used to obtain candidate tools from the preset tool library based on the comprehensive score of each tool, and generate a tool candidate plan for the candidate tools based on the tool plan first generation model;
[0016] The second generation module is used to perform parameter value reasoning and legality verification on the candidate plans of the tool based on multiple candidate parameters in the first multi-source data context, and generate an executable plan for the tool.
[0017] The second acquisition module is used to solve the constraints of the executable plan of the tool to obtain the target plan of the tool, and execute the target plan of the tool to obtain the execution result of the tool plan of the target application.
[0018] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0019] One or more processors;
[0020] Storage device for storing one or more programs.
[0021] When one or more programs are executed by one or more processors, the one or more processors implement the methods provided in the first aspect.
[0022] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method provided in the first aspect.
[0023] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0024] This disclosure discloses a tool plan execution method, apparatus, electronic device, and storage medium. First, based on a first multi-source data context of the target application scenario, dual-channel correlation scoring and multi-level feasibility screening are performed on each tool in a preset tool library to determine the comprehensive score of each tool. Then, based on the comprehensive scores of each tool, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on a first tool plan generation model. Next, based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the tool candidate plan to generate an executable tool plan. Finally, constraint solving is performed on the executable tool plan to obtain the target tool plan, and the target tool plan is executed to obtain the tool plan execution result for the target application. Thus, by integrating feasibility pre-processing, intelligent parameter reasoning, redundancy suppression, and multi-objective optimization into an integrated process, the accuracy, stability, and scalability of tool invocation are effectively improved, meeting the joint requirements of reliability and scalability for tool plan execution in the corresponding scenario. Attached Figure Description
[0025] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0026] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A flowchart illustrating a tool plan execution method provided in an embodiment of this disclosure;
[0028] Figure 2 A flowchart illustrating another tool plan execution method provided in this disclosure embodiment;
[0029] Figure 3 A flowchart illustrating yet another tool plan execution method provided in this disclosure embodiment;
[0030] Figure 4 A flowchart illustrating another tool plan execution method provided in this disclosure embodiment;
[0031] Figure 5 A flowchart illustrating another tool plan execution method provided in this disclosure embodiment;
[0032] Figure 6 A flowchart illustrating another tool plan execution method provided in this disclosure embodiment;
[0033] Figure 7 A flowchart illustrating another tool plan execution method provided in this disclosure embodiment;
[0034] Figure 8 A logical schematic diagram of a tool plan execution method provided in an embodiment of this disclosure;
[0035] Figure 9 This is a schematic diagram of the structure of a tool plan execution device provided in an embodiment of the present disclosure;
[0036] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0037] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0038] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0039] As modern supercomputers advance to the exascale level, their cluster size and system complexity increase dramatically. Thousands of heterogeneous nodes collaborate and are scheduled in parallel, creating a high degree of coupling between high-speed interconnected networks and file systems. Fluctuations in any link can trigger cascading effects at the system level. Traditional methods for resolving system-level maintenance tasks rely on maintenance personnel conducting cross-server forensics and executing predetermined repair steps using operation manuals and automated playbooks (such as Ansible Playbooks). In the maintenance scenarios of large-scale computing systems, response time and average recovery time are difficult to reduce effectively, thus impacting service stability and user experience.
[0040] The introduction of Artificial Intelligence for IT Operations (AIOps) and Large Language Model (LLM) has provided a new paradigm for the automated operation and maintenance of complex systems. Furthermore, the agent, through tool calling, truly translates the upper-level semantic understanding of LLM into executable and auditable actions.
[0041] In recent years, a series of methods have been proposed based on the core idea of enabling models to use tools.
[0042] The first approach is the retrieval / browsing enhancement and reasoning-action linkage method. WebGPT (Web Enhanced Large Model) allows the model to retrieve and cite evidence step-by-step within a text browsing environment, improving the factuality and traceability of the answers. However, it primarily relies on reading tools and is relatively limited in type. The Reasoning-Action Framework (ReAct) alternates between thought chains and actions, using external observation to correct inferences and enhance interpretability and stability. The Reasoning-No-Observation Planning Framework (ReWOO) advocates "plan first, then gather evidence / execute" to reduce the high latency and token costs associated with multiple rounds of interaction. However, while these methods alleviate the issues of information retrieval and reasoning stability, they focus primarily on information retrieval and planning, with limited attention paid to engineering constraints related to cross-host permissions, parameter solvability, and multi-strategy optimization.
[0043] The second approach is a routing and central orchestration method. The Modular Reasoning and Knowledge Base Integration (MRKL) framework uses a router + expert module structure to assign tasks to external modules, emphasizing the importance of "choosing the right tools." HuggingGPT uses a large language model as a central hub, breaking down, selecting, and summarizing tasks within the model and tool catalog to achieve multi-module collaborative reasoning. However, while these methods excel in task assignment and unified orchestration, when the tool catalog is large, permissions and scopes vary, dependency chains are complex, and there are latency / cost constraints, a higher-level decision-making mechanism is still needed to determine feasibility and balance multiple objectives to ensure the robustness and controllability of the calls.
[0044] The third approach is a learning and training method focused on the stability of API calls. Toolformer, a tool-call enhancement language model, uses self-supervised learning to autonomously learn when and how to call various APIs and absorb the results, reducing reliance on manual annotation. Gorilla, a large language model optimized for tool calls, reduces the illusion of endpoints and parameters through retrieval-aware training and can adapt to changes in API documentation. ToolLLM / ToolBench, an API-model library, provides real API instruction data and an evaluation framework with runnable tools and annotated dialogues, systematically evaluating the accuracy of planning, retrieval, and calling. These methods significantly improve the basic ability to use the right API and fill in the correct parameters, but they are mostly built around the general internet / API ecosystem and still lack systematic adaptation to the strong permissions, strong dependencies, and strong constraints present in large-scale computing systems.
[0045] In summary, existing solutions still have four core technical gaps when focusing on application scenarios related to large-scale computing power systems: 1) Lack of feasibility analysis mechanism, driven only by text relevance or general planning, without evaluating the capability compatibility and permission scope of tools, resulting in relevant but unexecutable candidate tools entering the later stages; 2) Weak parameter solvability, even if a theoretically feasible tool is selected, it is difficult to reliably extract the required parameters that conform to the verification rules from the domain context, affecting the tool call success rate; 3) Lack of redundancy and objective trade-offs among multiple tools, with multiple tools combined to achieve the same function, resulting in redundant calls, and lack of global optimization of tool success rate, risk, latency, and resource consumption cost; 4) Lack of a learnable and accumulative execution feedback mechanism, failing to accumulate the actual call effect back to the tool library, resulting in the system's inability to dynamically optimize subsequent decisions based on historical execution effects.
[0046] To address the aforementioned problems, this embodiment provides a tool plan execution method. The following is a detailed explanation... Figures 1-8 The tool plan execution method provided in the embodiments of this disclosure will be described. In the embodiments of this disclosure, the tool plan execution method can be executed by an electronic device. The electronic device can be understood as a supercomputer device.
[0047] Figure 1 A flowchart illustrating a tool plan execution method provided in an embodiment of this disclosure is shown.
[0048] As shown in Figure 1, the tool's execution method may include the following steps.
[0049] S110. Obtain the first multi-source data context of the target application scenario.
[0050] When an electronic device invokes a tool and executes a tool plan in a target application scenario, it first obtains the multi-source data context of that scenario as a reference for evaluating whether the tools in the tool library meet the requirements.
[0051] The target application scenario refers to any scenario in which the tool is invoked and run. Optionally, the target application scenario includes, but is not limited to, intelligent operation and maintenance scenarios, knowledge question and answer scenarios, and task collaboration scenarios.
[0052] The first multi-source data context refers to the multi-source data context corresponding to the target application scenario. For example, if the target application scenario is an intelligent operation and maintenance scenario, the first multi-source data context includes, but is not limited to, alarm information, operation and maintenance work orders, anomaly diagnosis information, command output information, operation and maintenance knowledge questions, etc.
[0053] S120. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0054] In this embodiment, the electronic device uses the first multi-source data context as a reference to evaluate whether the tools in the tool library meet the requirements, performs tool candidate recall for each tool in the preset tool library, and uses the tool candidate recall result as the comprehensive score of each tool.
[0055] For tool libraries The tools in During registration, users are required to fill in a description of their capabilities. To fully describe the tool's functions, parameter modes, operational domains, risk labels, and other information, and to facilitate the assessment of the tool's suitability for target needs in vector space, the tool's capability description is embedded as... To achieve the integration of various tools The capability description is converted into an embedding vector. During tool recall, a dual-channel relevance scoring and multi-level feasibility screening are performed to generate a multi-tool plan and obtain a comprehensive score for each tool.
[0056] Therefore, by introducing a multi-level feasibility screening mechanism, the executability judgment of the tool is brought forward to the recall stage, eliminating invalid calls from the source, significantly improving the stability of tool calls and the task closure rate, and maintaining a high success rate and high controllability in complex, heterogeneous, and multi-task computing environments.
[0057] S130. Based on the comprehensive score of each tool, obtain alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0058] Since the overall score represents the probability of a tool being selected, a higher overall score indicates a higher probability of selection, and vice versa. Therefore, the electronic device selects tools with higher overall scores from a preset tool library as candidate tools.
[0059] Furthermore, the electronic device generates a single-strategy tool plan according to a fixed strategy template and by calling the first generation model of the tool plan, and uses the single-strategy tool plan as a tool candidate plan for alternative tools.
[0060] Optionally, the tool candidate plan for the alternative tools is represented as Π={ }
[0061] S140. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0062] In this embodiment, the electronic device performs parameter value reasoning and legality verification on each tool based on the tool candidate plan and according to the tool parameter pattern, and materializes it into an executable structured plan.
[0063] Candidate parameters refer to the parameters of each tool.
[0064] Optionally, parameter value reasoning and validity verification may include source priority processing and specificity priority processing.
[0065] Therefore, by using intelligent domain-specific parameter reasoning and compliance verification mechanisms, a parameter pattern and legality verification chain for the operation and maintenance domain are constructed. This effectively improves the accuracy and standardization of the parameter generation stage, enabling the tool to extract parameters that conform to interface constraints in complex multi-source contexts, thereby enhancing the reproducibility and stability of task execution.
[0066] S150. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0067] In this embodiment, the electronic device solves the execution constraints of the tool executable plan, so that, under the condition of satisfying the constraints, a final executable plan is generated and sent to the target executor for execution according to the plan, and the result is received back, thereby obtaining the tool plan execution result of the target application.
[0068] Constraint solving can include multiple constraint dimensions, including but not limited to risk constraints, cost constraints, time delay constraints, and success rate constraints.
[0069] Here, the tool objective plan refers to the final executable plan. Optionally, the tool objective plan is represented as follows: .
[0070] Therefore, by employing a multi-objective constraint optimization algorithm, success rate, risk, and cost are adaptively balanced in large-scale computing power operation and maintenance scenarios, achieving efficient and economical task scheduling. While ensuring task completion quality, redundant steps and resource consumption are significantly reduced, tool invocation efficiency is improved, and the high requirements of large-scale computing power systems for task economy and real-time performance are met.
[0071] This disclosure discloses a tool plan execution method. First, based on a first multi-source data context of the target application scenario, a dual-channel correlation scoring and multi-level feasibility screening are performed on each tool in a preset tool library to determine the comprehensive score of each tool. Then, based on the comprehensive scores of each tool, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on a first tool plan generation model. Next, based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the tool candidate plan to generate an executable tool plan. Finally, constraint solving is performed on the executable tool plan to obtain the target tool plan, and the target tool plan is executed to obtain the tool plan execution result for the target application. Thus, by integrating feasibility pre-processing, intelligent parameter reasoning, redundancy suppression, and multi-objective optimization into an integrated process, the accuracy, stability, and scalability of tool invocation are effectively improved, meeting the joint requirements of reliability and scalability of tool plan execution in the corresponding scenario.
[0072] In another embodiment of this application, the implementation method of S120 will be explained in detail.
[0073] Figure 2 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0074] like Figure 2 As shown, the tool's execution method may include the following steps.
[0075] S210. Obtain the first multi-source data context of the target application scenario.
[0076] S210 is similar to S110, and will not be described in detail here.
[0077] S220. Perform semantic standardization processing on the first multi-source data context to generate structured context text.
[0078] To achieve structural unification of multi-source data context, electronic devices need to perform semantic standardization on the first multi-source data context to form a structured, unified text template. , as structured contextual text.
[0079] When the target scenario is an intelligent operation and maintenance scenario, the structured context text includes, but is not limited to, one or more of the following combinations: target host set, task type, abnormal phenomenon, expected repair target, environment mapping, etc.
[0080] S230. Perform dimensionality reduction processing on the pre-set first embedding model of the structured context text input to obtain the demand vector corresponding to the first multi-source data context.
[0081] In this embodiment, the electronic device invokes a preset first embedding model to reduce the dimensionality of the structured context text according to a specific text template, thereby obtaining an embedding vector. The embedded vector is used as the requirement vector, and the requirement vector is used to score tool matching in order to evaluate whether the selected tool meets the requirements.
[0082] When the target scenario is an intelligent operation and maintenance scenario, the requirement vector includes, but is not limited to, one or more of the following combinations: required tool capabilities, scope, and sensitivity level.
[0083] S240. Based on the demand vector, perform dual-channel relevance scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0084] In some embodiments, the specific implementation method of S240 includes: S2401, performing dual-channel relevance scoring on each tool in the preset tool library based on the demand vector to determine the initial relevance score of each tool; S2402, performing multi-level feasibility screening on each tool in the preset tool library based on the demand vector to determine the feasibility screening score of each tool; S2403, calculating the comprehensive score of each tool based on the initial relevance score and the feasibility screening score of each tool.
[0085] In S2401, the electronic device uses a dense / sparse dual-channel retrieval strategy to search for candidate tools that match the demand vector in a preset tool library, and overlays the prior feature vector of the tool's historical effectiveness to obtain the initial relevance score of each tool.
[0086] Optionally, the initial relevance scores for each tool can be determined using the following method:
[0087]
[0088] in, For tools The initial relevance score; For tools With demand vector Adaptability in densely embedded spaces; For tools With demand vector Adaptability in sparsely embedded spaces; As the first weight value, The value range can be adjusted from 0.3 to 0.7 depending on the embedding method; This is the second weight value. Used to control the prior features of the tool The participation rate (such as the tool's historical success rate, usage rate in similar scenarios, etc.) is set to 0.3 by default.
[0089] The specific implementation method of S2402 includes: based on the demand vector, performing capability compatibility screening on each tool in the preset tool library to obtain a capability compatibility feasibility screening score; based on the demand vector, performing parameter solvability screening on each tool in the preset tool library to obtain a parameter solvability feasibility screening score; based on the demand vector, performing permission consistency screening on each tool in the preset tool library to obtain a permission consistency feasibility screening score; and using the capability compatibility feasibility screening score, parameter solvability feasibility screening score, and permission consistency feasibility screening score as the feasibility screening score.
[0090] The principle of the capability compatibility screening process is to define a capability compatibility indicator function based on whether the capabilities of the selected tools fully meet the requirements.
[0091] Alternatively, the capability compatibility feasibility screening score can be determined using the following method:
[0092]
[0093] in, Feasibility screening score based on capability compatibility; For tools Ability description; This indicates dimension-by-dimensional coverage, evaluating whether the selected tool's capabilities can meet the requirements dimension-by-dimensionally in a multidimensional vector space; this applies if and only if the condition within the parentheses is true. ,otherwise, .
[0094] The principle behind the parameter solvability screening process is: based on the tool Parameter patterns (name, type, value range, validity constraints), statistical tools Required parameter set The parameter ratio can be automatically filled from the context.
[0095] Optionally, the feasibility screening score for the parameters can be determined by the following method:
[0096]
[0097] in, The feasibility of solving parameters is screened and scored; For tools Required parameter set; Parameters extracted from the demand vector The set of candidate values; The range of values; This is a validity check function (e.g., whether the parameter type is consistent with the tool description).
[0098] For each required parameter, at least one value must be found in the requirement vector. If the parameter satisfies its range and validity constraints, then the parameter can be solved. The higher the value, the easier it is to fill in the parameters required by the tool, and the stronger the tool's "plug-and-play" capability; when hour, This means that the tool does not require any parameters to be entered, such as: getting the top 10 processes with the highest CPU utilization.
[0099] The principle behind the permission consistency screening process is as follows: to prevent the selected tool from being blocked during invocation, two types of Boolean matrices are constructed to implement three-way permission constraints between the "user," "tool," and "host," ensuring permission uniformity. Specifically:
[0100] User-Tool Matrix : Exported jointly from the LDAP directory and the tool registry, configuring the corresponding accessible group for each tool.
[0101] Tools—Host Matrix Declared by the Invention file, this specifies the list of hosts that the tool is allowed to execute.
[0102] Based on the above principles, the permission consistency screening score can optionally be determined using the following method:
[0103]
[0104] in, A feasibility score is used to filter for consistency of permissions; This can be represented as follows:
[0105]
[0106] Among them, when At that time, the user Right to host Up call tool Otherwise, the marking tool is unavailable.
[0107] Therefore, by using the above methods, three scores were determined and directly used as feasibility screening scores.
[0108] In S2403, the electronic device integrates the initial relevance scores and feasibility screening scores of each tool to obtain a comprehensive score for each tool.
[0109] Alternatively, the overall score of each tool can be determined using the following method:
[0110] in, The risk to the tool's foundation is determined by reading the tool's dynamically updated statistical scores. Prioritize the "ease of use" feature of tools; High-risk instruments will be subject to stricter penalties.
[0111] Therefore, the tool candidate recall mechanism based on multi-level feasibility screening incorporates capability compatibility, parameter solvability, and consistency of third-party permissions into the tool selection score, thus preventing the subsequent transmission of "related but unusable" candidates.
[0112] S250. Based on the comprehensive score of each tool, select alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0113] S260. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0114] S270. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0115] S250~S270 are similar to S130~S150, and will not be described in detail here.
[0116] In another embodiment of this application, the implementation method of S130 will be explained in detail.
[0117] Figure 3 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0118] like Figure 3 As shown, the tool's execution method may include the following steps.
[0119] S310. Obtain the first multi-source data context of the target application scenario.
[0120] S320. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0121] S310~S320 are similar to S110~S120, and will not be described in detail here.
[0122] S330. Select a tool from the preset library whose overall score is greater than the preset score threshold as a candidate tool.
[0123] In this embodiment, the electronic device compares the overall score of each tool with a preset score threshold to select the Top-K tools with an overall score greater than the preset score threshold as candidate tools.
[0124] S340. Input the alternative tools into the first generation model of the tool plan, and perform plan generation processing on the alternative tools according to the constraints of the feasibility screening score corresponding to the alternative tools to obtain the tool candidate plan of the alternative tools.
[0125] The feasibility screening score includes: capability compatibility feasibility screening score, parameter solvability feasibility screening score, and permission consistency feasibility screening score. Correspondingly, the constraint for the capability compatibility feasibility screening score is that its value is 1. The constraint for the parameter solvability feasibility screening score is that its value is 1. The constraint for the permission consistency feasibility screening score is that its value is greater than the minimum threshold for the proportion of solvable parameters in the tool.
[0126] Optionally, the capability compatibility feasibility screening score is represented as: The feasibility screening score for parameter solvability is expressed as follows: The feasibility score for permission consistency screening is represented as follows: Correspondingly, the constraints for the feasibility screening score of the alternative tools are expressed as follows: .
[0127] in, It is the lowest threshold for the solvable proportion of the tool parameters. A value of 0.7 ensures that at least 4 parameters are automatically filled when there are fewer than 6 parameters, reducing the cost of manual filling.
[0128] Optionally, after determining the alternative tools, the parameter modes and dependency information of the alternative tools can also be recorded for easy recall when needed.
[0129] Optionally, the first generative model for the tool plan can be a large language model, which performs the operation of generating tool candidate plans based on prompt words. As an example, the prompt words take the following form:
[0130] """
[0131] Role: Tool Selector and Strategy Plan Generator
[0132] Objective: Within a given context and tool catalog, output a "single strategy plan" JSON; select only the minimum necessary tools to cover the required dependencies.
[0133] Constraints: Output only JSON; parameter values or explanations must not be output.
[0134] [Context]:
[0135] {context_block}
[0136]
Tool Directory
[0137] {tool_catalog_topk}
[0138] Output Requirements:
[0139] {{
[0140] "strategy_id": "auto- <hash>",
[0141] "steps": [
[0142] {{"id": "t1", "tool_id": " <tool-a>"}},
[0143] {{"id": "t2", "tool_id": " <tool-b>"}},
[0144] {{"id": "t3", "tool_id": " <tool-c>"}}
[0145] ],
[0146] "deps": [["t1","t2"],["t2","t3"]]
[0147] }}
[0148] """
[0149] Therefore, after comprehensively evaluating the tool's capability compatibility, parameter solvability, and the consistency of three-party permissions, the candidate tools that cannot meet the execution conditions are eliminated in advance according to the constraints of the feasibility screening score, thus obtaining the tool candidate plan for alternative tools.
[0150] S350. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0151] S360. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0152] S350~S360 are similar to S140~S150, and will not be described in detail here.
[0153] In another embodiment of this application, the implementation method of S140 will be explained in detail.
[0154] Figure 4 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0155] like Figure 4 As shown, the tool's execution method may include the following steps.
[0156] S410, Obtain the first multi-source data context of the target application scenario.
[0157] S420. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0158] S430. Based on the comprehensive score of each tool, obtain alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0159] S410~S430 are similar to S110~S130, and will not be described in detail here.
[0160] S440. Perform source priority processing and specificity priority processing on multiple candidate parameters to determine multiple target parameters.
[0161] The source priority processing includes the following processes in sequence: priority processing of display fields, priority processing of logs, priority processing of structured context key values, priority processing of output from preceding steps, priority processing of default values, and priority processing of the knowledge base.
[0162] Specifically, the priority of the displayed field is: priority of log processing > priority of structured context key-value pairs > priority of output from preceding steps > priority of default values >= priority of the knowledge base.
[0163] The specific priority processing includes the following processes in sequence: priority processing for precise identifiers, priority processing for complete paths, priority processing for single hosts, priority processing for group names, priority processing for wildcards, and priority processing for ranges.
[0164] Specifically, the priority of precise identification = the priority of the complete path = the priority of a single host > the priority of the group name = the priority of wildcards = the priority of ranges.
[0165] In some cases, when a target set is involved, the smaller set takes precedence. If it is impossible to select and fill the set normally, then record... The process was switched to manual filling.
[0166] S450. Using the second generation model of the tool plan, process multiple target parameters and tool candidate plans to generate an executable tool plan.
[0167] In this embodiment, without changing the order of the tool candidate plans or the dependencies among the multiple target parameters, the electronic device calls the second tool plan generation model. Based on the prompt words, it processes the multiple target parameters and tool candidate plans to generate an executable lightweight format (JSON) tool plan, which serves as the executable tool plan. An example of the prompt words is as follows:
[0168] """
[0169] Role: Parameter Reasoning and Plan Entityization Engine.
[0170] Objective: Given a strategy plan and tool parameter pattern, complete and validate required parameters without changing the steps; set parameters whose valid values cannot be automatically obtained from the context to empty and write them to needs.
[0171] Constraint: Output only JSON, without any explanation.
[0172] [Context]:
[0173] {context_block}
[0174] [Strategy and Plan]:
[0175] {strategy_plan}
[0176]
Tool Parameter Mode
[0177] {tool_schemas}
[0178] Output Requirements:
[0179] {{
[0180] "strategy_id": " <same-as-plan>",
[0181] "steps": [
[0182] {{
[0183] "id": "t1",
[0184] "tool_id": " <tool-a>",
[0185] "args": {{"host":"...", "probe":"..."}},
[0186] "needs": [],
[0187] "deps": []
[0188] }},
[0189] {{
[0190] "id": "t2",
[0191] "tool_id": " <tool-b>",
[0192] "args": {{"targets":["..."], "limit":32, "mode":"safe"}},
[0193] "needs": [],
[0194] "deps": ["precheck"]
[0195] }},
[0196] ],
[0197] }}
[0198] """
[0199] Therefore, parameter dependencies and source priorities are established based on the tool parameter pattern and task context. During the generation phase, candidate parameters are validated for consistency and validity to ensure that output parameters conform to the tool interface and execution environment constraints. Through this process, the method can stably generate parameters that conform to interface constraints in multi-source contexts, thereby significantly improving the correctness, reproducibility, and task execution success rate.
[0200] S460. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0201] S460 is similar to S150, so it will not be described in detail here.
[0202] In another embodiment of this application, the implementation method of S150 will be explained in detail.
[0203] Figure 5 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0204] like Figure 5 As shown, the tool's execution method may include the following steps.
[0205] S510, Obtain the first multi-source data context of the target application scenario.
[0206] S520. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0207] S530. Based on the comprehensive score of each tool, obtain alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0208] S540. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0209] S510~S540 are similar to S110~S140, and will not be described in detail here.
[0210] S550. Solve the constraints of the tool's executable plan to determine its comprehensive score.
[0211] In some embodiments, the specific implementation method of S550 includes: S5501, applying risk constraints, cost constraints, latency constraints and success rate constraints to the tool executable plan, and obtaining the risk score, executable cost, allowable latency and acceptable risk of the tool executable plan; S5502, determining the comprehensive score of the tool executable plan based on the risk score, executable cost, allowable latency and acceptable risk.
[0212] In S5501, the threshold set is defined as follows:
[0213]
[0214] in, To achieve the minimum acceptable success rate; To the maximum acceptable execution cost; This is the maximum allowable delay; This represents the maximum acceptable risk score.
[0215] If and only if:
[0216] ,
[0217] The candidate plan is determined to satisfy the constraints. The sum of success rates; This represents the total cost of use. The sum of risks; This represents the critical path latency. The threshold values for each indicator can be dynamically calculated using a sliding window statistical method.
[0218]
[0219]
[0220] in, This is the average of the N most recent executions; This represents the standard deviation. This calculation method adaptively adjusts the threshold based on recent performance fluctuations of the tool.
[0221] From all candidate plans that meet the constraints, form the objective vector based on the constraint indices:
[0222]
[0223] In S5502, the electronic device filters out plans that are completely degraded by other solutions (i.e., those that exist). (ensuring that all dimensions are non-inferior and at least one dimension is superior), the remaining solutions constitute a Pareto feasible set. Then, after normalizing the risk score, executable cost, allowable delay, and acceptable risk, a weighted comprehensive score method is used to approximate Pareto optimality, resulting in a comprehensive score for the tool's executable plan.
[0224] Alternatively, the overall score of the tool's executable plan can be determined by the following method:
[0225]
[0226] in, Normalized value; This is a weight vector, which can be set according to requirements. (Success rate takes priority) (Cost is secondary) (Taking into account latency) (Medium risk weight); .
[0227] S560. Select the plan with the lowest overall score from the tool's executable plans as the tool's target plan.
[0228] Alternatively, the plan with the lowest overall score can be determined using the following method:
[0229]
[0230] Therefore, by constructing a multi-objective optimization model, a comprehensive evaluation of the risks, delays, costs, and success rates of various tool plans is conducted, selecting the optimal executable solution under the condition of functional coverage equivalence. Through multi-dimensional constraint solving and weight balancing, the redundancy and resource consumption of tool execution are reduced while ensuring the quality of task completion, thereby improving scheduling efficiency and execution economy.
[0231] S570. In the trial operation environment corresponding to the target application, the tool target plan is trial run.
[0232] In this embodiment, before the electronic device formally executes the tool target plan, it needs to perform a trial run in a sandbox environment isolated from the production environment to verify whether the tool target plan can pass the trial run.
[0233] Optionally, the trial run may include one or more of the following processes: sequential consistency processing, parameter and environment readiness processing, and comparison of expected results with correctness.
[0234] Specifically, the sequential consistency handling involves ensuring that parameters are topologically sortable, acyclic, and that resource concurrency does not exceed the upper limit. Parameter and environment readiness handling ensures that all required parameters for each tool are complete and pass parameter pattern validation, and that the target node executed by the tool is reachable. The expected result accuracy comparison involves comparing results based on the execution expectation conditions defined in the context (such as status bits, thresholds, counts / survival rates, etc.).
[0235] S580. If the tool target plan passes the trial run, then execute the tool target plan and obtain the tool plan execution result for the target application.
[0236] In this embodiment, if the electronic device determines that the tool target plan has passed the trial run, it will automatically enter the formal operation, execute the tool target plan, and obtain the tool plan execution result of the target application.
[0237] In some embodiments, if the tool's target plan fails the trial run, a difference summary (e.g., missing parameters, unauthorized access, insufficient resources, etc.) is returned and distribution is stopped. To ensure that the formal execution process can be replayed and verified, the following audit information is also recorded when the tool's target plan fails the trial run: Plan and Environment: Structured plan text, identifier and version of the called tool, key parameter values, execution time, etc.; Execution Result Summary: Structured summary record of each step of execution extracted using a standard template; Association Identifier: One strategy_id corresponds to one tool execution plan for quick retrieval.
[0238] Therefore, by comprehensively evaluating the risks, latency, costs, and success rates of various tool plans, the optimal executable solution is selected under the condition of functional coverage equivalence. Through multi-dimensional constraint solving and weight balancing, the redundancy and resource consumption of tool execution are reduced while ensuring the quality of task completion, thereby improving scheduling efficiency and execution economy.
[0239] In another embodiment of this application, after executing S150, an operation to update the preset tool library is also performed.
[0240] Figure 6 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0241] like Figure 6 As shown, the tool's execution method may include the following steps.
[0242] S610, Obtain the first multi-source data context of the target application scenario.
[0243] S620. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0244] S630. Based on the comprehensive score of each tool, obtain alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0245] S640. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0246] S650. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0247] S610~S650 are similar to S110~S150, and will not be described in detail here.
[0248] S660. Obtain tool observables from the tool plan execution results.
[0249] In this embodiment, without introducing retraining, the electronic device can update the tool library based on the observables generated after the tool plan is executed, so that the tool candidate recall in subsequent rounds can more accurately match the scenario requirements.
[0250] The objective measurement tool includes dynamic field observations, which include success rate estimates, cost estimates, delay estimates, and risk estimates.
[0251] Understandably, the default tool library is for each tool. While maintaining static fields such as function descriptions, also sort by tool version and execution context segmentation A set of updatable statistical scores is stored in a partition to prevent cross-contamination between different versions / scenes. For the key... Maintain dynamic fields: success rate estimates Cost estimates Delay estimate Risk estimate Optionally, the values of each field of the tool are in their most recent... The calculation within the sliding window during each execution is as follows:
[0252]
[0253]
[0254]
[0255]
[0256] in, This indicates the window size for dynamic statistics; the default value is 20. This indicates whether the tool execution meets expectations; success is recorded as 1, and failure or exception is recorded as 0, determined by the execution log and the returned results. These are system resource usage metrics during tool execution, representing CPU utilization, memory usage, and network bandwidth usage, obtained by the node monitoring system. This refers to the number of times manual intervention was performed. This is a weighting parameter used to control the impact of different resource consumption indicators on the total cost of the tool; the default setting is... ; and These are the start and end times of the tool execution, respectively; This represents the proportion of abnormal events (such as alarms, error retries, etc.) that occur during tool execution.
[0257] Optionally, the field update mechanism for the objective measurements of the above-mentioned tools is as follows:
[0258] Each time the tool is executed, the method automatically reads dynamic fields from the execution log: (Whether the execution met expectations) (Cost of this execution) (Execution time delayed) (This risk score), and update each field using the Exponential Moving Average (EMA) method:
[0259]
[0260]
[0261]
[0262]
[0263] in, This is a smoothing coefficient used to control the sensitivity to the latest execution results. The smaller the value, the smoother the update. This indicates a complete replacement with the score from the most recent execution. During a cold start, the score is initialized with the first observation to ensure the initial estimate is not empty.
[0264] All updates are written to the database key using atomic writes. And refresh the update time; when the tool version is upgraded, create a new key. To avoid confusion in ratings between different versions.
[0265] S670. Add the observable tool to the preset tool library to obtain the updated preset tool library.
[0266] In this embodiment, the electronic device can add the success rate estimate, cost estimate, delay estimate, and risk estimate included in the observables of the tool to a preset tool library to obtain an updated preset tool library.
[0267] Therefore, automatic feedback and write-back are performed after each tool execution, continuously monitoring and smoothly updating key indicators such as success rate, latency, risk, and cost for each tool, achieving dynamic rolling calibration of tool performance. This mechanism enables the system to accumulate experience data over long-term operation, continuously optimizing tool recall and plan selection strategies, thereby achieving adaptive evolution and stable improvement in invocation effects.
[0268] In another embodiment of this application, after executing S150, the operation of reusing the tool target plan is also performed.
[0269] Figure 7 A flowchart illustrating another tool plan execution method provided in an embodiment of this disclosure is shown.
[0270] like Figure 7 As shown, the tool's execution method may include the following steps.
[0271] S710, Obtain the first multi-source data context of the target application scenario.
[0272] S720. Based on the first multi-source data context, perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library to determine the comprehensive score of each tool.
[0273] S730. Based on the comprehensive score of each tool, obtain alternative tools from the preset tool library, and generate a tool candidate plan for the alternative tools based on the first generation model of the tool plan.
[0274] S740. Based on multiple candidate parameters in the first multi-source data context, perform parameter value reasoning and legality verification on the tool candidate plan to generate an executable plan for the tool.
[0275] S750. Solve the constraints of the tool's executable plan to obtain the tool's target plan, and execute the tool's target plan to obtain the execution result of the tool plan for the target application.
[0276] S710~S750 are similar to S110~S150, and will not be described in detail here.
[0277] S760: Extract core elements from the execution results of the tool plan of the target application, and generate fingerprint vectors of the core elements based on the preset second embedding model.
[0278] To avoid repeatedly performing complete tool reasoning and multi-objective optimization analysis in similar task scenarios, this invention introduces an experience reuse mechanism, enabling tool planning to be learnable and accumulative. Under similar contextual conditions (such as consistent or similar target types, task semantics, and environmental constraints), the system can directly reuse historically validated tool combination schemes, thereby significantly reducing decision-making time and computational overhead.
[0279] The core elements may include task objectives, dependency sequences, key parameter combinations, and contextual features.
[0280] Specifically, the electronic device inputs the extracted core elements into a preset second embedding model to generate a fingerprint vector. This fingerprint vector is stored in a hashing manner and can be used to quickly retrieve similar plans when a subsequent task is triggered.
[0281] S770. If a second multi-source data context of the current application scenario is detected, calculate the similarity between the second multi-source data context and the fingerprint vector.
[0282] In this embodiment, when the second multi-source data context of the current application scenario is detected, a new task is generated based on the second multi-source data context, and the similarity between the second multi-source data context and the fingerprint vector is calculated one by one to determine whether to reuse the tool target plan of the target application scenario based on the similarity.
[0283] S780. If the similarity is greater than the preset similarity threshold, and the estimated success rate in the tool plan execution result is greater than the preset success rate threshold, then the tool target plan will be used as the tool candidate plan for the current application scenario.
[0284] In this embodiment, if the electronic device determines that the similarity is greater than the preset similarity threshold, the plan is directly used as the initial candidate without the need for re-reasoning and generation, thus speeding up the generation of the tool plan.
[0285] Optionally, if the similarity is greater than a preset similarity threshold, it can be determined by the following method:
[0286]
[0287] in, This is the demand vector corresponding to the second multi-source data context; For fingerprint vectors; This is a preset similarity threshold (default value is 0.8). If the success rate estimate... Not lower than the preset success rate threshold ,and, If so, the tool target plan will be used as the tool candidate plan for the current application scenario.
[0288] Furthermore, the electronic device also performs caching and updates. The tool's execution results are maintained using a lightweight cache table, eliminating the need to build a complete knowledge base structure. Each record contains:
[0289]
[0290] Next, the plan is dynamically eliminated based on time and performance. The cache is automatically updated after each plan is executed. The performance of the dynamic fields is evaluated, and if the new plan is better than the old plan, the corresponding entry is replaced.
[0291] Therefore, by adopting a static model plus dynamic experience accumulation, without relying on model retraining or parameter transfer, and without changing the structure of the neural network model or scheduling algorithm, learning and adaptation at the "behavioral level" are achieved solely through the structured recording and rapid matching of execution experience.
[0292] In another embodiment of this application, the overall logic of the tool plan execution method is explained.
[0293] Figure 8 A logical schematic diagram of a tool plan execution method provided in an embodiment of this disclosure is shown.
[0294] like Figure 8 As shown, the tool's execution method may include the following steps.
[0295] S810, a semantically aware tool decision engine.
[0296] In this embodiment, the electronic device receives multi-source input, and the tool decision engine generates a low-ambiguity candidate set in the tool knowledge base to complete the permission consistency determination and parameter solvability assessment, and generate a tool executable plan.
[0297] Specifically, firstly, the first multi-source data context of the target application scenario is obtained; then, based on the first multi-source data context, dual-channel correlation scoring and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool; next, based on the comprehensive score of each tool, candidate tools are obtained from the preset tool library, and based on the first generation model of the tool plan, a tool candidate plan for the candidate tools is generated; finally, based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the tool candidate plan to generate an executable plan for the tool.
[0298] S820, Multi-objective constraints and controlled execution.
[0299] In this embodiment, the electronic device scores and filters each tool plan under the constraint of a multi-plan strategy, selects the best one for execution, and receives the feedback results.
[0300] Specifically, the electronic device performs constraint solving on the tool's executable plan to obtain the tool's target plan, executes the tool's target plan, and obtains the tool plan execution result for the target application.
[0301] S830, dynamic scoring update mechanism.
[0302] In this embodiment, the electronic device updates its statistical score and success rate estimate based on the tool's performance and records experience information for reuse in subsequent rounds of tasks, thereby continuously optimizing the intelligent decision-making process and improving decision accuracy and call stability.
[0303] Specifically, firstly, core elements are extracted from the execution results of the tool plan of the target application, and fingerprint vectors of the core elements are generated based on a preset second embedding model; if a second multi-source data context of the current application scenario is detected, the similarity between the second multi-source data context and the fingerprint vector is calculated; if the similarity is greater than a preset similarity threshold, and the success rate estimate in the execution results of the tool plan is greater than a preset success rate threshold, then the tool target plan is taken as a tool candidate plan for the current application scenario.
[0304] This disclosure also provides a tool plan execution apparatus for implementing the above-described tool plan execution method, which is described below in conjunction with... Figure 9 The following explanation is provided. In this embodiment of the disclosure, the tool plan execution device can be executed by an electronic device. The electronic device can be understood as a supercomputer device.
[0305] Figure 9 A schematic diagram of the structure of a tool plan execution device provided in an embodiment of this disclosure is shown.
[0306] like Figure 9 As shown, the tool plan execution device 900 may include:
[0307] The first acquisition module 910 is used to acquire the first multi-source data context of the target application scenario;
[0308] The first determining module 920 is used to perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library based on the first multi-source data context, and determine the comprehensive score of each tool.
[0309] The first generation module 930 is used to obtain candidate tools from the preset tool library based on the comprehensive score of each tool, and generate a tool candidate plan for the candidate tools based on the tool plan first generation model;
[0310] The second generation module 940 is used to perform parameter value reasoning and legality verification on the candidate plan of the tool based on multiple candidate parameters in the first multi-source data context, and generate an executable plan for the tool.
[0311] The second acquisition module 950 is used to solve the constraints of the tool executable plan to obtain the tool target plan, and execute the tool target plan to obtain the tool plan execution result of the target application.
[0312] An embodiment of this disclosure discloses a tool plan execution apparatus. First, based on a first multi-source data context of the target application scenario, a dual-channel correlation scoring and multi-level feasibility screening are performed on each tool in a preset tool library to determine the comprehensive score of each tool. Then, based on the comprehensive scores of each tool, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on a first tool plan generation model. Next, based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the tool candidate plan to generate an executable tool plan. Finally, constraint solving is performed on the executable tool plan to obtain the target tool plan, and the target tool plan is executed to obtain the tool plan execution result for the target application. Thus, by integrating feasibility pre-processing, intelligent parameter reasoning, redundancy suppression, and multi-objective optimization into an integrated process, the accuracy, stability, and scalability of tool invocation are effectively improved, meeting the joint requirements of reliability and scalability of tool plan execution in the corresponding scenario.
[0313] In some embodiments of this disclosure, the first determining module 920 includes:
[0314] The semantic standardization processing unit is used to perform semantic standardization processing on the first multi-source data context to generate structured context text;
[0315] The dimensionality reduction processing unit is used to perform dimensionality reduction processing on the structured context text input preset first embedding model to obtain the demand vector corresponding to the first multi-source data context.
[0316] The comprehensive scoring unit is used to perform dual-channel relevance scoring and multi-level feasibility screening on each tool in the preset tool library based on the demand vector, and to determine the comprehensive score of each tool.
[0317] In some embodiments of this disclosure, the comprehensive scoring determination unit includes:
[0318] The first determining subunit is used to perform dual-channel relevance scoring on each tool in the preset tool library based on the demand vector, and determine the initial relevance score of each tool.
[0319] The second determining subunit is used to perform multi-level feasibility screening on each tool in the preset tool library based on the demand vector, and determine the feasibility screening score of each tool.
[0320] The third determining subunit is used to calculate the comprehensive score of each tool based on the initial relevance score and the feasibility screening score of each tool.
[0321] In some embodiments of this disclosure, the second determining subunit is specifically used for:
[0322] Based on the demand vector, the capability compatibility of each tool in the preset tool library is screened to obtain a capability compatibility feasibility screening score.
[0323] Based on the demand vector, parameter solvability screening is performed on each tool in the preset tool library to obtain a parameter solvability feasibility screening score.
[0324] Based on the demand vector, permission consistency screening is performed on each tool in the preset tool library to obtain a permission consistency feasibility screening score.
[0325] The feasibility screening score is determined by the capability compatibility feasibility screening score, the parameter solvability feasibility screening score, and the permission consistency feasibility screening score.
[0326] In some embodiments of this disclosure, the first generation module 930 is specifically used for:
[0327] Select tools whose overall score is greater than a preset score threshold from the preset library as the alternative tools.
[0328] In some embodiments of this disclosure, the first generation module 930 is specifically used for:
[0329] The alternative tools are input into the first generation model of the tool plan. According to the constraints of the feasibility screening score corresponding to the alternative tools, the alternative tools are processed to generate a plan, and the tool candidate plan of the alternative tools is obtained.
[0330] In some embodiments of this disclosure, the second generation module 940 includes:
[0331] The first processing unit is used to perform source priority processing and specificity priority processing on the multiple candidate parameters to determine multiple target parameters;
[0332] The second processing unit is used to process the multiple target parameters and the candidate tool plans using the second generation model of the tool plan, and generate an executable tool plan.
[0333] In some embodiments of this disclosure, the source priority processing includes the following processes in sequence: priority processing of display fields, priority processing of logs, priority processing of structured context key values, priority processing of output from preceding steps, priority processing of default values, and priority processing of the knowledge base.
[0334] The specific priority processing includes the following processes in sequence: priority processing for precise identifiers, priority processing for complete paths, priority processing for single hosts, priority processing for group names, priority processing for wildcards, and priority processing for ranges.
[0335] In some embodiments of this disclosure, the second acquisition module 950 includes:
[0336] The constraint solving unit is used to solve the constraints of the tool's executable plan and determine the comprehensive score of the tool's executable plan;
[0337] The planning determination unit is used to select the plan with the lowest comprehensive score from the executable plans of the tool as the target plan of the tool.
[0338] In some embodiments of this disclosure, the constraint solving unit is specifically used for:
[0339] Apply risk constraints, cost constraints, time constraints, and success rate constraints to the executable plan of the tool to obtain the risk score, executable cost, allowable time delay, and acceptable risk of the executable plan of the tool.
[0340] A comprehensive score for the tool's executable plan is determined based on the risk score, the executable cost, the allowable latency, and the acceptable risk.
[0341] In some embodiments of this disclosure, the second acquisition module 950 is specifically used for:
[0342] The tool target plan will be tested in the trial operation environment corresponding to the target application;
[0343] If the tool target plan passes the trial run, then the tool target plan is executed to obtain the tool plan execution result for the target application.
[0344] In some embodiments of this disclosure, the trial run includes one or more of the following processes:
[0345] It relies on sequential consistency processing, parameter and environment readiness processing, and comparison of expected results with accuracy.
[0346] In some embodiments of this disclosure, the device further includes:
[0347] The third acquisition module is used to acquire tool observables from the tool plan execution results;
[0348] An add module is used to add the observable tools to the preset tool library to obtain an updated preset tool library.
[0349] In some embodiments of this disclosure, the objective measurement of the tool includes dynamic field observations, which include success rate estimates, cost estimates, latency estimates, and risk estimates.
[0350] The adding module is specifically used to add the success rate estimate, cost estimate, delay estimate, and risk estimate included in the observables of the tool to the preset tool library to obtain an updated preset tool library.
[0351] In some embodiments of this disclosure, the device further includes:
[0352] The extraction module is used to extract core elements from the execution results of the tool plan of the target application, and generate fingerprint vectors of the core elements based on a preset second embedding model;
[0353] The calculation module is used to calculate the similarity between the second multi-source data context and the fingerprint vector if a second multi-source data context of the current application scenario is detected.
[0354] The determination module is used to determine if the similarity is greater than a preset similarity threshold and the estimated success rate in the tool plan execution result is greater than a preset success rate threshold, and then designate the tool target plan as a tool candidate plan for the current application scenario.
[0355] It should be noted that, Figure 9 The tool plan execution device 900 shown can execute Figures 1-8 The various steps in the method embodiment shown are implemented. Figures 1-8 The processes and effects in the method embodiments shown are not described in detail here.
[0356] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown.
[0357] like Figure 10 As shown, the electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.
[0358] Specifically, the processor 1001 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0359] Memory 1002 may include mass storage for advertising or instructions. For example, and not limitingly, memory 1002 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1002 may include removable or non-removable (or fixed) media. Where appropriate, memory 1002 may be internal or external to the integrated gateway device. In a particular embodiment, memory 1002 is non-volatile solid-state memory. In a particular embodiment, memory 1002 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0360] The processor 1001 acquires and executes computer program instructions stored in the memory 1002 to perform the steps of the tool plan execution method provided in the embodiments of this disclosure.
[0361] In one example, the electronic device may also include a transceiver 1003 and a bus 1004. Wherein, as... Figure 10 As shown, the processor 1001, memory 1002 and transceiver 1003 are connected via bus 1004 and communicate with each other.
[0362] Bus 1004 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 1004 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0363] The following are embodiments of a computer-readable storage medium provided in this disclosure. This computer-readable storage medium and the tool planning execution method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the computer-readable storage medium, please refer to the embodiments of the tool planning execution method described above.
[0364] This embodiment provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a tool plan execution method, including:
[0365] Obtain the first multi-source data context of the target application scenario;
[0366] Based on the first multi-source data context, a dual-channel correlation score and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool;
[0367] Based on the comprehensive scores of the tools, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on the first tool plan generation model.
[0368] Based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the candidate plans of the tool to generate an executable plan for the tool.
[0369] The constraints of the executable plan of the tool are solved to obtain the target plan of the tool, and the target plan of the tool is executed to obtain the execution result of the tool plan of the target application.
[0370] Of course, the computer-executable instructions provided in the embodiments of this disclosure are not limited to the above-described method operations, but can also perform related operations in the information push method provided in any embodiment of this disclosure.
[0371] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this disclosure can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer cloud platform (which may be a personal computer, a server, or a network cloud platform, etc.) to execute the information push method provided in the various embodiments of this disclosure.
[0372] Note that the above description is merely a preferred embodiment and the technical principles employed in this disclosure. Those skilled in the art will understand that this disclosure is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this disclosure. Therefore, although this disclosure has been described in detail through the above embodiments, it is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this disclosure, and the scope of this disclosure is determined by the scope of the appended claims. < / hash>
Claims
1. A tool plan execution method characterized by, include: Obtain the first multi-source data context of the target application scenario, wherein the first multi-source data context is reference data used to evaluate the tools in the tool library, and the target application scenario is one of the operation and maintenance scenario, knowledge question and answer scenario, and task collaboration scenario. When the target application scenario is the operation and maintenance scenario, the first multi-source data context includes alarm information, operation and maintenance work order, anomaly diagnosis information, command output information, and operation and maintenance knowledge questions. Based on the first multi-source data context, a dual-channel correlation score and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool; Based on the comprehensive scores of the tools, candidate tools are obtained from the preset tool library, and a tool candidate plan for the candidate tools is generated based on the first tool plan generation model. Based on multiple candidate parameters in the first multi-source data context, parameter value reasoning and legality verification are performed on the candidate plans of the tool to generate an executable plan for the tool. The constraints of the executable plan of the tool are solved to obtain the target plan of the tool, and the target plan of the tool is executed to obtain the execution result of the tool plan of the target application.
2. The method according to claim 1, characterized in that, Based on the first multi-source data context, a dual-channel relevance score and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool, including: The first multi-source data context is semantically standardized to generate structured context text; The structured context text input is subjected to dimensionality reduction processing of the preset first embedding model to obtain the demand vector corresponding to the first multi-source data context; Based on the demand vector, a dual-channel relevance score and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool.
3. The method according to claim 2, characterized in that, Based on the demand vector, a dual-channel relevance scoring and multi-level feasibility screening are performed on each tool in the preset tool library to determine the comprehensive score of each tool, including: Based on the demand vector, a dual-channel relevance score is performed on each tool in the preset tool library to determine the initial relevance score of each tool; Based on the demand vector, multi-level feasibility screening is performed on each tool in the preset tool library to determine the feasibility screening score of each tool; The comprehensive score of each tool is calculated based on its initial relevance score and its feasibility screening score.
4. The method according to claim 3, characterized in that, Based on the demand vector, a multi-level feasibility screening is performed on each tool in the preset tool library to determine the feasibility screening score of each tool, including: Based on the demand vector, the capability compatibility of each tool in the preset tool library is screened to obtain a capability compatibility feasibility screening score. Based on the demand vector, parameter solvability screening is performed on each tool in the preset tool library to obtain a parameter solvability feasibility screening score. Based on the demand vector, permission consistency screening is performed on each tool in the preset tool library to obtain a permission consistency feasibility screening score. The feasibility screening score is determined by the capability compatibility feasibility screening score, the parameter solvability feasibility screening score, and the permission consistency feasibility screening score.
5. The method according to claim 1, characterized in that, The step of obtaining candidate tools from the preset tool library based on the comprehensive score of each tool includes: Select a tool from the preset tool library whose overall score is greater than a preset score threshold as the alternative tool.
6. The method according to claim 1, characterized in that, The process of generating candidate tool plans for the alternative tools based on the first tool plan generation model includes: The alternative tools are input into the first generation model of the tool plan. According to the constraints of the feasibility screening score corresponding to the alternative tools, the alternative tools are processed to generate a plan, and the tool candidate plan of the alternative tools is obtained.
7. The method according to claim 1, characterized in that, The step of generating an executable plan for the tool by performing parameter value reasoning and validity verification on multiple candidate parameters in the first multi-source data context, including: Source priority processing and specificity priority processing are performed on the multiple candidate parameters to determine multiple target parameters; The tool plan second generation model is used to process the multiple target parameters and the tool candidate plans to generate an executable tool plan.
8. The method according to claim 7, characterized in that, The source priority processing includes the following processes in sequence: priority processing of display fields, priority processing of logs, priority processing of structured context key values, priority processing of output from preceding steps, priority processing of default values, and priority processing of the knowledge base. The specific priority processing includes the following processes in sequence: priority processing for precise identifiers, priority processing for complete paths, priority processing for single hosts, priority processing for group names, priority processing for wildcards, and priority processing for ranges.
9. The method according to claim 1, characterized in that, The constraint solving of the executable plan of the tool to obtain the tool's target plan includes: Constraints are solved on the executable plan of the tool to determine the comprehensive score of the executable plan; The plan with the lowest overall score is selected from the executable plans of the tool and used as the target plan of the tool.
10. The method according to claim 9, characterized in that, The constraint solving of the tool's executable plan to determine its comprehensive score includes: Apply risk constraints, cost constraints, time constraints, and success rate constraints to the executable plan of the tool to obtain the risk score, executable cost, allowable time delay, and acceptable risk of the executable plan of the tool. A comprehensive score for the tool's executable plan is determined based on the risk score, the executable cost, the allowable latency, and the acceptable risk.
11. The method according to claim 1, characterized in that, The execution of the tool target plan to obtain the tool plan execution result for the target application includes: The tool target plan will be tested in the trial operation environment corresponding to the target application; If the tool target plan passes the trial run, then the tool target plan is executed to obtain the tool plan execution result for the target application.
12. The method according to claim 11, characterized in that, The trial operation includes one or more of the following processes: It relies on sequential consistency processing, parameter and environment readiness processing, and comparison of expected results with accuracy.
13. The method according to claim 1, characterized in that, Also includes: Obtain tool observables from the tool plan execution results; The observable tool is added to the preset tool library to obtain an updated preset tool library.
14. The method according to claim 13, characterized in that, The objective measurement of the tool includes dynamic field observations, which include success rate estimates, cost estimates, delay estimates, and risk estimates. The step of adding the observable tool to the preset tool library to obtain an updated preset tool library includes: The success rate estimate, cost estimate, delay estimate, and risk estimate included in the observables of the tool are added to the preset tool library to obtain the updated preset tool library.
15. The method according to claim 1, characterized in that, Also includes: Extract core elements from the tool plan execution results of the target application, and generate fingerprint vectors of the core elements based on a preset second embedding model; If a second multi-source data context of the current application scenario is detected, the similarity between the second multi-source data context and the fingerprint vector is calculated; If the similarity is greater than a preset similarity threshold, and the estimated success rate in the tool plan execution result is greater than a preset success rate threshold, then the tool target plan is taken as a tool candidate plan for the current application scenario.
16. A tool plan execution device, characterized in that, include: The first acquisition module is used to acquire the first multi-source data context of the target application scenario. The first multi-source data context is reference data used to evaluate the tools in the tool library. The target application scenario is one of the operation and maintenance scenario, knowledge question and answer scenario, and task collaboration scenario. When the target application scenario is the operation and maintenance scenario, the first multi-source data context includes alarm information, operation and maintenance work order, anomaly diagnosis information, command output information, and operation and maintenance knowledge questions. The first determining module is used to perform dual-channel correlation scoring and multi-level feasibility screening on each tool in the preset tool library based on the first multi-source data context, and determine the comprehensive score of each tool. The first generation module is used to obtain candidate tools from the preset tool library based on the comprehensive score of each tool, and generate a tool candidate plan for the candidate tools based on the tool plan first generation model; The second generation module is used to perform parameter value reasoning and legality verification on the candidate plans of the tool based on multiple candidate parameters in the first multi-source data context, and generate an executable plan for the tool. The second acquisition module is used to solve the constraints of the executable plan of the tool to obtain the target plan of the tool, and execute the target plan of the tool to obtain the execution result of the tool plan of the target application.
17. An electronic device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to retrieve the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1-15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to implement the method described in any one of claims 1-15.