Workflow processing method and device

By recording execution-level execution data and adding transaction ACID feature support in workflow processing, the computing integrity problem of lightweight stream computing engines in cross-platform scenarios is solved, and efficient workflow processing is achieved.

CN114625509BActive Publication Date: 2024-09-27ZHEJIANG E COMMERCE BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210269882.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2024-09-27
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

When existing technologies use lightweight stream computing engines to run common workflows, it is difficult to achieve cross-platform unified modeling and cross-platform features, and cannot effectively guarantee the integrity of calculations.

Method used

By receiving the workflow graph, the task nodes are executed according to the execution order, and the execution data is recorded to the preset storage space according to the execution level, adding support for transaction ACID features to ensure the atomicity, consistency, isolation and durability of workflow processing. .

Benefits of technology

It improves the efficiency of workflow processing, ensures the atomicity, consistency, isolation and durability of workflow in cross-site, cross-platform and cross-data source scenarios, and enhances support for transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625509B
    Figure CN114625509B
Patent Text Reader

Abstract

The embodiments of this specification provide a workflow processing method and device, wherein the workflow processing method includes: receiving a workflow diagram, wherein the workflow diagram includes multiple task nodes and the execution order of each task node; executing the workflow tasks composed of the task nodes according to the execution order, and during the execution of the workflow tasks, according to the current execution level, recording the execution data generated by the execution level to a preset storage space, wherein the execution process of the workflow tasks includes multiple execution levels. By storing the execution data in the general workflow processing process, support for transactions is increased, and the atomicity, consistency, isolation and persistence of workflow processing in cross-site, cross-platform and cross-data source scenarios are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a workflow processing method. Background Art

[0002] With the rapid development of computer technology, various engines have emerged, among which stream computing engines have developed rapidly. In order to expand the application scope of stream computing engines, stream computing engines can be used for general workflows. However, when using lightweight stream computing engines to run general workflows, various resources and computing capabilities need to be modeled uniformly across platforms, and cross-platform features are required to ensure the integrity of computing through transactions. Summary of the invention

[0003] In view of this, an embodiment of this specification provides a workflow processing method. One or more embodiments of this specification also relate to a workflow processing apparatus, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, a workflow processing method is provided, including:

[0005] Receiving a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node;

[0006] The workflow task composed of the task nodes is executed in accordance with the execution order, and during the execution of the workflow task, the execution data generated by the execution level is recorded to a preset storage space according to the current execution level, wherein the execution process of the workflow task includes multiple execution levels.

[0007] Optionally, the execution level includes a main execution level, and the main execution level is the execution level corresponding to the workflow task;

[0008] During the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space includes:

[0009] During the execution of the workflow task, if the current execution level is the main execution level, the main execution state generated by the main execution level is recorded in the main storage space in the preset storage space.

[0010] Optionally, the main execution state includes at least one of an initialization state, an opening state, an execution state, a preparation state and a submission state.

[0011] Optionally, during the execution of the workflow task, if the current execution level is the main execution level, before recording the main execution state generated by the main execution level to the main storage space in the preset storage space, the method further includes:

[0012] Creating a main identifier for the main execution level according to the workflow diagram and a preset first configuration parameter;

[0013] The recording of the main execution state generated by the main execution level to the main storage space in the preset storage space includes:

[0014] The main execution state generated by the main execution level and the main identifier are recorded in association with the main storage space in the preset storage space.

[0015] Optionally, the execution level further includes a sub-execution level, and the sub-execution level is the execution level corresponding to the task node;

[0016] During the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space includes:

[0017] During the execution of the workflow task, if the current execution level is a sub-execution level, the task node execution result generated by the sub-execution level is recorded in the sub-storage space in the preset storage space.

[0018] Optionally, during the execution of the workflow task, if the current execution level is a sub-execution level, before recording the task node execution result generated by the sub-execution level to the sub-storage space in the preset storage space, the method further includes:

[0019] Creating a sub-identification for the sub-execution level according to the workflow diagram and a preset second configuration parameter;

[0020] The recording of the task node execution results generated by the sub-execution level to the sub-storage space in the preset storage space includes:

[0021] The task node execution result generated by the sub-execution level and the sub-identification are recorded in association with the sub-storage space in the preset storage space.

[0022] Optionally, the execution level further includes a sub-execution level, and the sub-execution level is an execution level corresponding to the task element in the task node;

[0023] During the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space includes:

[0024] During the execution of the workflow task, if the current execution level is a slave execution level, the execution result of the task element generated by the slave execution level is recorded in the slave storage space in the preset storage space.

[0025] Optionally, during the execution of the workflow task, if the current execution level is a slave execution level, before recording the execution result of the task element generated by the slave execution level to the slave storage space in the preset storage space, the method further includes:

[0026] Creating a slave identifier for the slave execution level according to the workflow diagram and a preset third configuration parameter;

[0027] The recording the execution result of the task element generated by the slave execution level to the slave storage space in the preset storage space includes:

[0028] The task element execution result generated from the slave execution level and the slave identifier are recorded in association with the slave storage space in the preset storage space.

[0029] Optionally, executing the workflow tasks composed of the task nodes in the execution order includes:

[0030] The workflow task corresponding to the workflow diagram is divided into a plurality of subtasks according to the execution order of each task node and sent to the execution unit corresponding to each task node, wherein the subtasks correspond to the task nodes one by one;

[0031] For any execution unit among the execution units, the subtask corresponding to the execution unit is processed according to the execution order.

[0032] According to a second aspect of an embodiment of this specification, there is provided a workflow processing device, including:

[0033] A receiving module is configured to receive a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node;

[0034] The execution module is configured to execute the workflow task composed of the task nodes in accordance with the execution order, and during the execution of the workflow task, record the execution data generated by the execution level to a preset storage space according to the current execution level, wherein the execution process of the workflow task includes multiple execution levels.

[0035] Optionally, the execution level includes a main execution level, and the main execution level is the execution level corresponding to the workflow task;

[0036] The execution module is further configured to:

[0037] During the execution of the workflow task, if the current execution level is the main execution level, the main execution state generated by the main execution level is recorded in the main storage space in the preset storage space.

[0038] Optionally, the main execution state includes at least one of an initialization state, an opening state, an execution state, a preparation state and a submission state.

[0039] Optionally, the device further includes a first creation module, configured to:

[0040] Creating a main identifier for the main execution level according to the workflow diagram and a preset first configuration parameter;

[0041] The execution module is further configured to:

[0042] The main execution state generated by the main execution level and the main identifier are recorded in association with the main storage space in the preset storage space.

[0043] Optionally, the execution level further includes a sub-execution level, and the sub-execution level is the execution level corresponding to the task node;

[0044] The execution module is further configured to:

[0045] During the execution of the workflow task, if the current execution level is a sub-execution level, the task node execution result generated by the sub-execution level is recorded in the sub-storage space in the preset storage space.

[0046] Optionally, the device further includes a second creation module configured to:

[0047] Creating a sub-identification for the sub-execution level according to the workflow diagram and a preset second configuration parameter;

[0048] The execution module is further configured to:

[0049] The task node execution result generated by the sub-execution level and the sub-identification are recorded in association with the sub-storage space in the preset storage space.

[0050] Optionally, the execution level further includes a sub-execution level, and the sub-execution level is an execution level corresponding to the task element in the task node;

[0051] The execution module is further configured to:

[0052] During the execution of the workflow task, if the current execution level is a slave execution level, the execution result of the task element generated by the slave execution level is recorded in the slave storage space in the preset storage space.

[0053] Optionally, the device further includes a third creation module, configured to:

[0054] Creating a slave identifier for the slave execution level according to the workflow diagram and a preset third configuration parameter;

[0055] The execution module is further configured to:

[0056] The task element execution result generated from the slave execution level and the slave identifier are recorded in association with the slave storage space in the preset storage space.

[0057] Optionally, the execution module is further configured to:

[0058] The workflow task corresponding to the workflow diagram is divided into a plurality of subtasks according to the execution order of each task node and sent to the execution unit corresponding to each task node, wherein the subtasks correspond to the task nodes one by one;

[0059] For any execution unit among the execution units, the subtask corresponding to the execution unit is processed according to the execution order.

[0060] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0061] Memory and processor;

[0062] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned workflow processing method are implemented.

[0063] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned workflow processing method are implemented.

[0064] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned workflow processing method.

[0065] The embodiment of this specification provides a workflow processing method, receiving a workflow diagram, wherein the workflow diagram includes multiple task nodes and the execution order of each task node; executing the workflow task composed of the task nodes according to the execution order, and in the execution process of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space, wherein the execution process of the workflow task includes multiple execution levels. After using stream computing for general workflow projects, the integrated computing and scheduling engine supports standardized online / offline control-computing projects. For control workflows, the efficiency of processing workflows is improved by adding support for transaction ACID characteristics on the basis of workflow processing, that is, by storing execution data during general workflow processing, support for transactions is added, and the atomicity, consistency, isolation and persistence of workflow processing in cross-site, cross-platform and cross-data source scenarios are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 is a flowchart of a workflow processing method provided by an embodiment of this specification;

[0067] Figure 2 It is a processing flow chart of a workflow processing method provided by an embodiment of this specification;

[0068] Figure 3 It is a structural diagram of a workflow processing device provided by an embodiment of this specification;

[0069] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0070] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0071] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0072] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0073] First, the terms involved in one or more embodiments of this specification are explained.

[0074] Transaction: A program execution unit that accesses and possibly updates various data items in a database. Transactions should have four properties: atomicity, consistency, isolation (also known as independence), and durability. These four properties are usually called ACID characteristics.

