Template management method, template management device, electronic equipment and storage medium

Through the template management method, users can customize the tasks and properties of workflow nodes and publish custom templates, solving the problem of inefficient new creation in the workflow engine orchestration stage and achieving more efficient workflow process creation.

CN119720979AActive Publication Date: 2025-03-28CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311277122.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

During the orchestration stage of the workflow engine, every time a new workflow process is created, users need to define and connect each node from scratch, resulting in inefficient process creation.

Method used

Through the template management method, the user can determine the node to be edited in response to the selection instruction, obtain custom information, and determine the edited node based on the information, and finally publish the custom template. This method defines the tasks and properties of the node through custom information, realizes personalized editing of the node, and allows multiplexing of edited nodes.

Benefits of technology

Simplifies the creation process of workflow processes, improves the creation efficiency of workflow processes, reduces the amount of operations for users during the orchestration stage, and supports reuse of custom templates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720979A_ABST
    Figure CN119720979A_ABST
Patent Text Reader

Abstract

The invention discloses a template management method, a template management device, electronic equipment and a computer readable storage medium. The method comprises the steps of determining a to-be-edited node in response to a first selection instruction; in response to the to-be-edited node, user-defined information is obtained, an edited node is determined based on the user-defined information, and the user-defined information is used for defining a task and / or attribute of the to-be-edited node to obtain the edited node; and publishing a custom template based on the edited node. Through the scheme of the invention, the new building efficiency of the workflow process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a template management method, a template management device, an electronic device, and a computer-readable storage medium. Background Art

[0002] High-throughput computing refers to the use of large-scale computing resources to process and analyze large amounts of data, and the process usually involves a large number of computing tasks and data operations. In order to achieve automated management and scheduling of these large-scale computing tasks and data operations, workflow engines have been designed to improve computing efficiency and data operation speed.

[0003] The core implementation logic of the workflow engine mainly includes orchestration, scheduling, monitoring, exception handling and result output. However, every time a new workflow process is created in the orchestration stage, the user needs to define and connect the required nodes from scratch, which easily affects the efficiency of process creation. Summary of the invention

[0004] The present application provides a template management method, a template management device, an electronic device and a computer-readable storage medium, which can improve the efficiency of creating a new workflow process.

[0005] In a first aspect, the present application provides a template management method, comprising:

[0006] In response to the first selection instruction, determining a node to be edited;

[0007] In response to the node to be edited, obtaining custom information, and determining the edited node based on the custom information, wherein the custom information is used to define the task and / or attribute of the node to be edited, so as to obtain the edited node;

[0008] Publish a custom template based on the edited node.

[0009] The workflow engine proposes node-based template management. Specifically, the smallest controllable object during template management is the node. The present application uses custom information to implement the editing of the selected node to be edited, and finally obtains the edited node. It can be understood that, on the one hand, the custom information can define the task of the node, so that the node performs the task according to the personalized needs of the user; on the other hand, the custom information can also define the attributes of the node, so that the attributes of the node can be matched with the task to be performed, ensuring that the task corresponding to the node can be smoothly executed. The electronic device publishes the customized edited nodes as custom templates, and these custom templates can be reused in the creation process of the workflow process. In summary, the present application proposes the management of templates in the orchestration stage of the workflow engine, thereby simplifying the creation process of the workflow process and improving the creation efficiency of the workflow process.

[0010] In some embodiments, publishing a custom template based on the edited node includes:

[0011] When the number of edited nodes is one, the edited node is published as a custom node template;

[0012] When the number of edited nodes is more than two, the two or more edited nodes are published as a custom process template according to the connection relationship between the edited nodes.

[0013] Taking into account the different levels of complexity of tasks, the workflow editing platform can publish a custom node template for completing simple tasks through a single edited node, or publish a custom process template for completing complex tasks through multiple edited nodes, thereby enriching the types of custom templates and providing more possibilities for the subsequent reuse of custom templates.

[0014] In some embodiments, the custom information includes: code information and / or attribute information, the code information is used to define the task of the node to be edited, and the attribute information is used to define the attribute of the node to be edited; in response to the node to be edited, obtaining the custom information, and determining the edited node based on the custom information, including:

[0015] Display the information editing page of the node to be edited. The information editing page includes: a code editing page and / or a property editing page. The code editing page is in the form of a text input box, and the property editing page is in the form of a form drawer;

[0016] Get custom information through the information editing page;

[0017] The node to be edited is edited based on the custom information to obtain the edited node.

