Workflow automatic generation method

Through the workflow automation generation method of natural language input, the large language model agent automatically selects and configures functional nodes, which solves the problems of complex user configuration and insufficient intelligence in the existing technology, and improves the ease of use of workflow generation and Efficiency improves user experience.

CN119179473APending Publication Date: 2024-12-24PEKING UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410993679.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing workflow generation methods have high requirements for users, requiring manual configuration by users, cumbersome operations, poor user experience, and lack intelligent decision-making and automatic optimization capabilities.

Method used

By obtaining the natural language requirement statements entered by the user, the functional nodes are automatically selected and configured from the preset node library to generate a target workflow, and the agent of the large language model is used to search, assemble and optimize the functional nodes, reducing the user's creation of the workflow and labor costs in configuration.

Benefits of technology

It improves the ease of use and intelligence of workflow automation, reduces the labor costs of users in workflow creation and configuration, improves automation efficiency and accuracy, is suitable for a variety of business scenarios, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179473A_ABST
    Figure CN119179473A_ABST
Patent Text Reader

Abstract

The invention discloses a workflow automatic generation method, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining a target demand statement input by a user; retrieving a preset node library according to the target demand statement to obtain a target function node; and assembling the target function node to obtain a target workflow. According to the method, the target demand statement which is input by the user through the natural language and describes the business demand is obtained, the corresponding target function node is automatically selected and configured from the preset node library, and the target workflow is generated. According to the method and the device, the labor cost of a user in workflow creation and configuration is reduced, the automation efficiency and accuracy are improved, the method and the device are suitable for various business scenes, the defects of usability and intelligence in the prior art are overcome, a more efficient and convenient workflow automation solution is provided for the user, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for automatically generating a workflow. Background Art

[0002] Workflow refers to an automated business process that uses computers to automatically transfer documents, information or tasks between multiple participants according to predetermined rules to achieve a certain business goal. It is an abstract description of the workflow and the business rules between its various operation steps, and is part of collaborative work in computers.

[0003] Workflow automation refers to the use of technology and software to simplify and automate repetitive tasks in business processes. It triggers, executes, and manages tasks through predefined business rules and logic, thereby reducing manual intervention and improving efficiency and accuracy. Existing workflow automation tools include N8N, Zapier, etc., which allow users to create workflows by dragging and dropping and configuring. These platforms provide a wealth of functional nodes and integrations, but users need to have a certain technical background and logical thinking ability to correctly configure and connect these functional nodes. Therefore, the existing workflow generation methods have high requirements for users, require users to manually configure, and the operation is cumbersome, resulting in poor user experience.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a workflow automation generation method, aiming to solve the technical problems that the existing workflow generation method has high requirements on users, requires manual configuration by users, has cumbersome operations, and has poor user experience.

[0006] To achieve the above objectives, the present application proposes a workflow automation generation method, which includes:

[0007] Obtain the target requirement statement input by the user;

[0008] Searching a preset node library according to the target requirement statement to obtain a target functional node;

[0009] The target functional nodes are assembled to obtain a target workflow.

[0010] In one embodiment, each functional node included in the preset node library is an operation unit including input parameters and output parameters;

[0011] Each of the functional nodes corresponds to a service function.

[0012] In one embodiment, the step of searching a preset node library according to the target requirement statement to obtain a target functional node includes:

[0013] Get the target retrieval mode;

[0014] The preset node library is searched according to the target search mode and the target requirement statement to obtain the target function node.

[0015] In one embodiment, the step of searching a preset node library according to the target search mode and the target requirement statement to obtain a target function node includes:

[0016] When the target retrieval mode is a search mode, parsing the target requirement statement to obtain a target semantic vector;

[0017] A preset vector search is performed on a preset node library according to the target semantic vector to obtain a target functional node.

[0018] In one embodiment, the step of searching the preset node library according to the target search mode and the target requirement statement to obtain the target function node further includes:

[0019] When the target retrieval mode is a query mode, the target requirement statement is parsed to obtain a target query condition;

[0020] According to the target query condition, function nodes are matched to the preset node library to obtain the target function node.

[0021] In one embodiment, the step of assembling the target function nodes to obtain the target workflow includes:

[0022] Obtaining target input parameters and target output parameters corresponding to the target function node;

