Workflow-based agent implementation method, platform and equipment and storage medium
Through the business component construction and target execution engine based on metadata structure, the flexibility and threshold problems of traditional programming methods under complex logic are solved, efficient and flexible workflow construction and AI capability integration are achieved, and the stability of business processes and data processing efficiency are improved.
Patent Information
- Application Number
- CN202510651104.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-29
AI Technical Summary
Traditional programming methods are not flexible enough when implementing complex logic, and have high thresholds, making it difficult to quickly and conveniently build workflows in diversified business scenarios, and cannot fully utilize AI capabilities to improve efficiency.
Build business components based on a unified metadata structure standard, determine component dependencies and trigger conditions through the target execution engine, build target workflows, and use message channels to transmit execution information, supporting custom templates and open interface extension components.
It lowers the threshold for workflow construction, improves construction efficiency and flexibility, ensures stable operation of business processes, enhances data processing capabilities, and supports the rapid integration of AI capabilities and applications in diversified scenarios.
Smart Images

Figure CN120560645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a workflow-based intelligent agent implementation method, platform, device and storage medium. Background Art
[0002] With the rapid development of artificial intelligence (AI) technology, businesses and individual users are increasingly demanding the use of AI to improve work efficiency. Traditional programming methods lack flexibility when implementing complex logic and are prohibitively difficult for non-professional developers. This makes it difficult to quickly and conveniently build workflows for diverse business scenarios. Therefore, there is an urgent need for a method that lowers the technical barriers to entry, increases flexibility, allows for quick and easy workflow development, meets the needs of diverse business scenarios, and fully leverages AI capabilities to improve work efficiency. Summary of the Invention
[0003] In order to solve the above technical problems, in a first aspect, the present invention provides a workflow-based agent implementation method, comprising:
[0004] Multiple business components are constructed based on business scenarios and predefined unified metadata structure standards to build a target execution engine; the metadata structure standards include: an execution chain; the execution chain includes: business components to be executed after the current business component is executed; the business scenarios include scenarios that use artificial intelligence technology to provide intelligent services and scenarios that use non-intelligent services;
[0005] Selecting at least one target component from the plurality of business components according to target requirements;
[0006] Determining, by the target execution engine, dependencies between target components based on execution links in each target component;
[0007] Build target workflows based on the dependencies between target components, and set trigger conditions and priorities for each target component.
[0008] Scheduling and executing the target workflow according to the trigger conditions and priorities corresponding to each target component;
[0009] During the execution of the target workflow, relevant execution information of each target component is obtained, and the relevant execution information of each target component is written into the corresponding message channel.
[0010] In an optional embodiment, during the execution of the target workflow, obtaining relevant execution information of each target component and writing the relevant execution information of each target component into a corresponding message channel includes:
[0011] During the execution of the target workflow, the relevant execution information of each target component is obtained through aspect-oriented programming, and the relevant execution information of each target component is written into the corresponding message channel using message queue technology.
[0012] In an optional implementation, the metadata structure standard further includes an identifier of a business component, a component name, an input parameter set, and an output parameter set.
[0013] In an optional implementation, the method further includes: during execution of the target workflow, calling the value of each input parameter in the input parameter set according to a custom template.
[0014] In an optional implementation, the method further includes: defining an application programming interface framework to allow external personnel to write codes for new business components according to the metadata structure standard and construct an executor interface.
[0015] In an optional implementation, the relevant execution information includes: input data, output data, and context information.
[0016] In an optional implementation, the method further includes: acquiring a historical workflow according to target requirements; and determining the historical workflow as the target workflow.
[0017] In a second aspect, the present invention provides a workflow-based agent implementation platform, the workflow-based agent implementation platform comprising:
[0018] A first processing module is configured to construct multiple business components based on business scenarios and a predefined unified metadata structure standard to construct a target execution engine; the metadata structure standard includes an execution chain; the execution chain includes business components to be executed after the current business component is executed; the business scenarios include scenarios for providing intelligent services using artificial intelligence technology and scenarios for providing non-intelligent services;
[0019] A second processing module, configured to select at least one target component from the plurality of business components according to target requirements;
[0020] Determining, by the target execution engine, dependencies between target components based on execution links in each target component;
[0021] Build target workflows based on the dependencies between target components, and set trigger conditions and priorities for each target component.
[0022] A third processing module is used to schedule and execute the target workflow according to the trigger conditions and priorities corresponding to each target component;
[0023] The fourth processing module is used to obtain relevant execution information of each target component during the execution of the target workflow, and write the relevant execution information of each target component into the corresponding message channel.
[0024] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the workflow-based intelligent agent implementation method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the workflow-based intelligent agent implementation method of the above-mentioned first aspect or any corresponding embodiment thereof.
[0026] The technical solution provided by the present invention has the following technical effects:
[0027] The technical solution of the embodiment of the present invention can improve construction efficiency and flexibility: by building business components based on a unified metadata structure standard, users can quickly select target components from a variety of components to build target workflows, lowering the threshold for workflow construction. In different business scenarios, whether it is an intelligent service scenario, such as using AI chat components to build an intelligent customer service system; or a non-intelligent service scenario, such as using database access API components for data management, they can be flexibly combined. This allows users to fully utilize AI capabilities to improve work efficiency.
[0028] The technical solutions of this embodiment optimize execution flow and controllability: by determining the dependencies between selected target components through execution links, the target workflow is executed based on trigger conditions and priorities, ensuring the orderly execution of target components and prioritizing critical tasks. This ensures stable operation in complex business processes.
[0029] The technical solution of the embodiment of the present invention can enhance data processing capabilities: the use of message channels realizes the asynchronous transmission and distribution of relevant execution information of the target component, facilitates data persistence, upstream and downstream business linkage and format conversion, and improves data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 1 is a flow chart of a workflow-based agent implementation method according to an embodiment of the present invention;
[0032] Figure 2 is a schematic diagram of a parameter setting interface according to an embodiment of the present invention;
[0033] Figure 3 Schematic diagram of the execution link of the target workflow according to an embodiment of the present invention;
[0034] Figure 4 1 is a schematic diagram of the structure of a workflow-based agent implementation platform according to an embodiment of the present invention;
[0035] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0037] With the development of artificial intelligence technology, more and more enterprises and individual users need to use AI capabilities to simplify workflows and improve efficiency. Traditional programming methods are often not flexible enough when implementing complex logic, and the threshold is high for non-professional developers. Therefore, it is necessary to develop a more intuitive and easy-to-use tool that enables users to quickly build workflows that include AI capabilities and routine operations, and execute these processes efficiently. Therefore, an embodiment of the present invention provides a workflow-based intelligent agent implementation method, platform, device and storage medium to solve the above problems.
[0038] An embodiment of the present invention provides an embodiment of a workflow-based intelligent agent implementation method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] Figure 1 It is a flowchart of a workflow-based agent implementation method according to an embodiment of the present invention.
[0040] like Figure 1As shown, an embodiment of the present invention provides a workflow-based agent implementation method, which includes:
[0041] S101: Build multiple business components according to business scenarios and pre-defined unified metadata structure standards to build a target execution engine.
[0042] In this embodiment, the metadata structure standard includes: an execution link; the execution link includes: business components to be executed subsequently after the current business component is executed; business scenarios include scenarios for providing intelligent services using artificial intelligence technology and scenarios for non-intelligent services; scenarios for non-intelligent services can be scenarios for ordinary application operations and scenarios for controlling workflow execution.
[0043] In this embodiment, the metadata structure standard also includes the business component identifier, component name, input parameter set, and output parameter set. The input parameter set includes at least one input parameter, and the output parameter set includes at least one output parameter.
[0044] In this embodiment, the target execution engine proposes a new type of AI Agent execution engine for the present invention. Its core lies in the definition of business components and a unified metadata structure standard. The metadata structure standard is equivalent to a metadata description specification. Through this unified metadata structure standard, business components in both intelligent service scenarios and non-intelligent service scenarios can collaborate in an orderly manner in the target execution engine. They can be flexibly combined according to business needs to build complex and efficient workflows to meet diverse business needs. Each business component can be an AI service with specific functions or a module for general application operations. As an example, the business components include:
[0045] Scenarios that use artificial intelligence technology to provide intelligent services correspond to AI capability components: such as text-to-image components, artificial intelligence generated content (AIGC) components, AI classification components, AI content extraction components, AI content summarization components, image understanding components, AI chat components, etc.
[0046] Non-intelligent service scenarios correspond to common capability components: such as HTTP request initiator, code snippet execution environment component, knowledge base query interface component, database access API component, etc.
[0047] Control components corresponding to non-intelligent service scenarios: conditional judgment components and loop components that provide functions such as conditional judgment (if) and loop (foreach) to control logical branches and repeated steps in the workflow.
[0048] In this embodiment, all business components are described using a unified metadata structure standard, ensuring that business components from different sources and technology stacks can seamlessly collaborate on the same platform. Business components, such as AI capability components, general capability components, and control components, are the core building blocks of intelligent entities.
[0049] In this embodiment, considering that the business component can be abstractly understood as the encapsulation of a specific business capability or function, the input parameters and processing results required for different business capabilities or functions are different. Therefore, different business components set different input parameters and output parameters. For example, the text image component in the AI capability component, the input parameters may include image description text, desired image style, image size, etc., and the output parameters are the generated image data. For the database access API component in the general capability component, the input parameters may be query statements, database connection information, etc., and the output parameters are the data result set that meets the query conditions. This method of setting different input and output parameters according to the differences in component functions can accurately meet the needs of diverse business scenarios, ensure that each business component collaborates efficiently in the workflow, and jointly completes complex business tasks.
[0050] As an example, the metadata structure standard is as follows:
[0051]
[0052]
[0053] In this embodiment, users can customize the rules and methods for calling the input parameters required by business components. These user-defined rules and methods for calling the input parameters required by business components are called custom templates. Different business components correspond to different custom templates. For example, business component 1 corresponds to custom template 1, and business component 2 corresponds to custom template 2. In this embodiment, during the execution of the target workflow, the value of each input parameter in the input parameter set can be called according to the custom template. Specifically, during the execution of the target workflow, the value of each input parameter in the input parameter set can be called according to the custom template corresponding to the currently executing business component.
[0054] Users can customize the way to input parameters:
[0055] Custom data protocol: Users can use custom data protocol to complete the setting of input parameters required by business components. This means that users can flexibly determine the content and format of input parameters according to specific business needs and component functions. In addition, users can also customize the content and format of output parameters of business components. Specifically, users can Figure 2 The parameter setting interface shown is used to set the content and format of input parameters and output parameters.
[0056] Utilize custom template engines: For some string-type parameters within business components (such as the Prompt of a large model), users can use custom template engines to define the rules and methods for calling input parameters through variable names, ordinary functions, and command functions.
[0057] Processing numeric parameters: Some numeric parameters within business components, such as the maximum number of contexts, chat history counts, and temperature parameters for large models, can be customized based on the functional requirements of different business components. After calling a business component, these parameters can be further processed using corresponding syntax such as variable names, regular functions, and command functions to optimize the execution of the business component.
[0058] In this embodiment, a custom template can be constructed using syntax corresponding to variable names, common functions, and command functions.
[0059] The syntax corresponding to the variable name is: get variable {{variable-key}}. Variables are generally used to get the values of system built-in variables or user-defined variables.
[0060] Example: {{now}} represents getting the current time. The custom template is {{now}}, which is used to get the current time.
[0061] The syntax corresponding to ordinary functions is: call function [@[function-data]@]. Functions are generally used to process data.
[0062] Example: The custom template to convert abc to uppercase ABC is:
[0063] JSON
[0064] [@[
[0065] {"function":"toUpperCase","params":["abc"]}
[0066] ]@]
[0067] The syntax of the command function is: call command [$[command-data]$]. The command generally changes the internal state of the target execution engine or calls internal capabilities.
[0068] Example: The custom template for adding meta information {"type":"deepresearch"} when the AI agent replies to a message is:
[0069] JSON
[0070] [$[
[0071] {"command":"AddMessageMeta","data":{"metadata":{"type":"deepresearch"}}}
[0072] ]$]
[0073] S102: Select at least one target component from multiple business components according to target requirements.
[0074] In this embodiment, the user selects at least one target component from multiple business components according to target requirements.
[0075] As an example, let's assume an e-commerce company wants to build an intelligent product recommendation workflow to improve the accuracy and efficiency of product recommendations. By integrating the functions of various components, the intelligent product recommendation workflow can form an intelligent agent with product recommendation capabilities. In this scenario:
[0076] Target requirement: Based on the user's browsing history and purchasing behavior, accurately recommend relevant products to users, analyze the recommendation effect and record the data.
[0077] Select the target component:
[0078] AI Capability Components: AI Content Extraction Component: Extracts key information from historical user browsing and purchase data, such as product categories, brands, and user preferences. For example, from a user's purchase record of "purchased XX brand sneakers and sports T-shirts," it extracts information such as "sneakers," "sports T-shirts," and "XX brand" to serve as the basis for subsequent recommendations.
[0079] Common Capabilities: Database Access API: This component is used to access the enterprise's user and product databases. This component allows you to query a user's browsing and purchase history using their ID, as well as obtain detailed product information such as product name, price, and inventory. For example, you can query the IDs of all products that user A has browsed in the past month and retrieve relevant information about these products from the product database.
[0080] Control component: Conditional judgment component: This component performs conditional judgment based on extracted user information and product data. For example, if a user frequently purchases sportswear, new sportswear products will be recommended. If a user recently browsed a certain brand but did not purchase, other popular products from that brand will be recommended. This approach enables personalized recommendation strategies.
[0081] AI Capability Components: AI Classification Component: This component categorizes products by categories and attributes for more targeted recommendations. For example, products can be divided into major categories such as sports, home furnishings, and digital products, and then further subdivided into specific subcategories to ensure that recommendations are more tailored to user needs.
[0082] Common capability components: HTTP request initiator: Sends recommended product information to the user's device. For example, it pushes recommended product links, images, descriptions, and other information to the user's mobile app or email address via HTTP requests.
[0083] Common capability components: Code snippet execution environment components: Execute custom code logic, such as counting clicks and conversion rates for recommended products, to analyze recommendation effectiveness. Code can be written to record user clicks on recommended products and calculate the ratio of clicks to recommendations to assess recommendation effectiveness.
[0084] S103: Determine the dependency relationship between target components based on the execution link in each target component through the target execution engine.
[0085] In this embodiment, the target execution engine analyzes each target component based on the execution link in the target component. It traverses the "nextComponents" field of each target component to determine the dependencies between the target components. In this way, the target execution engine determines the complex dependencies between business components in the target workflow. For example, in a workflow that includes data extraction, data cleaning, data analysis, and data visualization, the data cleaning component needs to rely on the output of the data extraction component as input, and the data analysis component relies on the output of the data cleaning component. The target execution engine can clearly determine the dependencies between the target components by parsing the execution links of each business component.
[0086] In this embodiment, the execution links of each target component may be parsed according to a pre-set operating procedure corresponding to the target requirement, that is, a standard operating procedure (SOP), to determine the dependency relationship between the target components.
[0087] In this embodiment, as an example, if the target files are business component 1, business component 2, business component 3, business component 4 and business component 5.
[0088] The next business component to be executed in the execution chain of business component 1 is business component 3. The next business components to be executed in the execution chain of business component 3 are business components 2 and 5. The next business component to be executed in the execution chain of business component 2 is business component 4. The next business component to be executed in the execution chain of business component 5 is business component 4. The dependency relationship between target components is the execution order between target components. The dependency relationship between target components can be constructed using a linked list structure.
[0089] S104: Construct a target workflow according to the dependency relationship between target components, and set the triggering condition and priority corresponding to each target component.
[0090] In this embodiment, the target execution engine constructs a target workflow based on the dependencies between target components. When constructing the target workflow, the user sets the trigger conditions and priorities corresponding to each target component. By integrating the functions of the target components, the target workflow can form an intelligent agent that meets the target requirements (with specific functions).
[0091] In this embodiment, the target workflow includes at least one standard workflow. A standard workflow is a coherent and unique component execution chain that begins with the starting business component and continues sequentially, following the order of subsequent execution components specified in each business component execution chain, until it reaches the final business component. Within this chain, the execution of each business component depends on the completion of the preceding component, and there are no branches or loops in the chain (within the scope of a standard workflow).
[0092] In this embodiment, the target workflow can be constructed based on the visual arrangement tool. The execution link of the target workflow constructed based on the above example is as follows: Figure 3 As shown, the target workflow includes two standard workflows.
[0093] In this embodiment, while the target execution engine determines the dependencies between target components based on the execution links in each target component, it also loads the initialization resources of each target component. Generally, each business component has some dependent resources that need to be initialized. For example, the AI dialogue component needs to initialize the calling parameters and secret keys related to the large model.
[0094] Users can complete the SOP of a certain transaction by combining different business components. In essence, the dependency transfer relationship between business components is constructed through a linked list structure, and each business component is executed in sequence according to the linked list structure to complete the SOP.
[0095] S105: Scheduling and executing the target workflow according to the triggering conditions and priorities corresponding to each target component.
[0096] In this embodiment, the target execution engine schedules and executes the target workflow according to the triggering conditions and priorities corresponding to each target component.
[0097] In this embodiment, since the metadata structure of the business components is unified, each business component can be executed and scheduled through the unified structure. Specifically, input parameters can be input into the business component and output parameters can be output from the business component through a unified interface.
[0098] The unified interface is defined as follows:
[0099] JSON
[0100] OuputMetadata runner(InputMetadata);
[0101] Each business component implements its specific capabilities through a unified interface. The InputMetadata interface provides input parameters to the business component, and upon completion, the business component outputs the resulting data through the OutputMetadata interface. Regardless of the function or type of the business component, this interface enables standardized processing of input and output data, ensuring operational consistency and compatibility.
[0102] In this embodiment, the scheduling and execution of business components is driven by rules (trigger conditions and priorities). Users can specify the trigger conditions and priorities for each business component when designing a workflow. The target execution engine then uses these rules to determine when to call each business component, implementing a priority queuing mechanism to ensure that critical, high-priority business components are processed promptly.
[0103] In addition, business components are scheduled and executed according to the trigger conditions and priorities corresponding to each target component. Each business component runs according to its own trigger conditions and priorities, and there is no direct interference with each other's operating status, which effectively isolates each business component. Each business component runs in an isolated and secure environment to prevent interference or conflicts between different business components.
[0104] When designing a workflow, users can specify trigger conditions for each business component based on actual business needs. These trigger conditions can be time conditions (such as specific time points or time intervals), data conditions (such as input data meeting a specific format or threshold), or other logical conditions. When these trigger conditions are met, the target execution engine will determine the appropriate business component to call based on pre-defined rules. For example, in an e-commerce order processing workflow, when order data arrives and the order amount exceeds a specific value (trigger condition), the target execution engine will call the dedicated high-value order processing component 1 for subsequent processing.
[0105] Users set priorities for each business component, and the target execution engine determines the order in which business components are called based on these priorities, ensuring that high-priority business components are processed first. For example, in a customer service workflow that includes both a general user consultation processing component and a VIP user consultation processing component, the target execution engine will prioritize calling the VIP user consultation processing component when a VIP user consultation event occurs, as the VIP user consultation processing component has a higher priority. This ensures that VIP users receive timely service and improves the user experience.
[0106] S106: During the execution of the target workflow, relevant execution information of each target component is obtained, and the relevant execution information of each target component is written into a corresponding message channel.
[0107] In this embodiment, the target execution engine obtains relevant execution information of each target component during the execution of the target workflow, and writes the relevant execution information of each target component into the corresponding message channel.
[0108] In this embodiment, for example, in a workflow that includes a data extraction component and a data analysis component, after the data extraction component is executed, its output data (extracted data) and related context information (such as the data source, etc.) will be intercepted and obtained, and then written to the corresponding message channel. The message channel can be understood as a "virtual pipeline" or mechanism for data transmission and storage. It is similar to a data transfer station, where the relevant execution information generated by different components is sent. The message channel can achieve data decoupling between different business components, separating the execution scheduling logic of the business components from the data processing logic. Different message channels can correspond to different data consumption scenarios, such as the persistence of component input parameters and processing results (output parameters), the linkage processing of upstream and downstream business modules, and the unified protocol conversion processing and consumption of message formats. For example, the message channel used for component data persistence is specifically responsible for receiving and storing the component's input and output data, facilitating subsequent query and analysis. The message channel used for the linkage of upstream and downstream business modules will promptly transmit the output data of the upstream component to the downstream component, triggering the execution of the downstream component.
[0109] In this embodiment, during the execution of the target workflow, the relevant execution information of each target component is obtained through aspect-oriented programming and written to the corresponding message channel using message queue technology. The relevant execution information includes input data, output data, and context information.
[0110] In this embodiment, during the execution of the target workflow, the interceptor mechanism based on aspect-oriented programming intercepts the relevant execution information of each target component, thereby obtaining the relevant execution information of each target component, and then uses message queue technology to write the relevant execution information of each target component into the corresponding message channel.
[0111] As an example, during the execution of the target workflow, each business component can be monitored and its input and output can be subscribed to, so that different data can be consumed on different message channels. Specifically, through aspect-oriented programming (a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns), the business component's input data, output data, and context information are intercepted during execution to obtain its output data. The business component's output data is then placed into the message channel using a message queue. This allows the business component's execution scheduling logic to be decoupled from the component's own execution when it is necessary to subscribe to component data for specific processing scenarios. Common subscription scenarios include: persistence of component input and output data, linkage processing of upstream and downstream business modules, and unified protocol conversion processing and consumption of message formats.
[0112] In an optional embodiment, the workflow-based agent implementation method further includes:
[0113] Define an application programming interface framework to allow external parties to write code for new business components based on metadata structure standards and build actuator interfaces.
[0114] In this embodiment, the executor interface is a runner interface, which can be called by the target execution engine to integrate the new business component into the target execution engine.
[0115] In this embodiment, considering the diversity of application scenarios, the present invention particularly emphasizes the ability to be open to third-party developers. A clear application programming interface framework is provided, allowing outsiders to use a unified metadata structure standard to define the paradigm and provide code to implement the runner interface to develop new business components and seamlessly integrate them into the existing platform. New business components only need to comply with established technical specifications to automatically obtain the same scheduling, execution, monitoring and other services as other built-in components. For example, if the internal business system of an enterprise is combined with an AI agent to realize a smart office scene, it is necessary to open up the API between the systems. The ability of custom extension components can be used to encapsulate some common enterprise HTTP protocol APIs into custom components, such as conference booking API interfaces, leave API interfaces, enterprise knowledge base interfaces, etc. In this way, the enterprise can give these existing internal capabilities to the agent for calling, thereby realizing a smart office scene.
[0116] To help external developers more efficiently develop new business components, we provide a comprehensive and detailed set of development documentation and sample code. The development documentation details the meaning and usage of each field in the metadata structure standard, as well as the specific implementation requirements and precautions for the executor interface. The sample code, based on common business scenarios, demonstrates how to write new business component code according to the standard. From building the component's basic framework to implementing core functionality and integrating it with existing systems, this provides developers with a clear reference.
[0117] The application programming interface framework includes: established technical specifications can also include the input and output parameter formats used, calling methods, data transmission protocols, etc.
[0118] Established technical specifications may include:
[0119] Metadata structure standards: The metadata of new business components must conform to this standard to ensure that business components from different sources and technology stacks can work seamlessly together on the same platform / system.
[0120] Interface definition specifications: When implementing the runner interface, you must write it according to the established interface definition OutputMetadatarunner(InputMetadata). This interface specifies how business components input and output data. InputMetadata is used to input parameters to the business component. After the business component executes, it outputs the execution data through OutputMetadata.
[0121] Coding standards: code structure, comment requirements, function naming rules, etc., to ensure the readability, maintainability and compatibility of the code.
[0122] In an optional embodiment, the workflow-based agent implementation method further includes: acquiring a historical workflow according to target requirements, and determining the historical workflow as the target workflow.
[0123] In this embodiment, some business components can be defined through a unified metadata structure standard. The user selects the required business components to form a workflow. Business components are called in a rule-based and event-driven manner and executed in sequence. This declarative data structure allows for the inclusion of some commonly used, entry-level configuration templates for user reference. In addition, when building a workflow, the user can also export historical workflows (for example, export them as JSON Schema files) and import and reuse them to improve construction efficiency.
[0124] The technical solution of the present invention is described below with specific application scenarios:
[0125] The technical solution of the present invention is applied to the operation process of smart e-commerce:
[0126] Application scenario description: In the daily operation of e-commerce platforms, it is necessary to handle a large amount of tasks such as product information management, user behavior analysis, and marketing activity planning, involving the multi-link collaboration of intelligent and non-intelligent services.
[0127] Business component selection and workflow construction: Utilize the AI classification and AI content extraction components in the AI capability component to process images and descriptions of newly listed products, automatically extract key information and classify it to facilitate subsequent retrieval and recommendation.
[0128] The database access API in the general capability component is used to obtain basic data such as product inventory and price. The HTTP request initiator is used to call the external logistics interface to obtain product logistics information.
[0129] The control component's conditional judgment function is used to determine whether the product inventory is below the warning value. If so, the replenishment process is triggered. The loop function can be used to iterate over all products and perform regular price updates.
[0130] Dependencies are determined based on the execution links of each business component, and workflows are constructed. For example, product information is first processed by the AI component, then the processed data is integrated with inventory and price data in the database. Finally, conditional judgments are made based on inventory status to trigger corresponding actions. Trigger conditions and priorities are also set for each business component. For example, when a new product is launched, product information entry and classification processes are prioritized.
[0131] Execution and Information Processing: The target execution engine executes workflows based on pre-defined trigger conditions and priorities. During execution, it utilizes aspect-oriented programming and message queues to obtain input and output data from each business component, as well as contextual information such as AI classification results and database access records, and writes this information to the corresponding message channels. This information can be used for business monitoring, such as real-time monitoring of product processing progress and inventory status, as well as subsequent data analysis and process optimization.
[0132] This paper proposes an AI Agent execution engine (target execution engine) based on standardized metadata and componentized architecture. By building a modular and scalable workflow-based agent implementation platform, it effectively addresses the technical bottlenecks of traditional development models in AI capability integration and complex process orchestration. Its core innovations are reflected in three aspects:
[0133] First, standardized capability abstraction and dynamic orchestration mechanisms: By defining a unified metadata structure standard encompassing input and output parameters and execution links (nextComponents), this standardizes the encapsulation of AI capabilities (such as AIGC and multimodal processing), basic services (such as database access and HTTP calls), and logical control (conditional branches and loops). Combined with custom template syntax (variable injection, function processing, and command invocation), business components are equipped with dynamic parameter processing capabilities, enabling complex data flows and contextual linkage without coding, significantly lowering the barrier to entry for building multi-step AI workflows.
[0134] Second, a decoupled execution architecture and full-link controllability: Based on the integrated design of the interceptor mechanism and message queue based on aspect-oriented programming, real-time monitoring and asynchronous distribution of component input and output data are achieved, ensuring the observability of the execution process. Through an isolated sandbox environment, priority scheduling rules, and event-driven strategies, while ensuring system stability in high-concurrency scenarios, it supports resource preemption and exception circuit breaking for key components, providing infrastructure support for cross-component Service-Level Agreements (SLAs).
[0135] Third, open ecosystem expansion capabilities: Relying on unified interface definition specifications and metadata structure standards, third-party developers can quickly access heterogeneous capability components and achieve seamless collaboration with native components through an automated registration mechanism. This design not only shortens the launch cycle of new features, but also, through the continuous contributions of the developer community, forms an ecosystem of "core engine + vertical field plug-ins", enabling the system to quickly adapt to cross-industry scenarios (such as intelligent customer service, automated research report generation, and industrial quality inspection process optimization).
[0136] Compared to traditional technologies, this target execution engine leverages metadata-driven, low-code configuration, and non-intrusive scalability to enable enterprises to scale AI capabilities while reducing technical debt. Future developments will further promote the widespread adoption of AI workflow technology across the industry through the continued optimization of the open source component market and visual orchestration tools.
[0137] It should be noted that any information not described in detail in this specification is well-known to those skilled in the art. It should also be understood that the data acquired in the embodiments of the present invention, such as the execution information related to each target component, is acquired, collected, stored, used, transmitted, provided, and presented with authorization, in compliance with relevant laws and regulations, without infringing on the privacy of others or violating public order and good morals.
[0138] In the present embodiment, a workflow-based agent implementation platform is also provided. A single platform is used to implement the above-mentioned embodiments and optional implementation methods. Those already described will not be repeated here. As used below, the term "module" may implement a combination of software and / or hardware for a predetermined function. Although the platform described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0139] Figure 4 It is a structural diagram of a workflow-based intelligent agent implementation platform according to an embodiment of the present invention.
[0140] The present invention provides a workflow-based intelligent agent implementation platform, such as Figure 4 As shown, the workflow-based agent implementation platform includes:
[0141] The first processing module 11 is configured to construct multiple business components based on business scenarios and predefined unified metadata structure standards to build a target execution engine. The metadata structure standards include an execution chain. The execution chain includes the business components to be executed after the current business component executes. Business scenarios include scenarios that utilize artificial intelligence technology to provide intelligent services and scenarios that provide non-intelligent services.
[0142] The second processing module 12 is configured to select at least one target component from a plurality of business components according to target requirements.
[0143] The target execution engine determines the dependencies between target components based on the execution links in each target component.
[0144] Build target workflows based on the dependencies between target components, and set trigger conditions and priorities for each target component.
[0145] The third processing module 13 is configured to schedule and execute the target workflow according to the triggering conditions and priorities corresponding to each target component.
[0146] The fourth processing module 14 is configured to obtain relevant execution information of each target component during the execution of the target workflow, and write the relevant execution information of each target component into a corresponding message channel.
[0147] In an optional embodiment, the fourth processing module 14 is specifically used to obtain relevant execution information of each target component through aspect-oriented programming during the execution of the target workflow, and write the relevant execution information of each target component into the corresponding message channel using message queue technology.
[0148] In an optional implementation, the metadata structure standard further includes an identifier of a business component, a component name, an input parameter set, and an output parameter set.
[0149] In an optional embodiment, the workflow-based intelligent agent implementation platform further includes: a calling module, which is used to call the value of each input parameter in the input parameter set according to the custom template during the execution of the target workflow.
[0150] In an optional embodiment, the workflow-based intelligent agent implementation platform further includes: a definition module for defining an application programming interface framework to allow external personnel to write code for new business components according to metadata structure standards and construct an executor interface.
[0151] In an optional implementation, the relevant execution information includes: input data, output data, and context information.
[0152] In an optional embodiment, the workflow-based agent implementation platform further includes: a history acquisition module, configured to acquire historical workflows according to target requirements and determine the historical workflows as target workflows.
[0153] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0154] The workflow-based intelligent agent implementation platform in this embodiment is presented in the form of functional units, where the units refer to application-specific integrated circuits (ASICs), processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0155] The present invention also provides a computer device. Figure 5 , Figure 5 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present invention. Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In an optional embodiment, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor device). Figure 5A processor 10 is taken as an example.
[0156] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0157] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0158] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating device, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In an optional embodiment, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0159] The memory 20 may include volatile memory, such as random access memory. The memory may also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive. The memory 20 may also include a combination of the above types of memory.
[0160] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0161] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or downloaded through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc. Further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0162] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A workflow-based agent implementation method, characterized in that: include: Build multiple business components based on business scenarios and pre-defined unified metadata structure standards to build the target execution engine; The metadata structure standard includes: an execution link; the execution link includes: a business component to be executed subsequently after the current business component is executed; the business scenario includes a scenario of providing intelligent services using artificial intelligence technology and a scenario of providing non-intelligent services; Selecting at least one target component from the plurality of business components according to target requirements; Determining, by the target execution engine, dependencies between target components based on execution links in each target component; Build target workflows based on the dependencies between target components, and set trigger conditions and priorities for each target component. Scheduling and executing the target workflow according to the trigger conditions and priorities corresponding to each target component; During the execution of the target workflow, relevant execution information of each target component is obtained, and the relevant execution information of each target component is written into the corresponding message channel.
2. The method according to claim 1, characterized in that During the execution of the target workflow, obtaining relevant execution information of each target component and writing the relevant execution information of each target component into a corresponding message channel includes: During the execution of the target workflow, the relevant execution information of each target component is obtained through aspect-oriented programming, and the relevant execution information of each target component is written into the corresponding message channel using message queue technology.
3. The method according to claim 1, characterized in that The metadata structure standard also includes the business component identifier, component name, input parameter set, and output parameter set.
4. The method according to claim 3, characterized in that The method further includes: during execution of the target workflow, calling the value of each input parameter in the input parameter set according to a custom template.
5. The method according to claim 1, wherein The method further includes: defining an application programming interface framework to allow external personnel to write codes for new business components according to the metadata structure standard and to construct an executor interface.
6. The method according to claim 1, characterized in that The relevant execution information includes: input data, output data and context information.
7. The method according to claim 1, characterized in that The method further includes: acquiring a historical workflow according to target requirements; and determining the historical workflow as a target workflow.
8. A workflow-based agent implementation platform, characterized in that: include: A first processing module is used to construct multiple business components according to business scenarios and predefined unified metadata structure standards to build a target execution engine; The metadata structure standard includes: an execution link; the execution link includes: a business component to be executed subsequently after the current business component is executed; the business scenario includes a scenario of providing intelligent services using artificial intelligence technology and a scenario of providing non-intelligent services; A second processing module, configured to select at least one target component from the plurality of business components according to target requirements; Determining, by the target execution engine, dependencies between target components based on execution links in each target component; Build target workflows based on the dependencies between target components, and set trigger conditions and priorities for each target component. A third processing module is used to schedule and execute the target workflow according to the trigger conditions and priorities corresponding to each target component; The fourth processing module is used to obtain relevant execution information of each target component during the execution of the target workflow, and write the relevant execution information of each target component into the corresponding message channel.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the workflow-based agent implementation method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the workflow-based agent implementation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Workflow processing method and device, intelligent workstation and electronic equipment
CN112202899A
Workflow engine and RPA fused arrangement method and system
CN114757592A
Machine learning method and device based on assembly line, electronic equipment and storage medium
CN115904359A
Task execution method and related device, equipment, storage medium and agent platform
CN118689563A
Business scene arrangement platform construction method and device based on standard component, equipment and storage medium
CN120010831A
Cited By
Generative agent system with long and short term memory mechanism and implementation method thereof
CN121303186A
Model context protocol service scheduling method and system and storage medium
CN121309678A