[0018] The workflow editing platform can mainly complete the definition of nodes through code information and attribute information. Specifically, code information defines tasks, and attribute information defines attributes. Based on the different expressions of code information and attribute information, the workflow editing platform proposes two information editing pages, namely code editing page and attribute editing page. Since code information generally relies on text input, the code editing page can be expressed as a text input box; since attribute information can generally only be entered within a given attribute value range, the attribute editing page can be expressed as a form drawer. Through these two information editing pages, flexible editing of nodes is achieved.

[0019] In some embodiments, when the information editing page includes a property editing page, obtaining custom information through the information editing page includes:

[0020] Determining, according to the node type of the node to be edited, a specific attribute associated with the node to be edited;

[0021] Receive attribute information for a particular attribute through an attribute edit page.

[0022] The workflow editing platform pre-sets a variety of node types to perform different types of tasks. Based on this, the workflow editing platform also proposes the concept of unique attributes associated with nodes for different node types. It can be understood that unique attributes refer to: attributes that are unique to nodes of a specific node type. By customizing unique attributes, different nodes can support different data input / output according to their uses, thereby improving the pertinence of nodes.

[0023] In some embodiments, the template management method further includes:

[0024] In response to the second selection instruction, determining a plurality of objects to be edited;

[0025] In response to at least two connection instructions, an execution order of a plurality of objects to be edited is determined to generate a workflow.

[0026] All currently published custom templates can be reused in the new workflow process. All currently published custom templates here include not only the custom templates published by the current user, but also the custom templates published by other users, which can broaden the application scenarios of each custom template. In addition, if the custom template is not sufficient to meet the new creation needs of the current workflow, the workflow editing platform still provides various basic nodes for editing. In the above way, the final generated workflow can be composed of the currently published custom templates and / or the basic nodes that have been edited this time, which not only improves the efficiency of workflow editing, but also ensures the flexibility of workflow editing.

[0027] In some embodiments, in response to at least two connection instructions, determining the execution order of multiple objects to be edited includes:

[0028] According to the preset connection rules, determine whether the directed connection indicated by each connection instruction is valid;

[0029] In the case where there are valid directed links, the execution order of two to-be-edited objects connected by each valid directed link is determined according to the direction of each valid directed link.

[0030] Each connection instruction actually indicates a directed connection. The workflow editing platform can use directed connections to construct the execution order between different objects to be edited, which is not only more intuitive but also easy to modify. In this process, the workflow editing platform will also judge the validity of the directed connection to ensure that the final generated workflow can be executed smoothly.

[0031] In some embodiments, judging whether the directed connection indicated by each connection instruction is valid according to a preset connection rule includes:

[0032] According to the preset connection quantity rule and the preset connection start and end position rule, it is determined whether the directed connection indicated by each connection instruction is valid.

[0033] To ensure the generation of workflows, the workflow editing platform can make a comprehensive judgment on the effectiveness of each directed connection from two different dimensions: the number of connections and the starting and ending positions of the connections, so as to minimize the occurrence of invalid directed connections.

[0034] In a second aspect, the present application provides a template management device, comprising:

[0035] A first determining module, configured to determine a node to be edited in response to a first selection instruction;

[0036] An editing module, configured to obtain custom information in response to a node to be edited, and determine an edited node based on the custom information, wherein the custom information is used to define a task and / or attribute of the node to be edited, so as to obtain the edited node;

[0037] Publishing module, used to publish custom templates based on edited nodes.

[0038] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0040] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.

[0041] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0043] Figure 1 It is a flow chart of the template management method provided in the embodiment of the present application;

[0044] Figure 2 This is an example diagram of an editing page of a workflow editing platform provided in an embodiment of the present application;

[0045] Figure 3 is an example diagram of valid directed lines and invalid directed lines provided in an embodiment of the present application;

[0046] Figure 4 is a structural block diagram of a template management device provided in an embodiment of the present application;

[0047] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0050] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features.

[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0052] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0053] In the description of the embodiments of the present application, the term "plurality" refers to more than two (including two), unless otherwise clearly and specifically defined.

[0054] High-throughput computing refers to the use of large-scale computing resources to process and analyze large amounts of data, and the process usually involves a large number of computing tasks and data operations. To achieve high-throughput computing, multiple steps are usually required, each of which may involve different computing tools, different data sources, and different computing resources, and these steps also need to be coordinated and managed. Currently, in order to achieve automated management and scheduling of these large-scale computing tasks and data operations, a workflow engine has been designed to improve computing efficiency and the speed of data operations.

[0055] The core implementation logic of the workflow engine mainly includes several aspects such as orchestration, scheduling, monitoring, exception handling and result output. Specifically, in the process orchestration of different workflows, there may be more or less fixed processes. However, each time a new workflow process is created in the orchestration stage, the user is required to define and connect the required nodes from scratch, which makes the efficiency of process creation easily affected. Based on the above considerations, the embodiment of the present application proposes a template management method, which can publish custom templates based on edited nodes, thereby realizing the reuse of edited nodes in the workflow creation process and improving the creation efficiency. In order to illustrate the technical solution proposed in the embodiment of the present application, it is described below through specific embodiments.

