Task flow arrangement method and task scheduling method based on workflow engine

By using JAVA to write task flow orchestration files in the workflow engine and combining real-time scheduling and preemptive scheduling methods, the problems of high learning cost and poor scheduling performance in existing technologies are solved, and efficient and stable task flow orchestration and scheduling are achieved.

CN123197319APending Publication Date: 2026-12-01ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510678307.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-12-01

AI Technical Summary

Technical Problem

Existing workflow engines have high learning costs and high orchestration complexity in task flow orchestration and scheduling, and poor scheduling performance, making it difficult to guarantee system stability.

Method used

The task flow orchestration file is written in JAVA language, combining real-time scheduling and preemptive scheduling methods. It realizes task flow orchestration and scheduling through parser and scheduler, and supports high availability, ease of use, high performance and security.

Benefits of technology

It reduces the learning cost and complexity of orchestration, improves scheduling performance and system stability, realizes task self-healing and process inspection functions, and has the advantages of high availability, ease of use, high performance, security and lightweight scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123197319A_ABST
    Figure CN123197319A_ABST
Patent Text Reader

Abstract

The application provides a task flow arrangement method and a task scheduling method based on a workflow engine, and belongs to the technical field of cloud computing. The workflow engine comprises a parser, the method is applied to the parser, and the method comprises the following steps: displaying an arrangement interface of a task flow, an arrangement control is displayed on the arrangement interface, and the arrangement control is used for writing code in JAVA language; obtaining flow arrangement information of a target task to be coded, the flow arrangement information is used for indicating an execution sequence and an execution mode of a plurality of steps of the target task; coding the target task on the arrangement interface based on the arrangement control and the flow arrangement information, obtaining a target flow arrangement file corresponding to the target task, and the target flow arrangement file is an executable file described in JAVA language. By coding the flow arrangement file in JAVA language, the learning cost and the arrangement complexity of the arrangement process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a task flow orchestration method and task scheduling method based on a workflow engine. Background Technology

[0002] A workflow engine is a core component for achieving process automation in enterprise applications, used to orchestrate a series of related tasks. A workflow engine includes a parser and a scheduler. The parser orchestrates the execution flow corresponding to a task; the scheduler schedules the tasks according to the execution flow orchestrated by the parser. Taking a target task as an example, the target task includes multiple subtasks. The user, based on the execution logic of these subtasks, uses XML (Extensible Markup Language) to write a workflow orchestration file on the parser. The user then submits the orchestration file to the scheduler, which parses the file to obtain the execution flow corresponding to the target task. Finally, the scheduler schedules the target task according to this execution flow to complete the target task.

[0003] However, to write workflow orchestration documents, users need to learn the meaning of each field in XML, how to indent, and other related knowledge, which has a high learning curve. Furthermore, a simple task may require writing hundreds of lines of code, making the workflow orchestration process complex. Summary of the Invention

[0004] This application provides a task orchestration method and task scheduling method based on a workflow engine, which can reduce the learning cost and complexity of the orchestration process. The technical solution is as follows:

[0005] Firstly, a task flow orchestration method based on a workflow engine is provided, wherein the workflow engine includes a parser, and the method is applied to the parser, the method comprising:

[0006] The task flow arrangement interface is displayed, and the arrangement interface displays arrangement controls, which are used to write code in JAVA language.

[0007] Obtain the process arrangement information of the target task to be encoded, wherein the process arrangement information is used to indicate the execution order and execution method of multiple steps of the target task;

[0008] Based on the orchestration control and the process orchestration information, the target task is encoded on the orchestration interface to obtain the target process orchestration file corresponding to the target task. The target process orchestration file is an executable file described using the JAVA language.

[0009] Secondly, a task scheduling method based on a workflow engine is provided, wherein the workflow engine includes a parser and a scheduler, and the method is applied to the scheduler, the method comprising:

[0010] The target process orchestration file is parsed to obtain multiple steps corresponding to the target task. The target process orchestration file is a process orchestration file written by the parser in JAVA language for the target task. The target task includes multiple subtasks, and each step is used to execute at least one subtask.

[0011] When the first server is running normally, after at least one subtask corresponding to the first step has been executed, the first server is invoked to execute at least one subtask corresponding to the second step. The first step is any one of the multiple steps, the second step is the next step after the first step, and the first server is one of the multiple servers used to execute the target task.

[0012] In the event that the first server fails, a third server is determined from a plurality of second servers, and the third server is invoked to execute at least one task corresponding to the third step. The plurality of second servers are all or some of the plurality of servers except the first server, and the third step is the step that could not be executed normally when the first server failed.

[0013] Thirdly, a task orchestration apparatus based on a workflow engine is provided, wherein the workflow engine includes a parser, and the apparatus is disposed in the parser, the apparatus comprising:

[0014] The display module is used to display the task flow arrangement interface. The task flow arrangement interface displays arrangement controls, which are used to write code in JAVA language.

[0015] The acquisition module is used to acquire the process arrangement information of the target task to be encoded. The process arrangement information is used to indicate the execution order and execution method of multiple steps of the target task.

[0016] The encoding module is used to encode the target task on the arrangement interface based on the arrangement control and the process arrangement information to obtain the target process arrangement file corresponding to the target task. The target process arrangement file is an executable file described using the JAVA language.

[0017] Fourthly, a task scheduling device based on a workflow engine is provided. The workflow engine includes a parser and a scheduler, and the device is disposed in the scheduler. The device includes:

[0018] The parsing module is used to parse the target process orchestration file to obtain multiple steps corresponding to the target task. The target process orchestration file is a process orchestration file written by the parser in JAVA language for the target task. The target task includes multiple subtasks, and each step is used to execute at least one subtask.

[0019] The first calling module is used to call the first server to execute at least one subtask corresponding to the second step when the first server is running normally and at least one subtask corresponding to the first step has been executed. The first step is any one of the multiple steps, the second step is the next step after the first step, and the first server is one of the multiple servers used to execute the target task.

[0020] The second invocation module is used to determine a third server from a plurality of second servers when the first server crashes, and to invoke the third server to execute at least one task corresponding to the third step. The plurality of second servers are all or some of the plurality of servers except the first server, and the third step is the step that could not be executed normally when the first server crashes.