[0075] Workflow is a computational model of the workflow, which is to express the logic and rules of how the work in the workflow is organized in a proper model in the computer and to perform calculations on it. The main problem that workflow solves is: to achieve a certain project goal, to automatically transfer information between multiple participants according to certain predetermined rules using computers.

[0076] A directed acyclic graph (DAG) is a directed graph that cannot start from a vertex and return to that vertex through several edges.

[0077] Then, a workflow processing method provided by one or more embodiments of this specification is briefly described.

[0078] With the rapid development of computer technology, various engines have emerged, among which stream computing engines have developed rapidly. In order to expand the application scope of stream computing engines, stream computing engines can be used for general workflows. However, when using lightweight stream computing engines to run general workflows, various resources and computing capabilities need to be modeled uniformly across platforms, and cross-platform features are required, such as batch / stream / interactive computing can share a set of operators, support custom UDF / UDAF / UDTF and can reference any server, and disposal server operators can be automatically integrated into the relational database system, etc., to ensure the integrity of the calculation through transactions.

[0079] Therefore, an embodiment of the present specification provides a workflow processing method, receiving a workflow diagram, wherein the workflow diagram includes multiple task nodes and the execution order of each task node; executing the workflow task composed of the task nodes according to the execution order, and in the execution process of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space, wherein the execution process of the workflow task includes multiple execution levels. After using stream computing for general workflow projects, the integrated computing and scheduling engine supports standardized online / offline control-computing projects. For control workflows, the efficiency of processing workflows is improved by adding support for transaction ACID characteristics on the basis of workflow processing, that is, by storing execution data during general workflow processing, support for transactions is added, and the atomicity, consistency, isolation and persistence of workflow processing in cross-site, cross-platform and cross-data source scenarios are guaranteed.

[0080] In this specification, a workflow processing method is provided. This specification also relates to a workflow processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0081] See also Figure 1 , Figure 1 A flowchart of a workflow processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0082] Step 102: Receive a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node.

[0083] The execution subject of the workflow processing method may be a computing device with a workflow processing function, such as a server or terminal with a workflow processing function.

[0084] Specifically, a workflow graph refers to a directed acyclic graph that carries workflow tasks, also known as a DAG graph; a task node refers to each link in processing a workflow task; and an execution order refers to the order in which a task node is executed.

[0085] In actual applications, there are many ways to receive a workflow diagram. For example, an operator may send a receiving request carrying a workflow diagram to an execution entity. After receiving the receiving request, the execution entity obtains the workflow diagram from the receiving request. Alternatively, an operator may send a receiving instruction for a workflow to an execution entity. After receiving the receiving instruction, the execution entity begins to obtain the workflow. Alternatively, a server may automatically obtain a workflow diagram at preset time intervals. For example, after a preset time, a server with a workflow processing function may automatically obtain a workflow diagram in a designated access area. Alternatively, after a preset time, a terminal with a workflow processing function may automatically obtain a workflow diagram stored locally. This specification does not impose any restrictions on the method of receiving a workflow diagram.

[0086] Step 104: Execute the workflow task composed of the task nodes in accordance with the execution order, and during the execution of the workflow task, record the execution data generated by the execution level to a preset storage space according to the current execution level, wherein the execution process of the workflow task includes multiple execution levels.

[0087] On the basis of receiving the workflow diagram, further, the workflow tasks composed of each task node are executed in the execution order, and during the execution of the workflow tasks, according to the current execution level, the execution data generated by the execution level is recorded to the preset storage space.

[0088] Specifically, a workflow task refers to a workflow task composed of a group of internal nodes that meets the requirements of a project scenario; the execution level refers to the level corresponding to the current execution node, such as the first level, the second level, etc.; the execution data refers to the data related to the execution, such as the execution results, execution status, etc.

[0089] In actual applications, after receiving the workflow diagram, the workflow tasks composed of the task nodes are executed according to the execution order of the task nodes in the workflow diagram. In the process of executing the workflow tasks, it is also necessary to store the execution data generated by the execution level into the preset storage space corresponding to the execution level according to the execution stage, that is, the execution level, or store the execution data generated by the execution level into the area corresponding to the execution level in the preset storage space.

[0090] In a possible implementation of the embodiments of this specification, the execution level may include a main execution level, wherein the main execution level is the execution level corresponding to the workflow task. At this time, when the current execution level is the main execution level, the execution data is the main execution state. At this time, during the execution of the workflow, the main execution state of the main execution level needs to be recorded to a preset storage space. That is, when the execution level includes the main execution level, during the execution of the workflow task, the execution data generated by the execution level is recorded to the preset storage space according to the current execution level. The specific implementation process may be as follows:

[0091] During the execution of the workflow task, if the current execution level is the main execution level, the main execution state generated by the main execution level is recorded in the main storage space in the preset storage space.

[0092] Specifically, the main execution level refers to the execution level corresponding to the workflow task; the main storage space refers to the area in the preset storage space used to store the execution data generated by the main execution level. The main execution state refers to the state of the current workflow task during the execution process, and the main execution state includes at least one of the initialization state, the start state, the execution state, the preparation state, and the submission state.

