Agent-based tool combination and task processing method and device, equipment and medium

By pre-training the language model and the Agent agent generate structured semantic vectors, dynamically match and optimize tool nodes, the problem of tool combinations relying on fixed rules is solved, and efficient and intelligent task processing is achieved.

CN120276875AActive Publication Date: 2025-07-08SHANGHAI HANGDONG TECH CO LTD

Patent Information

Application Number
CN202510772011.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-08
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

In the prior art, tool combinations rely on fixed rules and lack intelligent adaptability, resulting in users needing to manually call or orchestrate tools to operate in complex and inefficiently, making it difficult to cope with complex and changing task requirements.

Method used

By introducing pre-trained language models and Agent agents, structured semantic vectors are generated, knowledge base tool nodes are matched, dynamic priority sorting, initial thinking chains are generated, and tool nodes are visually adjusted through a tree flowchart, combining external feedback and optimization strategies to update tool combination logic.

Benefits of technology

It significantly lowers the threshold for users to manually combine tools, improves task processing efficiency and accuracy, and the system has the ability to continuously learn and optimize, which can better cope with complex and changeable task needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276875A_ABST
    Figure CN120276875A_ABST
Patent Text Reader

Abstract

The invention discloses an Agent-based tool combination and task processing method and device, equipment and a medium, and the method comprises the steps: carrying out the natural language processing of a task instruction inputted by a user, and generating a structured semantic vector containing task semantics; performing similarity matching on the structured semantic vector and a predefined tool node semantic tag in a knowledge base, and outputting a candidate tool node set related to the current task; performing dynamic priority ranking on the candidate tool node set based on context parameters to generate an initial thinking chain; converting the thinking chain into a tree flow chart structure, and performing dynamic addition and deletion or parameter adjustment on tool nodes in the flow chart according to a feedback or preset optimization strategy; and updating tool combinational logic according to the adjusted thinking chain, processing the task instruction, and outputting a task processing result. The tool nodes are matched through the Agent agents, and the thinking chain is generated through dynamic sorting, so that the task processing efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of Agent intelligent agents, and particularly relates to a tool combination based on Agent, a method, device, equipment, and medium for processing tasks. Background Art

[0002] In recent years, users need to manually call or orchestrate tools to solve problems, with complex operations and low efficiency. For example, although RPA tools can achieve process automation, they cannot dynamically adjust the tool combination according to tasks. In addition, existing systems have deficiencies in the automatic generation of tool combination logic, historical experience accumulation, and reuse, and it is difficult to cope with complex and changing task requirements. This proposal introduces technologies such as pre-trained language models, knowledge graphs, and reinforcement learning to achieve dynamic combination of tools, generation and optimization of the chain of thought, and incremental update of the knowledge base, significantly improving the intelligence level and task processing efficiency of the system. Summary of the Invention

[0003] The purpose of this application is to provide a tool combination based on Agent, a method, device, equipment, and medium for processing tasks, so as to at least solve the problem that the tool combination in the prior art depends on fixed rules and lacks intelligent adaptability.

[0004] To solve the above technical problems, this application provides a tool combination based on Agent and a method for processing tasks, including: Performing natural language processing on the task instruction input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; Based on the Agent intelligent agent, performing similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, and outputting a set of candidate tool nodes related to the current task; Based on the context parameters, performing dynamic priority sorting on the set of candidate tool nodes to generate an initial chain of thought; Automatically converting the initial chain of thought into a tree-shaped flowchart structure, and dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart according to external tool execution feedback or preset optimization strategies; Updating the tool combination logic according to the adjusted chain of thought, and processing the task instruction based on the updated tool combination logic to output a task processing result.

[0005] Optionally, after generating the initial chain of thought, it further includes: Verifying the logical feasibility of the initial chain of thought through a sandbox environment; If the verification passes, automatically converting the verified initial chain of thought into a tree-shaped flowchart structure.

[0006] Optionally, dynamically prioritizing the set of candidate tool nodes based on the context parameters to generate an initial thought chain includes: Performing dynamic weighting based on the context parameters to calculate the priority weights of each candidate tool node; Performing dependency constraint verification to detect logical conflicts in the prioritized candidate tool nodes based on the dependency rules of tool nodes in the knowledge graph; Simulating the execution paths of different node combinations through the Monte Carlo tree search algorithm and selecting the sorting scheme with the highest success rate to generate the initial thought chain.

[0007] Optionally, the Agent intelligent agent outputs a set of candidate tool nodes related to the current task by performing similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, including: Enhancing the domain features of the structured semantic vector by superimposing a dedicated feature vector on the structured semantic vector based on the domain label in the task instruction; Performing vector similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base using a dynamic weighting algorithm; Filtering the candidate tool nodes through multi-dimensional screening conditions and outputting the set of candidate tool nodes related to the current task.

[0008] Optionally, dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart according to the external tool execution feedback or preset optimization strategy includes: When the external feedback indicates that the node execution fails, automatically backtracking to the predecessor node of the failed node and calling an alternative tool in the knowledge base for replacement; Dynamically adjusting the parallel execution quantity and parameter configuration of the tool nodes according to the energy consumption constraint in the preset optimization strategy; Verifying whether the adjusted flowchart matches the original task intention through a semantic consistency check module.

[0009] Optionally, after updating the tool combination logic according to the adjusted thought chain, it further includes: Decomposing the adjusted thought chain into atomic operation units, annotating the domain label, execution environment, and version number, and storing them in the knowledge base; Constructing a reward function based on the reinforcement learning framework and optimizing the node mapping strategy of the Agent intelligent agent according to the accuracy and time consumption of the task processing result; When a new tool node is stored in the library, automatically generating the associated semantic label and dependency relationship and updating the knowledge graph topology.

[0010] Optionally, the method further includes: Obtain the execution logs of each tool in real time, extract key metrics to generate a feedback vector; By comparing the deviation between the feedback vector and the prediction vector, locate the weak nodes in the thinking chain and trigger the incremental update of the knowledge base; When the failure rate of the execution of the thinking chain exceeds the threshold, automatically roll back to the historical stable version.

[0011] To solve the above technical problems, the present application also provides an Agent-based tool combination and processing task device, including: A task parsing module, which is used to perform natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, and the task semantics includes intent, entity, and context parameters; A tool matching module, which is used to perform similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base based on an Agent intelligent agent, and output a set of candidate tool nodes related to the current task; A thinking chain generation module, which is used to perform dynamic priority sorting on the set of candidate tool nodes based on the context parameters to generate an initial thinking chain; A parameter adjustment module, which is used to automatically convert the initial thinking chain into a tree-shaped flow chart structure, and perform dynamic addition, deletion, or parameter adjustment on the tool nodes in the flow chart according to the external tool execution feedback or a preset optimization strategy; A processing output module, which is used to update the tool combination logic according to the adjusted thinking chain, process the task instructions based on the updated tool combination logic, and output the task processing result.

[0012] To solve the above technical problems, the present application also provides a computer device, including a memory and a processor. When the computer-readable instructions stored in the memory are executed by the processor, the processor executes the steps of the above-mentioned Agent-based tool combination and processing task method.

[0013] To solve the above technical problems, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned Agent-based tool combination and processing task method.

[0014] The beneficial effects of the embodiments of the present application are as follows: Through natural language processing of the task instructions input by the user by a pre-trained language model, a structured semantic vector containing task semantics is generated, and the task semantics includes intent, entity, and context parameters; based on the Agent intelligent agent, the structured semantic vector is matched with the predefined tool node semantic labels in the knowledge base, and a set of candidate tool nodes related to the current task is output; based on the context parameters, dynamic priority sorting is performed on the set of candidate tool nodes to generate an initial thought chain; the initial thought chain is automatically converted into a tree-shaped flowchart structure, and dynamic addition, deletion, or parameter adjustment of the tool nodes in the flowchart is performed according to external tool execution feedback or preset optimization strategies; the tool combination logic is updated according to the adjusted thought chain, and the task instructions are processed based on the updated tool combination logic to output a task processing result. By performing semantic parsing and vector representation on user task instructions through a pre-trained language model, combining a knowledge graph to match tool nodes and dynamically sorting to generate a thought chain, further visually displaying it in a tree-shaped flowchart and supporting user interaction adjustment, and finally processing the task and outputting the result according to the optimized thought chain. It significantly reduces the threshold for users to manually combine tools, improves task processing efficiency and accuracy. At the same time, the system continuously learns and optimizes through a feedback mechanism, has the ability to continuously improve, and can better handle complex and changing task requirements, solving the problems in the prior art that tool combination depends on fixed rules and lacks intelligent adaptive capabilities. Description of the Drawings

