Methods, apparatus, equipment, and media for automatically abstracting intelligent agent workflows into reusable functional products.

By extracting historical execution trajectory data of the agent workflow, performing semantic and topological feature analysis, and generating reusable functional products, the problem of low reuse efficiency of agent workflow is solved, and efficient workflow reuse and access verification are achieved.

CN123114459APending Publication Date: 2026-11-17BEIJING KAIWUJI CHUANGCAI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611520762.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies have low reusability of intelligent agent workflows, which forces developers to design and configure workflows from scratch, resulting in a significant waste of human resources.

Method used

By acquiring historical execution trajectory data of intelligent agents when performing tasks, semantic and topological features are extracted, similarity clustering is performed, multi-dimensional feature vectors are generated, common execution structures are identified, and these are encapsulated into reusable functional products with standard calling interfaces. After access verification, these products are registered to the capability library.

Benefits of technology

It achieves standardized abstraction and parameterized encapsulation of intelligent agent workflow, reducing the cost of repetitive development and improving the reusability and accuracy of workflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114459A_ABST
    Figure CN123114459A_ABST
Patent Text Reader

Abstract

This application relates to the field of artificial intelligence technology, and provides a method, apparatus, device, and medium for automatically abstracting intelligent agent workflows into reusable functional products. The method includes: acquiring historical execution trajectory data; evaluating the effectiveness of the data based on node execution logs, selecting a qualified set of execution trajectories, and performing similarity clustering to obtain task trajectory clusters; representing the execution nodes within the task trajectory clusters as multi-dimensional feature vectors; identifying execution nodes whose multi-dimensional similarity meets preset alignment conditions as a group of nodes to be aligned and performing alignment processing to obtain a common execution structure corresponding to the task trajectory clusters; comparing the configuration data of the aligned execution node set in the common execution structure, distinguishing between constants and variables, and constructing a parameter space based on the variables; encapsulating the common execution structure and parameter space into reusable functional products; and registering them to the capability library corresponding to the intelligent agent after successful verification. The technical solution of this application can improve the reusability efficiency of intelligent agent workflows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a method, apparatus, device, and medium for automatically abstracting intelligent agent workflows into reusable functional products. Background Technology

[0002] In related technologies, with the rapid development of artificial intelligence, intelligent agents are increasingly widely used in various fields. Intelligent agents typically accomplish complex tasks by orchestrating a series of execution nodes; this orchestration structure of execution nodes is called a workflow. In practical applications, developers often need to build similar workflows based on different business scenarios.

[0003] However, when building new workflows, developers often need to design and configure execution nodes from scratch. Even if similar workflows are available for reference, they often need to manually copy and modify a large amount of repetitive content. The same or similar workflow logic is repeatedly developed in different scenarios, resulting in a significant waste of human resources and low workflow reuse efficiency.

[0004] Therefore, how to improve the reusability of intelligent agent workflows and reduce the cost of repeated development has become a pressing technical problem to be solved when building intelligent agent workflows. Summary of the Invention

[0005] The technical problem solved by this application is to provide a method, apparatus, device and medium for automatically abstracting intelligent agent workflows into reusable functional products, which can improve the reuse efficiency of intelligent agent workflows.

[0006] According to a first aspect of the embodiments of this application, a method is provided for automatically abstracting an intelligent agent workflow into a reusable functional product. The method includes: acquiring historical execution trajectory data generated by the intelligent agent when performing a task, the historical execution trajectory data including multiple execution nodes and node execution logs corresponding to the execution nodes, the node execution logs containing input / output data and running status information of the corresponding execution nodes; performing validity evaluation based on the node execution logs, and filtering to obtain a set of qualified execution trajectories based on the validity evaluation results; the validity evaluation includes at least one of: evaluating the correctness of the execution result based on the input / output data, and evaluating the validity of the execution process based on the running status information; extracting semantic features and topological features of the set of qualified execution trajectories, and performing similarity clustering based on the semantic features and the topological features to obtain task trajectory clusters; representing the execution nodes within the task trajectory clusters as multi-dimensional feature vectors; and... The multidimensional similarity between execution nodes is calculated based on the multidimensional feature vectors, and execution nodes whose multidimensional similarity meets the preset alignment conditions are identified as a group of nodes to be aligned. Alignment processing is performed on the group of nodes to be aligned to extract the common execution structure corresponding to the task trajectory cluster. The common execution structure includes a set of aligned execution nodes and the execution dependencies of the aligned execution node set. The configuration data of the aligned execution node set in the common execution structure is compared, and attributes that remain unchanged in the configuration data are fixed as constants, while attributes that change in the configuration data are extracted as variables. A parameter space corresponding to the common execution structure is constructed based on the variables. The common execution structure and the parameter space are encapsulated into a reusable functional product with a standard calling interface. The reusable functional product undergoes admission verification based on verification rules. The verified reusable functional product is registered to the capability library corresponding to the intelligent agent for reuse.

[0007] Compared with existing technologies, the advantages of this application are as follows: By extracting common execution structures from historical execution trajectories and solidifying invariant attributes in configuration data as constants and extracting variable attributes as variables to construct a parameter space, standardized abstraction and parameterized encapsulation of workflow structures are achieved. This solution combines the common execution structure and parameter space into a capability object with a standard calling interface, and registers it to the capability library after admission verification based on verification rules, reducing redundant development costs and improving the reusability efficiency of intelligent agent workflows.

[0008] In one implementation, semantic and topological features are extracted from the qualified execution trajectory set, and similarity clustering is performed based on the semantic and topological features to obtain task trajectory clusters. This includes: parsing the input and output data in the node execution logs, extracting semantic features representing business logic intent, and constructing semantic vectors from the semantic features; parsing the connection relationships and execution order between multiple execution nodes, extracting topological features representing the process structure, and constructing topological vectors from the topological features; performing weighted fusion on the semantic vectors and the topological vectors to calculate the comprehensive similarity between different execution trajectories; and grouping execution trajectories with similarity higher than the comprehensive similarity threshold into the same cluster according to the comprehensive similarity threshold to obtain task trajectory clusters.