[0056] The following describes a template management method provided in an embodiment of the present application. The template management method can be applied to electronic devices equipped with a workflow engine, including but not limited to computers. Figure 1 , the template management method in the embodiment of the present application includes:

[0057] Step 101: In response to a first selection instruction, determine a node to be edited.

[0058] The workflow engine can provide a workflow editing platform so that users can complete various operations in the orchestration stage on the workflow editing platform. The workflow engine can configure the basic nodes supported by the workflow editing platform in advance according to its object-oriented requirements. Specifically, the basic nodes can be divided into the following two categories: general nodes and business nodes. General nodes are used to perform general tasks, and business nodes are used to perform specific tasks related to the business.

[0059] In some examples, the general nodes can be further subdivided into: start nodes, end nodes, task nodes, grouping nodes, judgment nodes, parallel nodes, and repeated parallel nodes, etc. Among them, the start node indicates the start of the workflow, the end node indicates the end of the workflow, the task node indicates the task defined by the user, the grouping node indicates the grouping operation, the judgment node indicates the tasks corresponding to different judgment results, the parallel node indicates the tasks executed in parallel at the same time, and the repeated parallel node indicates the tasks executed in parallel repeatedly.

[0060] Specifically, for parallel nodes and judgment nodes, both involve more than two tasks. In some examples, a branch structure can be set in the form of a task line, and one task line corresponds to a task node, wherein only two task lines are initially set, and can be added later according to actual use needs (specifically, adding task lines and then configuring the task nodes corresponding to the task lines). In other examples, a branch structure can also be set directly in the form of a task node, wherein only two task nodes are initially set, and can be added later according to actual use needs (specifically, directly adding task nodes and then performing normal connection operations).

[0061] In other examples, according to the specific business scenarios of high-throughput computing, business nodes can be further subdivided into: Gaussian nodes, Hypertext Transfer Protocol (HTTP) nodes, and result display nodes, etc. Among them, Gaussian nodes are used to perform Gaussian computing tasks, HTTP nodes are used to perform HTTP call tasks, and result display nodes are used to perform result display tasks.

[0062] The workflow editing platform can display the basic nodes it supports through a display interface to facilitate user selection. The user can input a first selection instruction to the workflow editing platform through touch, mouse control or remote control according to their task requirements. The first selection instruction is used to select the basic node as the node to be edited. Thus, the workflow editing platform can receive and respond to the first selection instruction, and determine the basic node selected by the first selection instruction as the node to be edited. Among them, the number of nodes to be edited can be one, two or more, and the embodiment of the present application does not limit the number of nodes to be edited.

[0063] Step 102: In response to the node to be edited, obtain custom information, and determine the edited node based on the custom information.

[0064] The user can traverse the nodes to be edited to input custom information to each node to be edited. In this way, for the workflow editing platform, according to the traversal order, it can respond to each node to be edited and obtain the custom information of the corresponding node to be edited by receiving the user's input. Specifically, the attributes of some basic nodes may be fixed, and only the tasks are configurable; the tasks of some basic nodes may be fixed, and only the attributes are configurable; and the attributes and tasks of some basic nodes may be configurable. Based on this, the use of custom information may include at least one of the following: defining the tasks of the corresponding node to be edited, and the number of the tasks may be more than one; and defining the attributes of the corresponding node to be edited.

[0065] It should be noted that for each node to be edited, when its corresponding custom information defines tasks and attributes, the workflow editing platform can also judge the legality of the task, the legality of the attribute, and the compatibility of the task and the attribute; that is, the workflow editing platform can judge whether the task is legal, whether the attribute is legal, and whether there is a conflict between the task and the attribute. In the case of any illegality between the two, or incompatibility between the two (that is, there is a conflict between the two), the workflow editing platform can output a reminder message to remind the user to re-enter the custom information for the node to be edited. Of course, even if the corresponding custom information of a node to be edited only defines tasks or attributes, the task or the attribute needs to be legal.

[0066] It can be understood that nodes with defined tasks and attributes can perform node functional operations normally. Based on this, for nodes to be edited that have acquired corresponding custom information and completed the definition of tasks and / or attributes based on the custom information, the workflow editing platform can consider that the editing of the nodes has been completed. For the sake of distinction, the nodes to be edited after editing can be recorded as edited nodes; that is, the distinction between edited nodes and nodes to be edited lies in whether the definition of tasks and / or attributes has been completed based on the acquired corresponding custom information.

[0067] Step 103: Publish a custom template based on the edited node.