[0015] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where: Figure 1 is a schematic basic flow diagram of a method for Agent-based tool combination and task processing in a specific embodiment of the present application; Figure 2 is a schematic basic structure diagram of an Agent-based tool combination and task processing device in a specific embodiment of the present application; Figure 3 is a basic structure block diagram of a computer device in a specific embodiment of the present application. Detailed Embodiments

[0016] The embodiments of the present application are described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application and should not be construed as limiting the present application.

[0017] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of this application means the presence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups.

[0018] Those skilled in the art can understand that, unless otherwise defined, all terms used herein (including technical terms and scientific terms) have the same meaning as the general understanding of those of ordinary skill in the art to which this application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as here.

[0019] Those skilled in the art can understand that the "terminal" used herein includes both a device with a wireless signal receiver that only has the ability of no transmission, and a device with receiving and transmitting hardware that has the receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palm computers or other devices, which are conventional laptop and / or palm computers or other devices with and / or including a radio frequency receiver. The "terminal" used herein can be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to operate locally, and / or in a distributed form, at any other location on the earth and / or in space. The "terminal" used herein can also be a communication terminal, an Internet access terminal, a music / video playback terminal, for example, it can be a PDA, a MID (Mobile Internet Device) and / or a mobile phone with music / video playback function, or it can also be devices such as a smart TV, a set-top box, etc.

[0020] The "server", "client", "service node" and other names mentioned in this application refer to hardware that essentially has the equivalent capabilities of a personal computer. It is a hardware device with the necessary components disclosed by the von Neumann principle, including a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input / output devices to complete specific functions.

[0021] It should be noted that the concept of "server" mentioned in this application can similarly be extended to the case of server clusters. According to the network deployment principles understood by those skilled in the art, the various servers should be logically divided. Physically, these servers can either be independent of each other but can be called through an interface, or integrated into a single physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility and should not use it to restrict the implementation manner of the network deployment method of this application.

[0022] One or several technical features of this application, unless explicitly specified, can either be deployed on the server and accessed by the client remotely invoking the online service interface provided by the server, or directly deployed and run on the client for access.

[0023] The AI models cited or possibly cited in this application, unless explicitly specified, can either be deployed on a remote server and remotely invoked on the client, or deployed on a client with sufficient device capabilities for direct invocation. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operation resources and avoid over-occupying the client's hardware operation resources.

[0024] All kinds of data involved in this application, unless explicitly specified, can either be remotely stored on the server or stored on the local terminal device, as long as it is suitable for being invoked by the technical solution of this application.

[0025] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus show commonality with each other, unless otherwise specified, these methods can all be executed independently. Similarly, for the various embodiments disclosed in this application, they are all proposed based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are only appropriately transformed for convenience although the concept expressions are different, should be understood as equivalent.

[0026] For each of the embodiments to be disclosed in this application, unless explicitly stated as mutually exclusive, the relevant technical features involved in each embodiment can be cross - combined to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the requirements in the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0027] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the basic process of the Agent - based tool combination and task - processing method in this embodiment.

[0028] As Figure 1 shown, it includes: S1100. Perform natural language processing on the task instruction input by the user through a pre - trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; This embodiment is applied to the task - processing scenarios of Agent intelligent agents in various fields such as finance, e - commerce, insurance, education, medical care, and law. In this embodiment, by configuring a task - processing system, it is used to automatically combine tools for and process tasks. Specifically, the task - processing system (hereinafter referred to as the "system") can receive the user's task instruction, and then parse the task instruction and combine the corresponding task - processing tools to process the task. Among them, when receiving the user's task - processing instruction, perform natural language processing on the task instruction input by the user through a pre - trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters. Specifically, the user inputs a task instruction: "Analyze the sales data of the past week and generate a visual report". The system performs natural language processing on the instruction through a pre - trained language model (for example, the LLM language model). First, the LLM language model performs intent recognition on the instruction and classifies it as "data analysis" and "report generation". Then, the model identifies the key entities, including the time range "the past week", the data type "sales data", and the target tool "visualization tool". In addition, the LLM language model also extracts context parameters, such as the user's historical task records and the context environment of the current task. Finally, the LLM converts these semantic information into a high - dimensional structured semantic vector, where each dimension in the vector represents different semantic features, such as intent intensity, entity type, and context association degree. The generated structured semantic vector will be used as the basis for subsequent tool matching.

[0029] It should be noted that in some specific fields (such as finance or healthcare), general pre-trained language models may not accurately understand domain-specific terms and semantics. For this reason, a domain adaptation layer is introduced based on the pre-trained language model in this embodiment. For example, in the financial field, when a user inputs "analyze the balance sheet", the domain adaptation layer maps the term "balance sheet" into the specific semantic space of the financial field, ensuring that its semantic vector is accurately matched with the tool nodes in the financial field (such as financial analysis tools). Through the domain adaptation layer, the system can more accurately parse domain-specific task instructions and avoid semantic deviation caused by general models.

[0030] It should be noted that to support multi-language input, the pre-trained language model is extended for multiple languages in this embodiment. For example, a user can input "Analyze the sales data for the past week" in Chinese, and the system aligns its semantic vector with the semantic labels of English tool nodes in the knowledge base through a multi-language model. The semantic alignment process is optimized through contrastive learning to ensure that instructions in different languages can be accurately mapped to the same tool nodes. For example, "data cleaning" in Chinese and "data cleaning" in English have a high degree of similarity in the semantic vector space, thus enabling cross-language task processing.

[0031] It should be noted that when processing user tasks in this embodiment, the system not only focuses on the current instruction but also combines context association and historical task records. For example, if the user has previously completed a similar task (such as "Analyze the sales data for last week"), the system will use the context information of the historical task to optimize the semantic parsing of the current task. When the user inputs "Analyze the sales data for the past week" again, the system will refer to the semantic vector of the historical task, quickly identify the repeated intentions and entities, and make adjustments in combination with the subtle differences in the current task (such as the change in the time range). This way of context association and utilization of historical tasks can significantly improve the efficiency and accuracy of task parsing.

[0032] S1200. Based on the Agent intelligent body, perform a similarity match between the structured semantic vector and the pre-defined tool node semantic labels in the knowledge base, and output a set of candidate tool nodes related to the current task; After performing natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, based on an Agent, the structured semantic vector is matched with the predefined tool node semantic tags in the knowledge base, and a set of candidate tool nodes relevant to the current task is output. In this embodiment, the system matches the structured semantic vector generated by the pre-trained language model (LLM) with the tool node semantic tags in the knowledge base. Each tool node in the knowledge base contains detailed metadata and semantic tags. For example, the metadata of a "data cleaning tool" node includes its function description (removing duplicate values and null values), input / output format (input is the original data set, output is the cleaned data set), and dependencies (requiring a data set as input). The semantic tags describe the function of the tool in natural language, such as "Data cleaning tool: used to remove duplicate values and null values". The system uses the LLM to calculate the similarity between the semantic vector of the user task and these semantic tags, and outputs a set of candidate tool nodes relevant to the current task. For example, for the user input "Analyze the sales data of the past week and generate a visual report", the system will match candidate nodes such as "data cleaning tool", "data analysis tool", and "visualization tool".

[0033] It should be noted that in some specific fields (such as finance or healthcare), the semantic tags and function descriptions of tool nodes may be domain-specific. For this reason, the system introduces a domain knowledge graph and constructs a dedicated knowledge base for different domains. For example, in the financial domain, the knowledge base will contain tool nodes related to financial analysis, such as "balance sheet analysis tool" and "financial statement generation tool". When the user inputs a task instruction in the financial domain, the system will give priority to calling the knowledge graph of the financial domain to ensure more accurate matching of tool nodes. Through the domain knowledge graph, the system can better understand the domain-specific task requirements and provide a tool combination that is more in line with domain habits.

[0034] It should be noted that in some complex tasks, the task instructions input by the user may contain multiple subtasks and multiple tool nodes need to be called. To improve the matching efficiency, the system introduces a context-aware mechanism to filter the candidate tool nodes according to the context information of the current task (such as task type, data scale, computing resources, etc.). For example, if the user task involves large-scale data analysis, the system will preferentially screen out tool nodes suitable for processing large amounts of data, such as distributed data analysis tools. Through context-aware filtering of tool nodes, the system can quickly narrow down the range of candidate tool nodes and improve the matching efficiency and accuracy.