[0009] Its beneficial effects lie in extracting semantic features representing business logic intent by parsing the input and output data in the node execution logs, and extracting topological features representing the process structure by parsing the connection relationships and execution order between multiple execution nodes. This approach simultaneously considers both the business intent and process structure of the execution trajectory, reducing potential biases that may occur when relying solely on single-dimensional features for clustering. By weighted fusion of semantic and topological vectors and calculating a comprehensive similarity, it is beneficial to more accurately measure the similarity between different execution trajectories, thus improving the accuracy of clustering. Grouping execution trajectories into the same cluster based on a comprehensive similarity threshold facilitates the effective grouping of execution trajectories with similar business intents and process structures, providing a foundation for subsequent extraction of common execution structures.

[0010] In one implementation, the execution nodes within the task trajectory cluster are represented as multidimensional feature vectors; multidimensional similarity between execution nodes is calculated based on the multidimensional feature vectors, and execution nodes whose multidimensional similarity satisfies a preset alignment condition are identified as a group of nodes to be aligned, including: for each execution node, extracting the context, input data type, output data type, and typical execution time of its task to construct a multidimensional feature vector; using cosine similarity or Euclidean distance algorithms to calculate the multidimensional similarity of execution nodes in different trajectories within the task trajectory cluster; and identifying execution nodes whose multidimensional similarity is greater than a preset alignment threshold and whose execution dependencies are consistent as a group of nodes to be aligned; the consistent execution dependency means that the two execution nodes have the same set of predecessor nodes and the same set of successor nodes.

[0011] Its beneficial effects lie in the fact that by extracting the context, input data type, output data type, and typical execution time of the task to which the execution node belongs to construct a multi-dimensional feature vector, it can more comprehensively represent the characteristics of the execution node and reduce the misjudgments that may occur when relying on a single feature for node matching. By calculating the multi-dimensional similarity of execution nodes in different trajectories within a task trajectory cluster, and identifying execution nodes with a multi-dimensional similarity greater than a preset alignment threshold and consistent execution dependencies as the node group to be aligned, it is beneficial to ensure the consistency of the node's position in the process while taking into account the similarity of the node's own features, thereby improving the accuracy of node alignment and laying the foundation for subsequent extraction of common execution structures.

[0012] In one implementation, comparing the configuration data of the aligned execution node set in the common execution structure, fixing the unchanging attributes in the configuration data as constants, extracting the changing attributes in the configuration data as variables, and constructing a parameter space corresponding to the common execution structure based on the variables, includes: traversing the configuration data items of all execution nodes in the aligned execution node set; identifying configuration data items with constant values ​​in multiple execution trajectories, marking them as constants, and fixing them into the common execution structure; identifying configuration data items with different values ​​in multiple execution trajectories, marking them as variables, establishing a mapping relationship between the variable names and the value ranges of the variables; combining all the configuration data items marked as variables and their mapping relationships to construct a parameter space corresponding to the common execution structure.

[0013] Its beneficial effect lies in the fact that by traversing the configuration data items of all execution nodes in the aligned execution node set, identifying configuration data items with constant values ​​across multiple execution trajectories and marking them as constants to be fixed into the common execution structure, stable core logic in the workflow can be preserved. By identifying configuration data items with differing values ​​across multiple execution trajectories and marking them as variables, a mapping relationship between variable names and value ranges is established. All variables and their mapping relationships are then combined to construct a parameter space corresponding to the common execution structure, achieving the separation of invariant and variable parts in the workflow structure. This approach facilitates adapting to different business scenarios simply through parameter configuration when reusing workflows, reducing the workload of repetitive configuration and improving workflow reuse efficiency.

[0014] In one embodiment, the acquisition of historical execution trajectory data generated by the intelligent agent during task execution includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain input / output data and running status information of the corresponding execution nodes, including: recording the application interface name, request parameters, and response results called by the intelligent agent during execution as the input / output data; and recording the execution start time, end time, exception stack information, and resource utilization rate as the running status information.

[0015] Its beneficial effects lie in the fact that by recording the application interface names, request parameters, and response results called by the intelligent agent during execution as input and output data, the business interaction content of the execution node can be accurately reflected. By recording the execution start time, end time, exception stack information, and resource utilization as runtime status information, the runtime performance of the execution node can be comprehensively characterized. This method is beneficial for providing a complete data foundation for subsequent extraction of semantic and topological features, and improves the usability of historical execution trajectory data.

[0016] In one implementation, the effectiveness evaluation includes at least one of: evaluating the correctness of the execution result based on the input and output data, and evaluating the effectiveness of the execution process based on the running status information; wherein, the correctness of the execution result is evaluated by at least one of the following methods: whether the task is successfully completed, whether the result meets the user acceptance conditions, whether the external validator passes, whether the calculation result meets physical or business constraints, and whether there is manual confirmation; the effectiveness of the execution process is determined by judging whether there are abnormal interruptions, timeouts, or resource exhaustion indicators in the running status information, and is comprehensively evaluated in combination with at least one of the following: whether the same process is repeatedly executed successfully, execution stability, execution cost, and execution time.

[0017] Its beneficial effects lie in the fact that by evaluating the correctness of execution results based on input and output data and the effectiveness of the execution process based on runtime status information, the reliability of the execution trajectory can be assessed from multiple dimensions. Evaluating the correctness of execution results by assessing whether the task was successfully completed, whether the results meet user acceptance criteria, whether the external validator passed, whether the calculation results meet physical or business constraints, and whether manual confirmation was required helps ensure the correctness of the business logic of the inbound workflow. By judging whether there are abnormal interruptions, timeouts, or resource exhaustion indicators in the runtime status information, and combining this with a comprehensive evaluation of whether the same process was successfully executed repeatedly, execution stability, execution cost, and execution time, it is beneficial to screen out stable and reliable execution trajectories, reducing the risk of including abnormal or inefficient trajectories in the common structure extraction scope, and improving the accuracy of access verification.