[0068] It can be understood that the edited node is already an executable node. After receiving the publishing instruction, the workflow editing platform can respond to the publishing instruction and publish a custom template based on the edited node. In some examples, the publishing instruction can be input by the user to the workflow editing platform through touch, mouse control or remote control, or it can be self-generated by the workflow editing platform. The published custom template can be saved in the workflow editing platform for use in the subsequent creation of the workflow, thereby realizing the reuse of the edited node. That is, for some fixed processing flows, they can be published as templates through the embodiments of the present application, so that users no longer have to create them from scratch every time.

[0069] As can be seen from the above, in the embodiment of the present application, the workflow engine proposes node-based template management. Specifically, the smallest controllable object during template management is the node. The present application uses custom information to implement the editing of the selected node to be edited, and finally the edited node can be obtained. It can be understood that, on the one hand, the custom information can define the task of the node, so that the node performs the task according to the personalized needs of the user; on the other hand, the custom information can also define the attributes of the node, so that the attributes of the node can be matched with the task to be performed, ensuring that the task corresponding to the node can be smoothly executed. The electronic device publishes the edited nodes obtained by customization as custom templates, and these custom templates can be reused in the creation process of the workflow process. In summary, the present application proposes the management of templates in the orchestration stage of the workflow engine, thereby simplifying the creation process of the workflow process and improving the creation efficiency of the workflow process.

[0070] In some embodiments, there are differences in task complexity between different tasks. Generally speaking, simple tasks can be implemented by a single node, while complex tasks usually require the cooperation of multiple nodes. Based on this, custom templates can be subdivided into the following two categories: custom node templates, and custom process templates. Accordingly, step 103 may specifically include:

[0071] A1. When the number of edited nodes is one, publish the edited node as a custom node template.

[0072] When publishing a custom template for a simple task, the user only needs to select a node to be edited. After completing the editing of the node to be edited and obtaining an edited node, the workflow editing platform can publish the edited node as a custom node template. It can be understood that the custom node template is actually: a single node that has been defined.

[0073] A2. When the number of edited nodes is more than two, publish the more than two edited nodes as a custom process template according to the connection relationship between the edited nodes.

[0074] When publishing a custom template for a complex task, the user can select two or more nodes to be edited. After completing the editing of the two or more nodes to be edited and obtaining two or more edited nodes, the user can set the connection relationship between the two or more edited nodes according to the desired task, thereby obtaining a sub-process composed of the two or more edited nodes. For example, the user can nest multiple task nodes in a grouping node to form an independent sub-process.

[0075] It should be noted that in the sub-process, there is no need to define the start node and the end node. The workflow editing platform can publish the two or more edited nodes with established connection relationships as a custom process template. It can be understood that the custom process template is actually: a processing flow composed of multiple nodes that have been defined.

[0076] In some embodiments, as described above, depending on the node type of the node to be edited, custom information can be used to define the tasks and / or attributes of the node to be edited; based on this, the custom information can specifically include: code information and / or attribute information. Among them, the code information is used to define the tasks performed by the node to be edited, including but not limited to various computing operations and node execution environment, so that the node to be edited can subsequently perform tasks according to the personalized needs of the user; attribute information is used to define the attributes of the node to be edited, including but not limited to input parameters and output parameters, so that the attributes of the node can be matched with the tasks to be performed, ensuring that the tasks corresponding to the node can be smoothly executed. Based on this, in order to improve the operability of node editing, step 102 can specifically include:

[0077] B1. Display the information editing page of the node to be edited.