[0023] Determine an initial function node in the target function nodes according to the target requirement statement and the target input parameter;

[0024] Determine the target function node sequence by the target input parameter and the target output parameter;

[0025] A target workflow is determined based on the initial function node and the target function node sequence.

[0026] In one embodiment, after assembling the target function nodes to obtain the target workflow, the method further includes:

[0027] Obtaining user feedback information on the target workflow;

[0028] The target workflow is updated according to the feedback information.

[0029] In addition, to achieve the above purpose, the present application also proposes a workflow automation generation device, which includes:

[0030] A data acquisition module is used to obtain the target requirement statement input by the user;

[0031] A node search module, used to search a preset node library according to the target requirement statement to obtain a target function node;

[0032] The function node assembly module is used to assemble the target function nodes to obtain the target workflow.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a workflow automation generation device, which includes: a memory, a processor, and a workflow automation generation program stored in the memory and executable on the processor, wherein the workflow automation generation program is configured to implement the steps of the workflow automation generation method as described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a storage medium on which a workflow automation generation program is stored. When the workflow automation generation program is executed by a processor, the steps of the workflow automation generation method as described above are implemented.

[0035] The present application discloses a method for automatically generating a workflow, which includes: obtaining a target requirement statement input by a user; searching a preset node library according to the target requirement statement to obtain a target function node; assembling the target function nodes to obtain a target workflow. The present application obtains a target requirement statement that a user inputs in natural language to describe their business needs, automatically selects and configures corresponding target function nodes from a preset node library, and generates a target workflow. The present application reduces the user's labor cost in workflow creation and configuration, improves automation efficiency and accuracy, is applicable to a variety of business scenarios, and solves the shortcomings of the prior art in terms of ease of use and intelligence, providing users with a more efficient and convenient workflow automation solution and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0038] Figure 1 A first flow chart provided for the first embodiment of the method for automatically generating a workflow in the present application;

[0039] Figure 2 A second flow chart provided for the first embodiment of the method for automatically generating a workflow in this application;

[0040] Figure 3 This is a process diagram of the first embodiment of the workflow automation generation method of the present application;

[0041] Figure 4 A first flow chart provided for the second embodiment of the method for automatically generating a workflow in the present application;

[0042] Figure 5 A second flow chart provided for the second embodiment of the method for automatically generating a workflow in the present application;

[0043] Figure 6 A third flow chart provided for the second embodiment of the method for automatically generating a workflow in this application;

[0044] Figure 7 A schematic diagram of a node retrieval process provided for the second embodiment of the workflow automation generation method of the present application;

[0045] Figure 8 This is a schematic diagram of the module structure of the workflow automation generation device according to an embodiment of the present application;

[0046] Fig. 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the workflow automation generation method in the embodiment of the present application.

[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The main solution of this application is: obtaining the target requirement statement input by the user; searching the preset node library according to the target requirement statement to obtain the target function node; assembling the target function node to obtain the target workflow.

[0051] At present, the existing workflow automation methods still have the following problems:

[0052] (1) High threshold: Although existing tools provide graphical interfaces, users still need to have certain technical knowledge to use these tools efficiently. Users need to spend a lot of time and energy to learn how to use these platforms and manually configure each workflow function node.

[0053] (2) Manual configuration is cumbersome: Users need to manually select and configure each functional node, which is a complex and error-prone process.

[0054] (3) Lack of intelligence: Existing tools are mostly static configurations and lack intelligent decision-making and automatic optimization capabilities.

[0055] Compared with the existing technology, this application automatically selects and configures the corresponding target function nodes from the preset node library to generate the target workflow by using natural language to input the target requirement statement of the user's business needs. This application reduces the labor cost of users in workflow creation and configuration, improves automation efficiency and accuracy, is applicable to a variety of business scenarios, solves the shortcomings of the existing technology in terms of ease of use and intelligence, and provides users with a more efficient and convenient workflow automation solution to improve user experience.

[0056] It should be noted that the execution subject of this embodiment can be a workflow automation generation system, or a computing service device with data processing, network communication and program running functions and pre-equipped with a React Agent (intelligent agent), such as a tablet computer, a personal computer, a mobile phone, etc., or a workflow automation generation device that can achieve the above functions, etc. This embodiment does not specifically limit this. The following takes the workflow automation generation device (referred to as the generation device) as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0057] It should be understood that Agent is a core concept of artificial intelligence. It can autonomously perceive information in its environment and make decisions based on this information to achieve specific goals or tasks. The above-mentioned React Agent can be an LLM-based Agent, that is, an intelligent agent based on a large language model (LLM, Large Language Model). An intelligent agent based on a large language model can be an intelligent agent with a large language model as its technical basis and built-in modules such as perception, memory, planning, and action (tool call). In this application, the above-mentioned React Agent can be an existing intelligent agent based on a large language model. React Agent iterates through large model reasoning-action-observation until the task is completed. The subsequent part of this article refers to the optimized intelligent agent as React Agent.