[0093] In actual applications, in the process of executing the workflow tasks composed of each task node in the execution order, if the current execution level is at the main execution level, the main execution state generated by the main execution level is recorded in the main storage space of the preset storage space. In this way, recording the main execution state in the main storage space can improve the atomicity, consistency, isolation and persistence of workflow processing.

[0094] For example, during the execution of a workflow task, if the current execution level is the initialization level in the main execution level, the main execution state is the initialization state, and then the initialization state is recorded in the main storage space; if the current execution level is the submission level in the main execution level, the main execution state is the submission state, and then the submission state is recorded in the main storage space.

[0095] Optionally, in order to further improve the atomicity, consistency, isolation and persistence of workflow processing, it is necessary to create a main identifier for the main execution level, and when recording the main execution status, the main identifier and the main execution status are associated and recorded. That is, during the execution of the workflow task, if the current execution level is the main execution level, before recording the main execution status generated by the main execution level to the main storage space in the preset storage space, it also includes:

[0096] Creating a main identifier for the main execution level according to the workflow diagram and a preset first configuration parameter;

[0097] Accordingly, recording the main execution state generated by the main execution level to the main storage space in the preset storage space includes:

[0098] The main execution state generated by the main execution level and the main identifier are recorded in association with the main storage space in the preset storage space.

[0099] Specifically, the first configuration parameter refers to a parameter for the main execution level or workflow task in the pre-set execution parameters.

[0100] In actual applications, after receiving the workflow diagram, the execution subject creates a unique primary identifier for the workflow task based on the workflow diagram and the preset first configuration parameter, that is, creates a primary identifier for the main execution level. Further, in the process of executing the workflow task, if it is in the main execution level, the main execution state generated by the main execution level and the primary identifier are associated and recorded in the storage area corresponding to the main execution level in the preset storage space, that is, the main storage space.

[0101] In a possible implementation of the embodiments of this specification, the execution level may include not only the main execution level, but also the sub-execution level, wherein the sub-execution level is the execution level corresponding to the task node. At this time, when the current execution level is the sub-execution level, the execution data is the execution result of the task node. At this time, during the execution of the workflow, the execution result of the task node of the sub-execution level needs to be recorded to the preset storage space. That is, when the execution level also includes the sub-execution level, during the execution of the workflow task, according to the current execution level, the execution data generated by the execution level is recorded to the preset storage space. The specific implementation process can be as follows:

[0102] During the execution of the workflow task, if the current execution level is a sub-execution level, the task node execution result generated by the sub-execution level is recorded in the sub-storage space in the preset storage space.

[0103] Specifically, the sub-execution level refers to the execution level corresponding to the task node; the sub-storage space refers to the area in the preset storage space used to store the task node execution results generated by the sub-execution level; the task node execution result refers to the execution result generated by the current task node during the execution process.

[0104] In actual applications, in the process of executing workflow tasks composed of task nodes in the execution order, if the current execution level is at the sub-execution level, the task node execution results generated by the sub-execution level are recorded in the sub-storage space of the preset storage space. In this way, recording the task node execution results in the main storage space can improve the atomicity, consistency, isolation and persistence of workflow processing.

[0105] For example, during the execution of a workflow task, the current execution level is the first sub-execution level in the sub-execution level, then the execution result of the task node generated by the first sub-execution level is the first execution result, and then the first execution result is recorded in the sub-storage space; during the execution of a workflow task, the current execution level is the Nth sub-execution level in the sub-execution level, then the execution result of the task node generated by the Nth sub-execution level is execution success, and then the execution success is recorded in the sub-storage space.

[0106] Optionally, in order to further improve the atomicity, consistency, isolation and persistence of workflow processing, it is necessary to create a sub-identifier for the sub-execution level, and when recording the task node execution result, the sub-identifier and the task node execution result are associated and recorded. That is, during the execution of the workflow task, if the current execution level is the sub-execution level, before recording the task node execution result generated by the sub-execution level to the sub-storage space in the preset storage space, it also includes:

[0107] Creating a sub-identification for the sub-execution level according to the workflow diagram and a preset second configuration parameter;

[0108] Accordingly, recording the task node execution results generated by the sub-execution level to the sub-storage space in the preset storage space includes:

[0109] The task node execution result generated by the sub-execution level and the sub-identification are recorded in association with the sub-storage space in the preset storage space.

[0110] Specifically, the second configuration parameter refers to a parameter for a sub-execution level in the pre-set execution parameters.

[0111] In actual applications, after receiving the workflow diagram, when executing the workflow tasks composed of each task node, at the beginning of the execution of the current sub-execution level, or before executing the workflow tasks composed of each task node, a unique sub-identifier can be created for the current task node based on the workflow diagram and the pre-set second configuration parameter, that is, a main identifier is created for the sub-execution level. Further, in the process of executing the workflow task, if it is in the sub-execution level, the task node execution result generated by the sub-execution level and the sub-identifier are associated and recorded in the storage area corresponding to the sub-execution level in the preset storage space, that is, the sub-storage space.