[0078] As described above, different types of custom information may be provided according to the node type to be edited; that is, some nodes may only require the user to input attribute information (that is, the node only needs to define its attributes) to complete editing, some nodes may only require the user to input code information (that is, the node only needs to define its tasks) to complete editing, and some nodes may require the user to input both attribute information and code information (that is, both the node's attributes and tasks need to be defined) before editing can be completed. Based on this, according to the different node types of the node to be edited, the information editing page may include: a code editing page and / or an attribute editing page.

[0079] Among them, since the code information is generally text information, the code editing page can be specifically expressed in the form of a text input box; since the attribute information is generally set within a given value range, the attribute editing page can be specifically expressed in the form of a form drawer.

[0080] B2. Obtain custom information through the information editing page.

[0081] In the case where the electronic device is a computer, the user can right-click the node to be edited to pop up the information editing page supported by the node to be edited, and then click the information editing page to be displayed by the mouse coordinates to enter the corresponding custom information in the displayed information editing page. That is, in the case where the electronic device is a computer, the workflow editing platform can display and hide the information editing page by clicking instructions. Of course, in the case where the electronic device is other devices, the workflow editing platform can also display and hide the information editing page through instructions of other input methods, which will not be repeated here.

[0082] In some examples, the attribute information can be further divided into: general attributes and execution attributes. Among them, general attributes include but are not limited to view attributes, such as node name, node ID and node position in the canvas, etc.; execution attributes include but are not limited to custom attributes and unique attributes. The following is a brief introduction to custom attributes and unique attributes:

[0083] Except for the end node, all other node types have custom attributes. Custom attributes can set attribute name, attribute data type, initialization time, and attribute value input method. Just as an example, taking attribute data type as an example, the workflow editing platform can define the following data types: LONG, DOUBLE, ENUM, BOOL, STRING, CIF, FILE, DICT, and LIST; users can input each custom attribute through controls and / or expressions.

[0084] Unique attributes refer to attributes that are unique to a node, and not all node types have unique attributes. As an example only, the unique attributes of a task node are the script type and script content; the unique attribute of a repeating parallel node is the degree of parallelism; the unique attribute of a judgment node is the judgment condition; and the unique attribute of a loop node is the loop condition. Based on this, when the information editing page includes an attribute editing page, the electronic device can first determine the unique attributes associated with the node to be edited based on the node type of the node to be edited, and then receive the attribute information of the unique attributes input by the user through the attribute editing page.

[0085] B3. Edit the node to be edited based on the custom information to obtain the edited node.

[0086] As described above, the workflow editing platform can verify the legality of defined tasks and attributes. Specifically, for the code information that defines the task, the workflow editing platform can determine whether the received code information has any anomalies in syntax, so as to determine whether the task defined by the code information is legal; similarly, for the attribute information that defines the attribute, the workflow editing platform can also determine whether the received attribute information is within the given attribute value range, so as to determine whether the attribute defined by the attribute information is legal. Based on the above operations, it can be prevented that illegal information input by the user due to manual errors will affect the subsequent application of the node to be edited. If the custom information is correct, the workflow editing platform can complete the editing of the node to be edited according to the custom information.

[0087] In some embodiments, the workflow editing platform may generate a workflow in the following manner:

[0088] C1. In response to the second selection instruction, a plurality of objects to be edited are determined.

[0089] It can be understood that both custom node templates and custom process templates can be used directly when creating a workflow. Specifically, the workflow editing platform can be provided with a custom node template list, a custom process template list and a node list, wherein the custom node template list is used to display each custom node template that has been published on the workflow editing platform, the custom process template list is used to display each custom process template that has been published on the workflow editing platform, and the node list is used to display each basic node supported by the workflow editing platform. Users can input switching instructions through the list to realize the display switching between the custom node template list, the custom process template list and the node list.

[0090] After the workflow editing platform is started, it can first initialize the canvas and display the initialized canvas in the canvas area. Among them, the initialization canvas can be implemented by code, including but not limited to the following operations: defining grid size, dragging canvas, scrolling canvas, small map and information such as allowed nested nodes. In this embodiment, the canvas is divided into two categories, namely: main canvas and other canvases. Among them, the main canvas is a canvas used to generate or display workflows, which cannot be closed; other canvases are canvases used to generate or display sub-processes or node operations, which can be closed. It should be noted that the main canvas and other canvases have the following restrictions: there can only be one start node and one end node in the main canvas, and there can be no start node and end node in other canvases (that is, there can only be one start node and one end node in the workflow, and there can be no start node and end node in the custom node template and the custom process template).

[0091] The user can enter a second selection instruction in the editing page of the workflow editing platform to select from the basic nodes and currently published custom templates supported by the workflow editing platform to determine multiple objects to be edited. As a result, the workflow editing platform can receive and respond to the second selection instruction, and determine the object selected by the second selection instruction (which can be a basic node or a currently published custom template) as the object to be edited. That is, the second selection instruction can be used to select the basic node and / or custom template as the object to be edited.

[0092] Specifically, the first selection instruction and the second selection instruction can both be input through a drag operation, the object corresponding to the start coordinates of the drag operation is the selected object, and the canvas position corresponding to the end coordinates of the drag operation is the position to which the object is dragged.

[0093] In order to input the first selection instruction and the second selection instruction through the drag operation, the workflow editing platform can create a drag instance in advance and customize the drag behavior through configuration, thereby giving each basic node and each custom template the ability to drag. During the drag operation, the user perceives that the selected basic node or custom template is dragged to the target canvas (that is, the currently displayed canvas), but the workflow editing platform actually performs: at the beginning of the drag, a proxy canvas with a proxy node is created according to the configuration options; during the drag process, the proxy canvas is actually dragged (this process is invisible and the user has no perception); at the end of the drag, the proxy node is used as a parameter of the getDragNode method; and finally the object to be edited on the target canvas is returned, that is, the object dragged to the target canvas. It should be noted that at the end of the drag, it is also necessary to verify whether the dragged object can be dragged to the target canvas according to the restrictions of the main canvas and other canvases mentioned above (that is, there can only be one start node and one end node in the main canvas, and there can be no start node and end node in other canvases).

[0094] See also Figure 2 , Figure 2 An example of the editing page of the workflow editing platform is given. On the far left of the editing page, the custom node template list, custom process template list and node list are displayed through the tab bar; on the right side of the tab bar, the content of the currently selected list is displayed; in the middle and right side of the editing page, the canvas area is displayed. The workflow editing platform can open multiple canvases in the canvas area, but only one canvas can be displayed in the foreground at the same time.

[0095] C2. In response to at least two connection instructions, determine the execution order of multiple objects to be edited to generate a workflow.

[0096] For any two objects to be edited that the user considers to be directly related in terms of execution logic, the user can input a connection instruction to the workflow editing platform; thus, the workflow editing platform can receive and respond to the connection instruction, and establish an association relationship between the two objects to be edited related to the connection instruction. Considering that the number of objects to be edited is at least three (because it includes at least a start node and an end node), the number of connection instructions is at least two, so that a direct or indirect association relationship between multiple objects to be edited can be established.

[0097] For any connection instruction, the directed connection indicated by it directly connects the two objects to be edited, specifically, connects the nodes in the two objects to be edited; and the direction of the directed connection can be explicitly identified by an arrow. That is, the directed connection should eventually be: from one node (also known as the starting node) to another node (also known as the target node). For any node, the directed connection from other nodes to itself is an incoming line, and the directed connection from itself to other nodes is an outgoing line. It should be noted that the starting node can only connect to the outgoing line, and the ending node can only connect to the incoming line.

[0098] In order to avoid the workflow from being unable to be executed due to user connection errors, the workflow editing platform can also pre-set connection rules to judge the validity of directed connections. Specifically, the connection rules can be considered from the aspects of quantity and position. That is, the connection rules can specifically include: connection quantity rules and connection start and end position rules. Taking the incoming lines of any node as an example, the connection quantity rule can be used to limit the upper limit of the number of incoming lines of the node (for example, not more than N, N is a positive integer, which can be determined according to the node type of the node); the connection start and end position rule can be used to limit the start and end positions of the incoming lines of the node (including the starting position and the ending position), for example, the starting position of the incoming line can only be the first specified edge, the ending position can only be the second specified edge, and the starting position of the incoming line cannot be the same edge as the ending position of other outgoing lines, etc.

[0099] See also Figure 3 , Figure 3 Examples of invalid directed links and valid directed links are given respectively when the grouping node is the start node and the target node. Invalid directed links are: dashed lines with arrows marked with "×"; valid directed links are: solid lines with arrows.

[0100] The workflow management platform can determine whether the directed connection indicated by each connection instruction is valid according to the preset connection rules, and if the directed connection is valid, determine the execution order of the two objects to be edited connected by the directed connection according to the direction of the directed connection (determined by the arrow of the directed connection). On the contrary, if the directed connection is invalid, the directed connection can be erased.

[0101] It can be understood that there are certain similarities between the generation of workflow and the generation of custom process templates. The biggest difference between the two is that the workflow includes a start node and an end node. In fact, in the process of generating a workflow, the user can intercept part of the fixed process and publish it as a custom process template. This embodiment of the application will not be repeated.

[0102] It can be understood that in the process of generating a workflow, when the object to be edited is a basic node, the user also needs to edit (ie customize) the object to be edited. The specific process can be referred to the description of step 102, and the embodiment of the present application will not go into details.

[0103] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0104] Corresponding to the template management method provided above, the present application embodiment also provides a template management device. Figure 4 The template management device 4 in the embodiment of the present application includes:

[0105] A first determination module 401, configured to determine a node to be edited in response to a first selection instruction;

[0106] The editing module 402 is used to obtain custom information in response to the node to be edited, and determine the edited node based on the custom information, wherein the custom information is used to define the task and / or attribute of the node to be edited, so as to obtain the edited node;

[0107] The publishing module 403 is used to publish the custom template based on the edited node.

[0108] In some embodiments, the publishing module 403 includes:

[0109] A first publishing unit, used for publishing the edited node as a custom node template when the number of edited nodes is one;

[0110] The second publishing unit is used to publish the two or more edited nodes as a custom process template according to the connection relationship between the edited nodes when the number of the edited nodes is more than two.

[0111] In some embodiments, the custom information includes: code information and / or attribute information, the code information is used to define the task of the node to be edited, and the attribute information is used to define the attribute of the node to be edited; the editing module 402 includes:

[0112] A display unit, used to display an information editing page of a node to be edited, the information editing page including: a code editing page and / or a property editing page, the code editing page is in the form of a text input box, and the property editing page is in the form of a form drawer;

[0113] An acquisition unit, used to acquire custom information through an information editing page;

[0114] The editing unit is used to edit the node to be edited based on the custom information to obtain the edited node.

[0115] In some embodiments, the acquisition unit includes:

[0116] A determination subunit, configured to determine, when the information editing page includes an attribute editing page, a specific attribute associated with the node to be edited according to the node type of the node to be edited;

[0117] The receiving subunit is used to receive the attribute information of the specific attribute through the attribute editing page.

[0118] In some embodiments, the template management device 4 further includes:

[0119] A second determining module, configured to determine a plurality of objects to be edited in response to a second selection instruction;

[0120] The generating module is used to determine the execution order of multiple objects to be edited in response to at least two connection instructions to generate a workflow.

[0121] In some embodiments, the generating module comprises:

[0122] A judging unit, used to judge whether the directed connection indicated by each connection instruction is valid according to a preset connection rule;

[0123] The determination unit is used to determine the execution order of two objects to be edited connected by each valid directed link according to the direction of each valid directed link when there is a valid directed link.

[0124] In some embodiments, the determination unit is specifically configured to determine whether the directed connection indicated by each connection instruction is valid according to a preset connection quantity rule and a preset connection start and end position rule.

[0125] As can be seen from the above, the embodiment of the present application proposes node-based template management. Specifically, the smallest controllable object during template management is the node. The present application uses custom information to implement the editing of the selected node to be edited, and finally the edited node can be obtained. It can be understood that, on the one hand, the custom information can define the task of the node, so that the node performs the task according to the personalized needs of the user; on the other hand, the custom information can also define the attributes of the node, so that the attributes of the node can be matched with the task to be performed, ensuring that the task corresponding to the node can be smoothly executed. The electronic device publishes the customized edited nodes as custom templates, and these custom templates can be reused in the creation process of the workflow process. In summary, the present application proposes the management of templates in the orchestration stage of the workflow engine, thereby simplifying the creation process of the workflow process and improving the creation efficiency of the workflow process.

[0126] Corresponding to the template management method provided above, the embodiment of the present application also provides an electronic device. Figure 5 The electronic device 5 in the embodiment of the present application includes: a memory 501, one or more processors 502 ( Figure 5 Only one is shown) and a computer program stored in the memory 501 and executable on the processor. The memory 501 is used to store software programs and modules, and the processor 502 executes various functional applications and data processing by running the software programs and units stored in the memory 501 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 502 implements the following steps when running the above-mentioned computer program stored in the memory 501:

[0127] In response to the first selection instruction, determining a node to be edited;

[0128] In response to the node to be edited, obtaining custom information, and determining the edited node based on the custom information, wherein the custom information is used to define the task and / or attribute of the node to be edited, so as to obtain the edited node;

[0129] Publish a custom template based on the edited node.

[0130] Assuming that the above is the first possible implementation, in a second possible implementation provided as a basis of the first possible implementation, publishing a custom template based on the edited node includes:

[0131] When the number of edited nodes is one, the edited node is published as a custom node template;

[0132] When the number of edited nodes is more than two, the two or more edited nodes are published as a custom process template according to the connection relationship between the edited nodes.

[0133] In a third possible implementation provided on the basis of the first possible implementation or the second possible implementation, the custom information includes: code information and / or attribute information, the code information is used to define the task of the node to be edited, and the attribute information is used to define the attribute of the node to be edited; in response to the node to be edited, obtaining the custom information, and determining the edited node based on the custom information, including:

[0134] Display the information editing page of the node to be edited. The information editing page includes: a code editing page and / or a property editing page. The code editing page is in the form of a text input box, and the property editing page is in the form of a form drawer;

[0135] Get custom information through the information editing page;

[0136] The node to be edited is edited based on the custom information to obtain the edited node.

[0137] In a fourth possible implementation provided based on the third possible implementation, when the information editing page includes a property editing page, obtaining custom information through the information editing page includes:

[0138] Determining, according to the node type of the node to be edited, a specific attribute associated with the node to be edited;

[0139] Receive attribute information of a specific attribute through the attribute editing page.

[0140] In a fifth possible implementation provided on the basis of the first possible implementation or the second possible implementation, the processor 502 further implements the following steps when running the computer program stored in the memory 501:

[0141] In response to the second selection instruction, determining a plurality of objects to be edited;

[0142] In response to at least two connection instructions, an execution order of a plurality of objects to be edited is determined to generate a workflow.