[0021] Fifthly, an electronic device is provided, including a processor and a memory; the memory stores at least one piece of program code; the at least one piece of program code is used to be called and executed by the processor to implement the task flow orchestration method based on the workflow engine described in the first aspect, or the task scheduling method based on the workflow engine described in the second aspect.

[0022] In a sixth aspect, a computer-readable storage medium is provided, wherein at least one computer program is stored therein, and when the at least one computer program is executed by a processor, it is capable of implementing the task flow orchestration method based on a workflow engine as described in the first aspect, or the task scheduling method based on a workflow engine as described in the second aspect.

[0023] In a seventh aspect, a computer program product is provided, the computer program product comprising a computer program, which, when executed by a processor, is capable of implementing the task flow orchestration method based on a workflow engine as described in the first aspect, or the task scheduling method based on a workflow engine as described in the second aspect.

[0024] The beneficial effects of the technical solutions provided in this application are:

[0025] This application provides a workflow engine, which includes a parser that can encode corresponding workflow orchestration files for various tasks using the JAVA language. Taking a target task as an example, when encoding the target task, the parser displays a task workflow orchestration interface. This interface displays orchestration controls that support the JAVA language and can be encoded using JAVA. The parser obtains the workflow orchestration information of the target task, which indicates the execution order and execution method of multiple steps of the target task. Based on the workflow orchestration information of each step of the target task, the parser uses the orchestration controls to encode the corresponding JAVA code for each step of the target task on the orchestration interface, obtaining the target workflow orchestration file corresponding to the target task. This target workflow orchestration file is an executable file described using the JAVA language. JAVA, as an object-oriented programming language, has a very simple syntax and provides prompts, resulting in a low learning curve. For a task, writing in XML might require hundreds of lines of code, but coding in JAVA might only require a few lines, greatly reducing the complexity of orchestration. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is an architecture diagram of a workflow engine provided in an embodiment of this application;

[0028] Figure 2 This is a flowchart of a task flow orchestration method based on a workflow engine, provided in an embodiment of this application.

[0029] Figure 3 This is a schematic diagram of a task flow orchestration process based on a workflow engine, provided in an embodiment of this application;

[0030] Figure 4 This is a flowchart of a task scheduling method based on a workflow engine provided in an embodiment of this application;

[0031] Figure 5 This is a flowchart of a task scheduling process based on a workflow engine, provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the structure of a task flow orchestration device based on a workflow engine provided in an embodiment of this application;

[0033] Figure 7 This is a schematic diagram of the structure of a task scheduling device based on a workflow engine provided in an embodiment of this application;

[0034] Figure 8 A structural block diagram of an electronic device provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0036] It is understood that the terms "each," "multiple," and "any" used in the embodiments of this application, etc., mean that "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the corresponding multiples. For example, multiple words include 10 words, and "each word" refers to each of the 10 words, while "any word" refers to any one of the 10 words.

[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0038] Before implementing the embodiments of this application, the terms involved in the embodiments of this application will be explained first.

[0039] A workflow engine is an engine foundation that supports process orchestration and execution. Workflow engines are mainly used to solve the problems of flexible state management and orchestration in complex processes, and are currently used in low-code platforms, office automation (OA) platforms, workflow systems, and other platforms.

[0040] A task component is an encapsulation of execution logic that can be reused and is capable of completing a specific task.

[0041] Native components refer to the task components provided by default by the workflow engine.

[0042] A controller is a special component that controls the routing of nodes in a process (corresponding to steps of a task in the embodiments of this application). Controllers include serial controllers, condition controllers, parallel controllers, subprocess controllers, and bypass controllers, etc.

[0043] Process orchestration refers to assembling multiple task components and controllers into a complete task flow to complete a certain task.

[0044] An event is a process that can be driven from outside the process by an event-based approach. These events include message events, signal events, timed events, and error events.

[0045] Timely scheduling means that once a node in the process (i.e., any step of a task) is completed, the subsequent node (i.e., the next step after any step) is executed immediately, without needing to execute scheduling logic.

[0046] Preemptive scheduling refers to each workflow engine instance actively scheduling and executing process nodes according to its current load.

[0047] Operations and maintenance services inherently possess a certain degree of complexity. For instance, a typical routine change operation might involve dozens of different subtasks, each of which may interact with several downstream systems. These subtasks also have dependencies and corresponding triggering conditions, and may even involve some manual tasks, such as approvals and manual execution. Furthermore, the same subtasks may be reused in different change operations. To reduce operational complexity, workflow engines are typically introduced to orchestrate and schedule tasks for operations and maintenance services.

[0048] Currently, mainstream workflow engines include Activiti, Flowable, Camunda, AirFlow, and JFlow. These engines consist of parsers and schedulers. The parser orchestrates the execution flow of tasks, while the scheduler schedules tasks according to the execution flow orchestrated by the parser. However, these workflow engines become unreliable at a certain scale, frequently experiencing issues such as task loss or workflow scheduling anomalies, requiring significant human intervention.

[0049] For example, when orchestrating tasks using these mainstream workflow engines, which generally support XML, users write a workflow orchestration file for a specific task using XML on the parser, based on the execution logic of the multiple subtasks included in the task. This file is then submitted to the scheduler. However, XML itself has a complex syntax. To write a workflow orchestration file, users need to learn the meaning of each field in XML, how to indent, and other related knowledge, resulting in a high learning curve. Furthermore, for a simple task, writing XML might require hundreds of lines of code, making the orchestration process quite complex.

[0050] For example, when scheduling tasks based on these mainstream workflow engines, the scheduler parses the workflow orchestration file to obtain the execution flow corresponding to the task. Then, according to the execution flow of the task, it uses a preemptive scheduling method to schedule the tasks. That is, based on the load of each server, it schedules each subtask of the task to complete the task. However, the preemptive scheduling method has low throughput and poor scheduling performance.

[0051] To reduce the learning curve and complexity of task orchestration, while improving system performance and ensuring system stability, this application provides a workflow engine. (See also...) Figure 1 The workflow engine includes a scheduler and a parser.