[0018] In one implementation, the common execution structure and the parameter space are encapsulated into a reusable functional product with a standard calling interface, including: compiling the common execution structure into executable flow control code and mapping the parameter space to interface parameter declarations; establishing a binding relationship between the flow control code and the interface parameter declarations to generate a standard calling interface with a unified input / output format; the standard calling interface is used to receive externally input parameter values ​​to fill the parameter space; and forming an independently running reusable functional product based on the binding relationship.

[0019] Its beneficial effects lie in the fact that by compiling common execution structures into executable flow control code and mapping parameter space to interface parameter declarations, the workflow structure can be made executable and parameterized. By establishing a binding relationship between the flow control code and the interface parameter declarations, a standard calling interface with a unified input / output format is generated. This facilitates external calls to the workflow by filling the parameter space with passed parameter values, reducing the adaptation costs when reusing workflows. Based on this binding relationship, independently running reusable functional products can be formed, improving the reuse efficiency of workflows.

[0020] In one implementation, registering the verified reusable functional products to the capability library corresponding to the intelligent agent for reuse includes: calculating the functional weight score of the reusable functional products, the functional weight score being determined based on the diversity of task types covered by the workflow and the execution success rate in the historical trajectory; writing the reusable functional products and their functional weight scores into the capability library corresponding to the intelligent agent, and establishing an index for retrieval according to task requirements.

[0021] Its beneficial effect lies in the fact that by calculating the functional weight score based on the diversity of task types covered by the workflow and the execution success rate in the historical trajectory, the reuse value and reliability of reusable functional products can be objectively reflected. Writing reusable functional products and their functional weight scores into the capability library corresponding to the agent, and creating an index for retrieval based on task requirements, facilitates the rapid location of suitable reusable functional products during the reuse phase, improving the retrieval efficiency and reuse convenience of the capability library.

[0022] In one implementation, an effectiveness evaluation is performed based on the node execution logs, and a qualified execution trajectory set is obtained by filtering according to the effectiveness evaluation results. This includes: evaluating the correctness of the execution results of each execution node based on the input and output data in the node execution logs, and evaluating the operational effectiveness of each execution node during the execution process based on the running status information; and selecting the execution trajectory that satisfies the preset correctness and effectiveness of all execution nodes as the qualified execution trajectory set.

[0023] Its beneficial effect lies in the fact that by evaluating the correctness of the execution results of each execution node based on the input and output data in the node execution logs, and by evaluating the operational effectiveness of each execution node during the execution process based on the running status information, the quality of the execution trajectory can be comprehensively assessed. Selecting execution trajectories that all execution nodes meet the preset correctness and effectiveness as the set of qualified execution trajectories helps to exclude trajectories containing erroneous execution results or abnormal running states, reduces the interference of low-quality trajectories on the subsequent extraction of common execution structures, and improves the accuracy of common execution structure extraction.

[0024] According to a second aspect of the embodiments of this application, an apparatus is provided for automatically abstracting an intelligent agent workflow into a reusable functional product. This apparatus is used to perform the method described in any one of the first aspects. The apparatus includes: a historical data acquisition module, used to acquire historical execution trajectory data generated by the intelligent agent when performing a task, the historical execution trajectory data including multiple execution nodes and node execution logs corresponding to the execution nodes, the node execution logs containing input / output data and running status information of the corresponding execution nodes; a validity screening module, used to perform validity evaluation based on the node execution logs, and to screen a set of qualified execution trajectories based on the validity evaluation results; the validity evaluation includes at least one of: evaluating the correctness of the execution result based on the input / output data, and evaluating the validity of the execution process based on the running status information; a trajectory clustering module, used to extract semantic features and topological features of the set of qualified execution trajectories, and to perform similarity clustering based on the semantic features and the topological features to obtain task trajectory clusters; and a structure alignment module, used to align the task... The execution nodes within a trajectory cluster are represented as multidimensional feature vectors. Multidimensional similarity between execution nodes is calculated based on these feature vectors, and execution nodes whose multidimensional similarity satisfies preset alignment conditions are identified as a group of nodes to be aligned. Alignment processing is performed on the group of nodes to be aligned, and a common execution structure corresponding to the task trajectory cluster is extracted. This common execution structure includes a set of aligned execution nodes and the execution dependencies of the aligned execution node set. A parameter abstraction module is used to compare the configuration data of the aligned execution node set in the common execution structure, solidify the unchanging attributes in the configuration data as constants, extract the changing attributes in the configuration data as variables, and construct a parameter space corresponding to the common execution structure based on the variables. An object encapsulation and registration module is used to encapsulate the common execution structure and the parameter space into reusable functional products with standard calling interfaces. Admission verification is performed on the reusable functional products based on verification rules. Verified reusable functional products are registered to the capability library corresponding to the intelligent agent for reuse.

[0025] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor, wherein the memory is used to store computer program instructions executable by the processor; and the processor is used to execute the computer program instructions in the memory to implement the above-described method.

[0026] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processor, enable the implementation of the above-described method.

[0027] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including computer program instructions that, when executed by a processor, implement the method described above. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating a method for automatically abstracting an intelligent agent workflow into a reusable functional product according to an exemplary embodiment.

[0029] Figure 2 This is a block diagram illustrating an apparatus for automatically abstracting an intelligent agent workflow into a reusable functional product according to an exemplary embodiment.

[0030] Figure 3 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0031] Explanation of the reference numerals in the figure: 1. A device that automatically abstracts intelligent agent workflows into reusable functional products; 11. Historical data acquisition module; 12. Validity filtering module; 13. Trajectory clustering module; 14. Structure alignment module; 15. Parameter abstraction module; 16. Object encapsulation and registration module; 600. Electronic device; 601. Memory; 602. Processor; 603. Communication interface. Detailed Implementation