[0035] S1300. Dynamically prioritize the set of candidate tool nodes based on the context parameters to generate an initial thought chain; After the Agent-based intelligent agent performs a similarity match between the structured semantic vector and the predefined tool node semantic tags in the knowledge base and outputs a set of candidate tool nodes relevant to the current task, based on the context parameters, a dynamic priority ranking is performed on the set of candidate tool nodes to generate an initial thought chain. Specifically, in this embodiment, the system performs a dynamic priority ranking on the set of candidate tool nodes through context parameters. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The system has already matched the relevant set of candidate tool nodes in the above steps, including "data cleaning tool", "data analysis tool", and "visualization tool". At this time, the system will rank these candidate nodes according to context parameters such as data scale, computing resources, historical success rate, etc. For example, if the computing resources in the current environment are limited, the system may preferentially select a lightweight data analysis tool instead of a resource-consuming advanced analysis tool. At the same time, the system will also refer to the success rate of historical tasks and preferentially select tool nodes that perform well in similar tasks. Finally, the system generates an initial thought chain, arranges the tool nodes in order of priority, for example: "data cleaning tool" → "data analysis tool" → "visualization tool", and is ready to enter the next step of processing.

[0036] It should be noted that in some scenarios, the urgency of the task is an important context parameter. For example, the user may need to complete an urgent data analysis task in a short period of time. In this case, the system will adjust the priority of the candidate tool nodes according to the urgency of the task. Specifically, the system will preferentially select tool nodes that can be executed quickly, even if these tools may be slightly inferior in function. For example, for an urgent task, the system may preferentially select a lightweight data cleaning tool instead of a powerful but time-consuming tool. In this way, the system can complete the task as efficiently as possible within a limited time to meet the urgent needs of the user.

[0037] It should be noted that in a multi-user environment, the availability of computing resources is an important factor affecting the selection of tool nodes. The system will monitor the resource usage of the current environment in real time and perform dynamic scheduling on the candidate tool nodes according to the resource availability. For example, if the memory resources of the current server are tight, the system may preferentially select tool nodes with low memory occupancy. In addition, the system can also adjust the priority of the tool nodes according to the dynamic changes of resources. For example, when the resources corresponding to a high-performance tool node are released, the system can re-adjust the priority and include it in the execution sequence of the current task. In this way, the system can efficiently allocate and utilize resources in a resource-constrained environment to ensure the smooth execution of the task.

[0038] S1400. Automatically convert the initial thought chain into a tree - shaped flowchart structure, and perform dynamic addition, deletion, or parameter adjustment on the tool nodes in the flowchart according to the feedback from external tool execution or preset optimization strategies; After dynamically prioritizing the set of candidate tool nodes based on the context parameters to generate an initial thought chain, automatically convert the initial thought chain into a tree - shaped flowchart structure, and perform dynamic addition, deletion, or parameter adjustment on the tool nodes in the flowchart according to the feedback from external tool execution or preset optimization strategies. Specifically, in this embodiment, the system automatically converts the generated initial thought chain into a tree - shaped flowchart structure for the user to intuitively view and edit. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The initial thought chain generated by the system is "Data cleaning tool" → "Data analysis tool" → "Visualization tool". The system converts this thought chain into a tree - shaped flowchart, where each tool node is a node in the graph, and the connecting lines between the nodes represent the call order. The user can view and edit this flowchart through the visual interface. For example, if the user finds that the execution time of the "Data cleaning tool" is too long, the user can directly delete this node through the interface and add a "Data pre - processing tool" node. The system will update the thought chain in real - time according to the user's editing operation and simulate the execution in the sandbox environment to verify the logical feasibility of the flowchart. If the simulation execution fails, the system will prompt the user and suggest possible solutions, such as adjusting the node order or modifying the parameters.

[0039] It should be noted that in this embodiment, when the user edits the tree - shaped flowchart, the system will collect user feedback in real - time and make dynamic adjustments. For example, if the user finds that the output result of a certain tool node does not meet the expectation during the running process, the user can directly feedback the problem through the interface. The system will automatically analyze the problem based on the user feedback and provide adjustment suggestions. For example, if the user feedbacks that the output data format of a certain "Data analysis tool" is incorrect, the system may suggest that the user adjust the parameters of this tool or replace it with another more suitable tool node. The system will also record the user's feedback and adjustment operations to optimize the selection and configuration of tool nodes in subsequent tasks.

[0040] It should be noted that in addition to the adjustments driven by user feedback, the system can also automatically optimize the tree-shaped flow chart according to preset optimization strategies. For example, the system can introduce performance optimization strategies to automatically detect bottleneck nodes in the flow chart (such as tool nodes with long execution times) and attempt to optimize performance by replacing tools or adjusting parameters. In addition, the system can introduce resource optimization strategies to automatically adjust the resource allocation of tool nodes to ensure the maximization of task execution efficiency under limited computing resources. For example, the system may automatically replace a tool node with high resource consumption with a lightweight alternative tool or adjust the parallel execution strategy of the tool to optimize resource utilization.

[0041] It should be noted that during the simulated execution of the tree-shaped flow chart, the system will monitor the execution results in real time and automatically perform backtracking and adjustment when problems are found. For example, assume that during the simulated execution, it is found that the output data of a "data cleaning tool" node does not meet the input requirements of the subsequent "data analysis tool". The system will automatically backtrack to the "data cleaning tool" node to analyze the cause of the problem. If the problem is caused by improper tool parameter settings, the system will automatically adjust the parameters and re-execute; if the problem is due to the tool itself being unsuitable for the current task, the system will automatically replace it with another more suitable tool node. In this way, the system can timely detect and adjust problems during the simulated execution phase to ensure that the finally generated chain of thought is logically correct and efficient.

[0042] S1500. Update the tool combination logic according to the adjusted chain of thought, process the task instruction based on the updated tool combination logic, and output the task processing result.

[0043] After automatically converting the initial thought chain into a tree-shaped flowchart structure, and performing feedback or preset optimization strategies according to external tools, dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart, update the tool combination logic according to the adjusted thought chain, and process the task instruction based on the updated tool combination logic to output the task processing result. Specifically, in this embodiment, the system updates the tool combination logic according to the adjusted thought chain and processes the task instruction input by the user. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". After the previous steps, the system has generated and adjusted the thought chain, and the final tree-shaped flowchart includes "Data preprocessing tool" → "Data analysis tool" → "Visualization tool". The system calls each tool node in turn according to this thought chain logic. First, the data preprocessing tool formats the original sales data; then, the data analysis tool analyzes the processed data and extracts key indicators; finally, the visualization tool generates a visual report based on the analysis results. The system outputs the final visual report as the task processing result to the user, and stores the entire thought chain and its execution results in the knowledge base for subsequent reuse and optimization.

[0044] It should be noted that users may need the task results to be output in multiple formats. For example, while a user may need a visual report, they may also need a detailed analysis report. To this end, the system is also configured to support the multi-format output of task results. While generating the visual report, the system will call a "Report generation tool" to organize the analysis results into a detailed text report. The report not only includes screenshots of the visual charts, but also contains a detailed description of the data analysis and an explanation of the key indicators. Users can select the required output format through the system interface, and the system will generate the corresponding task results according to the user's selection. This multi-format output method can meet the needs of different users and improve the flexibility and practicality of the system.

[0045] Furthermore, after completing the task processing, the system can provide intelligent recommendations to the user based on the task results. For example, suppose the user has completed a sales data analysis task. The system can recommend relevant subsequent operations based on the analysis results. If the analysis results show that the sales performance of a certain product is poor, the system can recommend that the user further analyze the market feedback of the product, or suggest that the user adjust the marketing strategy. In addition, the system can also recommend relevant tools or resources based on the task results. For example, if the user needs to further analyze a certain data dimension in depth, the system can recommend an advanced tool node suitable for the analysis of this dimension. In this way, the system can not only complete the current task, but also provide more value to the user and help the user make better use of the task results.

[0046] In the above embodiments, through a pre-trained language model, natural language processing is performed on the task instructions input by the user to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; based on an Agent intelligent body, the structured semantic vector is matched with the predefined tool node semantic tags in the knowledge base, and a set of candidate tool nodes related to the current task is output; based on the context parameters, dynamic priority sorting is performed on the set of candidate tool nodes to generate an initial thought chain; the initial thought chain is automatically converted into a tree-shaped flowchart structure, and according to the external tool execution feedback or a preset optimization strategy, dynamic addition, deletion, or parameter adjustment is performed on the tool nodes in the flowchart; the tool combination logic is updated according to the adjusted thought chain, and based on the updated tool combination logic, the task instructions are processed, and a task processing result is output. By performing semantic parsing and vector representation on the user task instructions through a pre-trained language model, combining a knowledge graph to match tool nodes and dynamically sorting to generate a thought chain, further visually displaying it in a tree-shaped flowchart and supporting user interaction adjustment, and finally processing the task and outputting a result according to the optimized thought chain. It significantly reduces the threshold for users to manually combine tools, improves the task processing efficiency and accuracy. At the same time, the system continuously learns and optimizes through a feedback mechanism, has the ability to continuously improve, and can better cope with complex and changing task requirements.