[0112] It should be noted that when creating a sub-identifier for the sub-execution level according to the workflow diagram and the preset second configuration parameter, the sub-identifier can also be created for the sub-execution level according to the workflow diagram and the preset second configuration parameter, and based on the main identifier of the main execution level. That is, the main identifier is created first, and then the sub-identifier is created.

[0113] In a possible implementation of the embodiments of this specification, the execution level may include not only the main execution level and the sub-execution level, but also the sub-execution level, wherein the sub-execution level is the execution level corresponding to the task element in the task node. At this time, when the current execution level is the sub-execution level, the execution data is the execution result of the task element. At this time, during the execution of the workflow, it is necessary to record the execution result of the task element of the sub-execution level to the preset storage space. That is, when the execution level also includes the sub-execution level, during the execution of the workflow task, according to the current execution level, the execution data generated by the execution level is recorded to the preset storage space. The specific implementation process may be as follows:

[0114] During the execution of the workflow task, if the current execution level is a slave execution level, the execution result of the task element generated by the slave execution level is recorded in the slave storage space in the preset storage space.

[0115] Specifically, a task element refers to an execution step in a task node, such as an assignment statement, an arithmetic operation, and the like; a slave execution level refers to the execution level corresponding to the task element in the task node; a slave storage space refers to an area in a preset storage space used to store the execution results of the task element generated from the slave execution level; and a task element execution result refers to the execution result generated by the current task element during the execution process.

[0116] In actual applications, in the process of executing workflow tasks composed of task nodes in the execution order, if the current execution level is at the slave execution level, the task element execution results generated from the slave execution level will be recorded in the slave storage space of the preset storage space. In this way, recording the task element execution results in the slave storage space can improve the atomicity, consistency, isolation and persistence of workflow processing.

[0117] For example, during the execution of a workflow task, the current execution level is the execution process of the second task element in the sub-execution level, that is, the second slave execution level, then the execution result of the task element generated by the first slave execution level is 2=1+1, and then 2 is recorded in the slave storage space; during the execution of a workflow task, the current execution level is the Mth slave execution level in the slave execution level, then the execution result of the task element generated by the Mth slave execution level is i=1, and then 1 is recorded in the slave storage space.

[0118] Optionally, in order to further improve the atomicity, consistency, isolation and persistence of workflow processing, it is necessary to create a slave identifier for the slave execution level, and when recording the task element execution result, the slave identifier and the task element execution result are associated and recorded. That is, during the execution of the workflow task, if the current execution level is the slave execution level, before recording the task element execution result generated by the slave execution level to the slave storage space in the preset storage space, it also includes:

[0119] Creating a slave identifier for the slave execution level according to the workflow diagram and a preset third configuration parameter;

[0120] Accordingly, recording the execution result of the task element generated from the execution level to the slave storage space in the preset storage space includes:

[0121] The task element execution result generated from the slave execution level and the slave identifier are recorded in association with the slave storage space in the preset storage space.

[0122] Specifically, the third configuration parameter refers to a parameter for the secondary execution level in the pre-set execution parameters.

[0123] In actual applications, after receiving the workflow diagram, when executing the workflow tasks composed of each task node, at the beginning of the execution of the current sub-execution level, or before executing the workflow tasks composed of each task node, a unique sub-identifier can be created for the current task node based on the workflow diagram and the pre-set second configuration parameter, that is, a main identifier is created for the sub-execution level. Further, in the process of executing the workflow task, if it is in the sub-execution level, the task node execution result generated by the sub-execution level and the sub-identifier are associated and recorded in the storage area corresponding to the sub-execution level in the preset storage space, that is, the sub-storage space.

[0124] It should be noted that, when creating a slave identifier for the slave execution level according to the workflow diagram and the preset third configuration parameter, a slave identifier can also be created for the slave execution level according to the workflow diagram and the preset third configuration parameter, as well as based on the sub-identifier of the sub-execution level. That is, first create a master identifier, then create a sub-identifier, and then create a slave identifier.

[0125] By setting the main execution level, sub-execution level and slave execution level, we increase support for transactions and make the entire workflow atomic, consistent, isolated and durable, thereby ensuring that the key control processes carried by the engine are controllable at the process level, sub-task level and operator level respectively, ensuring the integrity of the execution of the entire process at the process level, sub-task level and operator level respectively.

[0126] In a possible implementation of the embodiments of this specification, in order to improve the efficiency of workflow processing, the workflow task can be divided into multiple subtasks, and each execution unit executes the subtasks respectively. That is, the workflow task composed of each task node is executed in the execution order, and the specific implementation process can be as follows:

[0127] The workflow task corresponding to the workflow diagram is divided into a plurality of subtasks according to the execution order of each task node and sent to the execution unit corresponding to each task node, wherein the subtasks correspond to the task nodes one by one;

