Workflow Engine Tools
Through the programming language script inference of the workflow engine tool, DAG is constructed and edge dependencies are automatically summarized, which solves the problems of complexity and difficulty of transplantation of existing tools, and achieves efficient generation of DAG and seamless transplantation between multiple engines.
Patent Information
- Application Number
- CN202080016434.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-25
- Filing Date
- 2020-01-23
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-01-23
AI Technical Summary
The use of existing workflow engine tools is complex, and users need to manually build and adjust directed acyclic graphs (DAGs), which results in high overhead when generating and adjusting DAGs, and is difficult to transplant between different workflow engines.
Provide a workflow engine tool that builds DAG through programming language script inference and automatically summarizes edge dependencies. It provides an abstraction layer to convert programming language functions into workflow module definitions, simplifies the generation and adjustment of DAG, and supports multiple workflow engines. Seamless migration between.
It greatly reduces the overhead of DAG generation and adjustment, allows users to focus on business logic, reduces tedious tasks related to workflow management, and achieves seamless migration of DAG between different workflow engines.
Smart Images

Figure CN113826070B_ABST
Abstract
Description
Background Art
[0001] In the era of big data and artificial intelligence (AI), the intelligent use of data has become an important factor in the success of many enterprises. Data is often the basis for advanced analytics, artificial intelligence, and business operation efficiency. As more and more enterprises become data-driven and the amount of data is growing rapidly, there is an increasing need to manage and execute complex data processing pipelines that extract data from various sources, transform the data for consumption (e.g., extract features and train AI models), and save it for subsequent use. Workflow engines are often used to manage large-scale data workflow pipelines.
[0002] Despite the multiple benefits of workflow engines, full utilization of workflow engines remains cumbersome due to the steep learning curve and effort required to author complex workflow pipelines. A directed acyclic graph (DAG) defines a workflow pipeline for utilizing data to produce some desired results. Typically, users (e.g., engineers and scientists) interact with a graphical user interface (GUI) to manually construct a DAG, or must learn special syntax to programmatically generate a DAG. Neither of these approaches is natural or intuitive, and both are prone to errors. When a DAG becomes large and complex, generating, adjusting, and reviewing the generation of a DAG can introduce a significant amount of overhead effort. Summary of the invention
[0003] The disclosed examples are described in detail below with reference to the accompanying drawings listed below. The following summary is provided to illustrate some examples disclosed herein. However, this is not meant to limit all examples to any specific configuration or sequence of operations.
[0004] The present invention discloses a workflow engine tool that enables scientists and engineers to programmatically author workflows (e.g., directed acyclic graphs (DAGs)) with almost no overhead, using simpler scripts that can be ported between multiple different workflow engines with little to no modification. This allows users to focus on the business logic of the project and avoid the distracting tedious overhead associated with workflow management (such as uploading modules, drawing edges, setting parameters, and other tasks). The workflow engine tool provides an abstraction layer on top of the workflow engine, introducing binding functions that convert programming language functions (e.g., regular python functions) into workflow module definitions. The workflow engine tool infers module instances and automatically summarizes edge dependencies by inferring the construction DAG from the programming language script.
[0005] An example workflow engine tool includes: a processor; and a computer-readable medium storing instructions that, when executed by the processor, are used to: extract module definitions from a programming language script; extract execution flow information from the programming language script; generate modules from the extracted module definitions for a first workflow engine; generate edges for connecting modules generated for the first workflow engine; and, based at least on the extracted execution flow information, connect the modules generated for the first workflow engine with the edges generated for the first workflow engine to generate a first workflow pipeline for the first workflow engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Examples of the present disclosure are described in detail below with reference to the accompanying drawings listed below:
[0007] Figure 1 shows an arrangement in which an exemplary workflow engine tool may be advantageously used;
[0008] Figure 2 An example workflow module authoring page is shown;
[0009] Figure 3 Shown by Figure 1 A portion of the sample script used by the workflow engine tool;
[0010] Figure 4 Shows Figure 3 Another part of the example script;
[0011] Figure 5 Shows Figure 1 Workflow Engine Tool Operation Figure 3 and Figure 4 Intermediate results of the script shown;
[0012] Figure 6 Shown by Figure 1 The workflow engine tool extracts information from various data fields;
[0013] Figure 7 Yes and operation Figure 1 A flowchart of operations associated with a workflow engine tool;
[0014] Figure 8 Yes and operation Figure 1 another flow chart of operations associated with a workflow engine tool;
[0015] Fig. 9 is a block diagram of an example computing environment suitable for implementing some of the various examples disclosed herein.
[0016] Corresponding reference characters indicate corresponding parts throughout the drawings. DETAILED DESCRIPTION
[0017] Various examples will be described in detail with reference to the accompanying drawings. Where possible, the same reference numerals are used throughout the drawings to refer to the same or similar components. References throughout this disclosure related to specific examples and embodiments are provided for illustrative purposes only, but are not intended to limit all examples unless otherwise indicated.
[0018] In the era of big data and artificial intelligence (AI), the intelligent use of data has become an important factor in the success of many enterprises. Data is often the basis of advanced analysis, artificial intelligence, and business operation efficiency. As more and more enterprises become data-driven and the amount of data is growing rapidly, there is an increasing need to manage and execute complex data processing pipelines that extract data from various sources, transform data for consumption (e.g., extract features and train AI models), and save it for subsequent use. Workflow engines are often used to manage large-scale data workflow pipelines. Workflows consist of choreographed and repeatable business activity patterns. Workflows can be achieved by systematically organizing resources into processes for converting materials, providing services, or processing information. Workflows can be described as a series of operations, the work of individuals or teams, the work of employee organizations, or one or more simple or complex mechanisms. A flow can refer to a document, service, or product that is transferred from one step to another.
[0019] Workflow can be viewed as a basic building block that will be integrated with other parts of the organizational structure, such as information technology, teams, projects, and hierarchies. Benefits of a workflow management system include:
[0020] - Manage dependencies between jobs;
[0021] -Orchestration across heterogeneous computing clusters;
[0022] - Transparency, reproducibility, reusability (sharing of modules and data), collaboration, rapid development;
[0023] - Troubleshooting, alarms, reviews, and dispatch;
[0024] - Equality between offline experiments and online production;
[0025] - Visualize, monitor, and manage work; view work history; and
[0026] -Version control, diffing, and source control
[0027] The workflow in AI applications is usually a long-term, periodic batch process; AI engineering applications usually contain a large number of workflows, including data cleaning and processing, model training experiments, and metric dashboard generation. Typical workflow pipeline types include:
[0028] - Data warehouse;
[0029] -Data infrastructure maintenance;
[0030] -Model training and experiments;
[0031] - generated online; and
[0032] - Reporting and telemetry.
[0033] A directed acyclic graph (DAG) defines a workflow pipeline for utilizing data to produce some desired results. Typically, users (e.g., engineers and scientists) interact with a graphical user interface (GUI) to manually construct a DAG, or must learn special syntax to programmatically generate a DAG. Neither of these approaches is natural or intuitive, and both are prone to errors. When a DAG becomes large and complex, generating, as well as adjusting and reviewing the generation of a DAG, can introduce a significant amount of overhead effort. Manual creation of job modules requires specifying edges to connect modules to the DAG, which is tedious, labor-intensive, and error-prone. Programmatic creation of a DAG requires writing code, such as scripts written in a programming language such as C#, Python, or other programming languages. While this eliminates the tedious work of manually drawing graphs, it still requires users to write a lot of additional code, upload modules, connect nodes, etc., which is overhead to the core logic of the job. In addition, the additional code is specific to the workflow engine, which not only increases the learning cost, but also prevents the time investment from being reused with other workflow engines. Despite the multiple benefits of workflow engines, full utilization of workflow engines remains cumbersome due to the steep learning curve and effort required to author complex workflow pipelines.
[0034] Therefore, this paper provides a workflow engine tool that enables scientists and engineers to programmatically author workflows (e.g., DAGs) with almost no overhead, using simpler scripts that can be ported between multiple different workflow engines with almost no modification. This allows users to focus on the business logic of the project and avoid the cumbersome overhead of distracting attention related to workflow management (such as uploading modules, drawing edges, setting parameters, and other tasks). The workflow engine tool provides an abstraction layer on top of the workflow engine, introducing binding functions that convert programming language functions (e.g., ordinary python functions) into workflow module definitions. The workflow engine tool infers module instances and automatically summarizes edge dependencies by inferring and building DAGs from programming language scripts.
[0035] The workflow engine tool summarizes the workflow graph from the programming script (e.g., python script) so that the module definition is inferred from the function definition (e.g., function definition containing the document string), including the induction of input, parameters, and output. Module instances (tasks and nodes) are automatically detected and created by function calls in the script, and some examples involve generating unique module IDs from upstream dependencies and the module's own parameters. Edges and execution dependencies are inferred based on variables generated by a function call and provided as inputs and parameters to other functions. Therefore, the workflow engine tool creates an abstraction layer as a bridge between the user script and the target workflow engine. In order to adapt to various underlying workflow engines, by implementing different versions of the abstraction layer, the script can run on multiple different workflow engines to generate DAGs without cumbersome changes. By providing a dummy abstraction layer, the same script can even run without a workflow engine. In addition, the workflow engine tool automatically resolves task and data dependencies, naturally handles data persistence caching, and allows the same script to run locally and on workflow clusters - for multiple different workflow engines. This eliminates the need to manually create DAGs or program them with special APIs.
[0036] Figure 1An arrangement 100 in which an exemplary workflow engine tool 102 can be advantageously used is shown. The workflow engine tool 102 includes multiple adapters 104a-104d corresponding to multiple different workflow engines 106a-106d, allowing a public script 122 in a programming environment 120 to run on any one of the multiple different workflow engines 106a-106d. It should be understood that in some examples, different numbers of workflow engines can be supported. In some examples, at least one of the workflow engines 106b-106d is a virtual abstraction layer, allowing the workflow engine tool 102 to run without a workflow engine. DAG 110 is generated for workflow engine 106a and includes nodes 112a-112c and edges 114a and 114b, which connect the outputs 116a and 116b of nodes 112a and 112b to the inputs 118c and 118d of node 112c, respectively. As shown, node 112c also has an output 116c.
[0037] A workflow DAG (e.g., DAG 110) is composed of nodes (e.g., nodes 112a-112c) and directed edges (e.g., edges 114a and 114b). A node (e.g., module) is the basic unit of task execution in a workflow. It can be a function, a script, or an executable program, corresponding to a single task defined by a user. Each node has zero or more inputs, zero or more parameters, and zero or more outputs. Inputs and outputs are data passed from one node to another. Depending on the actual workflow engine design, the exchanged data can be in a variety of different forms, such as memory objects, shared files, distributed files, and others. The output of one node can become the input of another node, which at least partially determines the execution dependency between nodes. For example, because node 112c has input 118c from output 116a of node 112a, node 112c cannot be executed until node 112a is successfully executed and output 116a is generated. Dependencies between nodes can be represented as edges in a workflow DAG. A module can have multiple inputs and multiple outputs. Typically, each input and output is associated with a unique name that serves as its identifier.
[0038] Parameters are basic data required for a specific execution run of a node, but have not yet been output by another node. For example, a node for training an AI model may have parameters such as "number of epochs" or "learning rate". Both inputs and parameters are basic data required to execute a node. The difference between inputs and parameters is that inputs are data dynamically generated by upstream nodes during operation, thus indicating the execution flow dependencies (edges) between nodes, while parameters are not data generated by upstream nodes, but data specified by the user before running. Therefore, parameters do not affect the dependencies between nodes. Parameters are usually some simple values that can be easily specified. In some cases, the user may have the choice of specifying data as input or parameter. For example, if the data is complex, then even if it can be a parameter, a function can be written to generate it, making the data an input. In addition, in some cases, inputs, outputs, and parameters may have mandatory data types, such as integers, floating point numbers, strings, datetimes, or other predefined data types. In this case, when the output is connected to the input, the data type should be consistent.
[0039] Edges are directed (have a direction, pointing from output to input) and therefore specify at least some aspects of execution dependencies between nodes (modules and tasks). The edges in a DAG must be defined so that the DAG is acyclic in order to permit determination of the order of execution. Thus, since node 112c has input 118c (via edge 114a) from output 116a of node 112a, node 112a cannot have an input that depends (directly or through an intermediate module) on output 116c of node 112c. In some examples, there can be multiple edges between two modules because edges connect inputs to outputs, and each module can have multiple inputs or outputs. However, to prevent circular dependencies, in this case, all edges should have the same direction. When data generated by a module is consumed by multiple other modules, a single output can be connected to multiple inputs. However, the input of a module can come from only one source.
[0040] The execution of a DAG pipeline represents a specific run of the DAG. Parameters must be pre-specified before the DAG can be executed, and the DAG may also require some data from external data sources that are brought into the DAG by certain load modules. DAG runs are deterministic, which means that given the same input data and parameters, the final output for multiple execution runs will remain consistent. In some cases, a workflow engine (e.g., workflow engine 106a) can cache intermediate results generated by successfully executed modules when input dependencies and parameters have not been changed, so that the cached results can be used during the next run instead of executing the module again. This can speed up the execution time for the DAG. For a caching system, changes to the input are detected so that cached results are not reused inappropriately.
[0041] The programming environment 120 represents a general programming environment, such as python or C#. The execution module 130 allows the execution of a script 122 written in a high-level programming language. For example, for a line-by-line interpreted language, the execution module 130 provides an execution virtual machine. In the example shown, the programming environment 120 is a python environment. The script 122 is shown to include three parts: a workflow identifier and decorator 124, a function definition part 126 (e.g., a function definition including a documentation string), and a program logic part 128. Python provides decorators, which are functions that accept another function and extend the behavior of the other function without explicitly modifying the other function. In some examples, the workflow identifier and decorator 124 are implemented as a "binding" function, which is a single line of code used to convert a function into a module definition that can be recognized and used in the workflow engine. Examples and further details will refer to Figure 5 The workflow identifier and decorator 124 enable the workflow engine tool 102 to select a target adapter from the adapters 104a-104d, so that the workflow engine tool 102 can create different engine wrappers for different underlying workflow engines. This allows the function definition portion 126 and the program logic portion 128 to remain unchanged when any of the workflow engines 106a-106d is targeted. For clarity, in Figures 2 to 4 After the description, it will be combined Figure 5 Components 142-152 are described.
[0042] Figure 2An example workflow module authoring page 200 is shown. The workflow module authoring page 200 is used to manually generate modules for a DAG and has a plurality of data fields for user completion. The workflow engine tool 102 can extract, infer, or otherwise generate information from the script 122 corresponding to the plurality of data fields in the workflow module authoring page 200, thereby making the workflow module authoring page 200 obsolete in various use case scenarios.
[0043] Figure 3 A script portion 300 is shown that provides a function definition for use with a workflow engine tool 102, where a user utilizes the workflow engine tool 102 to specify a DAG using standard programming language syntax. Specifically, the script portion 300 forms an example of the function definition portion 126. The illustrated example of the script portion 300 uses the following functions for exemplary AI training and testing operations:
[0044] -prepare_data(), loads the dataset, splits the dataset into training and testing parts, and returns the training and testing data respectively. This function does not receive input or parameters and generates four outputs.
[0045] -train(), receives training data (input and label), trains the model, and returns the trained model. This function generates a trained model as output and receives three arguments; the first two arguments are inputs and the third argument is a parameter.
[0046] -test(), receives the trained model and test data, predicts the model output, and generates a classification report at the output.
[0047] The text of script section 300 is:
[0048]
[0049]
[0050] Function parameters correspond to module inputs and module parameters because they are the data required for functions to run in a general programming environment and for modules to run in a workflow environment. Functions also have return values, which correspond to module outputs. By extracting this data from the script portion 300, the workflow engine tool 102 saves the user from having to manually specify the inputs, parameters, and outputs of a module. For example, a function definition includes a document string that specifies: (1) which function parameters are module inputs, (2) which function parameters are module parameters, and (3) what the function returns as module output or output.
[0051] For example, prepare_data() uses
[0052] :return: <train_x, train_y, test_x, test_y>.
[0053] :rtype: <npy, npy, npy, npy>.
[0054] To specify the four outputs of type npy, that is, train_x, train_y, test_x, and test_y. Function train() uses a docstring to define input train_x and train_y as the same npy data type as the train_x and train_y outputs of prepare_data(), and the output of the named classifier of the pkl type. This permits the generation of the edge that will be connected to the output of the train_x based on the module corresponding to prepare_data() to the input of the train_x based on the module corresponding to train(). For the same module, similar edges are generated using the input and output based on train_y. Function test() uses a docstring to define input test_x and test_y as the same npy data type as the test_x and test_y outputs of prepare_data(), and the input of the named classifier, which has the same pkl data type as the output of train() using the same name. This permits three edges to be generated, two from the output of the module corresponding to prepare_data() to the input of the module corresponding to test(), and one from the output of the module corresponding to train() to the third input of the module corresponding to test().
[0055] Function test() must be executed after both prepare_data() and train(), and train() must be executed after prepare_data(). This means that the execution order is prepare_data(), then train(), then test(). The workflow engine tool 102 extracts this information to generate modules with the correct inputs, parameters, and outputs, and then generates edges connecting the modules.
[0056] Figure 4 A script portion 400 is shown that can be used in combination with the script portion 300 for use with the workflow engine tool 102. Specifically, the script portion 400 provides program logic that advantageously uses the function definitions provided in the script portion 300 and forms an example of the program logic portion 128. The illustrated example of the script portion 400 uses the above functions for exemplary AI training and testing operations:
[0057] train_x, train_y, test_x, test_y=prepare_data()
[0058] classifier=train(train_x,train_y,0.001)
[0059] res=test(classifier, test_x, test_y).
[0060] The example program (including script parts 300 and 400) loads data, divides it into training and test parts, trains using the training data, tests using the test data, and returns a report. Here, through this example, the execution flow can be inferred (extracted).
[0061] Figure 5 The intermediate result of the workflow engine tool 102 operating the script 522 is shown. In this example, the script 522 includes the script parts 300 and 400 (respectively Figure 3 and Figure 4 ), and a workflow identifier and decorator 124, the decorator 124 specifies the adapter 104a (for the workflow engine 106a) and calls the python decorator to convert the defined function into a workflow module definition. An example of a workflow identifier and decorator 124 is:
[0062] lf_a=LightflowEngine()
[0063] prepare_data,train,test=lf_a.bind_functions(prepare_data,train,test).
[0064] DAG 510 has node 512a corresponding to the prepare_data() function described above, node 512b corresponding to the train() function described above, and node 512c corresponding to the test() function described above. In addition, edges are shown between the nodes. For simplicity, edges 514a and 514b are shown as a single edge, although each edge has two outputs to match the four value outputs of node 512a (train_x, train_y, test_x, and test_y), and for clarity of illustration, the output is shown as a single output 516a. Specifically, edge 514a connects test_x and test_y from output 516a to input 518a of node 512c (there will actually be two); edge 514b connects train_x and train_y from output 516a to input 518b of node 512b (there will actually be two); and edge 514c connects the classifier of output 516b from node 512b to input 518c of node 512c. This, together with the parameter 618 of node 512b and the output 616 from node 512c, is Figure 6 is shown in .
[0065] Return to Figure 5, components 142-152 that perform information extraction and module and edge generation activities are described. The module extraction component 142 uses the function definitions in the script 522 (e.g., the script portion 300) to extract the information used by the module generation component 144 to generate modules (e.g., nodes 512a-512c). When modules are created, they will need labels or module IDs to be addressed and processed by the workflow engine 106a. One way to generate module IDs for assigning to nodes 512a-512c is to use upstream dependencies. For example, node 512a is upstream of both nodes 512b and 512c, and node 512b is upstream of node 512c. The module ID for node 512c can then be generated using information from nodes 512a and 512c, for example, by combining their module IDs and passing them to functions that are less likely to generate module ID conflicts. The workflow interface component 150 sends the generated modules to the workflow engine 106a. The execution flow extraction component 146 uses the input and output information to extract the execution flow information, and the edge generation component 148 generates edges connecting the outputs (e.g., outputs 516a and 516b) with the inputs (518a-518c) of the modules generated by the module generation component 144. The workflow interface component 150 sends the generated modules to the workflow engine 106a. The workflow decorator component 152 binds functions according to a specific target workflow engine (e.g., workflow engine 106a) so that the DAG 510 can be generated. The workflow interface component 150 executes the DAG 510 and the underlying system calls for the workflow engine 106a.
[0066] In some examples, a series of function calls can be grouped into more complex structures, such as by creating a subgraph and using the subgraph in a top-level workflow pipeline. An example streamlined script using the previously identified functions is:
[0067]
[0068] Furthermore, in some examples, based on conditional branching logic, such as if-then branches and for-loops, a DAG can be created as needed—when the information is extracted from the script, the information required to compile the DAG is available. The decorator function allows the use of workflow-specific functions identified in certain parameters. For example, according to the script portion 400 ( Figure 4 Some workflows can support schema specification by modifying the following example:
[0069] train_x, train_y, test_x, test_y=prepare_data(mode='cpu')
[0070] classifier=train(train_x, train_y, 0.001, mode='gpu')
[0071] res=test(classifier, test_x, test_y, mode='gpu')
[0072] When the workflow engine tool 102 reads the additional parameters, it will identify them as workflow specific parameters based on the original parameters of the module function in the documentation string. In order to enable the script 522 to run anywhere with or without a workflow engine that supports additional parameters, the dummy wrapper binds the function but eliminates the additional parameters and only passes the original parameters to the original function. In this way, as long as one line is changed, the script 522 can run normally without any further changes.
[0073] Figure 7 700 is a flowchart of operations associated with operating the workflow engine tool 102. As described above, the workflow engine tool 102 greatly simplifies workflow generation for users. The user only needs to perform operations 702 to 710 as shown, without manually creating modules (e.g., using a workflow module authoring page 200 for each module) and then manually connecting the modules. In operation 702, the user develops a task function, including a document string definition, generates a script portion 300 ( Figure 3 In operation 704, the user writes program logic in a general programming language to generate the script part 400 ( Figure 4 In operation 706, the user identifies the target workflow engine, and in operation 708, the workflow identifier and the decorator 124 are used to bind the function. This allows the user to generate a workflow in operation 710 simply by running the script.
[0074] Figure 8800 is a flowchart of operations associated with operating a workflow engine tool 102. In some examples, the following operations are implemented as computer executable instructions stored on a computing device 900 and executed by the computing device 900. Operation 802 includes writing a programming language script in a programming environment. In some examples, the programming language includes a python programming language and the programming language script is a python script. In some examples, C# is used. Operation 804 includes a workflow engine tool that receives a programming language script. Operation 806 includes extracting a module definition from the programming language script, and operation 808 includes extracting execution flow information from the programming language script. Operation 810 then includes generating a module from the extracted module definition for the workflow engine. In some examples, this includes using a binding function. Operation 812 includes generating a module ID for a module generated for the workflow engine based at least on upstream dependencies.
[0075] Operation 814 includes generating edges for connecting modules generated for the workflow engine for the workflow engine, and operation 816 includes connecting the modules generated for the workflow engine with the edges generated for the workflow engine based at least on the extracted execution flow information to generate a workflow pipeline for the workflow engine. In some examples, the workflow pipeline includes a DAG. Operation 818 includes identifying workflow-specific parameters. If the target workflow engine is supported (as determined by decision operation 820), operation 822 includes passing workflow-specific parameters to the workflow engine. Otherwise, operation 824 eliminates the workflow-specific parameters and does not pass it. Operation 826 then includes running the workflow engine to execute the workflow pipeline.
[0076] If it is determined in decision operation 828 that another different workflow engine will be used with the programming language script, then operation 830 includes slightly modifying the programming language script of the second workflow engine. In some examples, this is similar to modifying a single line (e.g., Figure 1 and Figure 5 The workflow identifier in is as simple as the decorator 124), and then the flowchart 800 returns to operation 804, where the workflow engine tool receives a slightly modified programming language script.
[0077] Additional Examples
[0078] Some aspects and examples disclosed herein relate to a workflow engine tool, comprising: a processor; and a computer-readable medium storing instructions, which, when executed by the processor, are used to: extract module definitions from a programming language script; extract execution flows from the programming language script; generate modules from the extracted module definitions for a first workflow engine; generate edges for connecting modules generated for the first workflow engine; and, based at least on the extracted execution flow information, connect the modules generated for the first workflow engine with the edges generated for the first workflow engine to generate a first workflow pipeline for the first workflow engine.
[0079] Additional aspects and examples disclosed herein relate to a process for workflow engine management, comprising: extracting module definitions from a programming language script; extracting execution flows from a programming language script; generating modules for a first workflow engine from the extracted module definitions; generating edges for connecting modules generated for the first workflow engine; and connecting modules generated for the first workflow engine with edges generated for the first workflow engine based at least on the extracted execution flow information to generate a first workflow pipeline for the first workflow engine.
[0080] Additional aspects and examples disclosed herein relate to one or more computer storage devices having computer executable instructions for workflow engine management stored thereon, which, when executed by a computer, cause the computer to perform operations, the operations comprising: extracting module definitions from a programming language script; extracting execution flows from a programming language script; generating, for a first workflow engine, modules from the extracted module definitions; generating, for the first workflow engine, edges for connecting the modules generated for the first workflow engine; and, based at least on the extracted execution flow information, connecting the modules generated for the first workflow engine with the edges generated for the first workflow engine to generate a first workflow pipeline for the first workflow engine; generating, for a second workflow engine, modules from the extracted module definitions; generating, for the second workflow engine, edges for connecting the modules generated for the second workflow engine; and, based at least on the extracted execution flow information, connecting the modules generated for the second workflow engine with the edges generated for the second workflow engine to generate a second workflow pipeline for the second workflow engine.
[0081] Alternatively, or in addition to other examples herein, the examples include any combination of the following:
[0082] -Programming languages include Python programming language;
[0083] - The first workflow pipeline includes a DAG;
[0084] -Running a first workflow engine to execute a first workflow pipeline;
[0085] -For the second workflow engine, generate modules from the extracted module definitions; for the second workflow engine, generate edges for connecting the modules generated for the second workflow engine; and based at least on the extracted execution flow information, use the edges generated for the second workflow engine to connect the modules generated for the second workflow engine to generate a second workflow pipeline for the second workflow engine.
[0086] - The second workflow pipeline includes the DAG;
[0087] -Running the second workflow engine to execute the second workflow pipeline;
[0088] - identifying workflow-specific parameters; and based at least on whether the first workflow engine supports workflow-specific parameters, passing the workflow-specific parameters to the first workflow engine;
[0089] - generating a module ID for the module generated for the first workflow engine based at least on the upstream dependencies;
[0090] - Based at least on the upstream dependencies, generate a module ID for the module generated for the second workflow engine.
[0091] Although aspects of the disclosure have been described in terms of various examples and their related operations, those skilled in the art will appreciate that combinations of operations from any number of the different examples are also within the scope of aspects of the disclosure.
[0092] Example operating environment
[0093] Fig. 9900 is a block diagram of an example computing device 900 for implementing the aspects disclosed herein, and is generally designated as computing device 900. Computing device 900 is only an example of a suitable computing environment and is not intended to imply any limitation on the scope of use or functionality of the examples disclosed herein. Computing device 900 should also not be interpreted as having any dependency or requirement on any one or combination of components / modules shown. The examples disclosed herein can be described in the general context of computer code or machine-usable instructions, including computer-executable instructions executed by a computer or other machine, such as program components executed by a computer or other machine, such as a personal data assistant or other handheld device. Typically, program components include routines, programs, objects, components, data structures, etc., referring to codes that perform specific tasks or implement specific abstract data types. The disclosed examples can be practiced in various system configurations, including personal computers, laptop computers, smart phones, mobile tablet computers, handheld devices, consumer electronics, professional computing devices, etc. When tasks are performed by remote processing devices linked by a communication network, the disclosed examples can also be practiced in a distributed computing environment.
[0094] The computing device 900 includes a bus 910 that directly or indirectly couples the following devices and components: computer storage memory 912, one or more processors 914, one or more presentation components 916, input / output (I / O) ports 918, I / O components 920, power supply 922, and network components 924. The computing device 900 should not be interpreted as having any dependency or requirement related to any single component or combination of components shown therein. Although the computing device 900 is depicted as appearing to be a single device, multiple computing devices 900 can work together and share the depicted device resources. For example, the memory 912 can be distributed across multiple devices, (multiple) processors 914 can be provided installed on different devices, and so on.
[0095] Bus 910 represents what may be one or more buses (such as an address bus, a data bus, or a combination thereof). Although for clarity, Fig. 9 The various blocks of the MCU are shown with lines, but in reality, it is not so clear to delineate the various components, and metaphorically, the lines would more accurately be gray and fuzzy. For example, one could consider a presentation component such as a display device to be an I / O component. Also, a processor has memory. This is the nature of the art, and to reiterate Fig. 9 The diagrams are merely illustrative of exemplary computing devices that can be used in conjunction with one or more of the disclosed examples. No distinction is made between categories such as "workstation," "server," "laptop," "handheld device," etc., because Fig. 9These categories are contemplated within the scope of and references to "computing devices" herein. Memory 912 may take the form of the following computer storage media references and is operable to provide storage of computer-readable instructions, data structures, program modules, and other data for computing device 900. For example, memory 912 may store an operating system, a general-purpose application platform, or other program modules and program data. Memory 912 may be used to store and access instructions configured to perform the various operations disclosed herein.
[0096] As described below, memory 912 may include computer storage media in the form of volatile and / or non-volatile memory, removable or non-removable memory, data disks in a virtual environment, or a combination thereof. Memory 912 may include any number of memories associated with or accessible by computing device 900. Memory 912 may be internal to computing device 900 (e.g., Fig. 9 ), external to computing device 900 (not shown), or both (not shown). Examples of memory 912 include, but are not limited to, random access memory (RAM); read-only memory (ROM); electrically erasable programmable read-only memory (EEPROM); flash memory or other storage technology; CD-ROM, digital versatile disk (DVD), or other optical or holographic media; cassettes, magnetic tape, disk storage, or other magnetic storage devices; memory wired to an analog computing device; or any other medium for encoding the desired information and for access by computing device 900. Additionally or alternatively, memory 912 may be distributed across multiple computing devices 900, for example, in a virtualized environment where instruction processing is performed on multiple computing devices 900. For purposes of this disclosure, "computer storage media," "computer storage memory," "memory," and "memory device" are synonymous terms for memory 912, and none of these terms include carrier waves or propagating signaling.
[0097] (Multiple) processors 914 may include any number of processing units that read data from various entities, such as memory 912 or I / O components 920. Specifically, processor 914 is programmed to execute computer executable instructions for implementing multiple aspects of the present disclosure. Instructions may be executed by a processor, multiple processors within computing device 900, or a processor outside computing device 900. In some examples, (multiple) processors 914 are programmed to execute instructions such as those shown in the flowcharts discussed below and depicted in the accompanying drawings. In addition, in some examples, (multiple) processors 914 represent the implementation of analog technology to perform the operations described herein. For example, these operations can be performed by analog client computing devices 900 and / or digital client computing devices 900. Presentation component 916 presents data indications to a user or other device. Exemplary presentation components include display devices, speakers, printing components, vibration components, etc. Those skilled in the art will understand and appreciate that computer data can be presented in a variety of ways, such as visually in a graphical user interface (GUI), audibly through a speaker, wirelessly between computing devices 900, through a wired connection, or in other ways. Ports 918 allow computing device 900 to be logically coupled to other devices including I / O components 920, some of which may be built-in. Example I / O components 920 include, for example but not limited to, microphones, joysticks, game pads, satellite dishes, scanners, printers, wireless devices, and the like.
[0098] The computing device 900 can operate in a networked environment using logical connections to one or more remote computers via a network component 924. In some examples, the network component 924 includes a network interface card and / or computer executable instructions (e.g., a driver) for operating a network interface card. Communications between the computing device 900 and other devices can be performed over any wired or wireless connection using any protocol or mechanism. In some examples, the network component 924 is operable to transmit data over public, private, or hybrid (public and private) using a transport protocol, using short-range communication technologies (e.g., near field communication (NFC), Bluetooth TM Brand communication, etc.) or a combination thereof to wirelessly communicate between devices. For example, network component 924 communicates with network 932 having cloud resources 934 via communication link 930. Various examples of communication link 930 include wireless connections, wired connections, and / or dedicated links, and in some examples, at least a portion is routed through the Internet. In some examples, cloud resources 934 perform at least some of the operations described herein for computing device 900.
[0099] Although described in conjunction with the example computing device 900, the examples of the present disclosure can be implemented with many other general or special computing system environments, configurations, or devices. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with aspects of the present disclosure include, but are not limited to, smartphones, mobile tablets, mobile computing devices, personal computers, server computers, handheld devices or laptops, multiprocessor systems, game consoles, microprocessor-based systems, set-top boxes, programmable consumer electronics, mobile phones, mobile computing and / or communication devices in the form of wearable or accessory devices (e.g., watches, glasses, headphones, or earphones), network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, virtual reality (VR) devices, holographic devices, and the like. Such systems or devices can accept input from a user in any manner, including from an input device such as a keyboard or pointing device, via gesture input, proximity input (such as by hovering), and / or via voice input.
[0100] Examples of the present disclosure can be described in the general context of computer executable instructions executed by one or more computers or other devices in software, firmware, hardware or a combination thereof, such as program modules. Computer executable instructions can be organized into one or more computer executable components or modules. Typically, program modules include but are not limited to routines, programs, objects, components and data structures that perform specific tasks or implement specific abstract data types. Aspects of the present disclosure can be implemented with such components or modules of any number and organization. For example, aspects of the present disclosure are not limited to specific computer executable instructions or specific components or modules shown in the figures and described herein. Other examples of the present disclosure may include different computer executable instructions or components, which have more or less functions than those shown and described herein. In an example involving a general-purpose computer, when configured to execute instructions described herein, aspects of the present disclosure convert the general-purpose computer into a special-purpose computing device.
[0101] As an example and not limitation, computer-readable media include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable memory implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules, etc. Computer storage media are tangible and mutually exclusive with communication media. Computer storage media are implemented in hardware and do not include carrier waves and propagation signals. Computer storage media for the purposes of this disclosure are not signals themselves. Exemplary computer storage media include hard disks, flash drives, solid-state memories, phase change random access memories (PRAM), static random access memories (SRAM), dynamic random access memories (DRAM), other types of random access memories (RAM), read-only memories (ROM), electrically erasable programmable read-only memories (EEPROM), flash memory or other storage technologies, compact disk read-only memories (CD-ROM), digital versatile disks (DVD) or other optical storage, cassettes, tapes, disk storage devices or other magnetic storage devices, or any other non-transmission media that can be used to store information for access by a computing device. In contrast, communication media typically embodies computer readable instructions, data structures, program modules, etc. in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
[0102] The execution of the operations in the examples of the present disclosure shown and described herein or the order of execution is not necessary, and can be executed in different sequential ways in various examples.For example, it is expected that before, simultaneously or after another operation, a specific operation is executed or performed within the scope of the aspects of the present disclosure.When introducing the elements of the aspects of the present disclosure or its examples, the articles "a", "an", "the" and "said" are intended to represent the presence of one or more elements.The terms "comprising", "including" and "having" are intended to be inclusive, and mean that there may be other elements in addition to the listed elements.The term "exemplary" is intended to represent "exemplary".The phrase "one or more of the following: A, B and C" refers to "at least one of A and / or at least one of B and / or at least one of C".
[0103] Having described various aspects of the disclosure in detail, it will be apparent that modifications and variations are possible without departing from the scope of aspects of the disclosure as defined in the appended claims. As various changes may be made to the above-described constructions, products, and methods without departing from the scope of aspects of the disclosure, it is intended that all matter contained in the above description and all matter shown in the accompanying drawings shall be interpreted as illustrative and not limiting.
Claims
1. A workflow engine tool, comprising: processor; as well as A computer storage medium storing instructions that, when executed by a processor, are used to: receiving a programming language script; extracting module definitions from the programming language script; extracting execution flow information from the programming language script; For a first workflow engine, generating a module from the module definition extracted from the programming language script; generating a module ID for the module generated for the first workflow engine based at least on the upstream dependency; For the first workflow engine, generating an edge for connecting the modules generated for the first workflow engine; connecting the modules generated for the first workflow engine with the edges generated for connecting the modules generated for the first workflow engine based at least on the execution flow information extracted from the programming language script, so as to generate a first workflow pipeline for the first workflow engine; Identify workflow-specific parameters; Based at least on whether the first workflow engine supports the workflow specific parameter, passing the workflow specific parameter to the first workflow engine; as well as The first workflow engine is run to execute the first workflow pipeline.
2. The workflow engine tool according to claim 1, wherein the programming language script comprises a python programming language script. 3 . The workflow engine tool according to claim 1 , wherein the first workflow pipeline comprises a directed acyclic graph (DAG).
4. The workflow engine tool according to claim 1, wherein the instructions, when executed by the processor, are further used to: For a second workflow engine, generating a module from the module definition extracted from the programming language script; For the second workflow engine, generating edges for connecting the modules generated for the second workflow engine; and Based at least on the execution flow information extracted from the programming language script, the modules generated for the second workflow engine are connected using the edges generated for connecting the modules generated for the second workflow engine to generate a second workflow pipeline for the second workflow engine.
5. The workflow engine tool according to claim 1, wherein: Extracting the module definition from the programming language script further comprises: Infer module definitions from function definitions.
6. The workflow engine tool according to claim 1, wherein: The first workflow engine is a virtual abstraction layer that allows the first workflow pipeline to run without a workflow engine.
7. The workflow engine tool according to claim 1, wherein: The first workflow engine is configured to cache intermediate results generated by one or more modules in the modules when one or more modules in the modules are successfully executed, and wherein, during subsequent execution of the one or more modules in the modules, the cached intermediate results are used to replace the execution of the one or more modules in the modules.
8. The workflow engine tool according to claim 1, wherein: Passing the workflow specific parameters to the first workflow engine further comprises: The function is bound using a virtual wrapper that eliminates one or more workflow-specific parameters and passes the original parameters to the original function.
9. A method for workflow engine management, the method comprising: receiving a programming language script; extracting module definitions from the programming language script; extracting execution flow information from the programming language script; For a first workflow engine, generating a module from the module definition extracted from the programming language script; generating a module ID for the module generated for the first workflow engine based at least on the upstream dependency; For the first workflow engine, generating an edge for connecting the modules generated for the first workflow engine; connecting the modules generated for the first workflow engine with the edges generated for connecting the modules generated for the first workflow engine based at least on the execution flow information extracted from the programming language script, so as to generate a first workflow pipeline for the first workflow engine; Identify workflow-specific parameters; Based at least on whether the first workflow engine supports the workflow specific parameter, passing the workflow specific parameter to the first workflow engine; as well as The first workflow engine is run to execute the first workflow pipeline.
10. The method of claim 9, wherein the programming language script comprises a python programming language script. The method of claim 9 , wherein the first workflow pipeline comprises a directed acyclic graph (DAG).
12. The method according to claim 9, further comprising: For a second workflow engine, generating a module from the module definition extracted from the programming language script; For the second workflow engine, generating an edge for connecting the modules generated for the second workflow engine; as well as Based at least on the execution flow information extracted from the programming language script, the modules generated for the second workflow engine are connected using the edges generated for connecting the modules generated for the second workflow engine to generate a second workflow pipeline for the second workflow engine.
13. The method according to claim 9, wherein: Extracting the module definition from the programming language script further comprises: Infer module definitions from function definitions.
14. The method according to claim 9, wherein: The first workflow engine is a virtual abstraction layer that allows the first workflow pipeline to run without a workflow engine.
15. The method according to claim 9, wherein: The first workflow engine is configured to cache intermediate results generated by one or more modules of the module when one or more modules of the module are successfully executed, and wherein, during subsequent execution of the one or more modules of the module, the cached intermediate results are used to replace the execution of the one or more modules of the module.
16. The method according to claim 9, wherein: Passing the workflow specific parameters to the first workflow engine further comprises: The function is bound using a virtual wrapper that eliminates one or more workflow-specific parameters and passes the original parameters to the original function.
17. One or more computer storage media having stored thereon computer executable instructions for workflow engine management, the computer executable instructions, when executed by a computer, causing the computer to perform operations comprising: receiving a programming language script; extracting module definitions from the programming language script; Extracting module execution flow information from the programming language script; For a first workflow engine, generating a module from the module definition extracted from the programming language script; generating a module ID for the module generated for the first workflow engine based at least on the upstream dependency; For the first workflow engine, generating an edge for connecting the modules generated for the first workflow engine; connecting the modules generated for the first workflow engine with the edges generated for connecting the modules generated for the first workflow engine based at least on the execution flow information extracted from the programming language script, so as to generate a first workflow pipeline for the first workflow engine; For a second workflow engine, generating a module from the module definition extracted from the programming language script; generating a module ID for the module generated for the second workflow engine based at least on the upstream dependency; For the second workflow engine, generating an edge for connecting the modules generated for the second workflow engine; connecting the modules generated for the second workflow engine with the edges generated for connecting the modules generated for the second workflow engine based at least on the execution flow information extracted from the programming language script, so as to generate a second workflow pipeline for the second workflow engine; Identify workflow-specific parameters; Based at least on whether the first workflow engine supports the workflow specific parameter, passing the workflow specific parameter to the first workflow engine; passing the workflow-specific parameter to the second workflow engine based at least on whether the second workflow engine supports the workflow-specific parameter; as well as The first workflow engine and the second workflow engine are run to execute the first workflow pipeline and the second workflow pipeline respectively.
18. The one or more computer storage media of claim 17, wherein the programming language script comprises a python programming language script.
19. The one or more computer storage media of claim 17, wherein the first workflow pipeline and the second workflow pipeline each comprise a directed acyclic graph (DAG).
Citation Information
Cited By
Creating a Ticket Workflow Partitioned between Local and Cloud-Based Execution
US20260359756A1