[0052] The parser supports the JAVA language. In response to user operations written in JAVA, the parser can define various components in the workflow engine, write task flow orchestration files for any task, and define the execution of tasks.

[0053] The scheduler parses the task flow file written by the parser and, based on the parsed results, schedules each step of the task using both immediate and preemptive scheduling methods to improve scheduling performance and stability. Typically, each step of a task has a different execution method, such as serial, parallel, parent-child flow, or branching. Different execution methods require corresponding types of processors. For example, for any step, if the execution method is serial, a serial processor is needed; if the execution method is parallel, a parallel processor is needed; if the execution method is parent-child flow, a parent-child processor is needed, and so on. When scheduling each step of a task, the scheduler also needs to determine the appropriate processor for each step based on its execution method, ensuring that the determined processor executes each step using the appropriate execution method.

[0054] See Figure 1The workflow engine also includes functional components such as a caching layer, listeners, interceptors, event-driven mechanisms, and historical data processing components to assist the parser and scheduler in their work and improve the performance of the workflow engine. The caching layer stores files defined or written by the parser. Listeners monitor task scheduling and execution. Interceptors intercept erroneous operations by the scheduler to ensure its proper functioning. The event-driven component manages the scheduler's scheduling operations based on events defined by the user on the parser. These user-defined events include message events, signal events, error events, and timed events. For example, if the user defines a timed event for a step in a task on the parser, the event-driven component will control the scheduler to wait for the time defined by the timed event after scheduling that step before scheduling the next step. The historical data processing component cleans and archives data in the workflow engine for later retrieval.

[0055] The workflow engine provided in this application embodiment can realize multiple functions such as recovery query and control, task self-healing, and process inspection, and has many advantages such as high availability, ease of use, high performance, security, lightweight and easy expansion.

[0056] High availability is manifested in the following aspects: when using real-time scheduling, if the server crashes, a preemptive scheduling method is used to restore the task, realizing task self-healing and ensuring scheduling stability; the execution logic of different tasks is isolated from each other; the execution strategies of different tasks can be flexibly configured; after the server recovers, real-time scheduling is automatically used to improve scheduling performance.

[0057] Ease of use is reflected in its support for multiple languages.

[0058] High performance is reflected in the following aspects: using a local caching layer to store defined files; zero-transaction scheduling in the real-time scheduling mode; and batch scheduling in the preemptive scheduling mode.

[0059] Security is ensured through measures such as risk interception of the scheduler and manual auditing of processes.

[0060] Lightweight and scalable features include: the workflow engine can be embedded in any operations and maintenance platform; and the functionality of the workflow engine can be extended.

[0061] based on Figure 1The workflow engine shown in this embodiment can achieve zero configuration with its parser, realizing task flow orchestration based on JAVA code. Furthermore, its high availability enables automatic recovery to prevent data loss (it can automatically recover even if the server restarts or crashes unexpectedly). In addition, the scheduler in this embodiment, by combining timely and preemptive scheduling methods, can significantly improve process execution efficiency. Simultaneously, through preemptive scheduling and task tagging mechanisms, it solves scheduling stability issues.

[0062] This application provides a task flow orchestration method based on a workflow engine, which is applied to... Figure 1 The parser for the workflow engine shown is available in [reference]. Figure 2 The method flow provided in this application embodiment includes:

[0063] 201. Display the task flow arrangement interface, which displays arrangement controls.

[0064] To facilitate task orchestration on the parser, a task orchestration interface is displayed. This interface includes multiple controls, including orchestration controls and a submission control. The orchestration controls are used by users to write code in Java to generate the corresponding task orchestration file; the submission control is used to submit the user-written task orchestration file to the scheduler for task scheduling.

[0065] This application embodiment displays a task flow arrangement interface on the parser and arrangement controls on the task flow arrangement interface, which facilitates users in writing task arrangement files for task execution flow, simplifies the user's operation process, and since users can directly write JAVA code on the interface, what the user writes is what they get, making the coding process more intuitive.

[0066] 202. Obtain the workflow arrangement information of the target task to be encoded.

[0067] The target task is any task to be coded. Typically, a target task can include multiple subtasks, which can be executed in multiple steps; that is, each step can execute at least one subtask. For example, a target task could be a package processing task, including multiple subtasks such as pickup, transportation, sorting, and delivery, each of which can be considered a step.

[0068] The workflow arrangement information for the target task is used to indicate the execution order and method of multiple steps within the target task. Generally, the multiple steps of a target task have a defined execution order, which can be determined based on the task's logical execution sequence. Taking the parcel processing task as an example again, the logical execution sequence of the parcel processing task is: pickup—transportation—sorting—delivery. Therefore, the execution order of each step can be determined according to the logical execution sequence of the parcel processing task.

[0069] The multiple steps of a target task have different execution methods, including serial, parallel, and sub-process. Serial execution means that any step of the target task needs to be executed independently; parallel execution means that at least two steps of the target task need to be executed synchronously; a sub-process means that multiple steps arranged into a larger step are executed as a whole, and the execution also follows the relationships between the included steps. For example, a target task includes steps one, two, three, four, five, and six. Step one is executed serially, steps two and three are executed in parallel, and steps four, five, and six are arranged into a larger step. Step four is executed serially, and steps five and six are executed in parallel. Therefore, the execution method of steps four, five, and six is ​​a sub-process. Within the sub-process, step four is specifically executed serially, and steps five and six are specifically executed in parallel.

[0070] Since the process orchestration information of the target task is used to indicate the multiple steps of the target task and the execution order and execution method of the multiple steps, by obtaining the process orchestration information of the target task, the necessary information can be provided for writing the process orchestration document of the target task, thereby enabling the writing of the process orchestration document for the target task.

[0071] 203. Based on the orchestration controls and process orchestration information, the target task is coded on the orchestration interface to obtain the target process orchestration file corresponding to the target task.

[0072] In this embodiment, the orchestration control supports the JAVA language, allowing users to write JAVA code on the control. The process orchestration information indicates the execution order and method of multiple steps in the target task. Based on this information, users can determine the coded content of the target process file in JAVA. The target process orchestration file is an executable file described in JAVA, which can be parsed and executed by the scheduler. Because JAVA has a relatively simple syntax and provides syntax highlighting, the writing process is simple, and the learning curve for users is low.