[0047] In some embodiments, after S1300 generates the initial thought chain; it further includes: S1311. Verify the logical feasibility of the initial thought chain through a sandbox environment; In this embodiment, after generating the initial thought chain, the system verifies the logical feasibility of the initial thought chain through a sandbox environment. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report", and the initial thought chain generated by the system includes "Data cleaning tool" → "Data analysis tool" → "Visualization tool". In the sandbox environment, the system simulates the execution of this thought chain and gradually calls each tool node. First, the data cleaning tool cleans the simulated data, and the system checks whether the output meets the expectations (such as whether duplicate values and null values are removed). Then, the data analysis tool analyzes the cleaned data, and the system verifies whether the analysis results contain the required key indicators. Finally, the visualization tool generates a chart based on the analysis results, and the system checks whether the chart correctly reflects the data trend. If the output of all tool nodes meets the expectations, the verification passes, and the system converts the verified initial thought chain into a tree-shaped flowchart structure for the user to further view and edit.

[0048] It should be noted that in some tasks, users may not provide complete actual data, or the data volume is too large and not suitable for direct verification. Therefore, the system introduces simulated data in the sandbox environment for verification. For example, for data analysis tasks, the system will generate simulated data sets that are similar to the actual data in structure and distribution but have a smaller data volume. By running the initial thought chain on the simulated data, the system can quickly verify whether the logical relationship between tool nodes is correct. For example, if the "data cleaning tool" cannot work properly on the simulated data, the system will immediately detect the problem and prompt the user, avoiding wasting time and resources on the actual data. This method not only improves the verification efficiency but also reduces the dependence on actual data.

[0049] It should be noted that in complex tasks, the initial thought chain may contain multiple tool nodes, and it may be difficult to locate problems by directly verifying the entire thought chain. Therefore, the system adopts a step-by-step verification method to gradually check the output of each tool node. For example, when verifying the "data analysis tool", the system will first check whether its input meets the expectations, and then check whether its output contains the required key indicators. If the output of a certain tool node does not meet the expectations, the system will record the error information and pause the verification process. The user can quickly locate the problem according to the error prompt, modify the tool parameters or replace the tool node. In this way, the system can more accurately detect problems and improve the accuracy and efficiency of verification.

[0050] It should be noted that in different task scenarios, the focus of verification may be different. Therefore, the system dynamically adjusts the verification strategy according to the task type and context. For example, in tasks dealing with real-time data streams, the system will focus on the real-time performance and response speed of tool nodes; in tasks dealing with large-scale data, the system will focus on the resource consumption and execution efficiency of tool nodes. By dynamically adjusting the verification strategy, the system can better adapt to the needs of different tasks and ensure that the verification process is both efficient and accurate. For example, in a resource-constrained environment, the system may give priority to verifying the performance of lightweight tool nodes to ensure that they can work properly under limited resources.

[0051] S1312. If the verification is passed, automatically convert the verified initial thought chain into a tree-shaped flowchart structure.

[0052] Furthermore, the system determines the logical feasibility of the initial thought chain and automatically converts the verified initial thought chain into a tree flowchart structure. In this embodiment, the initial thought chain verified through the sandbox environment is automatically converted into a tree flowchart structure. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The verified initial thought chain is "Data cleaning tool" → "Data analysis tool" → "Visualization tool". The system displays these tool nodes and their call sequences in the form of a tree flowchart. The root node of the tree flowchart is the task starting point, each tool node is a child node, and the connection lines between the nodes represent the call sequence. For example, the "Data cleaning tool" is the first child node, the "Data analysis tool" is its child node, and the "Visualization tool" is the child node of the "Data analysis tool". The user can intuitively view the function description, input and output formats, and their logical relationships of each tool node through the visual interface. In addition, the user can edit the flowchart by dragging nodes, modifying node parameters, etc., and the system will update the logical structure of the thought chain in real time.

[0053] It should be noted that in actual applications, users may need to modify and optimize the tree flowchart multiple times. For this purpose, the system introduces a version management mechanism. Each time the user edits the tree flowchart, the system will automatically save a version. The user can view the historical versions through the version management interface, compare the differences between different versions, and restore to a previous version as needed. For example, after the user modifies the parameters of the "Data analysis tool" and finds that the new parameter settings result in inaccurate analysis results, the user can restore to the previous parameter settings through version management. The version management mechanism not only facilitates the user to optimize the task process but also provides data security for the user, avoiding the irrecoverability of the task process caused by misoperations.

[0054] It should be noted that to improve the efficiency of task processing, the system supports saving the verified tree flowchart as a template for users to reuse in similar tasks. For example, after the user completes a task of "Sales data analysis and visualization", the system saves the tree flowchart of this task as a template. When the user needs to perform a similar sales data analysis task again, the user can directly call the template, and the system will automatically load the tool nodes and their parameter settings in the template. The user can fine-tune the template according to the new task requirements without having to build the task process from scratch. This templatized reuse mechanism not only saves the user's time and effort but also improves the system's processing efficiency for repetitive tasks, and at the same time accumulates rich task processing experience for the user.

[0055] In this embodiment, a sandbox environment is introduced to verify the logical feasibility of the initial thought chain, and the verified thought chain is automatically converted into a tree-shaped flowchart structure, further improving the reliability of the system and the user experience. Sandbox verification can detect and correct logical errors in the thought chain in advance, avoiding resource waste and task failure. The visual display and interactive editing functions of the tree-shaped flowchart enable users to intuitively understand and adjust the task process, reducing the operation threshold. At the same time, the version management and templatized reuse mechanism further improve the efficiency and flexibility of task processing, enhancing the practicality and scalability of the system.

[0056] In some embodiments, the dynamically prioritizing the set of candidate tool nodes based on the context parameters to generate an initial thought chain includes: S1321. Dynamically weighting based on the context parameters to calculate the priority weights of each candidate tool node; In this embodiment, during the process of dynamically prioritizing the set of candidate tool nodes based on the context parameters to generate an initial thought chain, dynamic weighting is performed based on the context parameters to calculate the priority weights of each candidate tool node. Specifically, the system calculates the priority weights of each candidate tool node by means of dynamic weighting. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The system performs weighted calculation on the candidate tool nodes according to the context parameters (such as task urgency, data scale, computing resources, etc.). For example, if the task urgency is high, the system will assign a higher weight to the tool node with a shorter execution time; if the data scale is large, the system will preferentially select the tool node with lower resource consumption. Specifically, the system assigns a basic weight to each candidate tool node and dynamically adjusts the weight according to the context parameters. For example, for the "data cleaning tool", its basic weight is 1.0. If the task urgency is high, the weight is increased by 0.5; if the data scale is large, the weight is reduced by 0.3. Finally, the system sorts the candidate tool nodes according to the adjusted weights to generate an initial thought chain.

[0057] It should be noted that in a resource-constrained environment, the availability of computing resources is an important context parameter. The system dynamically weights the candidate tool nodes according to the resource situation of the current environment (such as memory, CPU usage, etc.). For example, if the memory resources of the current server are tight, the system will preferentially select the tool node with lower memory consumption. Specifically, the system assigns a resource consumption weight to each tool node. For example, for the "data cleaning tool", if its memory consumption is high and the basic weight is 1.0, the system will reduce its weight by 0.3 according to the current memory usage. In this way, the system can efficiently allocate and utilize resources in a resource-constrained environment to ensure the smooth execution of tasks.

[0058] S1322. Dependency relationship constraint verification. Based on the dependency rules of tool nodes in the knowledge graph, logical conflict detection is performed on the candidate tool nodes after priority sorting; In this embodiment, after dynamically weighting based on the context parameters and calculating the priority weights of each candidate tool node, dependency relationship constraint verification is performed. Based on the dependency rules of tool nodes in the knowledge graph, logical conflict detection is performed on the candidate tool nodes after priority sorting. Specifically, the system first assumes that the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". After dynamic priority sorting, the order of the candidate tool nodes is "Data cleaning tool" → "Data analysis tool" → "Visualization tool". The system checks the dependency relationships between these tool nodes through the knowledge graph. For example, the "Data analysis tool" depends on the output of the "Data cleaning tool", and the "Visualization tool" depends on the result of the "Data analysis tool". The system will verify whether this dependency relationship is satisfied in the sorted node sequence. If a logical conflict is found, for example, the "Data analysis tool" is ranked before the "Data cleaning tool", the system will automatically adjust the node order to ensure the correctness of the dependency relationship. In this way, the system can effectively avoid task failures caused by incorrect dependency relationships and ensure that the generated initial thought chain is logically feasible.

[0059] It should be noted that in some tasks, the dependency relationships between tool nodes are mainly reflected in the data flow. For example, the output of a "Data cleaning tool" is the input of a "Data analysis tool", and the output of the "Data analysis tool" is the input of a "Visualization tool". The system verifies the dependency relationship by checking the coherence of the data flow. Specifically, the system will verify whether the output format of each tool node matches the input format of the next tool node. For example, if the output of the "Data cleaning tool" is a cleaned data set, and the input required by the "Data analysis tool" is a statistical summary of the data set, the system will detect this mismatch and prompt the user or automatically adjust the parameters of the tool node to ensure the coherence of the data flow. In this way, the system can ensure smooth data interaction between tool nodes and avoid task failures caused by data format mismatches.