[0058] Based on this, the present application embodiment provides a method for automatically generating a workflow, referring to Figure 1 , Figure 1 This is a first flow chart of the first embodiment of the workflow automation generation method of the present application.

[0059] In this embodiment, the workflow automation generation method includes steps S10 to S30:

[0060] Step S10, obtaining a target requirement statement input by a user;

[0061] It should be noted that this embodiment can preferably use large language models such as GPT-4 and GPT-3.5 that support function calls as the large model configuration of the optimization agent, and design and implement a specific mechanism for automatic workflow generation based on the optimization agent.

[0062] It is understandable that in this application, the generation device can understand the user's intention and analyze the needs by obtaining the target demand statement in natural language format input by the user. The target demand statement input by the user may include the expected function description, restrictions, own needs and workflow expectations, etc. At this time, the optimization agent in the generation device has a deep understanding of these needs through multiple rounds of dialogue with the user to ensure a comprehensive understanding of the user's intention, so that the subsequent generation device can combine the existing functional nodes and finally generate a feasible workflow construction plan, including the functional nodes that may be used, the overall workflow, etc.

[0063] Step S20, searching a preset node library according to the target requirement statement to obtain a target functional node;

[0064] It is understandable that the existing function nodes in the generation device can be pre-loaded in the above-mentioned preset node library. The generation device communicates with the user through multiple rounds of dialogue that supports function node retrieval, and after collecting the user's ideas on the expected workflow, the optimization agent in the generation device can retrieve and obtain relevant function nodes from the preset node library to form the above-mentioned target function node. The target function node matches the target workflow that realizes the user's expectations, and then the target workflow can be automatically generated based on the target function node.

[0065] Specifically, in this embodiment, the generating device optimizes the intelligent agent to gradually refine the user's needs through multiple rounds of dialogue with the user, and can solve possible vague descriptions or unclear places by actively asking questions. Then the generating device retrieves the function nodes during the multiple rounds of dialogue, and the user instructions, workflow construction plan, and retrieved available node information (including function node name, input and output format description, function node function description) will be used as input prompts for the optimizing intelligent agent. The optimizing intelligent agent can integrate the user's intentions with the node information of the workflow platform to generate a feasible workflow construction plan.

[0066] It is important to understand that when the optimization agent performs workflow construction tasks, it involves functions such as function node retrieval, function node configuration, workflow orchestration, and seeking manual feedback. These actions will be provided to the large language model in the form of tools, and the optimization agent will self-reason, make decisions, and choose to call tools until the workflow construction task is completed. Different actions can be called by the large language model through function call, and all behaviors are autonomously controlled by the optimization agent.

[0067] In a feasible implementation manner, in this embodiment, each functional node included in the preset node library is an operation unit including input parameters and output parameters;

[0068] Each of the functional nodes corresponds to a service function.

[0069] It is easy to understand that in this embodiment, each function node represents an operation unit, corresponding to a specific business function or software service. In order to achieve data standardization, in this embodiment, each function node can describe its input and output parameters in JSON format, and the input parameters and output parameters of each function node can be stored in the form of key-value pairs to ensure a unified data format for easy parsing and operation.

[0070] It is understandable that, in order to achieve standardization of control flow, in this embodiment, a function node can be represented as a Python function with defined input and output formats at an abstract level. In specific implementation, this embodiment can be encapsulated through the defnode_library_locator(tool_name) function, which is responsible for managing all function nodes on the workflow automation platform.

[0071] It should be understood that in the process of building the target workflow based on the retrieved target functional nodes, it may be encountered that the requirements cannot be met using the retrieved target functional nodes. At this time, the optimization agent may retrieve the functional nodes multiple times, thereby simulating the behavior of humans looking for suitable functional nodes in the process of assembling workflows.