[0032] Unless otherwise defined, the technical or scientific terms used in this specification and claims shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. Specific embodiments of this application will be described below in conjunction with the accompanying drawings. It should be noted that, in order to provide a concise description, this specification cannot exhaustively describe all features of the actual embodiments. Without departing from the spirit and scope of this application, those skilled in the art can modify and substitute the embodiments of this application, and the resulting embodiments are also within the protection scope of this application.

[0033] To address the aforementioned technical problems, this application proposes a method, apparatus, electronic device, and storage medium for automatically abstracting intelligent agent workflows into reusable functional products, which can improve the reuse efficiency of intelligent agent workflows.

[0034] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0035] like Figure 1As shown, the first embodiment of this application provides a method for automatically abstracting an intelligent agent workflow into a reusable functional product, the method comprising the following steps S1-S6: Step S1: Obtain historical execution trajectory data generated by the agent when performing tasks. The historical execution trajectory data includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain the input and output data and running status information of the corresponding execution nodes.

[0036] Step S2: Perform validity evaluation based on node execution logs, and select a set of qualified execution trajectories based on the validity evaluation results; the validity evaluation includes at least one of the following: evaluating the correctness of the execution results based on input and output data, and evaluating the validity of the execution process based on running status information.

[0037] Step S3: Extract the semantic and topological features of the qualified execution trajectory set, and perform similarity clustering based on the semantic and topological features to obtain the task trajectory cluster.

[0038] Step S4: Represent the execution nodes within the task trajectory cluster as multidimensional feature vectors; calculate the multidimensional similarity between execution nodes based on the multidimensional feature vectors, and determine the execution nodes whose multidimensional similarity meets the preset alignment conditions as the node group to be aligned; perform alignment processing on the node group to be aligned, and extract the common execution structure corresponding to the task trajectory cluster. The common execution structure includes the set of aligned execution nodes and the execution dependencies of the set of aligned execution nodes.

[0039] Step S5: Compare the configuration data of the aligned execution node set in the common execution structure, solidify the unchanged attributes in the configuration data into constants, extract the changed attributes in the configuration data into variables, and construct the parameter space corresponding to the common execution structure based on the variables.

[0040] Step S6: Encapsulate the common execution structure and parameter space into a reusable functional product with a standard calling interface; perform admission verification on the reusable functional product based on verification rules; and register the verified reusable functional product to the corresponding capability library of the intelligent agent for reuse.

[0041] In some specific embodiments, to prevent defective reusable functional products from being solidified as system capabilities, productization verification is performed before the reusable functional products are formally registered to the capability library. Productization verification includes historical trajectory replay verification, new task instance verification, input boundary verification, output consistency verification, node dependency verification, and abnormal situation verification. Only when a candidate reusable functional product reaches a preset credibility threshold is it included in the formal capability registry center; candidate reusable functional products that do not reach the preset credibility threshold can enter the candidate area or continue to collect execution data for subsequent verification.

[0042] In other specific embodiments, once a reusable functional product passes productization verification, it is registered with the agent capability registry center. After registration, the reusable functional product appears as a standard callable capability to the agent. The agent's capability set expands from the original atomic skill set to a hybrid capability set including atomic skills and reusable functional products. The reusable functional product can then directly participate in the construction of subsequent workflows as a higher-level capability.

[0043] In some specific embodiments, when a new user task arrives, the system first determines whether there is a reusable functional product in the capability registry that matches the current task objective. If no matching reusable functional product exists, a workflow is dynamically generated in the conventional manner. If a highly matching reusable functional product exists, the parameters of the reusable functional product are instantiated based on the current task input and executed directly. If a partially matching reusable functional product exists, the system achieves a hybrid construction of reusable functional products and dynamic workflows by reusing a portion of the workflow of the reusable functional product, modifying the parameters of the reusable functional product, replacing the internal nodes of the reusable functional product, or adding other atomic skills before and after the reusable functional product.

[0044] In some specific embodiments, reusable functional products are not immutable after generation. The system continuously records data generated by subsequent executions of the reusable functional products, including success rate, failure type, parameter performance, node replacement status, user modification records, execution time, resource consumption, and result quality. As new execution experience accumulates, at least one of the following is updated: default parameter values, parameter ranges, node selection strategies, exception handling rules, verification conditions, internal workflows, and applicable scope of the reusable functional products, forming a continuous evolution mechanism for reusable functional products.

[0045] It is worth noting that reusable functional products refer to machine-callable capability objects that have standard calling interfaces, parameter spaces, and internal abstract workflows.

[0046] In some examples, validity evaluation includes: evaluating the correctness of the execution result based on input and output data, and evaluating the validity of the execution process based on runtime status information.

[0047] In other examples, validity is evaluated as follows: the correctness of the execution result is evaluated based on the input and output data.

[0048] In some other examples, the effectiveness evaluation is: evaluating the effectiveness of the execution process based on runtime status information.

[0049] In one implementation, semantic and topological features are extracted from a set of qualified execution trajectories, and similarity clustering is performed based on the semantic and topological features to obtain task trajectory clusters. This includes: parsing input and output data in node execution logs, extracting semantic features representing business logic intent, and constructing semantic vectors from the semantic features; parsing the connection relationships and execution order between multiple execution nodes, extracting topological features representing the process structure, and constructing topological vectors from the topological features; performing weighted fusion of semantic vectors and topological vectors to calculate the comprehensive similarity between different execution trajectories; and grouping execution trajectories with similarity higher than the comprehensive similarity threshold into the same cluster to obtain task trajectory clusters.