[0128] For any execution unit among the execution units, the subtask corresponding to the execution unit is processed according to the execution order.

[0129] Specifically, the execution unit refers to a functional unit that processes the subtask corresponding to the task node.

[0130] In practical applications, based on the received workflow graph, the workflow task represented by the workflow graph is divided into multiple subtasks according to the number of task nodes and the execution order of the task nodes, and each subtask is further sent to the execution unit corresponding to each task node. The execution unit then executes the corresponding subtask based on the execution order of the task nodes. In this way, the processing efficiency of the workflow can be improved.

[0131] For example, if there are 4 task nodes, the workflow task is divided into four subtasks, the first subtask is sent to the first execution unit corresponding to the task node with the first execution order, the second subtask is sent to the second execution unit corresponding to the task node with the second execution order, the third subtask is sent to the third execution unit corresponding to the task node with the third execution order, and the fourth subtask is sent to the fourth execution unit corresponding to the task node with the fourth execution order. Further, based on the execution order, the first execution unit processes the first subtask, the second execution unit processes the second subtask, the third execution unit processes the third subtask, and the fourth execution unit processes the fourth subtask.

[0132] The following combination Figure 2 , the workflow processing method is further explained. Figure 2 A flowchart of a workflow processing method provided by an embodiment of the present specification is shown. The workflow system uses DAG (directed acyclic graph) to uniquely define a specific workflow and its execution process. The control flow graph is stored in a relational database in the form of a domain-specific language (DSL) at different levels. At runtime, dynamic compilation and dynamic expansion technology are used to generate executable Operators (operations) and perform calculations in a streaming manner:

[0133] 1. At the main execution level, that is, the main transaction level, when each workflow graph (DAG) is submitted, a transaction record will be automatically created to generate a unique transaction identifier (tid), that is, to create a main identifier for the workflow task. There is only one main transaction record, that is, the main identifier, and it is stored in the main transaction space (bkcs_transaction) corresponding to the main storage space (bkcs_staratlas.db_.bkcs_transaction_accessor) in the preset storage space (bkcs_staratlas.operator.bkcs_tran_bsae_operator).

[0134] The main execution level mainly includes: the initialization operation (initializer operator), that is, operatorfirst (initialiazer), which is responsible for initializing transactions (init_trans) and starting transactions (begin_trans), and in the life cycle of this execution, the primary identifier is written into the communication mechanism (xcom) between distributed nodes to propagate the primary identifier (tid) to the subsequent operation (operator); the first coordination operation (coordinator operator), that is, the first coordinator, is responsible for inheriting transactions (inherit_trans) and executing transactions (execute_trans); the finalizer operator, that is, operatorlast (finalizer), is responsible for inheriting transactions (inherit_trans), preparing transactions (prepare_trans) and committing transactions (commit_trans);

[0135] 2. Sub-execution level, corresponding to transaction subspace: During the execution of a workflow task, there may be multiple subtasks, namely transaction sub-operations (task operator), namely sub dag operator#(task) executed in parallel. In order to avoid these task operators from changing the context of the main transaction, a transaction subspace is generated for each task operator for its use. There may be multiple transaction subspace records, which are stored in the bkcs_transaction_sub_space table corresponding to bkcs_staratlas.db_accessor.bkcs_transaction_sub_space-accessor in bkcs_staratlas.operator.bkcs_tran_bsae_operator, that is, stored in the sub-storage space of the preset storage space.

[0136] The sub-execution level mainly includes: task_operator, transaction sub-operation, that is, sub dag operator#(task), which is responsible for inheriting transactions (inherit_trans) and manipulating transaction subspaces (update transaction_sub_space).

[0137] For any subtask, a subtask identifier is generated, such as tid1 s1, tid1 s2, tid1 s3, tid1 s4, and stored in the transaction subspace (bkcs_transaction_sub_space) corresponding to the substorage space (bkcs_staratlas.db_accessor.bkcs_transaction_sub_space-accessor) in the preset storage space (bkcs_staratlas.operator.bkcs_tran_bsae_operator).

[0138] 3. From the execution level, it corresponds to the project table transaction space: Since each project is different, it is impossible to use the transaction subspace to store data completely. For projects that are expected to have transactional features, a tid field can be added to the project table. When writing data, the tid attribute is attached to support transaction capabilities; from the execution level, it mainly includes each project operation (expression), such as operation input (expression input), operation operator 1 (expression p1), operation operator 2 (expression p2), and operation output (expression output), which is responsible for attaching the tid attribute when outputting data.

[0139] For any slave task, set the specified storage space, such as bkcs_assets_a, bkcs_assets_b, and generate the identifier of the directory slave task based on the identifier of the master task, such as tid1 v1, tid1 v2, tid1 v3, tid1 v4.

[0140] It should be noted that the project table also needs to be updated based on the identifier of the main transaction. The main transaction or transaction is the task, the transaction sub is the subtask, and the project operation is the slave task.