[0072] Once suitable function nodes are retrieved, the optimization agent will configure these function nodes. The configuration process includes setting the input and output parameters of the function nodes so that each function node can be quickly obtained through function calls later. In the specific implementation, the optimization agent in the generation device can call the function node configuration tool, define the function logic of the function node, etc., generate the input and output parameters of the function node through the large language model, and write the function logic of the function node.

[0073] Exemplarily, this embodiment uses the function node of sending an email to illustrate the abstract modeling of the function node definition and configuration.

[0074] Assume that the input parameters of a function node for sending emails can be expressed as:

[0075] {

[0076] "email_sender":"input_value1";

[0077] "email_receiver":"input_value2";

[0078] "email_content":"input_value3";

[0079] }

[0080] The corresponding output parameters may be expressed as:

[0081] {

[0082] "email_status":"output_value1";

[0083] }

[0084] Then the definition of the function node can be expressed as:

[0085] {

[0086] import node_library_locator;

[0087] def send_email(**input_params):

[0088]

[0089] The configuration of the function node can be expressed as the parameter configuration of the function, which can be configured as follows:

[0090]

[0091] Therefore, when the generating device needs to call the function node function send_email corresponding to the function node, it can be expressed as follows:

[0092]

[0093] Step S30, assembling the target functional nodes to obtain a target workflow.

[0094] It is understandable that in this embodiment, a workflow may be composed of multiple function nodes, each of which performs a specific operation and transfers data between function nodes. The input parameters of the workflow may also be defined by a JSON structure, and the business logic may be implemented by sequential or parallel calls of each function node. In this embodiment, the generation device may describe the control flow by Python code to implement the logical control of the workflow.

[0095] In one possible implementation, refer to Figure 2 , Figure 2 This is a second flow chart of the first embodiment of the workflow automation generation method of the present application. In this embodiment, step S30 may include steps A1 to A4:

[0096] Step A1, obtaining target input parameters and target output parameters corresponding to the target function node;

[0097] Step A2, determining an initial function node in the target function nodes according to the target requirement statement and the target input parameter;

[0098] Step A3, determining the target function node sequence according to the target input parameter and the target output parameter;

[0099] Step A4: determining a target workflow based on the sequence of the initial function node and the target function node.

[0100] It is understandable that after the target function node is configured, the optimization agent begins to orchestrate the workflow. This step includes connecting each function node according to a specific business logic and process sequence to ensure that data can be correctly transferred between function nodes and that the control flow can be executed as expected. Specifically, after obtaining the target input parameters and target output parameters corresponding to each target function node, the generating device can traverse and select the input parameters that best match the target requirement statement, and use the function node corresponding to the matching input parameter as the initial function node.

[0101] In addition, each function node in the target workflow is executed in sequence or in parallel, and the output parameter of the previous function node must be able to be used as the input of the next function node. Therefore, in this embodiment, the target function node sequence can be determined by the target input parameter and the target output parameter, and finally the target workflow is determined based on the sequence of the initial function node and the target function node.

[0102] It should be noted that the above-mentioned workflow automation generation process is essentially code generation, overwriting the mainWorkflow function. That is, in this embodiment, after calling the workflow arrangement tool, the optimization agent overwrites the mainworkflow through code generation, thereby realizing the arrangement of the workflow.

[0103] For example, the following can represent a simple workflow after abstract modeling:

[0104] {

[0105] def mainWorkflow():

[0106]

[0107] In a feasible implementation manner, in this embodiment, after step S40, the workflow automation generation method further includes steps S50 to S60:

[0108] Step S50, obtaining user feedback information on the target workflow;

[0109] Step S60: updating the target workflow according to the feedback information.

[0110] It is understandable that after the workflow is orchestrated, the generating device can automatically execute the generated python code to implement the workflow test. The optimization agent will collect the output results or error information of the program and further iterate the configuration of the functional nodes and the workflow orchestration. Specifically, the optimization agent will locate the potential error location based on the feedback, re-call the functional node configuration tool, reconfigure the functional node, or call the workflow orchestration tool to rewrite the mainworkflow.

[0111] During the workflow construction process, the optimization agent may encounter uncertain situations or require further confirmation from the user. At this time, the optimization agent can implement human feedback during the workflow construction process by calling the "seek human feedback" tool to ensure that the constructed workflow fully meets the user's needs and expectations. Therefore, in this embodiment, the generation device can obtain user feedback information on the target workflow and update the target workflow based on the feedback information. User feedback will help the optimization agent adjust and optimize the workflow configuration and solve potential problems.

[0112] In this embodiment, the overall technical principle is as follows Figure 3 As shown, Figure 3 This is a process diagram of the first embodiment of the workflow automation generation method of the present application, such as Figure 3 As shown, the generation device can be loaded with an optimization agent, and the user can input the target requirement statement describing his business requirements into the optimization agent in the form of instructions. The optimization agent parses these inputs and understands the user's intention through multiple rounds of dialogue with the user, and retrieves nodes from the preset node library based on the results of the user's demand analysis, automatically selects and configures the corresponding node (i.e., the above-mentioned target function node) based on the retrieved information, and then automatically assembles and tests the workflow based on the target function node. Figure 3 As shown in the abstract modeling of the workflow in , the generating device can assemble the Python code defined by the JSON structure according to the retrieved node information, and then automatically generate the inclusion conditions (such as Figure 3 Condition), perform actions (such as Figure 3 Action0~2 in ), loop (such as Figure 3 Loop in), branches (such as Figure 3 Branch in) and no operation (such as Figure 3 In addition, production equipment can also seek user feedback for optimization based on test results. This process can be active seeking of user help or passive acquisition of user feedback.

[0113] Therefore, the workflow automation generation method proposed in this embodiment has the following advantages compared with the prior art:

[0114] (1) Natural language-driven workflow orchestration: Users can interact with the optimization agent through natural language, describe their needs, and the optimization agent automatically understands and generates the corresponding workflow.

[0115] (2) Intelligent configuration and optimization: The optimization agent based on the large language model can automatically select appropriate functional nodes and configure them, while optimizing the workflow to improve efficiency.

[0116] (3) Automated testing and optimization: The optimization agent can not only build workflows, but also automatically perform testing and a certain degree of optimization to ensure the correctness and efficiency of the workflow.

[0117] (4) User-friendliness: It greatly reduces the user threshold, allowing users without technical background to easily create and manage complex workflows.

[0118] Therefore, this embodiment significantly reduces the user's labor costs in workflow creation and configuration, improves automation efficiency and accuracy, is applicable to a variety of business scenarios, solves the shortcomings of existing technologies in terms of ease of use and intelligence, and provides users with a more efficient and convenient workflow automation solution.

[0119] The present embodiment discloses a method for automatically generating a workflow, which includes: obtaining a target requirement statement input by a user; searching a preset node library according to the target requirement statement to obtain a target function node; each function node contained in the preset node library is an operation unit including input parameters and output parameters; each function node corresponds to a business function. Obtain the target input parameter and target output parameter corresponding to the target function node; determine the initial function node in the target function node according to the target requirement statement and the target input parameter; determine the target function node sequence through the target input parameter and the target output parameter; determine the target workflow based on the initial function node and the target function node sequence. Obtain user feedback information on the target workflow; update the target workflow according to the feedback information. The present embodiment obtains the target requirement statement that the user inputs to describe its business requirements through natural language, automatically selects and configures the corresponding target function node from the preset node library, and generates the target workflow. The present embodiment reduces the labor cost of the user in workflow creation and configuration, improves automation efficiency and accuracy, is applicable to a variety of business scenarios, solves the shortcomings of the prior art in terms of ease of use and intelligence, provides users with a more efficient and convenient workflow automation solution, and improves user experience.

[0120] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those of the above-mentioned first embodiment can be referred to the above introduction and will not be repeated later.

[0121] It can be understood that this embodiment pre-builds a node retriever for retrieving relevant node information, including function node names, specific input and output requirements, and other information, based on natural language.

[0122] Reference Figure 4 , Figure 4 This is a first flow chart of the second embodiment of the workflow automation generation method of the present application. In this embodiment, step S20 may include steps A1 to A2:

[0123] Step A1, obtaining a target retrieval mode;

[0124] Step A2: searching a preset node library according to the target search mode and the target requirement statement to obtain a target function node.

[0125] It should be noted that, in this embodiment, the optimization agent in the generation device can use the node retriever to obtain relevant node information from the preset node library. The node retriever can provide detailed information such as functional node name, input and output requirements based on user descriptions and specific requirements, to help the optimization agent quickly find suitable functional nodes.

[0126] Since these functional nodes contain detailed information, such as the functional node name, input and output format description, functional description, etc. The retrieved node information will serve as the basis for workflow construction and provide a reference for subsequent functional node configuration and arrangement. In this embodiment, two types of node retrieval can be performed, corresponding to two different retrieval modes. Therefore, before searching through the node retriever, in this embodiment, the generating device must first determine the current corresponding retrieval mode, that is, the above-mentioned target retrieval mode, so that the preset node library can be searched according to the target retrieval mode and the target requirement statement to obtain the target functional node.

[0127] In a first possible implementation, refer to Figure 5 , Figure 5 This is a second flow chart of the second embodiment of the workflow automation generation method of the present application. In this embodiment, step A2 may include steps A21 to A22:

[0128] Step A21, when the target retrieval mode is a search mode, the target requirement statement is parsed to obtain a target semantic vector;

[0129] Step A22, performing a preset vector search on a preset node library according to the target semantic vector to obtain a target functional node.

[0130] It is easy to understand that in this embodiment, the node retriever can support two retrieval modes, namely search mode and query mode.

[0131] When the target retrieval mode is the search mode, the user can input the target requirement statement by natural language to describe the desired function node function. The node retriever can convert the user's natural language input into a vector representation, obtain the target semantic vector, and perform vector retrieval based on the target semantic vector in the preset node library.

[0132] Specifically, the process of the preset vector search may be that the node retriever calculates the similarity between the input description and the description corresponding to the input parameter of the function node, and the retriever can return the most matching node information and use the function node corresponding to the node information as the target function node. For example, if the user inputs "send email", the retriever will return the function node related to email sending and its detailed information.

[0133] It is understandable that the above-mentioned preset vector retrieval can be implemented in a variety of ways, and a dual-encoder BERT architecture can be used to align the natural language description of the API with the API document, or other general text embedding models can be used. The present invention uses OpenAI's text-embedding-ada-002 as the node retriever model. It is worth noting that the retrieval model can be implemented in a variety of ways, and this embodiment does not limit this.

[0134] In a second possible implementation, refer to Figure 6 , Figure 6 This is a third flow chart of the second embodiment of the workflow automation generation method of this application. In this embodiment, step A2 may include steps A21 to A22:

[0135] Step A23, when the target search mode is a query mode, the target requirement statement is parsed to obtain a target query condition;

[0136] Step A24, matching the function nodes of the preset node library according to the target query condition to obtain the target function node.

[0137] It should be understood that when the target retrieval mode is the query mode, the target requirement statement input by the user may include specific query conditions, such as the function node name, input and output parameter types, etc. Therefore, the node retriever can directly extract the target query conditions from the user's target requirement statement. The node retriever directly queries the preset node library according to the target query conditions and returns the node information that meets the requirements. For example, if the user enters the query condition "the function node name contains 'email', and the input parameter contains 'email_sender'", the node retriever can return all the node information that meets these conditions.

[0138] In summary, refer to Figure 7 , Figure 7This is a flow chart of the functional node retrieval process of the second embodiment of the workflow automation generation method of this application. In this embodiment, the node retriever can be used as an external auxiliary tool for the optimization agent, which can assist the optimization agent based on the large language model to automatically retrieve the retrieval questions in the target requirement statement input by the user, and understand and retrieve different node information according to different retrieval modes. When it is in search mode, the node retriever can perform vector retrieval, that is, first generate a semantic vector of the retrieval question, and then obtain a semantic vector that can match the node information in the preset node library, that is, the above-mentioned target semantic vector, and then match the corresponding node information. When it is in query mode, the node retriever can perform a database query. At this time, the node retriever can directly extract the query conditions according to the retrieval questions in the target requirement statement, and search the preset node library according to the node information in the query conditions to obtain the node information of the target functional node.

[0139] In this implementation, useful functional nodes can be quickly and automatically retrieved during the process of understanding user intent, building and testing workflows, thereby reducing the complexity of operating steps and user usage thresholds, thereby achieving efficient and accurate workflow automation and improving user experience.

[0140] Therefore, this embodiment has designed multiple powerful tools such as function node retrieval, function node configuration, workflow orchestration and testing, and seeking manual feedback in the workflow construction stage. By collaboratively empowering the optimization agent with multiple tools, it ensures that the workflow construction and optimization process is simple and efficient.

[0141] The present embodiment provides a method for automatically generating a workflow, which includes: obtaining a target retrieval mode; when the target retrieval mode is a search mode, parsing the target requirement statement to obtain a target semantic vector; performing a preset vector search on a preset node library according to the target semantic vector to obtain a target functional node. When the target retrieval mode is a query mode, parsing the target requirement statement to obtain a target query condition; matching functional nodes on the preset node library according to the target query condition to obtain a target functional node. The present embodiment can quickly and automatically retrieve useful functional nodes in the process of understanding user intent, building and testing workflows, thereby reducing the complexity of operation steps and user usage thresholds, thereby achieving efficient and accurate workflow automation and improving user experience. Therefore, the present embodiment specifically designs multiple powerful tools such as functional node retrieval, functional node configuration, workflow orchestration and testing, and seeking manual feedback in the workflow construction stage, and enables the optimization of intelligent agents through the collaborative empowerment of multiple tools to ensure that the workflow construction and optimization process is simple and efficient.

[0142] This application also provides a workflow automation generation device, please refer to Figure 8 , Figure 8This is a schematic diagram of the module structure of the workflow automation generation device in the embodiment of the present application. In this embodiment, the workflow automation generation device includes:

[0143] The data acquisition module 801 is used to acquire the target requirement statement input by the user;

[0144] A node search module 802 is used to search a preset node library according to the target requirement statement to obtain a target function node;

[0145] The function node assembly module 803 is used to assemble the target function nodes to obtain a target workflow.

[0146] As an implementable method, in this embodiment, each functional node included in the preset node library is an operation unit including input parameters and output parameters;

[0147] Each of the functional nodes corresponds to a service function.

[0148] As an implementable method, in this embodiment, the node retrieval module is also used to obtain a target retrieval mode;

[0149] The node search module 802 is further used to search the preset node library according to the target search mode and the target requirement statement to obtain the target function node.

[0150] As an implementable method, in this embodiment, the node retrieval module 802 is further used to parse the target requirement statement to obtain a target semantic vector when the target retrieval mode is a search mode;

[0151] The node retrieval module 802 is further configured to perform a preset vector retrieval on a preset node library according to the target semantic vector to obtain a target functional node.

[0152] As an implementable method, in this embodiment, the node retrieval module 802 is further used to parse the target requirement statement to obtain the target query condition when the target retrieval mode is the query mode;

[0153] The node retrieval module 802 is further used to match the function nodes of the preset node library according to the target query condition to obtain the target function node.

[0154] As an implementable method, in this embodiment, the function node assembly module 803 is further used to obtain the target input parameter and the target output parameter corresponding to the target function node;

[0155] The function node assembly module 803 is further used to determine the initial function node in the target function node according to the target requirement statement and the target input parameter;

[0156] The function node assembly module 803 is further used to determine the target function node sequence according to the target input parameter and the target output parameter;

[0157] The function node assembly module 803 is further used to determine the target workflow based on the sequence of the initial function node and the target function node.

[0158] As an implementable method, in this embodiment, the function node assembly module 803 is also used to obtain user feedback information on the target workflow;

[0159] The function node assembly module 803 is further configured to update the target workflow according to the feedback information.

[0160] The workflow automation generation device provided by the present application adopts the workflow automation generation method in the above embodiment, which can solve the technical problem of workflow automation generation. Compared with the prior art, the beneficial effects of the workflow automation generation device provided by the present application are the same as the beneficial effects of the workflow automation generation method provided by the above embodiment, and other technical features in the workflow automation generation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0161] The present application provides a workflow automation generation device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the workflow automation generation method in the first embodiment above.

[0162] Reference below Fig. 9 , which shows a schematic diagram of the structure of a workflow automation generation device suitable for implementing the embodiment of the present application. The workflow automation generation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The workflow automation generation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0163] like Fig. 9As shown, the workflow automation generation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the workflow automation generation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the workflow automation generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a workflow automation generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0164] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a workflow automation generation program product, which includes a workflow automation generation program carried on a computer-readable medium, and the workflow automation generation program contains program code for executing the method shown in the flowchart. In such an embodiment, the workflow automation generation program can be downloaded and installed from the network through a communication device, or installed from a storage device 1003, or installed from ROM 1002. When the workflow automation generation program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0165] The workflow automation generation device provided by the present application adopts the workflow automation generation method in the above embodiment, which can solve the technical problem of workflow automation generation. Compared with the prior art, the beneficial effects of the workflow automation generation device provided by the present application are the same as the beneficial effects of the workflow automation generation method provided by the above embodiment, and other technical features in the workflow automation generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0166] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0167] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0168] The present application provides a storage medium having computer-readable program instructions (ie, a workflow automation generation program) stored thereon, wherein the computer-readable program instructions are used to execute the workflow automation generation method in the above-mentioned embodiment.