[0050] In some specific embodiments, the system aggregates multiple workflows with similar task objectives and execution structures into candidate workflow clusters. Taking the ionic conductivity calculation task as an example, the candidate workflow cluster contains three workflows: the first workflow's execution structure is structure input, MatterSim optimization, first-principles molecular dynamics (AIMD) calculation, mean square displacement (MSD) calculation, and conductivity output; the second workflow's execution structure is structure input, Vienna Abinitio Simulation Package (VASP) optimization, AIMD calculation, MSD calculation, and conductivity output; the third workflow's execution structure is structure input, MatterSim optimization, AIMD calculation, MSD calculation, conductivity output, and VASP verification. Although the above three workflows differ in the optimization module and verification stage, they can all be identified as belonging to the same type of ionic conductivity calculation task and thus are classified into the same candidate workflow cluster.

[0051] In other specific embodiments, for candidate workflow clusters, the system analyzes the node functions, node order, data dependencies, and control dependencies of each workflow, aligns functionally or semantically equivalent nodes in different workflows, and further identifies fixed nodes, optional nodes, mutually exclusive nodes, conditional nodes, repeating nodes, and exception handling nodes, thereby generating an abstract workflow corresponding to that task category. This abstract workflow no longer corresponds to a specific task, but rather represents an execution structure shared by a class of tasks.

[0052] In some specific embodiments, this application does not simply save the workflow generated by a single successful task, but rather generates an abstract workflow by aligning multiple workflows, identifying common structures, and identifying variable structures, thereby transforming specific execution experience into a general capability for a class of tasks.

[0053] In one implementation, execution nodes within a task trajectory cluster are represented as multidimensional feature vectors. Multidimensional similarity between execution nodes is calculated based on these multidimensional feature vectors, and execution nodes whose multidimensional similarity satisfies a preset alignment condition are identified as a group of nodes to be aligned. This includes: for each execution node, extracting the context, input data type, output data type, and typical execution time of its assigned task to construct a multidimensional feature vector; using cosine similarity or Euclidean distance algorithms to calculate the multidimensional similarity of execution nodes in different trajectories within the task trajectory cluster; and identifying execution nodes with multidimensional similarity greater than a preset alignment threshold and consistent execution dependencies as a group of nodes to be aligned. Consistent execution dependencies indicate that two execution nodes have the same set of predecessor nodes and the same set of successor nodes.

[0054] In some specific embodiments, functionally or semantically equivalent nodes refer to nodes that perform the same business operations in different workflows. Taking the material stability calculation task as an example, four nodes in one workflow—reading the Crystallographic Information File (CIF), structural relaxation, VASP single-point energy calculation, and stability judgment—and four nodes in another workflow—loading the crystal structure, geometry optimization, density functional theory (DFT) energy evaluation, and stability judgment—although using different tools, have high similarity in input type, output type, and functional description, and can be determined as functionally equivalent nodes. After alignment, they form a node sequence of loading structure, structural relaxation, energy calculation, and stability evaluation. The system represents each execution node as a multi-dimensional feature vector containing functional description, input type, output type, called tool, key parameters, and context. It calculates the input compatibility, output compatibility, and functional semantic similarity between different nodes. When all the above features meet the similarity requirements, even if the called tools are different, the two nodes can be determined to be functionally equivalent.

[0055] In some other specific embodiments, the system defines the similarity score of two nodes as a weighted sum of functional semantic similarity, input compatibility, output compatibility, contextual similarity, and tool type similarity. When the similarity score is greater than a preset threshold, the two nodes are determined to be candidate alignment nodes.

[0056] In some specific embodiments, taking four material calculation workflows as examples, the execution sequence of the first workflow is loading, relaxation, DFT calculation, phonon calculation, and report generation; the execution sequence of the second workflow is loading, relaxation, DFT calculation, and report generation; the execution sequence of the third workflow is the same as the first workflow; and the execution sequence of the fourth workflow is loading, relaxation, machine learning force field calculation, DFT calculation, and report generation. After alignment, the common execution structure is obtained as loading structure, structure relaxation, energy or property calculation, optional phonon verification, and report generation, where phonon verification is an optional node that can be selected for execution according to task requirements.

[0057] In one implementation, the configuration data of the aligned execution node set in the common execution structure is compared. Attributes that remain unchanged in the configuration data are solidified as constants, and attributes that change in the configuration data are extracted as variables. A parameter space corresponding to the common execution structure is constructed based on these variables. This includes: traversing the configuration data items of all execution nodes in the aligned execution node set; identifying configuration data items with constant values ​​across multiple execution trajectories, marking them as constants, and solidifying them into the common execution structure; identifying configuration data items with differing values ​​across multiple execution trajectories, marking them as variables, and establishing a mapping relationship between variable names and variable value ranges; and combining all configuration data items marked as variables and their mapping relationships to construct a parameter space corresponding to the common execution structure.

[0058] In some specific embodiments, the system analyzes multiple task execution instances, solidifies recurring execution structures into invariant structures, and abstracts the changing content between different instances into parameters of reusable functional products. This approach can solve the problem of specific workflows being difficult to reuse across tasks, and is beneficial to improving the versatility of reusable functional products.

[0059] In one implementation, historical execution trajectory data generated by the agent during task execution is acquired. The historical execution trajectory data includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain the input and output data and running status information of the corresponding execution nodes, including: recording the application interface name, request parameters, and response results called by the agent during execution as input and output data; and recording the execution start time, end time, exception stack information, and resource utilization as running status information.

[0060] In some specific embodiments, the system automatically generates standard input and output interfaces for reusable functional products based on the input-output relationships of multiple workflows. The abstracted reusable functional product is represented as a structured object containing a target category, standard input interface, standard output interface, configurable parameter space, internal abstract workflow, verification rules, and metadata. The metadata includes the reusable functional product name, version, applicable domain, dependent atomic skills, dependency model, dependent software, runtime resource requirements, historical success rate, average execution time, creation time, and update time. This facilitates the complete recording of the reusable functional product's attribute information, enabling subsequent management and retrieval.