[0141] This specification provides a workflow processing method, receiving a workflow diagram, wherein the workflow diagram includes multiple task nodes and the execution order of each task node; executing the workflow tasks composed of the task nodes according to the execution order, and in the execution process of the workflow tasks, according to the current execution level, recording the execution data generated by the execution level to a preset storage space, wherein the execution process of the workflow tasks includes multiple execution levels. After using stream computing for general workflow projects, the integrated computing and scheduling engine supports standardized online / offline control-computing projects. For control workflows, by adding support for transaction ACID characteristics on the basis of workflow processing, the efficiency of processing workflows is improved, that is, by storing execution data during general workflow processing, support for transactions is increased, and the atomicity, consistency, isolation and persistence of workflow processing in cross-site, cross-platform and cross-data source scenarios are guaranteed. In addition, by setting the execution level, the coarse and fine granularity of the control workflow is guaranteed to be controllable, so that the workflow processing method can be effectively applied in information security projects that control the entire network.

[0142] Corresponding to the above method embodiment, this specification also provides a workflow processing device embodiment, Figure 3 FIG. 1 shows a schematic diagram of a workflow processing device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises:

[0143] The receiving module 302 is configured to receive a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node;

[0144] The execution module 304 is configured to execute the workflow task composed of the task nodes in accordance with the execution order, and during the execution of the workflow task, record the execution data generated by the execution level to a preset storage space according to the current execution level, wherein the execution process of the workflow task includes multiple execution levels.

[0145] In one or more optional embodiments of the present specification, the execution level includes a main execution level, and the main execution level is the execution level corresponding to the workflow task;

[0146] The execution module 304 is further configured to:

[0147] During the execution of the workflow task, if the current execution level is the main execution level, the main execution state generated by the main execution level is recorded in the main storage space in the preset storage space.

[0148] In one or more optional embodiments of the present specification, the main execution state includes at least one of an initialization state, a start state, an execution state, a preparation state, and a submission state.

[0149] In one or more optional embodiments of the present specification, the apparatus further includes a first creation module configured to:

[0150] Creating a main identifier for the main execution level according to the workflow diagram and a preset first configuration parameter;

[0151] The execution module 304 is further configured to:

[0152] The main execution state generated by the main execution level and the main identifier are recorded in association with the main storage space in the preset storage space.

[0153] In one or more optional embodiments of the present specification, the execution level further includes a sub-execution level, and the sub-execution level is the execution level corresponding to the task node;

[0154] The execution module 304 is further configured to:

[0155] During the execution of the workflow task, if the current execution level is a sub-execution level, the task node execution result generated by the sub-execution level is recorded in the sub-storage space in the preset storage space.

[0156] In one or more optional embodiments of the present specification, the apparatus further includes a second creation module configured to:

[0157] Creating a sub-identification for the sub-execution level according to the workflow diagram and a preset second configuration parameter;

[0158] The execution module 304 is further configured to:

[0159] The task node execution result generated by the sub-execution level and the sub-identification are recorded in association with the sub-storage space in the preset storage space.

[0160] In one or more optional embodiments of the present specification, the execution level further includes a sub-execution level, and the sub-execution level is an execution level corresponding to the task element in the task node;

[0161] The execution module 304 is further configured to:

[0162] During the execution of the workflow task, if the current execution level is a slave execution level, the execution result of the task element generated by the slave execution level is recorded in the slave storage space in the preset storage space.

[0163] In one or more optional embodiments of the present specification, the apparatus further includes a third creation module configured to:

[0164] Creating a slave identifier for the slave execution level according to the workflow diagram and a preset third configuration parameter;

[0165] The execution module 304 is further configured to:

[0166] The task element execution result generated from the slave execution level and the slave identifier are recorded in association with the slave storage space in the preset storage space.

[0167] In one or more optional embodiments of this specification, the execution module 304 is further configured to:

[0168] The workflow task corresponding to the workflow diagram is divided into a plurality of subtasks according to the execution order of each task node and sent to the execution unit corresponding to each task node, wherein the subtasks correspond to the task nodes one by one;

[0169] For any execution unit among the execution units, the subtask corresponding to the execution unit is processed according to the execution order.

[0170] The embodiment of this specification provides a workflow processing device, receiving a workflow diagram, wherein the workflow diagram includes multiple task nodes and the execution order of each task node; executing the workflow tasks composed of the task nodes according to the execution order, and in the execution process of the workflow tasks, according to the current execution level, recording the execution data generated by the execution level to the preset storage space, wherein the execution process of the workflow tasks includes multiple execution levels. After using stream computing for general workflow projects, the integrated computing and scheduling engine supports standardized online / offline control-computing projects. For control workflows, by adding support for transaction ACID characteristics on the basis of workflow processing, the efficiency of processing workflows is improved, that is, by storing execution data during general workflow processing, support for transactions is increased, and the atomicity, consistency, isolation and persistence of workflow processing in cross-site, cross-platform and cross-data source scenarios are guaranteed. In addition, by setting the execution level, the coarse and fine granularity of the control workflow is guaranteed to be controllable, so that the workflow processing device can be effectively applied in information security projects that control the entire network.