[0060] It should be noted that in complex tasks, the dependency relationships of tool nodes may be related to the stages of the tasks. For example, some tool nodes can only be used at specific stages of the task. The system will verify the dependency relationships of tool nodes based on the stage information of the task. For example, in a data analysis task, the "data preprocessing tool" can only be used at the initial stage of the task, while the "result evaluation tool" can only be used at the final stage of the task. The system will check whether the sorting of candidate tool nodes conforms to the logical order of the task stages. If it is found that a certain tool node is placed at the wrong stage, the system will automatically adjust its position. In this way, the system can ensure that the usage order of tool nodes conforms to the overall logic of the task and avoid task failures caused by stage errors.

[0061] S1323. Simulate the execution paths of different node combinations through the Monte Carlo tree search algorithm, and select the sorting scheme with the highest success rate to generate the initial thought chain.

[0062] In this embodiment, after detecting logical conflicts in the candidate tool nodes sorted by priority, the system simulates the execution paths of different node combinations through the Monte Carlo tree search algorithm, and selects the sorting scheme with the highest success rate to generate the initial thought chain. Specifically, the system uses the Monte Carlo tree search (MCTS) algorithm to simulate the execution paths of different node combinations in order to select the sorting scheme with the highest success rate to generate the initial thought chain. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". After dynamic priority sorting and dependency relationship verification, the order of candidate tool nodes is "data cleaning tool" → "data analysis tool" → "visualization tool". The system uses the MCTS algorithm to simulate multiple possible node combination paths, such as: Path 1: "data cleaning tool" → "data analysis tool" → "visualization tool" Path 2: "data cleaning tool" → "data preprocessing tool" → "data analysis tool" → "visualization tool" Path 3: "data cleaning tool" → "data analysis tool" → "data visualization tool" → "result evaluation tool" The system simulates the execution of these paths and counts the success rate of each path. For example, the success rate of Path 1 is 80%, the success rate of Path 2 is 85%, and the success rate of Path 3 is 75%. The system finally selects Path 2 as the initial thought chain because it has the highest success rate. In this way, the system can dynamically optimize the combination order of tool nodes to ensure that the generated thought chain has a higher success rate in actual execution.

[0063] It should be noted that in practical applications, the system can utilize historical task data to optimize the Monte Carlo tree search algorithm. For example, the system can record the performance of each tool node in past tasks, including execution time, success rate, resource consumption, etc. When simulating different combinations of node paths, the system will preferentially select those combinations of tool nodes that performed well in historical tasks. For example, if the "data cleaning tool" and the "data analysis tool" were often successfully combined in past tasks, the system will give priority to considering paths that include these two tools when simulating paths. In this way, the system can utilize historical experience to improve the efficiency and accuracy of simulation, reduce unnecessary path exploration, and thus find the optimal node combination scheme more quickly.

[0064] In this embodiment, through dynamic weighting, dependency check, and the Monte Carlo tree search algorithm, the priority sorting and combination logic of tool nodes are optimized to generate an efficient initial thought chain. Dynamic weighting flexibly adjusts the weights of tool nodes according to context parameters (such as urgency and resource consumption) to ensure the efficiency and adaptability of task execution. Dependency check ensures the logical coherence of tool nodes based on the knowledge graph to avoid task failures caused by dependency conflicts. The Monte Carlo tree search algorithm selects the combination scheme with the highest success rate by simulating different paths, further improving the success rate and efficiency of task execution. The combination of these methods significantly improves the intelligence level and task processing ability of the system.

[0065] In some embodiments, S1200 performs a similarity match between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, and outputs a set of candidate tool nodes relevant to the current task, including: S1211. Superimpose a dedicated feature vector on the structured semantic vector based on the domain label in the task instruction to enhance the domain features of the structured semantic vector; In this embodiment, when performing similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base, a dedicated feature vector is superimposed on the structured semantic vector based on the domain tags in the task instruction to enhance the domain features of the structured semantic vector. Specifically, the system optimizes the matching process of tool nodes through domain feature enhancement. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report", and the domain tag "finance" is included in the task instruction. The system first generates a structured semantic vector through a pre-trained language model, which contains the intention, entities, and context parameters of the task. Subsequently, the system extracts the corresponding dedicated feature vector from the domain feature library according to the domain tag "finance". The dedicated feature vector contains semantic information unique to the financial domain, such as features related to "balance sheet", "financial analysis", etc. The system superimposes the dedicated feature vector on the structured semantic vector to enhance the feature dimensions related to the financial domain in the vector. For example, for the intention of "report generation", the enhanced vector will be more inclined to the report generation tools in the financial domain rather than general report tools. In this way, the system can more accurately match the tool nodes suitable for the financial domain, improving the accuracy and efficiency of task processing.

[0066] It should be noted that in actual applications, users may need to switch tasks between multiple domains. For example, a user may first process a data analysis task in the financial domain and then switch to a data analysis task in the medical domain. For this reason, the system supports dynamic switching of multi-domain feature vectors. When the domain tag of the task instruction changes, the system will automatically extract the dedicated feature vector of the corresponding domain from the domain feature library and superimpose it on the structured semantic vector. For example, when the domain tag of the task instruction changes from "finance" to "medical", the system will replace the dedicated feature vector of the financial domain with the dedicated feature vector of the medical domain. In this way, the system can quickly adapt to the task requirements of different domains and ensure the accuracy of tool node matching.

[0067] It should be noted that the domain feature vectors of this embodiment are also adjusted and optimized according to actual tasks. For example, the business in the financial domain may be continuously updated with market changes, resulting in the existing domain feature vectors being unable to fully cover the new business requirements. For this reason, the system introduces an adaptive learning mechanism for domain feature vectors. The system will dynamically adjust the domain feature vectors according to the user's historical task data and feedback information. For example, if a user frequently uses a new analysis tool in the financial domain, the system will add the feature information of this tool to the dedicated feature vector of the financial domain. In this way, the system can continuously optimize the domain feature vectors to better adapt to the changes within the domain and user requirements.

[0068] S1212. Use the dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base; After superimposing the dedicated feature vector on the structured semantic vector based on the domain label in the task instruction and enhancing the domain features of the structured semantic vector, use the dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base. Specifically, the system uses the dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The structured semantic vector after domain feature enhancement contains the intention, entity, context parameters, and domain features of the task. The system extracts the semantic tag vectors of each tool node from the knowledge base, and these vectors also contain information such as the function description of the tool, input and output formats, etc. The dynamic weighting algorithm assigns weights to each dimension according to context parameters (such as task urgency, data scale, resource consumption, etc.). For example, if the task urgency is high, the system will increase the dimension weight related to the execution time; if the data scale is large, the system will increase the dimension weight related to the resource consumption. Through the weighted vector similarity calculation, the system can more accurately match the candidate tool nodes related to the current task. For example, "data analysis tool" and "visualization tool" stand out in the weighted similarity calculation and are selected as candidate tool nodes.

[0069] It should be noted that the task type is a key factor affecting the tool node matching. For example, data analysis tasks may pay more attention to the function description and output format of the tool, while text processing tasks may pay more attention to the input format and processing speed of the tool. Therefore, the system dynamically adjusts the weighting algorithm according to the task type. Suppose the task instruction input by the user is "Generate a sales report". The system identifies the task type as "text processing". In this case, the system will increase the dimension weights related to the input format (such as text format) and processing speed, and reduce the dimension weights related to the output format (such as visual charts). In this way, the system can more accurately match the suitable tool nodes according to the characteristics of the task type.

[0070] S1213. Filter the candidate tool nodes through multi-dimensional screening conditions and output the set of candidate tool nodes related to the current task.

[0071] After performing vector similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base using the dynamic weighting algorithm, candidate tool nodes are filtered through multi-dimensional screening conditions, and the set of candidate tool nodes relevant to the current task is output. Specifically, the system further filters the candidate tool nodes after matching through multi-dimensional screening conditions to output the set of tool nodes most relevant to the current task. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". After matching by the dynamic weighting algorithm, the system obtains a candidate set containing multiple tool nodes. Next, the system filters these candidate nodes according to the multi-dimensional screening conditions. These screening conditions include but are not limited to: Tool function matching degree: Ensure that the function of the tool node is highly relevant to the task instruction. For example, filter out tool nodes that can process "sales data" and generate a "visual report".

[0072] Resource consumption: According to the resource situation of the current environment (such as CPU, memory, network bandwidth, etc.), filter out tool nodes with moderate resource consumption. For example, if the current server has limited memory, the system will preferentially filter out tool nodes with low memory occupancy.