[0061] In one implementation, the effectiveness evaluation includes at least one of: evaluating the correctness of the execution result based on input and output data, and evaluating the effectiveness of the execution process based on runtime status information; wherein, the correctness of the execution result is evaluated by at least one of the following methods: whether the task was successfully completed, whether the result meets the user acceptance conditions, whether the external validator passed, whether the calculation result meets physical or business constraints, and whether there is manual confirmation; the effectiveness of the execution process is determined by judging whether there are abnormal interruptions, timeouts, or resource exhaustion indicators in the runtime status information, and is comprehensively evaluated in combination with at least one of the following: whether the same process is repeatedly executed successfully, execution stability, execution cost, and execution time.

[0062] In one implementation, a common execution structure and parameter space are encapsulated into a reusable functional product with a standard calling interface. This includes: compiling the common execution structure into executable flow control code and mapping the parameter space to interface parameter declarations; establishing a binding relationship between the flow control code and the interface parameter declarations to generate a standard calling interface with a unified input / output format; the standard calling interface is used to receive externally passed parameter values ​​to fill the parameter space; and forming an independently running reusable functional product based on the binding relationship.

[0063] In some specific embodiments, the reusable functional products generated by this application have standard inputs, standard outputs, parameter spaces, internal execution topologies, applicable scopes, and verification rules. They are machine-callable, machine-composable, and machine-verifiable capability objects, rather than simply historical experience records.

[0064] In other specific embodiments, reusable functional products, once generated, can re-enter the agent's capability set and participate as agent capabilities in the construction of higher-level workflows. The system can generate reusable functional products based on atomic skills, then combine these reusable functional products with atomic skills to form new workflows, and further abstract these new workflows into higher-level reusable functional products, thereby forming a recursive capability growth mechanism that can gradually form high-level professional capabilities from a large number of low-level atomic skills.

[0065] In one implementation, the reusable functional products that have passed verification are registered in the capability library corresponding to the intelligent agent for reuse, including: calculating the functional weight score of the reusable functional products, the functional weight score being determined based on the diversity of task types covered by the workflow and the execution success rate in the historical trajectory; writing the reusable functional products and their functional weight scores into the capability library corresponding to the intelligent agent, and establishing an index for retrieval according to task requirements.

[0066] In some specific embodiments, a verification and admission mechanism for reusable functional products is established, ensuring that not all successfully executed workflows are directly solidified into system capabilities. The system determines whether candidate reusable functional products meet the registration requirements based on at least one of the following: historical execution count, success rate, result quality, replay verification results, new instance verification results, input / output constraints, and human feedback. This reduces the risk of accidental successes, erroneous experiences, or overfitting workflows being solidified into system capabilities.

[0067] In other specific embodiments, reusable functional products have continuous evolution capabilities, continuously collecting execution data during subsequent calls and updating internal workflows, parameters, node selection strategies and verification conditions accordingly. This is a versionable and evolving execution capability, rather than a static template.

[0068] In some specific embodiments, a reusable functional product can include other reusable functional products. For example, reusable functional products for structural optimization, molecular dynamics, and trajectory analysis can be combined to form reusable functional products for material thermal stability analysis, thereby forming a hierarchical capability system of atomic skills, primary reusable functional products, secondary reusable functional products, and tertiary reusable functional products.

[0069] In some specific embodiments, the system supports the automatic splitting and merging of reusable functional products. When a reusable functional product contains multiple high-frequency independent sub-processes, it can be automatically split into multiple reusable functional products; when multiple reusable functional products are frequently called together, they can be automatically merged to form a higher-level reusable functional product, and the system automatically adjusts the capability granularity according to historical call relationships.

[0070] In some examples, the system supports a competition mechanism for reusable functional products based on execution results. For the same task objective, there can be multiple reusable functional products, such as reusable functional products for high-precision solutions, reusable functional products for fast solutions, and reusable functional products for low-resource solutions. The system automatically selects the corresponding reusable functional product based on task accuracy requirements, resource constraints, time constraints, and historical success rates.

[0071] It is worth noting that the system supports reusable functional products that are environmentally adaptive. The internal workflow of a reusable functional product can dynamically select nodes based on the current operating environment. For example, when a GPU is present, the GPU machine learning force field model is called, and when a GPU is absent, the CPU model is called; when a VASP is present, the VASP is used for final verification, and when a VASP is absent, an alternative computation path is used. Therefore, the same reusable functional product can be automatically instantiated into different workflows in different computing environments.

[0072] In other examples, the system supports user-customized reusable functional product instances. These reusable functional products can be combined with user research preferences, and system-level reusable functional products can be instantiated based on user research preferences and the current task context. For example, the default molecular dynamics simulation duration for globally reusable functional products is 20 picoseconds. If a user consistently requires a molecular dynamics simulation duration of 100 picoseconds or more, then the reusable functional product instantiation will automatically generate a molecular dynamics simulation duration of 100 picoseconds. This mechanism can be combined with technologies related to the continuous accumulation of user research experience and personalized evolution to form a protective mechanism.

[0073] In other examples, this method can be applied to scientific research agents to automatically generate reusable functional products for ionic conductivity calculation, material sintering analysis, catalytic performance analysis, phase stability analysis, superconducting performance calculation, and machine learning potential function training. Each reusable functional product is gradually generated by the agent during the execution of actual scientific research tasks, without the need for developers to pre-write it completely.

[0074] In some other examples, while meeting data access and privacy requirements, anonymized execution trajectories generated by multiple users can be aggregated to identify stable execution patterns from a large number of user workflows and form system-level common reusable functional products. At the same time, reusable functional products with different scopes, such as system-level reusable functional products, organization-level reusable functional products, and user-level reusable functional products, can be retained.

[0075] In one implementation, effectiveness evaluation is performed based on node execution logs, and a set of qualified execution trajectories is obtained by filtering based on the effectiveness evaluation results. This includes: evaluating the correctness of the execution results of each execution node based on the input and output data in the node execution logs, and evaluating the operational effectiveness of each execution node during the execution process based on the running status information; and selecting the execution trajectory that satisfies the preset correctness and effectiveness of all execution nodes as the set of qualified execution trajectories.