[0073] Specifically, based on the orchestration controls and process orchestration information, the target task is coded on the orchestration interface to obtain the target process orchestration file corresponding to the target task. This can be achieved using the following method:

[0074] 2031. In the process of encoding a target task according to the execution order of multiple steps, for any step, based on the execution method of the step and the sub-tasks corresponding to the step, the JAVA code corresponding to the step is obtained by using an orchestration control on the orchestration interface.

[0075] In this embodiment of the application, the parser can determine the JAVA method field corresponding to the step according to the execution method of the step. Then, the parser uses an orchestration control to write the task content of each subtask corresponding to the step under the JAVA method field on the orchestration interface to obtain the JAVA code corresponding to the step.

[0076] The JAVA method fields are used to characterize the execution method of the steps, including a first field, a second field, and a third field. The first field, defined by the JAVA language, indicates that the tasks under this field are executed sequentially; it can be a `Push` field. The second field, defined by the JAVA language, indicates that the tasks under this field are executed in parallel; it can be a `Many` field. The third field, defined by the JAVA language, indicates that the tasks under this field are executed as sub-processes; it can be a `PushFlow` field, etc.

[0077] Based on the meanings of different Java method fields, the parser can determine the corresponding Java method field for a step according to the execution method of the step. Specifically, when the step is executed serially, the parser can determine the corresponding Java method field as the first field; when the step is executed in parallel, the parser determines the corresponding Java method field as the second field; and when the step is executed as a sub-process, the parser determines the corresponding Java method field as the third field.

[0078] Because Java's syntax is relatively simple, after determining the Java method field corresponding to a step, the user can enter that Java method field in the parser's orchestration controls and then enter the task content of each subtask of that step below it. The parser responds to the user's input and displays the corresponding Java code on the coding interface. For example, if a step corresponds to a subtask whose task content is "collection," and the corresponding Java method field is "Push," the user can enter "PushTask(Collect.class);" in the orchestration controls. The parser will then respond to the user's input and retrieve the Java code entered.

[0079] 2032. Arrange the Java code corresponding to each of the multiple steps into a target process orchestration file.

[0080] After the task content of multiple steps is written in JAVA according to the execution order and execution method of multiple steps, the parser obtains the JAVA code corresponding to multiple steps and assembles the JAVA code corresponding to multiple steps into a target process arrangement file.

[0081] To facilitate understanding of the workflow arrangement process for the target task, the following will combine... Figure 3 The left figure will be used for illustration.

[0082] See Figure 3 The left diagram shows a target task consisting of four steps: Step 1, Step 2, Step 3, and Step 4. Step 1 executes the SimpleTask task sequentially. Step 2 executes Task1, and Step 3 executes Task2 in parallel. Step 4 executes the SimpleFlow sub-flow. The execution order of the four steps is: Step 1 is executed first, then Steps 2 and 3 are executed in parallel, and finally Step 4 is executed. Based on the programming control and the flow arrangement information of the target task, the user can input the Push field in the programming control and then write the corresponding Java code for Step 1 under the Push field. Then, the user can input the Many field in the programming control and then write the corresponding Java code for Steps 2 and 3 under the Many field. Finally, the user can input the PushFlow field in the programming control and then write the corresponding Java code for Step 4 under the PushFlow field, ultimately obtaining... Figure 3 The Java code shown in the middle left image.

[0083] Furthermore, due to the built-in code completion feature of the Java language, helpful information can be displayed during the coding process, such as... Figure 3 The "Start," "Normal Serial," "Parallel Execution," "Subprocess," and "End" prompts shown in the left-middle image provide a reference for the user's coding process. Users can check the accuracy of their coding process based on the displayed prompts and the actual execution method of each step. If any Java code corresponding to a step is incorrect, the written code can be modified to ensure the task is executed smoothly and improve user satisfaction.

[0084] Furthermore, to intuitively demonstrate the execution flow of the target task, each step of the target task can be treated as a node, and then a tree structure of the target task's execution flow can be constructed based on the target flow arrangement file corresponding to the target task. For example, based on Figure 3 The Java code shown in the middle left image can be used to construct... Figure 3 The tree structure shown in the middle right figure.

[0085] Furthermore, after obtaining the target process orchestration file corresponding to the target task, the parser also caches the target process orchestration file in the cache layer for subsequent user queries.

[0086] In another embodiment of this application, after obtaining the target process orchestration file corresponding to the target task, the parser also provides the target process orchestration file to the scheduler. This target process encoding file is used by the scheduler to schedule the target task to complete it. For details on the scheduler's scheduling process for the target task, please refer to [link to documentation]. Figure 4 The embodiments shown are not described in detail here.

[0087] The task orchestration method based on a workflow engine provided in this application supports the JAVA language. Since JAVA has a relatively simple syntax and provides syntax hints, the learning curve for users is low, and the entire coding process is WYSIWYG (What You See Is What You Write). For a simple task, which might require hundreds of lines of code using XML, only a few lines are needed using JAVA, greatly simplifying the coding process.

[0088] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0089] This application provides a task scheduling method based on a workflow engine, which is applied to... Figure 1 The scheduler of the workflow engine shown is described in [reference]. Figure 4 The method flow provided in this application embodiment includes:

[0090] 401. Parse the target process orchestration file to obtain multiple steps corresponding to the target task.

[0091] The target workflow orchestration file is a workflow orchestration file written in Java by the parser for the target task. Upon receiving the target workflow orchestration file from the parser, the scheduler can parse it to obtain multiple steps corresponding to the target task. Each step has an execution order and execution method, used to execute at least one subtask of the target task.

[0092] Furthermore, after parsing the target process orchestration file to obtain multiple steps corresponding to the target task, the multiple steps corresponding to the target task and at least one subtask corresponding to each step can be added to the database to facilitate the management of the target task.

[0093] 402. When the first server is running normally, after at least one subtask corresponding to the first step is completed, the first server is invoked to execute at least one subtask corresponding to the second step.