[0073] Historical success rate: Refer to the success rate of the tool node in past similar tasks and preferentially select tool nodes with good performance. For example, filter out tool nodes with a success rate of over 80% in past tasks.

[0074] Through these multi-dimensional screening conditions, the system finally outputs the set of candidate tool nodes most relevant to the current task, such as "data cleaning tool", "data analysis tool" and "visualization tool". This method can effectively reduce the number of candidate tool nodes and improve the efficiency and accuracy of task processing.

[0075] This embodiment optimizes the matching process of tool nodes through domain feature enhancement, dynamic weighting algorithm and multi-dimensional screening conditions, significantly improving the adaptability and accuracy of the system in complex tasks. Domain feature enhancement can provide more accurate tool matching for specific domain tasks. The dynamic weighting algorithm flexibly adjusts the matching strategy according to context parameters to ensure a high degree of fit between tool nodes and task requirements. The multi-dimensional screening conditions further filter candidate tool nodes, eliminating options that do not meet the task requirements, and finally output the set of tool nodes most relevant to the current task, improving the efficiency and success rate of task processing.

[0076] In some embodiments, the S1400 Agent-based tool combination and task processing method is characterized in that dynamically adding, deleting or adjusting parameters of tool nodes in the flow chart according to external tool execution feedback or preset optimization strategies includes: S1411: When the external feedback prompt node fails to execute, automatically backtrack to the predecessor node of the failed node and call an alternative tool in the knowledge base for replacement; In this embodiment, the system monitors the execution status of tool nodes through external feedback. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visualization report". The thought chain generated by the system includes "Data cleaning tool" → "Data analysis tool" → "Visualization tool". During the execution process, the system discovers through the external tool execution feedback that the "Data analysis tool" node fails to execute, and the feedback prompt may be due to the data format not meeting the expectations. The system automatically backtracks to the predecessor node of the "Data analysis tool", which is the "Data cleaning tool", and calls an alternative "Data preprocessing tool" from the knowledge base for replacement. This alternative tool can handle more complex data formats, thereby solving the problem of execution failure. The system re-executes the adjusted thought chain and continues to monitor the execution status to ensure the smooth completion of the task.

[0077] In some cases, the failure of a tool node to execute may be caused by specific error types, such as data format errors, insufficient resources, or logical errors. The system can select the most suitable alternative tool based on the error type. For example, if the "Data analysis tool" fails to execute due to a data format error, the system will call an alternative tool specifically for data format conversion; if the failure is due to insufficient resources, the system will call a lightweight alternative tool. In this way, the system can solve problems more accurately and improve the efficiency and success rate of task processing.

[0078] In complex tasks, multiple alternative tools may be required to solve the problem of execution failure. For this reason, the system introduces a multi-level alternative tool strategy. For example, when the "Data analysis tool" fails to execute, the system first attempts to call an alternative tool with similar functions; if the alternative tool still cannot solve the problem, the system will further call a more basic tool node, gradually reducing the complexity of the tool. In this way, the system can gradually troubleshoot problems and finally find a tool node that can execute successfully, ensuring the smooth progress of the task.

[0079] S1412: Dynamically adjust the parallel execution quantity and parameter configuration of the tool node according to the energy consumption constraint in the preset optimization strategy; In this embodiment, the system dynamically adjusts the parallel execution quantity and parameter configuration of the tool nodes according to the energy consumption constraint in the preset optimization strategy. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution process, the system monitors the resource status of the current environment and finds that the CPU and memory resources of the current server are limited. To meet the energy consumption constraint, the system dynamically adjusts the parallel execution quantity of the tool nodes. For example, the originally planned parallel execution of the "data analysis tool" and the "data cleaning tool" is adjusted to serial execution to reduce resource contention. At the same time, the system adjusts the parameter configuration of the tool nodes according to the energy consumption constraint. For example, the computing precision of the "data analysis tool" is adjusted from "high" to "medium" to reduce resource consumption. In this way, the system optimizes task execution under limited resource conditions to ensure the smooth completion of the task.

[0080] In a multi-task environment, different tasks may have different priorities. The system dynamically adjusts the parallel execution quantity and parameter configuration of the tool nodes according to the task priorities. For example, for high-priority tasks, the system will allocate resources preferentially and allow more tool nodes to execute in parallel; for low-priority tasks, the system will reduce the number of tool nodes executing in parallel and even adjust them to serial execution. At the same time, the system will adjust the parameter configuration of the tool nodes according to the task priorities. For example, for high-priority tasks, the system will configure a higher computing precision; for low-priority tasks, the system will reduce the computing precision to save resources. In this way, the system can better manage multi-task execution to ensure the smooth progress of high-priority tasks.

[0081] S1413: Verify whether the adjusted flow chart matches the original task intention through the semantic consistency check module.

[0082] In this embodiment, the system verifies whether the adjusted flowchart matches the original task intention through the semantic consistency check module. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The thought chain generated and adjusted by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the adjustment process, the system may replace certain tool nodes or adjust parameters. To ensure that the adjusted flowchart still conforms to the user's original intention, the system uses the semantic consistency check module for verification. This module will compare the semantic vectors of the flowcharts before and after adjustment to check whether the key intentions (such as "data analysis" and "visualization") and entities (such as "sales data") remain consistent. For example, if the original task intention is to generate a "visual report", and the "visualization tool" in the adjusted flowchart is wrongly replaced by a "text report generation tool", the semantic consistency check module will detect this inconsistency and prompt the system to make corrections. In this way, the system can ensure that the adjusted flowchart still meets the user's original requirements and avoid the task deviating from the expected goal due to adjustment.

[0083] In practical applications, user feedback is an important basis for verifying semantic consistency. After adjusting the flowchart, the system will prompt the user to confirm whether the adjustment meets the expectations. For example, after replacing the "data analysis tool", the system will show the adjusted flowchart to the user and ask if the user is satisfied. If the user feedback indicates that the adjusted tool cannot meet the requirements, the system will further analyze the specific content of the user feedback. For example, if the user points out that "the visualization effect does not meet the expectations", the system will readjust the tool nodes to ensure that the final result is in line with the user's Figure 1 intention. In this way, the system can dynamically optimize the flowchart according to the user's real-time feedback and improve user satisfaction.

[0084] This embodiment significantly improves the flexibility, reliability, and resource utilization efficiency of task processing by dynamically adjusting the execution strategy of tool nodes and verifying the semantic consistency of the flowchart. When a node execution fails, the system automatically backtracks and replaces the alternative tool to ensure the continuity of the task; dynamically adjusts the parallel execution quantity and parameter configuration according to the energy consumption constraint to optimize resource utilization; verifies whether the adjusted flowchart conforms to the original task intention through semantic consistency check to avoid the task deviating from the goal. These mechanisms together improve the system's adaptive ability and task success rate, and at the same time ensure that the task result meets the user's expectations.

[0085] In some embodiments, after S1500 updates the tool combination logic according to the adjusted thought chain, it includes: S1511: Decompose the adjusted thought chain into atomic operation units, and label the domain label, execution environment, and version number and store them in the knowledge base; In this embodiment, the system disassembles the adjusted thought chain into atomic operation units, and labels the domain label, execution environment, and version number and stores them in the knowledge base. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The adjusted thought chain includes "data cleaning tool" → "data analysis tool" → "visualization tool". The system disassembles this thought chain into three atomic operation units: data cleaning, data analysis, and visualization. Each atomic operation unit is labeled with a domain label (such as "finance"), an execution environment (such as "Server A"), and a version number (such as "v1.0"). For example, the "data cleaning tool" is labeled with the domain label "finance", the execution environment "Server A", and the version number "v1.0". This information is stored in the knowledge base for subsequent retrieval and reuse. In this way, the system can better manage and utilize the adjusted thought chain and provide reference for similar tasks.

[0086] In practical applications, tasks may involve multiple domains. The system supports disassembling the adjusted thought chain into atomic operation units and labeling multiple domain labels for each unit. For example, a task may involve both the "finance" and "data analysis" domains at the same time. The system will label each atomic operation unit as "finance + data analysis" and store it in the knowledge base. In this way, the system can better support cross-domain tasks and improve the generality and flexibility of the knowledge base. For example, when the user inputs a task instruction involving multiple domains, the system can quickly retrieve the relevant atomic operation units from the knowledge base and quickly generate a suitable thought chain.