[0076] like Figure 2As shown, according to a second embodiment of this application, an apparatus is provided for automatically abstracting an intelligent agent workflow into a reusable functional product. This apparatus is used to execute the method of any one of the above embodiments. The apparatus includes: a historical data acquisition module, used to acquire historical execution trajectory data generated by the intelligent agent when performing a task. The historical execution trajectory data includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain input / output data and running status information of the corresponding execution nodes; a validity screening module, used to perform validity evaluation based on the node execution logs and screen a set of qualified execution trajectories based on the validity evaluation results; the validity evaluation includes at least one of: evaluating the correctness of the execution result based on input / output data and evaluating the validity of the execution process based on running status information; a trajectory clustering module, used to extract semantic features and topological features of the qualified execution trajectory set, and perform similarity clustering based on the semantic features and topological features to obtain task trajectory clusters; and a structure alignment module, used for... The execution nodes within a task trajectory cluster are represented as multidimensional feature vectors. Multidimensional similarity between execution nodes is calculated based on these feature vectors, and execution nodes whose multidimensional similarity meets preset alignment conditions are identified as the node group to be aligned. Alignment processing is performed on the node group to be aligned, extracting the common execution structure corresponding to the task trajectory cluster. The common execution structure includes the set of aligned execution nodes and their execution dependencies. A parameter abstraction module compares the configuration data of the aligned execution node set in the common execution structure, solidifies the unchanged attributes in the configuration data as constants, extracts the changed attributes as variables, and constructs a parameter space corresponding to the common execution structure based on these variables. An object encapsulation and registration module encapsulates the common execution structure and parameter space into reusable functional products with standard calling interfaces. Admission verification is performed on the reusable functional products based on verification rules. Verified reusable functional products are registered to the capability library corresponding to the intelligent agent for reuse.

[0077] The method and apparatus embodiments of this application can complement each other.

[0078] Regarding the apparatus in the above embodiments, the specific manner in which the processor performs the operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0079] A third embodiment of this application also proposes an electronic device, including a processor and a memory; the memory is used to store computer program instructions executable by the processor; the processor is used to execute the computer program instructions in the memory to implement the methods of any of the above embodiments.

[0080] like Figure 3As shown, the electronic device 600 includes a memory 601 and a processor 602. The memory 601 is used to store computer program instructions executable by the processor 602; the processor 602 is used to execute the computer program instructions in the memory 601 to implement the method provided in any of the above embodiments.

[0081] The electronic device 600 also includes a communication interface 603. The processor 602, memory 601, and communication interface 603 are connected via a communication bus and communicate with each other.

[0082] The processor 602 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the above scheme.

[0083] Communication interface 603 is used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), and Wireless Local Area Network (WLAN).

[0084] The memory 601 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0085] A fourth embodiment of this application provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, can implement the above-described method.

[0086] A fifth embodiment of this application provides a computer program product, including computer program instructions that, when executed by a processor, implement the method described above.

[0087] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.

[0088] The above description of the embodiments is intended to enable those skilled in the art to understand and apply this application. It will be apparent to those skilled in the art that various modifications can be easily made to these embodiments, and the general principles described herein can be applied to other embodiments without creative effort. Therefore, this application is not limited to the embodiments described herein, and any improvements and modifications made by those skilled in the art based on the disclosure of this application without departing from the scope and spirit of this application are within the scope of this application.

Claims

1. A method for automatically abstracting an intelligent agent workflow into a reusable functional product, characterized in that, The method includes: Acquire historical execution trajectory data generated by the intelligent agent when performing tasks. The historical execution trajectory data includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain the input and output data and running status information of the corresponding execution nodes. The effectiveness is evaluated based on the node execution logs, and a set of qualified execution trajectories is obtained by filtering according to the effectiveness evaluation results; the effectiveness evaluation includes at least one of: evaluating the correctness of the execution results based on the input and output data, and evaluating the effectiveness of the execution process based on the running status information; Extract semantic and topological features from the qualified execution trajectory set, and perform similarity clustering based on the semantic and topological features to obtain task trajectory clusters; The execution nodes within the task trajectory cluster are represented as multidimensional feature vectors; the multidimensional similarity between execution nodes is calculated based on the multidimensional feature vectors, and the execution nodes whose multidimensional similarity satisfies the preset alignment conditions are determined as the node group to be aligned; the node group to be aligned is aligned, and the common execution structure corresponding to the task trajectory cluster is extracted. The common execution structure includes the set of aligned execution nodes and the execution dependencies of the set of aligned execution nodes. By comparing the configuration data of the aligned execution node set in the common execution structure, the attributes that remain unchanged in the configuration data are fixed as constants, the attributes that change in the configuration data are extracted as variables, and a parameter space corresponding to the common execution structure is constructed based on the variables. The common execution structure and the parameter space are encapsulated into reusable functional products with standard calling interfaces; the reusable functional products are subjected to access verification based on verification rules; and the verified reusable functional products are registered to the capability library corresponding to the intelligent agent for reuse.

2. The method as described in claim 1, characterized in that, Extract semantic and topological features from the qualified execution trajectory set, and perform similarity clustering based on the semantic and topological features to obtain task trajectory clusters, including: The input and output data in the node execution log are parsed to extract semantic features that represent the business logic intent, and the semantic features are constructed into semantic vectors. The connection relationships and execution order between multiple execution nodes are analyzed, the topological features that represent the process structure are extracted, and the topological features are constructed into topological vectors. The semantic vector and the topological vector are weighted and fused to calculate the comprehensive similarity between different execution trajectories; Based on the comprehensive similarity threshold, execution trajectories with similarity higher than the threshold are grouped into the same cluster to obtain task trajectory clusters.