[0094] In this embodiment, the scheduler can configure multiple servers for a target task to execute the target task. The first server is one of the multiple servers used to execute the target task; this first server can be specified by the user or selected by the scheduler based on the performance of the multiple servers.

[0095] In this embodiment, the scheduler employs two scheduling methods: immediate scheduling and preemptive scheduling. Immediate scheduling refers to the first server executing multiple steps of the target task. Once a step is completed, the next step is executed directly without further scheduling by the scheduler. Preemptive scheduling involves multiple servers vying for unexecuted steps from the database. The scheduler determines the server to execute each step based on the load of the servers, and the corresponding server then performs the execution. Immediate scheduling offers better performance as it eliminates the need to wait for the scheduler, but its stability is poor if the first server fails. Preemptive scheduling, on the other hand, requires waiting for the scheduler, resulting in insufficient throughput and poor performance, but its stability is better as the failure of any server does not affect the continued execution of the target task. To ensure both scheduling performance and stability, this embodiment combines immediate and preemptive scheduling. When the first server is running normally, immediate scheduling is used to schedule the target task, improving performance. When the first server fails, preemptive scheduling is used to improve stability.

[0096] Specifically, when the first server is running normally, the scheduler uses an immediate scheduling method to call the first server to execute at least one subtask corresponding to the first step. Once all at least one subtask corresponding to the first step has been executed, the scheduler directly calls the first server to execute at least one subtask corresponding to the second step. Here, the first step is any one of multiple steps, and the second step is the step following the first step.

[0097] After at least one subtask corresponding to the first step has been executed, when the scheduler calls the first server to execute at least one subtask corresponding to the second step, it can determine the first processor in the first server to execute the at least one subtask corresponding to the second step based on the execution method of the second step, and then call the first processor to execute the at least one subtask corresponding to the second step. When the scheduler determines the first processor in the first server to execute the at least one subtask corresponding to the second step based on the execution method of the second step, if the execution method of the second step is serial, the scheduler determines the serial processor in the first server as the first processor; if the execution method of the second step is parallel, the scheduler determines the parallel processor in the first server as the first processor, and so on.

[0098] Optionally, to facilitate the management of subtasks corresponding to each step to be executed using the real-time scheduling method, the scheduler maintains a real-time task queue, i.e., a JIT task queue. This queue stores the subtasks corresponding to each step to be executed using the real-time scheduling method. Initially, the scheduler can add the process initiation task and orchestration parsing task corresponding to the target task to the JIT task queue. The process initiation task triggers the scheduler to schedule the target task using the real-time scheduling method, and the orchestration parsing task parses the subtasks corresponding to each step added to the JIT task queue to obtain relevant information about each step and its corresponding subtasks, such as the execution method of each step. As the target task is executed, the scheduler adds the subsequent steps of the completed steps to the JIT task queue.

[0099] To facilitate the management of subtasks corresponding to each step that is about to be scheduled for execution, the scheduler also maintains a unified routing queue, which stores the subtasks corresponding to each step that is about to be scheduled for execution.

[0100] Based on the JIT task queue and the unified routing queue, the execution process of each subtask corresponding to the second step includes: after at least one subtask corresponding to the first step has been executed, the scheduler executes the JIT consumer thread to retrieve each subtask corresponding to the second step from the JIT task queue, adds each subtask corresponding to the second step to the unified routing queue, and then executes the routing thread to determine the first processor in the first server for executing at least one subtask corresponding to the second step according to the execution method of the second step, that is, to perform route allocation, and then calls the first processor to execute at least one subtask corresponding to the second step.

[0101] Optionally, when scheduling target tasks using the real-time scheduling method, even if all target tasks are executed by the first server, in order to distinguish between the steps of the scheduled target tasks and the steps of the unscheduled target tasks, after the first step is completed, the scheduler will also associate the second step with the identifier of the first server, thereby indicating that the second step is executed by the first server.

[0102] In this embodiment of the application, when the first server is running normally, multiple steps of the target task are executed by the first server by default. After the first step is completed, the scheduler directly adds at least one subtask corresponding to the second step to the JIT task queue. The whole process does not require waiting for the scheduler to allocate the corresponding server, thus improving scheduling performance.

[0103] 403. In the event that the first server fails, a third server is determined from multiple second servers, and the third server is invoked to execute at least one task corresponding to the third step.

[0104] If the first server crashes during operation, to ensure the smooth execution of the target task, the scheduler will use a preemptive scheduling method to continue scheduling the unexecuted steps in the target task. When using the preemptive scheduling method, the scheduler needs to determine a third server from multiple second servers, and then call the third server to execute at least one task corresponding to the third step. Here, the multiple second servers refer to all or some of the servers other than the first server, and the third step is the step that failed to execute normally when the first server crashed.

[0105] Specifically, in the event of a first server failure, the scheduler identifies a third server from among multiple second servers and invokes the third server to execute at least one task corresponding to the third step, including:

[0106] If the first server fails, based on the load information of each of the multiple second servers, the second server with the lowest load is determined as the third server; according to the execution method of the third step, the second processor in the third server is determined to execute at least one subtask corresponding to the third step; the second processor is invoked to execute at least one subtask corresponding to the third step.

[0107] As described above, when scheduling the third step using the real-time scheduling method, the scheduler associates the third step with the identifier of the first server. That is, it associates at least one subtask corresponding to the third step with the identifier of the first server. If the first server fails, it cannot execute at least one subtask corresponding to the third step. In this case, it is necessary to first clear the identifier of the first server associated with at least one subtask corresponding to the third step to obtain at least one subtask to be associated. Then, based on the load information of each of the multiple second servers, the second server with the smaller load is selected as the third server. The identifier of the third server is then associated with the at least one subtask to be associated, indicating that at least one task corresponding to the third step is executed by the third server. Then, the second processor is called to execute at least one subtask corresponding to the third step.