[0087] S1512: Construct a reward function based on the reinforcement learning framework, and optimize the node mapping strategy of the Agent intelligent body according to the accuracy and time consumption of the task processing result; In this embodiment, the system optimizes the node mapping strategy of the Agent intelligent body through the reinforcement learning framework. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The system executes the task according to the adjusted thought chain and collects the accuracy and time consumption data of the task processing result. Based on these data, the system constructs a reward function, where the higher the accuracy and the shorter the time consumption, the higher the reward value. For example, if the task accuracy reaches 90% and the time consumption is within the expected range, the Agent intelligent body will obtain a higher reward value. The system updates the strategy of the Agent intelligent body through a reinforcement learning algorithm (such as Q-learning or policy gradient method), making it more inclined to select a combination of tool nodes with high accuracy and short time consumption in subsequent tasks. In this way, the Agent intelligent body can continuously learn and optimize, improving the overall efficiency and quality of task processing.

[0088] In practical tasks, in addition to accuracy and time consumption, there may be other optimization goals, such as resource consumption, user satisfaction, etc. To this end, the system can construct a multi-objective reward function, comprehensively considering multiple optimization goals. For example, the reward function can simultaneously consider the accuracy, time consumption, resource consumption, and user satisfaction of the task. The system optimizes the strategy of the Agent through reinforcement learning algorithms, enabling it to achieve a balance among multiple goals. For example, if a combination of tool nodes has high accuracy but excessive resource consumption, the Agent may choose a combination with slightly lower accuracy but more reasonable resource consumption. In this way, the system can better meet the diverse needs of complex tasks.

[0089] S1513: When a new tool node is stored in the library, automatically generate the associated semantic tags and dependencies, and update the topological structure of the knowledge graph.

[0090] In this embodiment, when a new tool node is stored in the library, the system automatically generates the associated semantic tags and dependencies, and updates the topological structure of the knowledge graph. Suppose the system introduces a new "data mining tool" for extracting valuable information from large-scale data. The system first analyzes the function description and input / output format of the tool, and automatically generates semantic tags, such as "data mining", "large-scale data analysis", etc. At the same time, the system identifies the dependencies of the tool on other tool nodes. For example, the "data mining tool" depends on the output of the "data cleaning tool", and its output can be used as the input of the "visualization tool". The system updates this information into the knowledge graph to ensure that the topological structure of the knowledge graph can accurately reflect the relationships between tool nodes. In this way, the system can quickly adapt to the addition of new tools, ensuring the integrity and accuracy of the knowledge graph and providing richer tool options for subsequent tasks.

[0091] In practical applications, the function description of new tool nodes is an important basis for generating semantic tags. The system analyzes the function description of the tool through natural language processing techniques, extracts key information, and generates semantic tags. For example, if the function description of the new tool mentions "used for processing large-scale text data and extracting key information", the system will generate semantic tags such as "text processing", "information extraction", etc. At the same time, the system will further refine the tags according to the keywords in the function description (such as "large-scale", "text"), for example, "large-scale text processing". In this way, the system can generate accurate and detailed semantic tags for new tools, improving the retrievability and reusability of tools in the knowledge graph.

[0092] Through the knowledge management and intelligent optimization mechanism, the adaptive ability and intelligent level of the system are further improved. The adjusted thought chain is disassembled into atomic operation units and stored in the knowledge base for subsequent reuse and optimization. The node mapping strategy of the Agent intelligent body is optimized based on the reinforcement learning framework and dynamically adjusted according to the task processing results to improve the task success rate and efficiency. When a new tool node is added to the library, the knowledge graph is automatically updated to ensure the dynamics and integrity of the knowledge base. These mechanisms together enhance the flexibility, scalability and intelligent level of the system, providing more efficient support for complex task processing.

[0093] In some embodiments, the method further includes: S1611. Obtain the execution logs of each tool in real time, and extract key metrics to generate a feedback vector.

[0094] In this embodiment, the system monitors the execution logs of each tool in real time, extracts key metrics, and generates a feedback vector. Suppose the task instruction input by the user is "analyze the sales data of the past week and generate a visual report". The thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution of each tool, the system collects the execution logs in real time and extracts key metrics, such as execution time, resource consumption, output data quality, etc. For example, the execution log of the "data cleaning tool" shows that its execution time is 10 seconds, the memory occupancy is 50MB, and the output data quality is 95%. The system converts these key metrics into a feedback vector, such as [10, 50, 0.95]. In this way, the system can grasp the execution situation of each tool node in real time, providing data support for subsequent optimization and adjustment.

[0095] In practical applications, the execution situation of the tool can be evaluated from multiple dimensions. The system not only monitors the execution time, resource consumption and output data quality, but also can extract key metrics from more dimensions, such as error rate, response time, user satisfaction, etc. For example, for the "data analysis tool", the system can monitor the accuracy of its analysis results and the user satisfaction with the results. By extracting key metrics from multiple dimensions, the system can evaluate the execution situation of the tool more comprehensively and generate a richer feedback vector. For example, the feedback vector can be extended to [10, 50, 0.95, 0.05, 0.9], where 0.05 represents the error rate and 0.9 represents the user satisfaction. In this way, the system can more accurately locate problems and optimize them.

[0096] S1612. By comparing the deviation between the feedback vector and the prediction vector, locate the weak nodes in the thought chain and trigger the incremental update of the knowledge base.

[0097] In this embodiment, the system locates the weak nodes in the thought chain by comparing the deviation between the feedback vector and the prediction vector, and triggers the incremental update of the knowledge base. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the task execution, the system monitors the execution logs of each tool in real time and generates a feedback vector. For example, the feedback vector of the "data cleaning tool" is [10, 50, 0.95] (execution time 10 seconds, memory occupancy 50MB, output data quality 95%). At the same time, the system generates a prediction vector based on historical data and model prediction, such as [8, 40, 0.98]. By calculating the deviation between the feedback vector and the prediction vector, the system finds that the execution time of the "data cleaning tool" is 2 seconds longer than the predicted value, the memory occupancy is 10MB higher than the predicted value, and the output data quality is 3% lower than the predicted value. Based on this, the system determines that the "data cleaning tool" is a weak node and triggers the incremental update of the knowledge base to record the performance of this tool in the current task for subsequent optimization.

[0098] Furthermore, the system can dynamically adjust the parameters of the tool node or replace the node according to the preset deviation threshold. For example, if the deviation between the feedback vector and the prediction vector exceeds the set threshold (such as the execution time deviation exceeds 5 seconds, and the memory occupancy deviation exceeds 20MB), the system will automatically adjust the parameters of the tool node or select an alternative tool from the knowledge base for replacement. For example, if the execution time deviation of the "data analysis tool" exceeds the threshold, the system may reduce its calculation accuracy parameter or replace it with a more efficient analysis tool. In this way, the system can optimize the performance of the tool node in real time to ensure the efficient execution of the task.

[0099] S1613. When the execution failure rate of the thought chain exceeds the threshold, automatically roll back to the historical stable version.

[0100] In this embodiment, the system ensures the stability of the task by monitoring the execution failure rate of the thought chain. Suppose the task instruction input by the user is "Analyze the sales data of the past week and generate a visual report". The thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the task execution, the system monitors the execution status of each tool node in real time and counts the failure rate. If the execution failure rate of a certain tool node exceeds the preset threshold (for example, the failure rate reaches 30%), the system will automatically trigger the rollback mechanism to roll back the current thought chain to the historical stable version. For example, if the "data analysis tool" has a too high failure rate in the current task, the system will roll back to the previously verified successful version and re-execute the task. In this way, the system can quickly resume the normal execution of the task and avoid task failure caused by the instability of the tool node.

[0101] Furthermore, in complex tasks, the chain of thought may consist of multiple stages, and the failure rate of each stage may vary. The system can monitor the failure rate stage by stage and trigger a fallback mechanism based on the failure rate of each stage. For example, the failure rate threshold for the data cleaning stage may be set at 20%, and the failure rate threshold for the data analysis stage may be set at 15%. If the failure rate of a certain stage exceeds the threshold, the system will fallback to the historical stable version of that stage instead of the entire chain of thought. In this way, the system can manage the task execution process more precisely, reduce unnecessary fallback operations, and improve the overall efficiency of the task.

[0102] This embodiment significantly improves the stability and adaptability of the system by real-time monitoring of tool execution logs, comparing feedback with prediction vector deviations, and monitoring execution failure rates. Real-time monitoring and feedback vector generation can quickly capture anomalies during tool execution. Comparing deviations can accurately locate weak nodes and trigger incremental updates to the knowledge base to optimize subsequent task processing. When the task failure rate is too high, the automatic fallback mechanism can quickly restore to a stable version to ensure task continuity. These mechanisms together improve the reliability, efficiency, and user experience of the system.

[0103] For details, please refer to Figure 2 , Figure 2 which is the basic structural schematic diagram of the Agent-based tool combination and task processing device for this embodiment.