3. The method as described in claim 1, characterized in that, The execution nodes within the task trajectory cluster are represented as multi-dimensional feature vectors; The multidimensional similarity between execution nodes is calculated based on the multidimensional feature vectors, and execution nodes whose multidimensional similarity satisfies the preset alignment conditions are identified as the node group to be aligned, including: For each execution node, extract the context of its task, input data type, output data type, and typical execution time to construct a multi-dimensional feature vector; The cosine similarity or Euclidean distance algorithm is used to calculate the multidimensional similarity of execution nodes in different trajectories within the task trajectory cluster; Execution nodes with a multidimensional similarity greater than a preset alignment threshold and consistent execution dependencies are identified as a group of nodes to be aligned; the consistent execution dependencies mean that the two execution nodes have the same set of predecessor nodes and the same set of successor nodes.

4. The method as described in claim 1, characterized in that, By comparing the configuration data of the aligned execution node set in the common execution structure, the attributes that remain unchanged in the configuration data are fixed as constants, and the attributes that change in the configuration data are extracted as variables. A parameter space corresponding to the common execution structure is then constructed based on these variables, including: Iterate through the configuration data items of all execution nodes in the aligned execution node set; Identify configuration data items that have constant values ​​across multiple execution traces, mark them as constants, and embed them into the common execution structure; Identify configuration data items whose values ​​differ across multiple execution trajectories, mark them as variables, and establish a mapping relationship between the variable name and the value range of the variable; Combine all configuration data items marked as variables and their mapping relationships to construct a parameter space corresponding to the common execution structure.

5. The method as described in claim 1, characterized in that, The process involves acquiring historical execution trajectory data generated by the intelligent agent during task execution. This historical execution trajectory data includes multiple execution nodes and corresponding node execution logs. The node execution logs contain input / output data and running status information for the corresponding execution node, including: The input and output data are recorded as the application interface names, request parameters, and response results called by the intelligent agent during execution. The execution start time, end time, exception stack information, and resource utilization rate are recorded as the running status information.

6. The method as described in claim 1, characterized in that, The effectiveness evaluation includes: At least one of the following: evaluating the correctness of the execution result based on the input and output data, and evaluating the effectiveness of the execution process based on the running status information; The correctness of the execution result is evaluated in at least one of the following ways: whether the task is successfully completed, whether the result meets the user acceptance criteria, whether the external validator passes, whether the calculation result meets physical or business constraints, and whether there is manual confirmation. The effectiveness of the execution process is determined by judging whether there are abnormal interruptions, timeouts, or resource exhaustion indicators in the running status information, and is comprehensively evaluated by combining at least one of the following: whether the same process is successfully executed repeatedly, execution stability, execution cost, and execution time.

7. The method as described in claim 1, characterized in that, The common execution structure and the parameter space are encapsulated into a reusable functional product with a standard calling interface, including: The common execution structure is compiled into executable flow control code, and the parameter space is mapped to interface parameter declarations; A binding relationship is established between the flow control code and the interface parameter declaration to generate a standard calling interface with a unified input and output format; the standard calling interface is used to receive externally passed parameter values ​​to fill the parameter space; Based on the aforementioned binding relationship, an independently operating, reusable functional product is formed.

8. The method as described in claim 1, characterized in that, The step of registering the verified reusable functional products to the capability library corresponding to the intelligent agent for reuse includes: Calculate the functional weight score of the reusable functional product, which is determined based on the diversity of task types covered by the workflow and the execution success rate in the historical trajectory. The reusable functional products and their functional weight scores are written into the capability library corresponding to the intelligent agent, and an index is created for retrieval according to task requirements.

9. The method as described in claim 1, characterized in that, The effectiveness of the execution logs of the nodes is evaluated, and a set of qualified execution trajectories is obtained based on the evaluation results, including: The correctness of the execution results of each execution node is evaluated based on the input and output data in the node execution log, and the effectiveness of the execution of each execution node during the execution process is evaluated based on the running status information. The set of qualified execution trajectories is selected from those where all execution nodes meet the preset correctness and validity requirements.

10. A device for automatically abstracting intelligent agent workflows into reusable functional products, characterized in that, The apparatus is used to perform the method according to any one of claims 1 to 9, the apparatus comprising: The historical data acquisition module is used to acquire historical execution trajectory data generated by the intelligent agent when performing tasks. The historical execution trajectory data includes multiple execution nodes and node execution logs corresponding to the execution nodes. The node execution logs contain the input and output data and running status information of the corresponding execution nodes. The validity screening module is used to evaluate the validity of the node execution logs and to filter out a set of qualified execution trajectories based on the validity evaluation results; the validity evaluation includes at least one of: evaluating the correctness of the execution results based on the input and output data, and evaluating the validity of the execution process based on the running status information; The trajectory clustering module is used to extract the semantic and topological features of the qualified execution trajectory set, and perform similarity clustering based on the semantic and topological features to obtain task trajectory clusters; The structure alignment module is used to represent the execution nodes within the task trajectory cluster as multi-dimensional feature vectors; calculate the multi-dimensional similarity between execution nodes based on the multi-dimensional feature vectors, and determine the execution nodes whose multi-dimensional similarity satisfies the preset alignment conditions as a group of nodes to be aligned; perform alignment processing on the group of nodes to be aligned, and extract the common execution structure corresponding to the task trajectory cluster, wherein the common execution structure includes a set of aligned execution nodes and the execution dependencies of the set of aligned execution nodes; The parameter abstraction module is used to compare the configuration data of the aligned execution node set in the common execution structure, solidify the unchanging attributes in the configuration data into constants, extract the changing attributes in the configuration data into variables, and construct a parameter space corresponding to the common execution structure based on the variables. The object encapsulation and registration module is used to encapsulate the common execution structure and the parameter space into reusable functional products with standard calling interfaces; to perform access verification on the reusable functional products based on verification rules; and to register the verified reusable functional products to the capability library corresponding to the intelligent agent for reuse.

11. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer program instructions executable by the processor; and the processor executes the computer program instructions in the memory to implement the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the executable computer program instructions in the storage medium are executed by a processor, the method described in any one of claims 1 to 9 can be implemented.

13. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, they implement the method as described in any one of claims 1 to 9.