[0108] In the event of a first server failure, the scheduler can execute multiple threads to schedule target tasks using a preemptive scheduling approach, ensuring their normal execution. These threads include cleanup threads, multiple marking threads, and scanning threads. The cleanup threads remove the identifiers of the first server associated with at least one subtask that failed to execute when the first server failed, resulting in at least one subtask to be associated. The marking threads are used by the scheduler to preemptively mark the at least one subtask to be associated based on the load information of multiple second servers, resulting in at least one associated subtask corresponding to the third step. The scanning threads scan the at least one associated subtask corresponding to the third step and add it to a unified routing queue. While scanning the at least one associated subtask corresponding to the third step, the scanning threads also obtain the task status of the scanned subtasks. Task statuses include Running, Waiting, Success, and Skiped. Different task states indicate the execution status of subtasks: Running, Waiting, and Skiped all indicate that the subtask has not been completed; Success indicates that the subtask has been completed.

[0109] If the first server fails, the scheduler executes a scanning thread, which can add at least one associated subtask corresponding to the third step to a unified routing queue. The scheduler then executes a routing thread, determining the second processor on the third server to execute the at least one subtask corresponding to the third step, based on the execution method of the third step. For example, if the third step is executed serially, the scheduler determines the serial processor on the third server as the second processor; if the third step is executed in parallel, the scheduler determines the parallel processor on the third server as the second processor. The scheduler then calls the second processor to execute the at least one subtask corresponding to the third step.

[0110] In this embodiment of the application, regardless of the scheduling method used, the unified routing queue stores associated subtasks. By routing and allocating associated subtasks, the processor to be executed is determined, and the corresponding processor can then be used to execute the subtask.

[0111] In this embodiment, regardless of whether an immediate or preemptive scheduling method is used, the scheduler records the scheduling status of each step. If any step's scheduling status is complete, the next step is scheduled. If any step's scheduling status is incomplete, the scheduler waits for that step to complete before scheduling the next step. It's important to note that the scheduling status of any step differs from the task status of at least one subtask corresponding to any step in the preemptive scheduling method. If the task status of at least one subtask corresponding to a step is successful, it also needs to be added to the unified routing queue. If the scheduler can obtain at least one subtask corresponding to the next step (i.e., the successor node of the step), it determines that the step is scheduled successfully and adds the successor node to the JIT task queue. If the scheduler cannot obtain at least one subtask corresponding to the next step, although the task status of each subtask corresponding to the step is complete, the step is not yet scheduled successfully, and the scheduler needs to wait for the step to complete before adding the successor node to the JIT task queue.

[0112] In this embodiment, as the target task is scheduled and executed, the first server may recover. To improve scheduling performance, after at least one task corresponding to the third step has been executed, an immediate scheduling method can be attempted. If it can be executed normally, it indicates that the first server has recovered, and the immediate scheduling method can continue to be used. If it cannot be executed normally, it indicates that the first server has not recovered, and a preemptive scheduling method needs to be used. Specifically, after at least one task corresponding to the third step has been executed, the scheduler calls the first server to execute at least one subtask corresponding to the fourth step, which is the next step after the third step. If at least one subtask corresponding to the fourth step is executed successfully, the first server is called to execute each subtask corresponding to the remaining steps until the target task is completed. If at least one subtask corresponding to the fourth step fails, the fourth server is determined from multiple second servers, and the fourth server is called to execute at least one task corresponding to the fourth step.

[0113] To facilitate understanding of the task scheduling process based on a workflow engine, the following will combine... Figure 5 Please provide a detailed explanation.

[0114] See Figure 5 Initially, the scheduler uses an immediate scheduling approach to schedule the target task. Specifically, the scheduler adds the process start node, orchestration parsing node, and at least one subtask corresponding to the first step of the target task to the JIT task queue. The scheduler executes the JIT consumer thread, pulls at least one subtask corresponding to the first step from the JIT task queue, and adds it to the unified routing queue. The scheduler executes the routing thread to perform route allocation for the at least one subtask corresponding to the first step, that is, to determine the processor in the first server to execute the at least one subtask corresponding to the first step, and then calls that processor to execute the at least one subtask corresponding to the first step. After the at least one subtask corresponding to the first step is completed, the scheduler adds at least one subtask corresponding to the second step, i.e., the successor node, to the JIT task queue, thus scheduling the second step in the same way as the first step.

[0115] After the first server crashes, the scheduler continues to schedule the target task using a preemptive scheduling approach. Specifically, the scheduler executes a cleanup thread to remove the identifiers of the first server associated with each subtask (i.e., the abnormal subtask) that was not executed due to the first server crash, thus obtaining the subtasks to be associated. Then, it executes a marking thread to determine the third server to execute the subtask to be tagged based on the load of multiple second servers, and then associates the subtask with the identifier of the third server, thus obtaining the associated subtasks. Next, it executes a scanning thread to scan the associated subtasks and adds the scanned associated subtasks to a unified routing queue. The scheduler then executes a routing thread to route the associated subtasks to determine the processor on the third server to execute the associated subtask, and then calls that processor to execute the associated subtask. After executing the associated subtask, obtain the successor node of the associated subtask, add the successor node to the JIT task queue, and then attempt to schedule the successor node using the real-time scheduling method. If the scheduling is successful, the real-time scheduling method will continue to be used for subsequent scheduling. If the scheduling fails, the preemptive scheduling method will be used for scheduling.

[0116] Preemptive scheduling offers better scheduling stability but poor scheduling performance; while instantaneous scheduling offers better scheduling performance but poor scheduling stability. This application combines instantaneous and preemptive scheduling to ensure both scheduling performance and scheduling stability.

[0117] Please refer to Figure 6 The illustration shows a schematic diagram of a task orchestration device based on a workflow engine, provided in an embodiment of this application. The workflow engine includes a parser and a scheduler, and the device is disposed in the parser. This device can be implemented by software, hardware, or a combination of both, and can become all or part of an electronic device. The device includes:

[0118] Display module 601 is used to display the task flow arrangement interface, the arrangement interface displays arrangement controls, and the arrangement controls are used to write code in JAVA language;

[0119] The acquisition module 602 is used to acquire the process arrangement information of the target task to be encoded, wherein the process arrangement information is used to indicate the execution order and execution method of multiple steps of the target task;

[0120] The encoding module 603 is used to encode the target task on the arrangement interface based on the arrangement control and the process arrangement information to obtain the target process arrangement file corresponding to the target task. The target process arrangement file is an executable file described using the JAVA language.