[0104] As Figure 2 shown, an Agent-based tool combination and task processing device includes: a task parsing module 1100, configured to perform natural language processing on a task instruction input by a user through a pre-trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; a tool matching module 1200, configured to perform similarity matching between the structured semantic vector and predefined tool node semantic labels in a knowledge base based on an Agent agent, and output a set of candidate tool nodes related to the current task; a chain of thought generation module 1300, configured to perform dynamic priority sorting on the set of candidate tool nodes based on the context parameters to generate an initial chain of thought; a parameter adjustment module 1400, configured to automatically convert the initial chain of thought into a tree-shaped flowchart structure, and perform dynamic addition, deletion, or parameter adjustment on the tool nodes in the flowchart according to external tool execution feedback or a preset optimization strategy; a processing output module 1500, configured to update the tool combination logic according to the adjusted chain of thought, process the task instruction based on the updated tool combination logic, and output a task processing result.

[0105] The above-mentioned Agent-based tool combination and task processing device perform semantic parsing and vector representation on user task instructions through a pre-trained language model, match tool nodes in combination with a knowledge graph and dynamically sort them to generate a chain of thought, further visualize it in a tree-shaped flow chart and support user interaction adjustment, and finally process the task and output the result according to the optimized chain of thought. It significantly reduces the threshold for users to manually combine tools, improves the task processing efficiency and accuracy. At the same time, the system continuously learns and optimizes through a feedback mechanism, has the ability to continuously improve, and can better cope with complex and changing task requirements, solving the problems in the prior art that tool combination depends on fixed rules and lacks intelligent adaptive ability.

[0106] To solve the above technical problems, the embodiments of the present application further provide a computer device. Specifically, please refer to Figure 3 , Figure 3 which is the basic structural block diagram of the computer device in this embodiment.

[0107] As Figure 3 shown, it is a schematic internal structure diagram of the computer device. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions, and control information sequences can be stored in the database. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. Computer-readable instructions can be stored in the memory of the computer device, and when the computer-readable instructions are executed by the processor, the processor can execute an Agent-based tool combination and task processing method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that Figure 3 the structure shown in

[0108] In this embodiment, the processor is used to execute Figure 2Task parsing module 1100, tool matching module 1200, thought chain generation module 1300, parameter adjustment module 1400, and processing output module 1500. Through a pre-trained language model, natural language processing is performed on the task instructions input by the user to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; based on an Agent, the structured semantic vector is matched with the predefined tool node semantic labels in the knowledge base for similarity, and a set of candidate tool nodes related to the current task is output; based on the context parameters, dynamic priority sorting is performed on the set of candidate tool nodes to generate an initial thought chain; the initial thought chain is automatically converted into a tree-shaped flowchart structure, and according to the feedback of external tool execution or a preset optimization strategy, tool nodes in the flowchart are dynamically added, deleted, or parameter-adjusted; the tool combination logic is updated according to the adjusted thought chain, and based on the updated tool combination logic, the task instructions are processed to output a task processing result. By performing semantic parsing and vector representation on user task instructions through a pre-trained language model, combining a knowledge graph to match tool nodes and dynamically sorting to generate a thought chain, further visually displaying it in a tree-shaped flowchart and supporting user interaction adjustment, and finally processing the task and outputting a result according to the optimized thought chain. It significantly reduces the threshold for users to manually combine tools, improves task processing efficiency and accuracy. At the same time, the system continuously learns and optimizes through a feedback mechanism, has the ability to continuously improve, and can better handle complex and changing task requirements, solving the problems in the prior art that tool combination depends on fixed rules and lacks intelligent adaptive capabilities.

[0109] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the method for Agent-based tool combination and task processing described in any of the above embodiments.

[0110] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), etc., or a random access memory (RAM), etc.

[0111] Those skilled in the art can understand that the various operations, methods, steps, measures, and solutions in the processes discussed in this application can be alternated, changed, combined, or deleted. Further, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, those in the prior art that have steps, measures, and solutions in the various operations, methods, and processes disclosed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted.

[0112] The above are only some embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. An Agent-based tool combination and task processing method, characterized in that Including: Performing natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entities, and context parameters; Based on an Agent, performing similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, and outputting a set of candidate tool nodes related to the current task; Based on the context parameters, performing dynamic priority sorting on the set of candidate tool nodes to generate an initial thought chain; Automatically converting the initial thought chain into a tree-shaped flowchart structure, and dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart according to the external tool execution feedback or preset optimization strategies; Updating the tool combination logic according to the adjusted thought chain, and processing the task instructions based on the updated tool combination logic to output a task processing result.

2. The Agent-based tool combination and processing task method according to claim 1, wherein After generating the initial thought chain, it further includes: Verifying the logical feasibility of the initial thought chain through a sandbox environment; If the verification passes, automatically converting the verified initial thought chain into a tree-shaped flowchart structure.

3. The Agent-based tool combination and processing task method according to claim 1, wherein The step of performing dynamic priority sorting on the set of candidate tool nodes based on the context parameters to generate an initial thought chain includes: Performing dynamic weighting based on the context parameters to calculate the priority weights of each candidate tool node; Dependency constraint verification, based on the dependency rules of tool nodes in the knowledge graph, detecting logical conflicts in the candidate tool nodes after priority sorting; Simulating the execution paths of different node combinations through the Monte Carlo tree search algorithm, and selecting the sorting scheme with the highest success rate to generate an initial thought chain.

4. The Agent-based tool combination and processing task method according to claim 1, characterized in that The step of performing similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base based on an Agent to output a set of candidate tool nodes related to the current task includes: Overlaying a dedicated feature vector on the structured semantic vector based on the domain label in the task instructions to enhance the domain features of the structured semantic vector; Using a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base; Filtering the candidate tool nodes through multi-dimensional screening conditions to output the set of candidate tool nodes related to the current task.

5. The Agent-based tool combination and processing task method according to claim 1, wherein The step of dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart according to the external tool execution feedback or preset optimization strategies includes: When the external feedback indicates that the node execution fails, automatically backtracking to the predecessor node of the failed node and calling an alternative tool in the knowledge base for replacement; Dynamically adjusting the parallel execution quantity and parameter configuration of the tool nodes according to the energy consumption constraint in the preset optimization strategy; Verifying whether the adjusted flowchart matches the original task intent through a semantic consistency check module.

6. The Agent-based tool combination and processing task method according to claim 1, wherein, After updating the tool combination logic according to the adjusted thought chain, it further includes: Decomposing the adjusted thought chain into atomic operation units, and annotating the domain label, execution environment, and version number and storing them in the knowledge base; Construct a reward function based on the reinforcement learning framework, and optimize the node mapping strategy of the Agent according to the accuracy and time consumption of the task processing results; When a new tool node is stored in the library, automatically generate associated semantic tags and dependencies, and update the knowledge graph topology.

7. The Agent-based tool combination and processing task method according to claim 1, characterized in that The method further includes: Obtain the execution logs of each tool in real time, and extract key metrics to generate a feedback vector; By comparing the deviation between the feedback vector and the prediction vector, locate the weak nodes in the thought chain and trigger an incremental update of the knowledge base; When the failure rate of the thought chain execution exceeds the threshold, automatically roll back to the historical stable version.

8. An Agent-based tool combination and task processing device, characterized in that, Including: A task parsing module for performing natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, where the task semantics includes intent, entity, and context parameters; A tool matching module for performing similarity matching between the structured semantic vector and the predefined tool node semantic tags in the knowledge base based on the Agent, and outputting a set of candidate tool nodes related to the current task; A thought chain generation module for dynamically prioritizing the set of candidate tool nodes based on the context parameters to generate an initial thought chain; A parameter adjustment module for automatically converting the initial thought chain into a tree-shaped flowchart structure, and dynamically adding, deleting, or adjusting the parameters of the tool nodes in the flowchart according to external tool execution feedback or preset optimization strategies; A processing output module for updating the tool combination logic according to the adjusted thought chain, processing the task instructions based on the updated tool combination logic, and outputting task processing results.

9. A computer device, characterized in that, Including a memory and a processor, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the Agent-based tool combination and task processing method according to any one of claims 1 to 7.

10. A storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the Agent-based tool combination and task processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Enterprise online education-oriented AI Agent execution plan processing method and system

    CN118551753A

  • Mathematical reasoning method and device, storage medium and computer program product

    CN119005332A

  • Multi-layer semantic understanding large model agent construction and application method

    CN119089931A

  • Humanoid robot flexible assembly method and system based on thinking chain and medium

    CN119238612A

  • Construction method and device of multi-component data agent

    CN119398092A

Cited By

  • Task processing method and device, equipment and storage medium

    CN120745762A

  • AI semantic model and robot interconnection method and system based on MCP protocol, and medium

    CN120791784A

  • Mcp protocol-based ai semantic model and robot interconnection method, system and medium

    CN120791784B

  • Multi-modal scene RAG tool dynamic enhancement agent building method and system

    CN120821756A

  • Rag tool dynamic enhancement method and system for multi-modal scene intelligent agent construction

    CN120821756B