A workflow configuration method, device, equipment, medium and program product
Patent Information
- Application Number
- CN202610760545.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-28
AI Technical Summary
[0002]现阶段人工智能相关产品及工作流配置体系,在实际应用中存在显著的使用门槛与功能局限性问题
[0031]This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
Smart Images

Figure CN122653592A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of workflow orchestration technology, and in particular to a workflow configuration method, apparatus, equipment, medium, and program product. Background Technology
[0002] At present, artificial intelligence-related products and workflow configuration systems have significant usage barriers and functional limitations in practical applications.
[0003] Currently, the configuration of mainstream configurable AI (Artificial Intelligence) workflow tools relies on the professional computer technology knowledge of the operators. Operators need to master professional skills such as model knowledge and parameter debugging, which is difficult to get started with, has a high learning cost, and takes a long time. As a result, non-professionals need to spend a lot of time and energy to learn computer technology knowledge, and even after mastering the knowledge, they still need to debug model parameters, resulting in low workflow orchestration efficiency. Summary of the Invention
[0004] This invention provides a workflow configuration method, apparatus, device, medium, and program product to improve workflow orchestration efficiency.
[0005] In a first aspect, embodiments of the present invention provide a workflow configuration method, executed by a front-end, comprising:
[0006] In response to the user's drag-and-drop operation on the candidate visualization node, a global identifier for the candidate visualization node is generated based on the node type and data transmission type of the candidate visualization node.
[0007] A global identifier is selected from the global identifiers of at least one target visualization node to be used as the input identifier of the candidate visualization node; the drag-and-drop placement time of the target visualization node is earlier than the drag-and-drop placement time of the candidate visualization node;
[0008] Determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes;
[0009] In response to the user's configuration end command, a workflow configuration file is generated based on the global identifier, input identifier, and connection relationship of each visualization node, and the workflow configuration file is sent to the backend so that the backend runs the workflow according to the workflow configuration file.
[0010] Secondly, embodiments of the present invention provide a workflow configuration method, executed by a backend, comprising:
[0011] The system receives a workflow configuration file sent from the front end. The workflow configuration file, in response to a user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for each candidate visualization node based on its node type and data transmission type. It then selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier for the candidate visualization node. The drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node. The system determines the connection relationships between the candidate visualization node and each of the target visualization nodes. Finally, in response to a configuration completion command issued by the user, it generates a configuration file based on the global identifier, input identifier, and connection relationships of each visualization node.
[0012] The workflow configuration file is parsed to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node;
[0013] A global data pool is constructed based on the global identifier of each of the aforementioned execution function nodes; the global data pool includes the global fields of each of the aforementioned execution function nodes;
[0014] Based on the connection relationships of each execution function node, the global data pool, the global identifier, and the input identifier, each execution function node is run sequentially to achieve workflow operation.
[0015] Thirdly, embodiments of the present invention also provide a workflow configuration device, configured at the front end, comprising:
[0016] The identifier generation module is used to respond to the user's drag-and-drop operation on the candidate visualization node and generate a global identifier for the candidate visualization node based on the node type and data transmission type of the candidate visualization node.
[0017] The first determining module is used to select a global identifier from the global identifiers of at least one target visualization node and determine it as the input identifier of the candidate visualization node; the drag-and-place time of the target visualization node is earlier than the drag-and-place time of the candidate visualization node;
[0018] The second determining module is used to determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes;
[0019] The file generation module is used to respond to the configuration end command issued by the user, generate a workflow configuration file based on the global identifier, input identifier and connection relationship of each visualization node, and send the workflow configuration file to the backend so that the backend runs the workflow according to the workflow configuration file.
[0020] Fourthly, embodiments of the present invention also provide a workflow configuration device, configured in the backend, comprising:
[0021] A receiving module is used to receive a workflow configuration file sent by the front end. The workflow configuration file, in response to a user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for each candidate visualization node based on its node type and data transmission type. It then selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier for the candidate visualization node. The drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node. The module determines the connection relationships between the candidate visualization node and each of the target visualization nodes. Finally, in response to a configuration end command issued by the user, it generates a configuration file based on the global identifier, input identifier, and connection relationships of each visualization node.
[0022] The parsing module is used to parse the workflow configuration file to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node;
[0023] A construction module is used to construct a global data pool based on the global identifier of each of the execution function nodes; the global data pool includes global fields of each of the execution function nodes;
[0024] The execution module is used to sequentially run each of the execution function nodes according to the connection relationship of each execution function node, the global data pool, the global identifier, and the input identifier, so as to realize the workflow operation.
[0025] Fifthly, embodiments of the present invention also provide an electronic device, comprising:
[0026] At least one processor; and
[0027] A memory that is communicatively connected to at least one processor; wherein
[0028] The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform the workflow configuration method provided in any embodiment of the present invention.
[0029] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions for causing a processor to execute a configuration method for a workflow according to any embodiment of the present invention.
[0030] In a seventh aspect, embodiments of the present invention also provide a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the workflow configuration method of any embodiment of the present invention.
[0031] This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
[0032] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1A This is a flowchart of a workflow configuration method provided according to Embodiment 1 of the present invention;
[0035] Figure 1B This is a schematic diagram of a node display area in a front-end interface according to Embodiment 1 of the present invention;
[0036] Figure 2 This is a flowchart of a workflow configuration method provided according to Embodiment 2 of the present invention;
[0037] Figure 3 This is a flowchart of a workflow configuration method provided according to Embodiment 3 of the present invention;
[0038] Figure 4 This is a flowchart of a workflow configuration method provided according to Embodiment 4 of the present invention;
[0039] Figure 5 This is a schematic diagram of a workflow configuration device provided according to Embodiment 5 of the present invention;
[0040] Figure 6 This is a schematic diagram of the structure of a workflow configuration device provided according to Embodiment Six of the present invention;
[0041] Figure 7 This is a structural diagram of an electronic device that implements a workflow configuration method according to an embodiment of the present invention. Detailed Implementation
[0042] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0044] In the technical solutions of this invention, the acquisition, storage, and application of workflow configuration files, global identifiers, and input identifiers all comply with relevant laws and regulations and do not violate public order and good morals.
[0045] Example 1
[0046] Figure 1A This is a flowchart of a workflow configuration method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of workflow orchestration. The method can be executed by a workflow configuration device, which can be implemented in hardware and / or software and specifically configured in an electronic device.
[0047] See Figure 1A The workflow configuration method shown includes:
[0048] S101. In response to the user's drag-and-drop operation on the candidate visualization node, generate a global identifier for the candidate visualization node based on the node type and data transmission type of the candidate visualization node.
[0049] S102. Select a global identifier from the global identifiers of at least one target visualization node and determine it as the input identifier of the candidate visualization node; the drag-and-drop placement time of the target visualization node is earlier than the drag-and-drop placement time of the candidate visualization node.
[0050] S103. Determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes.
[0051] S104. In response to the configuration end command issued by the user, a workflow configuration file is generated based on the global identifier, input identifier and connection relationship of each visualization node, and the workflow configuration file is sent to the backend so that the backend runs the workflow according to the workflow configuration file.
[0052] In this embodiment, the candidate visualization node can be a visualization node used to implement a preset function; for example, the candidate visualization node can include, but is not limited to, a text input node for receiving user input text, a natural language processing node for performing natural language processing on text, a file upload node for receiving user-uploaded files, an image generation node for generating images, a frame animation generation node for generating frame animations, and a file download node for storing files locally, etc.
[0053] The node type can be the type of candidate visualization node, including but not limited to natural language processing, image generation, frame animation generation, and text input types. A global identifier can be used to uniquely identify the corresponding candidate visualization node globally. Data transmission types can include input, output, upload, and download types; the input type indicates that the corresponding visualization node receives user-input data; the output type indicates that the corresponding visualization node generates and outputs data; the upload type indicates that the corresponding visualization node receives files uploaded by the user; and the download type indicates that the corresponding visualization node downloads files to the user's local machine. Specifically, a certain algorithm can be used to generate the global identifier of the candidate visualization node based on its node type and data transmission type.
[0054] Optional, Figure 1B This is a schematic diagram of the node display area in a front-end interface. For example... Figure 1BThe front-end interface shown can be built based on the Blockly visual block programming framework; through the Blockly visual block programming framework, at least one logical function can be encapsulated as a candidate visual node (i.e. Figure 1B (The blocks shown in the image); The Blockly visual block programming framework also provides registration, rendering, and operation event listening for candidate visual nodes, as well as toolbox management and node lifecycle listening. It can rely on Blockly's native event mechanism to realize the creation and deletion of candidate visual nodes, as well as the precise capture of field changes.
[0055] like Figure 1B As shown, the left-hand area displays candidate visualization nodes, including basic building blocks, AI building blocks, and file processing building blocks. The basic building blocks include the "Start" node, the "User Input" node, and the "Branch Decision" node. The AI building blocks include the "llm" node and the "Raw Image" node. The file processing building blocks include the "Frame Animation Generation" node, the "Download File" node, and the "File Upload" node. Specifically, the "Start" node can be used to trigger and initialize the workflow; the "User Input" node can be used to receive text input from the user; the "Branch Decision" node can be used to determine subsequent workflow branches based on conditions; the "llm" node can be used to process user-input text by calling a Large Language Model (LLM); the "Raw Image" node can be used to generate images by calling an image generation model based on prompts and / or reference images; the "Frame Animation Generation" node can be used to create an animation from multiple frames of images; the "Download File" node can be used to download files selected by the user; and the "File Upload" node can be used to upload files selected by the user. Figure 1B The right-hand area is the configuration area for candidate visualization nodes. Users can select candidate visualization nodes from the candidate visualization node display area on the left and drag and drop them to the configuration area on the right to build their own workflow. Figure 1B The configuration area on the right shows the visualization nodes that the user has selected, i.e., the target visualization nodes, including the "Start" node, "User Input" node, "llm" node, "File Upload" node, "Raw Image" node, and "Download File" node. The input for the "llm" node is user input; the "File Upload" node accepts image types; the prompts for the "Raw Image" node are derived from the execution result of the "llm" node, and the reference image is derived from the image received by the "File Upload" node; the file downloaded by the "Download File" node can be the image generated by the "Raw Image" node.
[0056] In this embodiment, the target visualization node can be a candidate visualization node whose drag-and-place time is earlier than that of the candidate visualization nodes, that is, a candidate visualization node that has been placed before the current drag-and-place operation occurs. The input identifier can be used to uniquely identify the target visualization node that serves as the source of the input data for the candidate visualization node. For example, if the object identified by the input identifier of the "Download File" node is the "Raw Image" node, it means that the input data of the "Download File" node is the image generated by the "Raw Image" node.
[0057] Specifically, in response to a user's selection of a target visualization node, the global identifier of the selected target visualization node can be determined as the input identifier of the candidate visualization node. Optionally, the input data source for the candidate visualization node can be one or more target visualization nodes; correspondingly, the number of input identifiers for the candidate visualization node can be one or more.
[0058] For example, such as Figure 1B As shown, Figure 1B The "raw image" node can have at least one input data source, namely a prompt source and a reference image source. Its input identifier can include the input identifier corresponding to the prompt source, which is used to identify the node that provides the prompt for the "raw image" node; its input identifier can also include the reference image source, which is used to identify the node that provides the reference image for the "raw image" node.
[0059] See Figure 1B , Figure 1B The configuration area on the right displays the dropdown menu interface for the "Raw Image" node. This dropdown menu shows "User Input" and "llm," with the user selecting "llm" as the input source for the prompt. During this process, the front-end can respond to the user's selection of the target visualization node "llm" from the dropdown menu corresponding to the "Raw Image" node's prompt, determining the global identifier of the selected "llm" node as the input identifier for the "Raw Image," thus enabling the "Raw Image" node to obtain the output data of the "llm" node as its required prompt.
[0060] In one optional embodiment, nodes can be categorized by function into basic building blocks, AI building blocks, and file processing building blocks. Each category can be assigned a unique color scheme, and the `setColour()` method of the Blockly framework can be used to set the color style, improving the user's visual recognition efficiency. Drop-down menus for visual nodes are dynamically generated, and invalid options (such as the node itself) are filtered to ensure option validity. Drop-down options are dynamically rendered using the menu generator of the Blockly framework. The `getValue()` and `setValue()` methods of the native drop-down fields in the Blockly framework are overridden to support multi-option selection, persistent selection status, and display of the number of selected options. A standardized JSON array format is output, enabling custom menu rendering and interaction logic. Two statement input ports, `if` and `else`, are designed for branch judgment nodes. The `appendStatementInput()` method of Blockly is used to create multi-statement input nodes, supporting the visual construction of conditional branch execution logic.
[0061] In this embodiment, the connection relationship can be used to characterize the logical execution order relationship between candidate visualization nodes and each target visualization node; for example, such as Figure 1B The visualization nodes in the configuration area shown are connected in the following order: "Start -- User Input -- llm -- File Upload -- Raw Image -- Download File". Specifically, the "User Input" node follows the "Start" node; the "llm" node follows the "User Input" node; the "File Upload" node follows the "llm" node; the "Raw Image" node follows the "File Upload" node; and the "Download File" node follows the "Download File" node. The connection relationships between visualization nodes can be obtained by calling the `getNextBlock()` and `getInputTargetBlock()` methods of the Blockly framework.
[0062] In this embodiment, the configuration completion command can be used to indicate that the workflow configuration is complete and instruct the front end to generate a workflow configuration file to be sent to the back end for implementation. The workflow configuration file can be a JSON (JavaScript Object Notation) file. Specifically, after the configuration completion command is issued, all visual nodes in the configuration area become target visual nodes; the target visual nodes can be traversed, and the list of visual nodes can be obtained through the workspace.getAllBlocks() method to extract parameters such as global node identifier, input identifier, node type, and input / output; the condition:true / false flags are used to distinguish between sequential connections of visual nodes and conditional connections of branch nodes; information such as global identifier, workflow name, and description are integrated to generate a standardized workflow configuration file, which can be downloaded; local storage can also be performed to avoid temporary data loss.
[0063] In one optional embodiment, the JSON file may include, but is not limited to, fields such as flow_name, description, start_node, nodes, connections, and global_states to ensure front-end and back-end compatibility; for example, the core format of the JSON-formatted workflow configuration file may be as follows:
[0064] {
[0065] "flow_name": "Unnamed process",
[0066] "description": "A process created using the Blockly visual editor",
[0067] "start_node": "init_xxxxxx", / / Starting node ID
[0068] "nodes": [
[0069] {
[0070] "id": "input_xxxxxx", / / Unique ID for the node
[0071] "type": "InputNode", / / The backend can identify the node type
[0072] "inputs": {}, / / Node input parameters
[0073] "outputs": {
[0074] "value": "input1"
[0075] / / Node output associated global state key
[0076] }
[0077] ],
[0078] "connections": [
[0079] {
[0080] "from": "init_xxxxxx", / / Source node ID
[0081] "to": "input_xxxxxx", / / Target node ID
[0082] "condition": true / / Branch node segment condition judgment
[0083] }
[0084] ],
[0085] "global_states": [] / / List of global states
[0086] }
[0087] The data format for nodes in the workflow configuration file can be as follows:
[0088] {
[0089] "type": "string / image / video / file", / / Global state type
[0090] "label": "User input 1", / / Visual label
[0091] "key": "input1" / / Global identifier
[0092] }
[0093] In an optional embodiment, a pre-configured workflow configuration file can also be imported. This pre-configured workflow configuration file refers to a workflow configuration file generated and saved using the workflow configuration method provided in this embodiment for reuse. During the import process, invalid fields, unknown visualization node types, and illegal connections can be tolerated without disrupting the overall import process. A detailed error report is generated, allowing users to adjust and correct the workflow on the front end based on the error report. After invalid fields, unknown visualization node types, or illegal connections are corrected, the workflow generated based on the corrected workflow configuration file can run normally. Visual nodes are imported using the Blockly framework's EventsGroup. Visual node creation events are processed in batches using the Blockly.Events.setGroup() method. Compatibility with single-value and multi-value formats is supported, and parsing of non-JSON format multi-select values is provided as a fallback to improve robustness.
[0094] Furthermore, for the workflow configuration file import step, the uploaded JSON-formatted workflow configuration file can be parsed to verify the file format validity and obtain information such as workflow, visualization nodes, global status, and connection relationships. Before importing the workflow configuration file, the `workspace.clear()` method can be used to clear all target visualization nodes already placed in the configuration area, as well as the global identifiers of each target visualization node, to avoid overlapping conflicts. Visualization nodes in the workflow configuration information can be created using a reverse type mapping table, and the `workspace.newBlock()` method of the Blockly framework can be used to create visualization nodes, restoring the fields, input / output parameters, labels, input identifiers, and global identifiers of the visualization nodes. Based on the connection relationships in the workflow configuration file, the `connection.connect()` method of the Blockly framework can be used to establish sequential connections between visualization nodes and conditional connections between branch nodes. Horizontal layout can also be performed on the root node (without a parent node), with child nodes automatically following, improving the visualization effect after import. An import report can also be generated, which includes statistics on the number of visualization nodes, the number of successful connections, the number of failed connections, and the types of unknown visualization nodes skipped, and provides feedback to the user on the import results of the workflow configuration file.
[0095] Optionally, a multi-line text input box for "System Prompt" can be provided for "llm" and "raw image" nodes, supporting real-time editing. When editing the configuration, the text entered in the multi-line text input box for "System Prompt" can be written to the hidden field (SYSTEM_PROMPT) of the node. The workspace is then re-rendered through the workspace.render() method of the Blockly framework to ensure that configuration changes take effect in real time. The right area adopts a drawer-style design, which supports the expansion and collapse of global status and node configuration, optimizing the utilization of interface space.
[0096] This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
[0097] Example 2
[0098] Figure 2 This is a flowchart of a workflow configuration method provided in Embodiment 2 of the present invention. Based on the technical solution of the above embodiments, the present invention optimizes and improves the global identifier generation operation.
[0099] Furthermore, the step of "generating a global identifier for the candidate visualization node based on the node type and data transmission type of the candidate visualization node" is refined to "determining the node type identifier of the candidate visualization node based on the node type and data transmission type of the candidate visualization node; counting the number of nodes in each target visualization node whose node type identifier is the same as the node type identifier of the candidate visualization node; and generating a global identifier for the candidate visualization node based on the number of nodes and the node type identifier".
[0100] It should be noted that for any parts not described in detail in the embodiments of the present invention, please refer to the description in the foregoing embodiments.
[0101] See Figure 2 The workflow configuration method shown includes:
[0102] S201. In response to the user's drag-and-drop operation on the candidate visualization node, determine the node type identifier of the candidate visualization node according to the node type and data transmission type of the candidate visualization node.
[0103] S202. Count the number of nodes whose node type identifier is the same as that of the candidate visualization nodes among the target visualization nodes.
[0104] S203. Generate a global identifier for the candidate visualization node based on the number of nodes and the node type identifier.
[0105] S204. Select a global identifier from the global identifiers of at least one target visualization node and determine it as the input identifier of the candidate visualization node; the drag-and-drop placement time of the target visualization node is earlier than the drag-and-drop placement time of the candidate visualization node.
[0106] S205. Determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes.
[0107] S206. In response to the configuration end command issued by the user, a workflow configuration file is generated based on the global identifier, input identifier and connection relationship of each visualization node, and the workflow configuration file is sent to the backend so that the backend runs the workflow according to the workflow configuration file.
[0108] In this embodiment, the node type identifier can be used to globally and uniquely identify the node type of a visualization node. Specifically, a certain algorithm is used to determine the node type identifier of the candidate visualization node based on its node type and data transmission type; the number of target visualization nodes whose node type identifier is the same as that of the candidate visualization node is counted; this number is incremented by one to obtain the target node count, and the characters of the target node count and the node type identifier are concatenated to obtain the global identifier of the candidate visualization node. For example, if there are three target visualization nodes with the same node type identifier as the candidate visualization node, the target node count is 4; the number "4" is concatenated with the node type identifier to obtain the global identifier of the candidate visualization node; for example... Figure 1B If there is only one "raw image" node, and there is no target visualization node with the same node type identifier as it before dragging and dropping the "raw image" node, then the number of nodes is counted as 0, and the number of target nodes corresponding to the "raw image" node is 1. If the node type identifier of the "raw image" node is "output_image", then the global identifier of the "raw image" node is "output_image_1".
[0109] Optionally, determining the node type identifier of the candidate visualization node based on the node type and data transmission type of the candidate visualization node includes: determining the global data type of the candidate visualization node based on the association information between the preset node type and the global data type; and determining the node type identifier of the candidate visualization node based on the global data type and the data transmission type.
[0110] Global data types are used to uniquely identify the type of a visualization node globally, and can include, but are not limited to, string, image, video, and file types.
[0111] Specifically, based on the association information between preset node types and global data types, a global data type matching the node type of the candidate visualization node is searched. For example, in the preset mapping information, the global data type corresponding to the node type of natural language processing is "string"; the global data type corresponding to the node type of text input is "string"; the global data type corresponding to the node type of image generation is "image"; the global data type corresponding to the node type of frame animation generation is "video"; and the global data type corresponding to the node type of file download is "file".
[0112] By concatenating the global data type and the data transfer type, the node type identifier of the candidate visualization node type is obtained. For example, if the global data type of the "raw image" node is "image" and the data transfer type is "output", then the node type identifier of the "raw image" node is "output_image".
[0113] Understandably, by adopting the above technical solution, the association between the node type and global data type of the candidate visualization node is established in advance, which facilitates the quick search of the matching global data type in the pre-established association information when it is necessary to determine the global data type of the candidate visualization node, thereby improving the efficiency of determining the global data type. By determining the node type identifier through the global data type and the data transmission type, the node type identifier can also be matched with the actual data processing attributes and transmission requirements of the node, which fits the data flow logic in the workflow.
[0114] This invention determines the node type identifier by considering the node type and data transmission type of candidate visualization nodes. Then, by counting the number of target visualization nodes with the same identifier, a global identifier is generated by combining the number of nodes and the node type identifier. This ensures the uniqueness of the global identifier and fundamentally avoids duplicate global identifier conflicts. Furthermore, it enables automated generation, eliminating the need for users to manually set identifiers, simplifying the front-end operation process and reducing user difficulty. This further improves the efficiency and accuracy of workflow configuration, as well as the convenience and stability of workflow setup and deployment.
[0115] Example 3
[0116] Figure 3 This is a flowchart of a workflow configuration method provided in Embodiment 3 of the present invention. This embodiment is applicable to the situation of workflow orchestration. The method can be executed by a workflow configuration device, which can be implemented in hardware and / or software and specifically configured in an electronic device.
[0117] It should be noted that for any parts not described in detail in the embodiments of the present invention, please refer to the description in the foregoing embodiments.
[0118] See Figure 3 The workflow configuration method shown includes:
[0119] S301. Receive a workflow configuration file sent by the front end; the workflow configuration file, in response to the user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for the candidate visualization node based on the node type and data transmission type of the candidate visualization node; selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier of the candidate visualization node; the drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node; determines the connection relationship between the candidate visualization node and each of the target visualization nodes; in response to the configuration end command issued by the user, generates a global identifier, input identifier, and connection relationship for each visualization node.
[0120] S302. Parse the workflow configuration file to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node.
[0121] S303. Construct a global data pool based on the global identifier of each of the execution function nodes; the global data pool includes the global fields of each of the execution function nodes.
[0122] S304. Based on the connection relationship of each execution function node, the global data pool, the global identifier, and the input identifier, each execution function node is run sequentially to realize workflow operation.
[0123] In this embodiment, the workflow configuration file can be a JSON (JavaScript Object Notation) file used to store workflow configuration information. The workflow configuration information may include, but is not limited to, global identifiers, input identifiers, and connection relationships for each functional node. Visual nodes can be graphical interface nodes displayed on the front-end interface, while execution function nodes can be node instances used in the back-end for data processing to implement corresponding functions.
[0124] In the front-end configuration process, candidate visualization nodes can be visualization nodes used to implement preset functions; for example, candidate visualization nodes can include, but are not limited to, text input nodes for receiving user input text, natural language processing nodes for performing natural language processing on text, file upload nodes for receiving user-uploaded files, image generation nodes for generating images, frame animation generation nodes for generating frame animations, and file download nodes for storing files locally, etc.
[0125] The node type can be the type of candidate visualization node, including but not limited to natural language processing, image generation, frame animation generation, and text input types. A global identifier can be used to uniquely identify the corresponding candidate visualization node globally. Data transmission types can include input, output, upload, and download types; the input type can indicate that the corresponding visualization node receives user-input data; the output type can indicate that the corresponding visualization node generates and outputs data; the upload type can indicate that the corresponding visualization node receives files uploaded by the user; and the download type can indicate that the corresponding visualization node downloads files to the user's local machine. Specifically, a certain algorithm can be used to generate the global identifier of the candidate visualization node based on its node type and data transmission type.
[0126] In this embodiment, the target visualization node can be a candidate visualization node whose drag-and-place time is earlier than that of the candidate visualization nodes, that is, a candidate visualization node that has been placed before the current drag-and-place operation occurs. The input identifier can be used to uniquely identify the target visualization node that serves as the source of the input data for the candidate visualization node. For example, if the object identified by the input identifier of the "Download File" node is the "Raw Image" node, it means that the input data of the "Download File" node is the image generated by the "Raw Image" node.
[0127] Specifically, in response to a user's selection of a target visualization node, the global identifier of the selected target visualization node can be determined as the input identifier of the candidate visualization node. Optionally, the input data source for the candidate visualization node can be one or more target visualization nodes; correspondingly, the number of input identifiers for the candidate visualization node can be one or more.
[0128] In this embodiment, the connection relationship can be used to characterize the logical execution order relationship between candidate visualization nodes and each target visualization node. Specifically, the getNextBlock() and getInputTargetBlock() methods of the Blockly framework can be called to obtain the connection relationship between visualization nodes.
[0129] In this embodiment, the configuration completion command can be used to indicate that the workflow configuration is complete and instruct the front end to generate a workflow configuration file to be sent to the back end for implementation. The workflow configuration file can be a JSON (JavaScript Object Notation) file. Specifically, after the configuration completion command is issued, all visual nodes in the configuration area become target visual nodes; the target visual nodes can be traversed, and the list of visual nodes can be obtained through the workspace.getAllBlocks() method to extract parameters such as global node identifier, input identifier, node type, and input / output; the condition:true / false flag is used to distinguish between sequential connections of visual nodes and conditional connections of branch nodes; information such as global identifier, workflow name, and description are integrated to generate a standardized workflow configuration file, which can be downloaded; local storage can also be performed to avoid temporary data loss.
[0130] In this embodiment, the global data pool can be a unified collection of data processed by the workflow, used to store the workflow processing data of each execution function node, thereby realizing data sharing among the execution function nodes. The global field can be a storage unit in the global data pool, with the global identifier as the field name, used to store the data execution result of the corresponding execution function node.
[0131] Specifically, based on the global identifier of each execution function node, a corresponding global field is created for each execution function node to store the workflow processing data of the execution function node, so as to obtain a global data pool; using a certain algorithm, according to the connection relationship of each execution function node, the global data pool, the global identifier and the input identifier, each execution function node is run sequentially to realize workflow operation.
[0132] In one optional embodiment, the backend adopts a three-layer architecture consisting of a configuration driver layer, a registry center layer, and a node-based execution layer. The configuration driver layer relies on the workflow configuration file generated by the frontend; the registry center layer completes configuration parsing and workflow construction through a node registry and a workflow builder; and the node-based execution layer is based on the PocketFlow framework (a workflow orchestration and execution framework) to achieve automatic execution of workflows.
[0133] Furthermore, the backend includes a node registration center module (NodeRegistry class), which provides the ability to register, store, query and enumerate execution function nodes, uniformly manage all execution function nodes that can be used in the workflow, provide workflow builder with support for obtaining execution function node classes, solve the problem of scattered execution function nodes and difficulty in unified scheduling, and adapt to the node specification of the PocketFlow framework.
[0134] The node registration center module uses a class-level private dictionary `_registry` as the node storage container. The key is a string representing the node type, and the value is the corresponding node class (inherited from the `Node` base class of `PocketFlow`), which realizes a one-to-one mapping between node types and classes, ensuring compatibility between nodes and the framework. It provides a decorator `register(node_type)` to simplify the node registration process. By adding this decorator to a custom node class (inherited from `PocketFlowNode`) and specifying the node type, the node class can be automatically entered into the registry without manually maintaining the node list, thus improving development efficiency.
[0135] Furthermore, the backend also includes a workflow builder (FlowBuilder class), used to parse the workflow configuration file sent from the frontend and convert it into an executable PocketFlow Flow instance, supporting loading configuration from JSON files or JSON strings. Optionally, the workflow builder can be used to load configuration and store metadata: it supports two static methods, from_json_file(json_path) and from_json_string(json_str), to load workflow configuration files from local files and in-memory strings respectively, ensuring compatibility with workflow configuration file inputs in different scenarios; after loading the workflow configuration file, it automatically extracts and stores metadata such as flow_name, description, and global_states, providing support for subsequent PocketFlow workflow execution and state initialization, while retaining the original configuration self.config to ensure data integrity. Optionally, the workflow builder can also be used to instantiate execution function nodes: iterate through the nodes array in the workflow configuration file, extracting information such as id, type, inputs, and outputs for each execution function node; perform personalized parameter mapping for different execution functions (such as LLM nodes, raw image nodes, and frame animation generation nodes) to solve compatibility issues after workflow configuration file format iteration, while ensuring that the parameters meet the construction requirements of PocketFlow nodes; obtain the corresponding node class (all inheriting from PocketFlow Node) from NodeRegistry, instantiate the execution function node through keyword parameters, and store it in the self.nodes dictionary with node_id as the key to achieve centralized management of execution function node instances, providing a foundation for subsequent execution function node connection and Flow construction. Optionally, the workflow builder can also be used to connect execution function nodes: it supports two connection modes: sequential connection of ordinary execution function nodes and conditional connection of branch execution function nodes. All connections are first classified and collected, and then processed separately. Sequential connection of ordinary execution function nodes: the >> operator supported by the PocketFlow framework is used to establish the execution order between execution function nodes, realizing the linear flow of the workflow. Conditional connection of branch execution function nodes: for conditional connection of BranchNode, the condition field (True / False) is extracted and the branch condition information is stored on the execution function node for runtime condition checking, which solves the branch flow problem of the workflow, while being compatible with the execution restrictions of the PocketFlow framework and avoiding frequent triggering of internal events of the framework to interfere with workflow execution.Optionally, the workflow builder can also be used for starting node lookup and Flow instance creation: implementing a starting node lookup logic that prioritizes explicit specification and provides implicit compatibility as a fallback: it prioritizes reading the start_node field in the configuration, and if it is not found, it searches for an execution function node without incoming edges, solving the problem of PocketFlow workflows failing to start due to unclear starting nodes; it uses the starting node as the entry point to call the PocketFlow Flow constructor to create a Flow instance, completing the transformation from workflow configuration file to executable workflow.
[0136] Optionally, the backend can also include a general node module for pre-execution preparation, core business logic, and post-execution status updates. It also enables data sharing between execution function nodes, ensuring that they can successfully integrate into the PocketFlow workflow and execute stably. All execution function nodes strictly adhere to the PocketFlow framework's node specifications, inheriting from the PocketFlow Node base class and uniformly implementing the three core methods: prep(), exec(), and post().
[0137] Optionally, the execution function nodes include basic tool nodes, specifically: InitNode, corresponding to the "Start" node in the front end, is responsible for the global state initialization when the process starts. It is executed only on the first run to avoid repeated initialization, and also supports the configuration and output of welcome messages to adapt to the initialization requirements of PocketFlow process startup; InputNode, corresponding to the "User Input" node in the front end, supports custom prompts, stores user input results in the global data pool, provides input data for subsequent execution function nodes, and realizes data transfer between execution function nodes; SaveFileNode, corresponding to the "File Save" node in the front end, supports saving three types of files: local files, network URLs, and text content, suitable for file storage needs in different scenarios. After execution, it updates the saved results to the global data pool for subsequent execution function nodes to call.
[0138] Optionally, the execution function nodes include AI-related nodes, specifically: LLMNode, corresponding to the "llm" node in the front end, is a large language model invocation node, supports system_prompt and prompt configuration, obtains input prompts from the global data pool, calls the large language model to generate response results, and stores the results in the global data pool, supporting automation in natural language processing scenarios; FileUploadNode, corresponding to the "file upload" node in the front end, supports specifying file types, receives file paths input by the user, calls the upload tool to complete the file upload, returns and stores the uploaded URL (Uniform Resource Locator) in the global data pool, providing file resources for subsequent AI processing; ImageGenerationNode, corresponding to the "raw image" node in the front end, is an image generation node, supports prompt and reference image (reference_image) configuration, obtains input data from the global data pool, calls the image generation tool to generate image URLs, and stores them in the global data pool, supporting automation in image creation scenarios.
[0139] Optionally, the execution function nodes include multimedia processing nodes, specifically: FrameAnimationNode, which corresponds to the "frame animation generation" node in the front end. It supports loading and standardization of multiple image resources (local path or network URL), unifies frame size and number of channels, supports custom animation duration and frame rate, automatically generates GIF format frame animation files, stores them in the local output directory and records the file path in the global data pool, supports the automation of multimedia creation scenarios, and is compatible with the PocketFlow workflow scheduling rhythm during execution.
[0140] Optionally, the execution function nodes include flow control nodes, specifically: BranchNode: a branch judgment node that supports various comparison operators (==, >, <, and contains, etc.), retrieves the left value from the global data pool, compares it with the configured right value, and stores the judgment result in the global data pool to provide a basis for the conditional execution of subsequent branch nodes, adapting to the branch flow execution requirements of PocketFlow; before the node is executed, it checks whether the branch condition is met and decides whether the node is executed, realizing the conditional flow of the process, making up for the lack of native branch support in the PocketFlow framework, and improving the flexibility of process orchestration.
[0141] Furthermore, the configuration driver layer includes a configuration driver starter, which receives workflow configuration files from the front end and completes the loading, construction, initialization, and automatic execution of the process, achieving full automation of the configuration driver process. Specifically, this includes: parsing command-line arguments using argparse to obtain the configuration file path `--flow`; instantiating a `FlowBuilder` and loading the configuration to build a `Flow` instance conforming to the PocketFlow specification; initializing the global state dictionary of the global data pool to provide the initial state for process execution; and calling the `pocketFlow.run()` method to start process execution, including exception handling and stack trace logic to facilitate troubleshooting and ensure rapid problem location when process execution exceptions occur.
[0142] This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
[0143] Example 4
[0144] Figure 4 This is a flowchart of a workflow configuration method provided in Embodiment 4 of the present invention. Based on the technical solutions of the above embodiments, the present invention optimizes and improves the global identifier generation operation.
[0145] Furthermore, the phrase "running each functional node sequentially according to the connection relationship of each functional node, the global data pool, the global identifier, and the input identifier" is refined to "determining the running order of each functional node according to the connection relationship of each functional node; processing the user's input data by inputting it into the starting functional node to obtain the execution result of the starting functional node; the starting functional node is the functional node that runs first in the order of execution; storing the execution result in the global field of the starting functional node; using the next functional node of the starting functional node as an intermediate functional node; running the intermediate functional node according to the global data pool, the global identifier of the intermediate functional node, and the input identifier; verifying whether the intermediate functional node is the last functional node; the last functional node is the functional node that runs last in the order of execution; if the intermediate functional node is not the last functional node, updating the intermediate functional node to the next node, and returning to the step of running the intermediate functional node according to the global data pool, the global identifier of the intermediate functional node, and the input identifier, until the intermediate functional node is the last functional node."
[0146] It should be noted that for any parts not described in detail in the embodiments of the present invention, please refer to the description in the foregoing embodiments.
[0147] See Figure 4 The workflow configuration method shown includes:
[0148] S401. Receive a workflow configuration file sent by the front end; the workflow configuration file, in response to the user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for the candidate visualization node based on the node type and data transmission type of the candidate visualization node; selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier of the candidate visualization node; the drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node; determines the connection relationship between the candidate visualization node and each of the target visualization nodes; in response to the configuration end command issued by the user, generates a global identifier, input identifier, and connection relationship for each visualization node.
[0149] S402. Parse the workflow configuration file to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node.
[0150] S403. Construct a global data pool based on the global identifier of each functional node; the global data pool includes the global fields of each functional node.
[0151] S404. Determine the running order of each execution function node according to the connection relationship of each execution function node.
[0152] S405. Input the user's input data into the starting execution function node for processing, and obtain the execution result of the starting execution function node; the starting execution function node is the execution function node that runs first in the order of execution.
[0153] S406. Store the execution result in the global field of the starting execution function node.
[0154] S407. The next execution function node after the starting execution function node is taken as the intermediate execution function node.
[0155] S408. Run the intermediate execution function node according to the global data pool, the global identifier and the input identifier of the intermediate execution function node.
[0156] S409. Verify whether the intermediate execution function node is the last execution function node; the last execution function node is the execution function node at the end of the running order.
[0157] S410. If the intermediate execution function node is not the last execution function node, then update the intermediate execution function node to the next node, and return to the steps of running the intermediate execution function node according to the global data pool, the global identifier and the input identifier of the intermediate execution function node, until the intermediate function node is the last execution function node.
[0158] Specifically, the user's input data is input into the starting execution function node for processing, and the execution result of the starting execution function node is obtained; the starting execution function node is the execution function node that runs first in the order of execution; more specifically, the starting execution function node is the node that runs first in the order of execution and processes the user's input data, for example, the starting execution node is not the "start" node.
[0159] The execution result is stored in the global field of the starting execution function node; the next execution function node of the starting execution function node is taken as the intermediate execution function node; the intermediate execution function node is run using a certain algorithm based on the global data pool, the global identifier of the intermediate execution function node, and the input identifier; the intermediate execution function node is checked to see if it is the last execution function node; the last execution function node is the execution function node that runs last in the execution order; if the intermediate execution function node is not the last execution function node, the intermediate execution function node is updated to the next node, and the steps of running the intermediate execution function node based on the global data pool, the global identifier of the intermediate execution function node, and the input identifier are returned until the intermediate function node is the last execution function node.
[0160] Optionally, the step of running the intermediate functional node based on the global data pool, the global identifier of the intermediate functional node, and the input identifier includes: determining a global field in the global data pool that matches the input identifier of the intermediate execution functional node; inputting the field value of the global field into the intermediate execution functional node for processing, and outputting the execution result of the intermediate execution functional node; and storing the execution result in the global field of the intermediate execution functional node.
[0161] Specifically, in each global field of the global data pool, a global field matching the input identifier of the intermediate execution function node is searched and used as the input field of the intermediate execution function node; for example, a global field in the global data pool with the same field name as the input identifier of the intermediate execution function node is searched; the intermediate execution function node obtains data from the input field and processes it, and stores the output data (i.e., the execution result) into the global field corresponding to the global identifier of the intermediate execution function node in the global data pool.
[0162] Understandably, by adopting the above technical solution, the corresponding global field can be matched in the global data pool by inputting an identifier, and the field value can be read as the input data of the intermediate execution function node, realizing the direct transmission of data between nodes, reducing redundant data transfer links, and reducing data transmission loss and latency; after the node finishes execution, the result is stored in its own global field in real time, which can ensure the consistency and accuracy of data storage and retrieval, avoid data chaos, and facilitate subsequent execution function nodes to obtain data from its global field and process it.
[0163] For example, such as Figure 1B The processing steps of the corresponding execution function nodes in the backend for each visualization node displayed in the front end include: starting the execution function node corresponding to the "user input" node, obtaining the user input text, and storing it in the corresponding global field; using the execution function node corresponding to the "llm" node as an intermediate execution function node; using the global field of the execution function node corresponding to the "user input" node as the input field of the intermediate execution function node; having the intermediate execution function node obtain the user input text from the input field and call the large language model to process the user input text, and storing the execution result in the global field corresponding to the global data pool; updating the intermediate execution function node to the execution function node corresponding to the "file upload" node, and returning the steps of running the intermediate execution function node according to the global data pool, the global identifier of the intermediate execution function node, and the input identifier, until the execution function node corresponding to the "download file" node is completed.
[0164] This invention determines the execution order of functional nodes by the connection relationship between them, thereby clarifying the starting and ending functional nodes. By iteratively selecting and running intermediate functional nodes, the workflow is automated and executed in an orderly manner, avoiding disordered node execution order, ensuring the continuity and integrity of workflow execution, and adapting to the operational needs of complex multi-node workflows.
[0165] Example 5
[0166] Figure 5 This is a schematic diagram of a workflow configuration device provided in Embodiment 5 of the present invention. This embodiment of the invention is applicable to workflow orchestration. The device can execute a workflow configuration method and can be implemented in hardware and / or software. The device can be configured in an electronic device.
[0167] See Figure 5 The workflow configuration device shown includes an identifier generation module 501, a first determination module 502, a second determination module 503, and a file generation module 504, wherein...
[0168] The identifier generation module 501 is used to generate a global identifier for the candidate visualization node in response to the user's drag-and-drop operation on the candidate visualization node, based on the node type and data transmission type of the candidate visualization node.
[0169] The first determining module 502 is used to select a global identifier from the global identifiers of at least one target functional node and determine it as the input identifier of the candidate functional node; the drag-and-drop placement time of the target functional node is earlier than the drag-and-drop placement time of the candidate functional node;
[0170] The second determining module 503 is used to determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes;
[0171] The file generation module 504 is used to respond to the configuration end command issued by the user, generate a workflow configuration file according to the global identifier, input identifier and connection relationship of each visualization node, and send the workflow configuration file to the backend so that the backend runs the workflow according to the workflow configuration file.
[0172] This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
[0173] Optionally, the identifier generation module 501 includes:
[0174] The determining unit is configured to determine the node type identifier of the candidate visualization node based on the node type and data transmission type of the candidate visualization node;
[0175] The statistics unit is used to count the number of nodes in each of the target visualization nodes whose node type identifier is the same as the node type identifier of the candidate visualization node;
[0176] The generation unit is used to generate a global identifier for the candidate visualization node based on the number of nodes and the node type identifier.
[0177] Optional, define the unit, specifically for:
[0178] The global data type of the candidate visualization node is determined based on the association information between the preset node type and the global data type.
[0179] A global identifier for the candidate visualization node is generated based on the number of nodes and the node type identifier.
[0180] The workflow configuration device provided in this embodiment of the invention can execute the workflow configuration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the workflow configuration method.
[0181] Example 6
[0182] Figure 6This is a schematic diagram of a workflow configuration device provided in Embodiment Six of the present invention. This embodiment of the present invention is applicable to workflow orchestration. The device can execute a workflow configuration method and can be implemented in hardware and / or software. The device can be configured in an electronic device.
[0183] See Figure 6 The workflow configuration device shown includes a receiving module 601, a parsing module 602, a construction module 603, and an execution module 604, wherein...
[0184] The receiving module 601 is used to receive a workflow configuration file sent by the front end; the workflow configuration file is generated by the front end in response to the user's drag-and-drop operation on the candidate visualization nodes, based on the node type and data transmission type of the candidate visualization nodes; a global identifier is selected from the global identifiers of at least one target visualization node to be determined as the input identifier of the candidate visualization node; the drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node; the connection relationship between the candidate visualization node and each of the target visualization nodes is determined; and in response to the configuration end command issued by the user, it is generated based on the global identifier, input identifier and connection relationship of each visualization node.
[0185] The parsing module 602 is used to parse the workflow configuration file to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node;
[0186] The construction module 603 is used to construct a global data pool based on the global identifier of each of the execution function nodes; the global data pool includes global fields of each of the execution function nodes;
[0187] The execution module 604 is used to sequentially run each of the execution function nodes according to the connection relationship of each execution function node, the global data pool, the global identifier and the input identifier, so as to realize the workflow operation.
[0188] This invention, in response to user drag-and-drop operations on candidate visualization nodes, automatically generates global identifiers for candidate visualization nodes based on their node types. It then selects input identifiers for candidate visualization nodes from the global identifiers of the target visualization node, ensuring the uniqueness and accuracy of each visualization node's identifier and avoiding identifier conflicts. Users can independently drag and drop and configure workflows, selecting input identifiers for each visualization node. By recognizing the user-configured workflow connections and determining the global and input identifiers, the invention automatically generates workflow configuration files, enabling the backend to run the workflow automatically. This eliminates the need for users to possess computer technical knowledge or manually construct complex connections, simplifying workflow configuration and lowering the configuration threshold. It achieves seamless integration between front-end visualization workflow configuration and back-end workflow execution, improving the efficiency and accuracy of workflow configuration and enhancing the convenience and stability of workflow setup and deployment.
[0189] Optionally, the execution module 604 includes:
[0190] The determining unit is used to determine the running order of each of the execution function nodes based on the connection relationship of each execution function node;
[0191] The input unit is used to input user input data into the starting execution function node for processing, and to obtain the execution result of the starting execution function node; the starting execution function node is the execution function node that runs first in the execution order;
[0192] The storage unit is used to store the execution result into the global field of the starting execution function node;
[0193] The update unit is used to take the next execution function node of the starting execution function node as the intermediate execution function node;
[0194] An execution unit is configured to run the intermediate execution function node based on the global data pool, the global identifier of the intermediate execution function node, and the input identifier.
[0195] A verification unit is used to verify whether the intermediate execution function node is the last execution function node; the last execution function node is the execution function node that is last in the running order.
[0196] The return unit is used to update the intermediate execution function node to the next node if the intermediate execution function node is not the last execution function node, and return the steps of running the intermediate execution function node according to the global data pool, the global identifier and the input identifier of the intermediate execution function node, until the intermediate function node is the last execution function node.
[0197] Optional, execution unit, specifically used for:
[0198] In the global data pool, determine the global field that matches the input identifier of the intermediate execution function node;
[0199] The field value of the global field is input into the intermediate execution function node for processing, and the execution result of the intermediate execution function node is output.
[0200] The execution result is stored in the global field of the intermediate execution function node.
[0201] The workflow configuration device provided in this embodiment of the invention can execute the workflow configuration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the workflow configuration method.
[0202] Example 7
[0203] Figure 7 A schematic diagram of a workflow configuration device 710 that can be used to implement embodiments of the present invention is shown. The workflow configuration device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The workflow configuration device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0204] like Figure 7 As shown, the workflow configuration device 710 includes at least one processor 711 and a memory, such as a read-only memory (ROM) 712 or a random access memory (RAM) 713, communicatively connected to the at least one processor 711. The memory stores computer programs executable by the at least one processor. The processor 711 can perform various appropriate actions and processes based on the computer program stored in the ROM 712 or loaded from storage unit 718 into the RAM 713. The RAM 713 may also store various programs and data required for the operation of the workflow configuration device 710. The processor 711, ROM 712, and RAM 713 are interconnected via a bus 714. An input / output (I / O) interface 715 is also connected to the bus 714.
[0205] Multiple components in the workflow configuration device 710 are connected to the I / O interface 715, including: an input unit 716, such as a keyboard, mouse, etc.; an output unit 717, such as various types of displays, speakers, etc.; a storage unit 718, such as a disk, optical disk, etc.; and a communication unit 719, such as a network interface card, modem, wireless transceiver, etc. The communication unit 719 allows the workflow configuration device 710 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0206] Processor 711 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 711 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 711 performs the various methods and processes described above, such as workflow configuration methods.
[0207] In some embodiments, the workflow configuration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 718. In some embodiments, part or all of the computer program may be loaded and / or installed on the workflow configuration device 710 via ROM 712 and / or communication unit 719. When the computer program is loaded into RAM 713 and executed by processor 711, one or more steps of the workflow configuration method described above may be performed. Alternatively, in other embodiments, processor 711 may be configured to execute the workflow configuration method by any other suitable means (e.g., by means of firmware).
[0208] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0209] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable workflow configuration device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0210] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0211] To provide user interaction, the systems and techniques described herein can be implemented on a workflow configuration device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the workflow configuration device. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0212] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0213] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing workflow system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) workflows, such as high management difficulty and weak business scalability.
[0214] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0215] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A workflow configuration method, characterized in that, Executed by the front end, the method includes: In response to the user's drag-and-drop operation on the candidate visualization node, a global identifier for the candidate visualization node is generated based on the node type and data transmission type of the candidate visualization node. A global identifier is selected from the global identifiers of at least one target visualization node to be used as the input identifier of the candidate visualization node; the drag-and-drop placement time of the target visualization node is earlier than the drag-and-drop placement time of the candidate visualization node; Determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes; In response to the user's configuration end command, a workflow configuration file is generated based on the global identifier, input identifier, and connection relationship of each visualization node, and the workflow configuration file is sent to the backend so that the backend runs the workflow according to the workflow configuration file.
2. The method according to claim 1, characterized in that, The step of generating a global identifier for the candidate visualization node based on its node type and data transmission type includes: The node type identifier of the candidate visualization node is determined based on the node type and data transmission type of the candidate visualization node; Count the number of nodes in each target visualization node whose node type identifier is the same as the node type identifier of the candidate visualization node; A global identifier for the candidate visualization node is generated based on the number of nodes and the node type identifier.
3. The method according to claim 2, characterized in that, The step of determining the node type identifier of the candidate visualization node based on the node type and data transmission type of the candidate visualization node includes: The global data type of the candidate visualization node is determined based on the association information between the preset node type and the global data type. The node type identifier of the candidate visualization node is determined based on the global data type and the data transmission type.
4. A workflow configuration method, characterized in that, Executed by the backend, the method includes: The system receives a workflow configuration file sent from the front end. The workflow configuration file, in response to a user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for each candidate visualization node based on its node type and data transmission type. It then selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier for the candidate visualization node. The drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node. The system determines the connection relationships between the candidate visualization node and each of the target visualization nodes. Finally, in response to a configuration completion command issued by the user, it generates a configuration file based on the global identifier, input identifier, and connection relationships of each visualization node. The workflow configuration file is parsed to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node; A global data pool is constructed based on the global identifier of each of the aforementioned execution function nodes; the global data pool includes the global fields of each of the aforementioned execution function nodes; Based on the connection relationships of each execution function node, the global data pool, the global identifier, and the input identifier, each execution function node is run sequentially to achieve workflow operation.
5. The method according to claim 4, characterized in that, The step of sequentially running each execution function node according to the connection relationship of each execution function node, the global data pool, the global identifier, and the input identifier includes: The execution order of each execution function node is determined based on the connection relationship between the execution function nodes. The user's input data is input into the starting execution function node for processing, and the execution result of the starting execution function node is obtained; the starting execution function node is the execution function node that runs first in the execution order; The execution result is stored in the global field of the starting execution function node; The next execution function node after the starting execution function node is taken as the intermediate execution function node; The intermediate execution function node is run based on the global data pool, the global identifier of the intermediate execution function node, and the input identifier. Verify whether the intermediate execution function node is the last execution function node; the last execution function node is the execution function node that is last in the running order. If the intermediate execution function node is not the last execution function node, then the intermediate execution function node is updated to the next node, and the steps of running the intermediate execution function node according to the global data pool, the global identifier of the intermediate execution function node and the input identifier are returned until the intermediate function node is the last execution function node.
6. The method according to claim 5, characterized in that, The step of running the intermediate execution function node based on the global data pool, the global identifier of the intermediate execution function node, and the input identifier includes: In the global data pool, determine the global field that matches the input identifier of the intermediate execution function node; The field value of the global field is input into the intermediate execution function node for processing, and the execution result of the intermediate execution function node is output. The execution result is stored in the global field of the intermediate execution function node.
7. A workflow configuration device, characterized in that, The device is disposed at the front end, and the device includes: The identifier generation module is used to generate a global identifier for the candidate visualization node in response to the user's drag-and-drop operation on the candidate visualization node, based on the node type and data transmission type of the candidate visualization node. The first determining module is used to select a global identifier from the global identifiers of at least one target visualization node and determine it as the input identifier of the candidate visualization node; the drag-and-place time of the target visualization node is earlier than the drag-and-place time of the candidate visualization node; The second determining module is used to determine the connection relationship between the candidate visualization nodes and each of the target visualization nodes; The file generation module is used to respond to the configuration end command issued by the user, generate a workflow configuration file based on the global identifier, input identifier and connection relationship of each visualization node, and send the workflow configuration file to the backend so that the backend runs the workflow according to the workflow configuration file.
8. A workflow configuration device, characterized in that, The device is configured at the rear end, and the device includes: A receiving module is used to receive a workflow configuration file sent by the front end. The workflow configuration file, in response to a user's drag-and-drop operation on candidate visualization nodes, generates a global identifier for each candidate visualization node based on its node type and data transmission type. It then selects a global identifier from the global identifiers of at least one target visualization node to determine the input identifier for the candidate visualization node. The drag-and-drop time of the target visualization node is earlier than the drag-and-drop time of the candidate visualization node. The module determines the connection relationships between the candidate visualization node and each of the target visualization nodes. Finally, in response to a configuration end command issued by the user, it generates a configuration file based on the global identifier, input identifier, and connection relationships of each visualization node. The parsing module is used to parse the workflow configuration file to obtain the global identifier, input identifier, and connection relationship of the execution function node corresponding to each visualization node; A construction module is used to construct a global data pool based on the global identifier of each of the execution function nodes; the global data pool includes global fields of each of the execution function nodes; The execution module is used to sequentially run each of the execution function nodes according to the connection relationship of each execution function node, the global data pool, the global identifier, and the input identifier, so as to realize the workflow operation.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the workflow configuration method of any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the workflow configuration method according to any one of claims 1-6.