[0171] The above is a schematic scheme of a workflow processing device of this embodiment. It should be noted that the technical scheme of the workflow processing device and the technical scheme of the workflow processing method described above belong to the same concept, and the details not described in detail in the technical scheme of the workflow processing device can be found in the description of the technical scheme of the workflow processing method described above.

[0172] Figure 4 The structure block diagram of a computing device 400 provided in one embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.

[0173] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0174] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0175] Computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 400 may also be a mobile or stationary server.

[0176] The processor 420 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned workflow processing method when executed by the processor.

[0177] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned workflow processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned workflow processing method.

[0178] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned workflow processing method when executed by a processor.

[0179] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the workflow processing method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the workflow processing method described above.

[0180] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned workflow processing method.

[0181] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the workflow processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the workflow processing method described above.

[0182] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0183] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0184] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

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

[0186] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A workflow processing method, comprising: Receiving a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node; The workflow task composed of the task nodes is executed in accordance with the execution order, and during the execution of the workflow task, the execution data generated by the execution level is recorded to a preset storage space corresponding to the execution level according to the current execution level, wherein the execution process of the workflow task includes multiple execution levels, and the multiple execution levels include a main execution level corresponding to the workflow task, a sub-execution level corresponding to the task node, and a sub-execution level corresponding to the task element in the task node.

2. The method according to claim 1, wherein during the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space corresponding to the execution level, comprises: During the execution of the workflow task, if the current execution level is the main execution level, the main execution state generated by the main execution level is recorded in the main storage space in the preset storage space. 3 . The method according to claim 2 , wherein the main execution state comprises at least one of an initialization state, an opening state, an execution state, a preparation state, and a submission state.

4. The method according to claim 2, wherein during the execution of the workflow task, if the current execution level is the main execution level, before recording the main execution state generated by the main execution level to the main storage space in the preset storage space, further comprises: Creating a main identifier for the main execution level according to the workflow diagram and a preset first configuration parameter; The recording of the main execution state generated by the main execution level to the main storage space in the preset storage space includes: The main execution state generated by the main execution level and the main identifier are recorded in association with the main storage space in the preset storage space.

5. The method according to claim 2, wherein during the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space corresponding to the execution level, comprises: During the execution of the workflow task, if the current execution level is a sub-execution level, the task node execution result generated by the sub-execution level is recorded in the sub-storage space in the preset storage space.

6. The method according to claim 5, wherein during the execution of the workflow task, if the current execution level is a sub-execution level, before recording the task node execution result generated by the sub-execution level to the sub-storage space in the preset storage space, the method further comprises: Creating a sub-identification for the sub-execution level according to the workflow diagram and a preset second configuration parameter; The recording of the task node execution results generated by the sub-execution level to the sub-storage space in the preset storage space includes: The task node execution result generated by the sub-execution level and the sub-identification are recorded in association with the sub-storage space in the preset storage space.

7. The method according to claim 5, wherein during the execution of the workflow task, according to the current execution level, recording the execution data generated by the execution level to a preset storage space corresponding to the execution level, comprises: During the execution of the workflow task, if the current execution level is a slave execution level, the execution result of the task element generated by the slave execution level is recorded in the slave storage space in the preset storage space.

8. The method according to claim 7, wherein during the execution of the workflow task, if the current execution level is a slave execution level, before recording the execution result of the task element generated by the slave execution level to the slave storage space in the preset storage space, the method further comprises: Creating a slave identifier for the slave execution level according to the workflow diagram and a preset third configuration parameter; The recording the execution result of the task element generated by the slave execution level to the slave storage space in the preset storage space includes: The task element execution result generated from the slave execution level and the slave identifier are recorded in association with the slave storage space in the preset storage space.

9. The method according to claim 1, wherein executing the workflow tasks composed of the task nodes in the execution order comprises: The workflow task corresponding to the workflow diagram is divided into a plurality of subtasks according to the execution order of each task node and sent to the execution unit corresponding to each task node, wherein the subtasks correspond to the task nodes one by one; For any execution unit among the execution units, the subtask corresponding to the execution unit is processed according to the execution order.

10. A workflow processing device, comprising: A receiving module is configured to receive a workflow diagram, wherein the workflow diagram includes a plurality of task nodes and an execution order of each task node; The execution module is configured to execute the workflow task composed of the task nodes in accordance with the execution order, and during the execution of the workflow task, according to the current execution level, record the execution data generated by the execution level to the preset storage space corresponding to the execution level, wherein the execution process of the workflow task includes multiple execution levels, and the multiple execution levels include the main execution level corresponding to the workflow task, the sub-execution level corresponding to the task node, and the sub-execution level corresponding to the task element in the task node.

11. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the workflow processing method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the workflow processing method according to any one of claims 1 to 9.