[0121] In another embodiment of this application, the target task includes multiple subtasks, and each step is used to execute at least one subtask. The encoding module 603 is used to encode the target task in the execution order of the multiple steps, and for any step, based on the execution method of the step and the subtasks corresponding to the step, use the arrangement control on the arrangement interface to encode the subtasks corresponding to the step to obtain the JAVA code corresponding to the step; and to assemble the JAVA code corresponding to the multiple steps into the target process arrangement file in sequence.

[0122] In another embodiment of this application, the encoding module 603 is used to determine the JAVA method field corresponding to the step according to the execution method of the step, the JAVA method field being used to characterize the execution method of the step; using the orchestration control, the task content of each subtask corresponding to the step under the JAVA method field is written on the orchestration interface to obtain the JAVA code corresponding to the step.

[0123] In another embodiment of this application, the encoding module 603 is configured to: when the execution mode of the step is serial, determine the JAVA method field corresponding to the step as a first field, wherein the first field is a field defined by the JAVA language for serial execution of the task content under the field; when the execution mode of the step is parallel, determine the JAVA method field corresponding to the step as a second field, wherein the second field is a field defined by the JAVA language for parallel execution of the task content under the field; and when the execution mode of the step is sub-process, determine the JAVA method field corresponding to the step as a third field, wherein the third field is a field defined by the JAVA language for executing the task content under the field as a sub-process.

[0124] In another embodiment of this application, the workflow engine further includes a scheduler, and the apparatus further includes:

[0125] A module is provided for sending the target process orchestration file to the scheduler, wherein the target process encoding file is used by the scheduler to schedule the target task to complete the target task.

[0126] Please refer to Figure 7 The illustration shows a schematic diagram of a task scheduling device based on a workflow engine, provided in an embodiment of this application. The workflow engine includes a parser and a scheduler, and the device is disposed within the scheduler. This device can be implemented by software, hardware, or a combination of both, and can become all or part of an electronic device. The device includes:

[0127] The parsing module 701 is used to parse the target process arrangement file to obtain multiple steps corresponding to the target task. The target process arrangement file is a process arrangement file written by the parser in JAVA language for the target task. The target task includes multiple subtasks, and each step is used to execute at least one subtask.

[0128] The first calling module 702 is used to call the first server to execute at least one subtask corresponding to the second step when the first server is running normally and at least one subtask corresponding to the first step has been executed. The first step is any one of the multiple steps, the second step is the next step after the first step, and the first server is one of the multiple servers used to execute the target task.

[0129] The second invocation module 703 is used to determine a third server from a plurality of second servers when the first server crashes, and to invoke the third server to execute at least one task corresponding to the third step. The plurality of second servers are all or some of the plurality of servers except the first server, and the third step is the step that could not be executed normally when the first server crashes.

[0130] In another embodiment of this application, the first calling module 702 is used to determine a first processor in the first server for executing at least one subtask corresponding to the second step, based on the execution method of the second step.

[0131] The first processor is invoked to execute at least one subtask corresponding to the second step.

[0132] In another embodiment of this application, the second invocation module 703 is configured to, in the event that the first server crashes, determine the second server with the lowest load from the plurality of second servers based on the load information of each of the plurality of second servers, and designate it as the third server; determine the second processor in the third server for executing at least one subtask corresponding to the third step according to the execution method of the third step; and invoke the second processor to execute at least one subtask corresponding to the third step.

[0133] In another embodiment of this application, at least one subtask corresponding to the third step is associated with the identifier of the first server; the apparatus further includes:

[0134] The clearing module is used to clear the identifier of at least one subtask corresponding to the third step that is associated with the first server, so as to obtain at least one subtask to be associated.

[0135] The annotation module is used to associate the identifier of the first server with the at least one subtask to be associated, so as to indicate that at least one task corresponding to the third step is executed by the third server.

[0136] In another embodiment of this application, the apparatus further includes:

[0137] The third calling module is used to call the first server to execute at least one subtask corresponding to the fourth step after the execution of at least one task corresponding to the third step. The fourth step is the next step after the third step.

[0138] The fourth calling module is used to call the first server to execute each of the remaining subtasks if at least one subtask corresponding to the fourth step is executed successfully, until the target task is completed.

[0139] The fifth calling module is used to determine the fourth server from the plurality of second servers and call the fourth server to execute the at least one task corresponding to the fourth step if at least one subtask corresponding to the fourth step fails to execute.

[0140] Figure 8 This diagram illustrates a structural block diagram of an electronic device 800 provided in an exemplary embodiment of this application. Typically, the electronic device 800 includes a processor 801 and a memory 802.

[0141] The processor 801 can be implemented in at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor; the main processor is a processor for processing data in the wake-up state, and the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 801 may also include an artificial intelligence processor for handling computational operations related to machine learning.

[0142] The memory 802 may include one or more computer-readable storage media, which may be non-transitory computer-readable storage media, such as CD-ROM (Compact Disc Read-Only Memory), ROM, RAM (Random Access Memory), magnetic tape, floppy disk, and optical data storage devices. The computer-readable storage medium stores at least one computer program, which, when executed, can implement the above-described workflow engine-based task flow orchestration method, or workflow engine-based task scheduling method.

[0143] Of course, the aforementioned electronic device may also include other components, such as input / output interfaces and communication components. Input / output interfaces provide an interface between the processor and peripheral interface modules, which can be output devices, input devices, etc. Communication components are configured to facilitate wired or wireless communication between the electronic device and other devices.

[0144] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the electronic device 800, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0145] This application provides a computer-readable storage medium storing at least one computer program. When the at least one computer program is executed by a processor, it can implement the above-described task flow orchestration method based on a workflow engine, or the task scheduling method based on a workflow engine.

[0146] This application provides a computer program product, which includes a computer program that, when executed by a processor, can implement the above-described task flow arrangement method based on a workflow engine, or the task scheduling method based on a workflow engine.