[0169] The storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0170] The above storage medium may be included in the workflow automation generation device; or may exist independently without being assembled into the workflow automation generation device.

[0171] The storage medium carries one or more programs. When the one or more programs are executed by the workflow automation generation device, the workflow automation generation device can generate workflows automatically.

[0172] The workflow automation generation program code for performing the operations of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0173] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and workflow automation generation program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or the flow chart, and the combination of the square boxes in the block diagram and / or the flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0174] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0175] The readable storage medium provided by the present application is a storage medium, which stores computer-readable program instructions (i.e., a workflow automation generation program) for executing the above-mentioned workflow automation generation method, and can solve the technical problem of workflow automation generation. Compared with the prior art, the beneficial effects of the storage medium provided by the present application are the same as the beneficial effects of the workflow automation generation method provided by the above-mentioned embodiment, and will not be repeated here.

[0176] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A workflow automation generation method, characterized in that: The method comprises: Obtain the target requirement statement input by the user; Searching a preset node library according to the target requirement statement to obtain a target functional node; The target functional nodes are assembled to obtain a target workflow.

2. The workflow automation generation method according to claim 1, characterized in that: Each functional node included in the preset node library is an operation unit including input parameters and output parameters; Each of the functional nodes corresponds to a service function.

3. The workflow automation generation method according to claim 2, characterized in that: The step of searching the preset node library according to the target requirement statement to obtain the target function node includes: Get the target retrieval mode; The preset node library is searched according to the target search mode and the target requirement statement to obtain the target function node.