[0143] In a sixth possible implementation provided on the basis of the fifth possible implementation, in response to at least two connection instructions, determining the execution order of the plurality of objects to be edited includes:

[0144] According to the preset connection rules, determine whether the directed connection indicated by each connection instruction is valid;

[0145] In the case where there are valid directed links, the execution order of two to-be-edited objects connected by each valid directed link is determined according to the direction of each valid directed link.

[0146] In a seventh possible implementation provided on the basis of the sixth possible implementation, judging whether the directed connection indicated by each connection instruction is valid according to a preset connection rule includes:

[0147] According to the preset connection quantity rule and the preset connection start and end position rule, it is determined whether the directed connection indicated by each connection instruction is valid.

[0148] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0149] The memory 501 may include a read-only memory and a random access memory, and provide instructions and data to the processor 502. A part or all of the memory 501 may also include a non-volatile random access memory. For example, the memory 501 may also store information on the device type.

[0150] As can be seen from the above, the embodiment of the present application proposes node-based template management. Specifically, the smallest controllable object during template management is the node. The present application uses custom information to implement the editing of the selected node to be edited, and finally the edited node can be obtained. It can be understood that, on the one hand, the custom information can define the task of the node, so that the node performs the task according to the personalized needs of the user; on the other hand, the custom information can also define the attributes of the node, so that the attributes of the node can be matched with the task to be performed, ensuring that the task corresponding to the node can be smoothly executed. The electronic device publishes the customized edited nodes as custom templates, and these custom templates can be reused in the creation process of the workflow process. In summary, the present application proposes the management of templates in the orchestration stage of the workflow engine, thereby simplifying the creation process of the workflow process and improving the creation efficiency of the workflow process.

[0151] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0154] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0155] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0157] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A template management method, characterized in that: include: In response to the first selection instruction, determining a node to be edited; In response to the node to be edited, obtaining custom information, and determining an edited node based on the custom information, wherein the custom information is used to define a task and / or attribute of the node to be edited, so as to obtain the edited node; A custom template is published based on the edited node.

2. The template management method according to claim 1, characterized in that: The publishing of a custom template based on the edited node includes: When the number of the edited node is one, publishing the edited node as a custom node template; In the case that the number of the edited nodes is more than two, the more than two edited nodes are published as a custom process template according to the connection relationship between the edited nodes.

3. The template management method according to claim 1 or 2, characterized in that: The custom information includes: code information and / or attribute information, the code information is used to define the task of the node to be edited, and the attribute information is used to define the attribute of the node to be edited; the obtaining of the custom information in response to the node to be edited, and determining the edited node based on the custom information, includes: Displaying the information editing page of the node to be edited, the information editing page including: a code editing page and / or a property editing page, the code editing page is in the form of a text input box, and the property editing page is in the form of a form drawer; Obtain the custom information through the information editing page; The node to be edited is edited based on the custom information to obtain the edited node.

4. The template management method according to claim 3, characterized in that: In the case where the information editing page includes a property editing page, obtaining the custom information through the information editing page includes: Determining, according to the node type of the node to be edited, a specific attribute associated with the node to be edited; The attribute information of the unique attribute is received through the attribute editing page.

5. The template management method according to claim 1 or 2, characterized in that: The template management method further includes: In response to the second selection instruction, determining a plurality of objects to be edited; In response to at least two connection instructions, an execution order of the plurality of objects to be edited is determined to generate a workflow.

6. The template management method according to claim 5, characterized in that: The step of determining the execution order of the plurality of objects to be edited in response to at least two connection instructions comprises: According to the preset connection rules, determining whether the directed connection indicated by each connection instruction is valid; In the case that there are valid directed links, the execution order of two to-be-edited objects connected by each valid directed link is determined according to the direction of each valid directed link.

7. The template management method according to claim 6, characterized in that: The step of judging whether the directed connection indicated by each connection instruction is valid according to the preset connection rule includes: According to the preset connection quantity rule and the preset connection start and end position rule, it is determined whether the directed connection indicated by each connection instruction is valid.

8. A template management device, characterized in that: include: A first determining module, configured to determine a node to be edited in response to a first selection instruction; An editing module, configured to obtain custom information in response to the node to be edited, and determine an edited node based on the custom information, wherein the custom information is used to define a task and / or attribute of the node to be edited, so as to obtain the edited node; A publishing module is used to publish a custom template based on the edited node.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, device and equipment for obtaining business process

    CN112561386A

  • Instrument digital object construction system and method based on data dictionary

    CN113435174A

  • Workflow and custom form-based management method, system and storage medium

    CN114064037A

  • Dialogue interaction method and apparatus, device, and storage medium

    US20210209312A1

  • Configuration template generation method, network element configuration method and system therefor, and storage medium

    WO2022247420A1