[0147] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0148] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A task flow orchestration method based on a workflow engine, characterized in that, The workflow engine includes a parser, and the method is applied to the parser, the method including: The task flow arrangement interface is displayed, and the arrangement interface displays arrangement controls, which are used to write code in JAVA language. Obtain the process arrangement information of the target task to be encoded, wherein the process arrangement information is used to indicate the execution order and execution method of multiple steps of the target task; Based on the orchestration control and the process orchestration information, the target task is encoded on the orchestration interface to obtain the target process orchestration file corresponding to the target task. The target process orchestration file is an executable file described using the JAVA language.

2. The method according to claim 1, characterized in that, The target task includes multiple subtasks, and each step is used to execute at least one subtask. Based on the orchestration control and the process orchestration information, the target task is encoded on the orchestration interface to obtain a target process orchestration file corresponding to the target task, including: In the process of encoding the target task according to the execution order of the multiple steps, for any step, based on the execution method of the step and the sub-tasks corresponding to the step, the orchestration control is used to encode the sub-tasks corresponding to the step on the orchestration interface to obtain the JAVA code corresponding to the step. The Java code corresponding to each of the multiple steps is sequentially assembled into the target process orchestration file.

3. The method according to claim 2, characterized in that, Based on the execution method of the steps and the sub-tasks corresponding to the steps, the orchestration control is used to encode the sub-tasks corresponding to the steps on the orchestration interface to obtain the JAVA code corresponding to the steps, including: Based on the execution method of the step, determine the corresponding JAVA method field for the step, whereby the JAVA method field is used to characterize the execution method of the step; Using the aforementioned orchestration control, the task content of each subtask corresponding to the step is written on the orchestration interface under the JAVA method field, thereby obtaining the JAVA code corresponding to the step.

4. The method according to claim 3, characterized in that, The step of determining the JAVA method field corresponding to the step based on the execution method of the step includes: When the execution mode of the step is serial, the JAVA method field corresponding to the step is determined to be the first field. The first field is a field defined by the JAVA language for serial execution of the task content under the field. When the execution mode of the step is parallel, the JAVA method field corresponding to the step is determined to be the second field. The second field is a field defined by the JAVA language for parallel execution of the task content under the field. When the execution mode of the step is a sub-process, the JAVA method field corresponding to the step is determined to be the third field. The third field is a field defined by the JAVA language that uses the task content under the field as the sub-process execution field.

5. The method according to any one of claims 1 to 4, characterized in that, The workflow engine also includes a scheduler. After encoding the target task based on the orchestration controls and the process orchestration information to obtain the target process orchestration file corresponding to the target task, the engine further includes: The target process orchestration file is sent to the scheduler, and the target process encoding file is used by the scheduler to schedule the target task to complete the target task.

6. A task scheduling method based on a workflow engine, characterized in that, The workflow engine includes a parser and a scheduler, and the method is applied to the scheduler, the method including: The target process orchestration file is parsed to obtain multiple steps corresponding to the target task. The target process orchestration file is a process orchestration file written by the parser in JAVA language for the target task. The target task includes multiple subtasks, and each step is used to execute at least one subtask. When the first server is running normally, after at least one subtask corresponding to the first step is completed, the first server is invoked to execute at least one subtask corresponding to the second step. The first step is any one of the multiple steps, the second step is the next step after the first step, and the first server is one of the multiple servers used to execute the target task. In the event that the first server fails, a third server is determined from a plurality of second servers, and the third server is invoked to execute at least one task corresponding to the third step. The plurality of second servers are all or some of the plurality of servers except the first server, and the third step is the step that could not be executed normally when the first server failed.

7. The method according to claim 6, characterized in that, Invoking the first server to execute at least one subtask corresponding to the second step includes: Based on the execution method of the second step, determine the first processor in the first server for executing at least one subtask corresponding to the second step; The first processor is invoked to execute at least one subtask corresponding to the second step.

8. The method according to claim 6, characterized in that, In the event that the first server fails, determining a third server from among multiple second servers and invoking the third server to execute at least one task corresponding to the third step includes: In the event that the first server fails, the second server with the lowest load is determined from the plurality of second servers based on the load information of each of the plurality of second servers, and is selected as the third server. Based on the execution method of the third step, a second processor in the third server is determined for executing at least one subtask corresponding to the third step; The second processor is invoked to execute at least one subtask corresponding to the third step.

9. The method according to claim 8, characterized in that, At least one subtask corresponding to the third step is associated with the identifier of the first server; before determining the third server from the plurality of second servers based on the load information of each of the plurality of second servers in the event of the first server failure, the method further includes: Clear the identifier of the first server associated with at least one subtask corresponding to the third step to obtain at least one subtask to be associated. In the event that the first server fails, after determining the third server from the plurality of second servers based on the load information of each of the plurality of second servers, the method further includes: Associate the identifier of the third server with the at least one subtask to be associated, so as to indicate that at least one task corresponding to the third step is executed by the third server.

10. The method according to any one of claims 6 to 9, characterized in that, In the event that the first server fails, after determining a third server from among multiple second servers and invoking the third server to execute at least one task corresponding to the third step, the method further includes: After at least one task corresponding to the third step is completed, the first server is invoked to execute at least one sub-task corresponding to the fourth step, wherein the fourth step is the next step after the third step. If at least one subtask corresponding to the fourth step is executed successfully, the first server is invoked to execute each subtask corresponding to the remaining steps until the target task is completed. If at least one subtask corresponding to the fourth step fails to execute, then a fourth server is determined from the plurality of second servers, and the fourth server is invoked to execute at least one task corresponding to the fourth step.

11. An electronic device, characterized in that, It includes a processor and a memory; the memory stores at least one piece of program code; the at least one piece of program code is used to be called and executed by the processor to implement the task flow orchestration method based on the workflow engine as described in any one of claims 1 to 5, or the task scheduling method based on the workflow engine as described in any one of claims 6 to 10.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which, when executed by a processor, is capable of implementing the task flow orchestration method based on a workflow engine as described in any one of claims 1 to 5, or the task scheduling method based on a workflow engine as described in any one of claims 6 to 10.

13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, can implement the task flow orchestration method based on a workflow engine as described in any one of claims 1 to 5, or the task scheduling method based on a workflow engine as described in any one of claims 6 to 10.