4. The workflow automation generation method according to claim 3, characterized in that: The step of searching the preset node library according to the target search mode and the target requirement statement to obtain the target function node includes: When the target retrieval mode is a search mode, parsing the target requirement statement to obtain a target semantic vector; A preset vector search is performed on a preset node library according to the target semantic vector to obtain a target functional node.

5. The workflow automation generation method according to claim 3, characterized in that: The step of searching the preset node library according to the target search mode and the target requirement statement to obtain the target function node also includes: When the target retrieval mode is a query mode, the target requirement statement is parsed to obtain a target query condition; According to the target query condition, function nodes are matched to the preset node library to obtain the target function node.

6. The workflow automation generation method according to claim 2, characterized in that: The step of assembling the target functional nodes to obtain the target workflow includes: Obtaining target input parameters and target output parameters corresponding to the target function node; Determine an initial function node in the target function nodes according to the target requirement statement and the target input parameter; Determine the target function node sequence by the target input parameter and the target output parameter; A target workflow is determined based on the initial function node and the target function node sequence.

7. The workflow automation generation method according to claim 1, characterized in that: After assembling the target function nodes to obtain the target workflow, the method further includes: Obtaining user feedback information on the target workflow; The target workflow is updated according to the feedback information.

8. A workflow automation generation device, characterized in that: The workflow automation generation device comprises: A data acquisition module is used to obtain the target requirement statement input by the user; A node search module, used to search a preset node library according to the target requirement statement to obtain a target function node; The function node assembly module is used to assemble the target function nodes to obtain the target workflow.

9. A workflow automation generation device, characterized in that: The workflow automation generation device comprises: a memory, a processor, and a workflow automation generation program stored in the memory and executable on the processor, wherein the workflow automation generation program is configured to implement the steps of the workflow automation generation method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a storage medium on which a workflow automation generation program is stored. When the workflow automation generation program is executed by a processor, the steps of the workflow automation generation method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • AI programming-oriented declarative workflow generation method and system, and AI programming-oriented declarative workflow execution method and system

    CN122111395A