Workflow construction method, workflow scheduling method and device
By introducing virtual components and schedulers into the workflow, the complex task dependencies in the workflow are solved, and the execution efficiency and reliability of the workflow are improved.
Patent Information
- Application Number
- CN202411979628.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art is difficult to effectively handle complex dependencies between tasks in workflows, resulting in low workflow execution efficiency and high error rates.
By introducing virtual components during the construction of the workflow, allowing users to configure and specify complex dependencies between task components, the scheduler schedules the target workflow based on the scheduling sequence to achieve scheduling alignment of task components.
It realizes flexible processing of complex dependencies between task components in the workflow, improves the execution efficiency and reliability of the workflow, and meets complex and changeable process needs.
Smart Images

Figure CN120066700A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a workflow construction method, a workflow scheduling method and a device. Background Art
[0002] In workflow management, scheduling tasks in a workflow is crucial because it is directly related to work efficiency and the reduction of error rates. In the past, tasks in a workflow were often executed in sequence according to their positions in the preset flowchart. However, as workflows become increasingly complex and diverse, this simple execution method is no longer sufficient, especially when there are complex dependencies between tasks in a workflow. Therefore, how to flexibly deal with the complex dependencies between tasks in a workflow and ensure efficient execution of the workflow has become a top priority. Summary of the invention
[0003] The embodiments of the present application provide a workflow construction method, a workflow scheduling method and a device, which can meet the complex dependencies between tasks in the workflow and ensure the efficient execution of the workflow.
[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, a workflow construction method is provided, the method specifically comprising: displaying a target interface for constructing the workflow, the target interface comprising a component bar and a canvas, the component bar comprising one or more task components and virtual components, the task component being used to carry the business to be executed, and the virtual component being used to implement the scheduling alignment of one or more task components; establishing a target workflow in the canvas according to the user's construction operation, the target workflow comprising a plurality of target task components and one or more virtual components arranged in a scheduling order, the virtual component being located before or after a plurality of parallel target task components; wherein the target workflow is used to be scheduled by a scheduler in a scheduling order, so that the scheduler schedules and aligns the plurality of parallel target task components before or after the virtual component by scheduling the virtual component.
[0006] In the method for constructing a workflow provided by this application, during the process of constructing the workflow, the user is allowed to configure and specify complex dependency relationships between task components through construction operations based on actual requirements. By introducing virtual components before or after the target task components, the scheduler schedules the target workflow based on the scheduling order between the components. That is, after scheduling the virtual components, the target task components are triggered to start execution, achieving the scheduling alignment of multiple parallel task components. For example, scheduling alignment is performed on multiple target task components before the virtual component, that is, aligning the execution completion status of multiple target task components before the virtual component. Another example is to perform scheduling alignment on multiple target task components after the virtual component, that is, aligning the execution start status of multiple target task components after the virtual component. By introducing virtual components before or after the target task components, it is possible to meet the complex and variable process requirements between the task components in the workflow, improving the flexibility of workflow design.
[0007] In a possible implementation, in the target workflow, the first virtual component is located after multiple parallel first target task components and before at least one second target task component; the scheduler is used to schedule the first virtual component when multiple parallel first target task components have all been executed; the first virtual component is used to trigger the scheduler to schedule at least one second target task component in response to the scheduling of the scheduler.
[0008] In this implementation, the first virtual component is located before multiple first target task components and after at least one second target task component, and the scheduler schedules the first virtual component when multiple first target task components are all completed, so as to trigger the scheduler to schedule the second target task component. That is, the second target task component is triggered to execute after all the first target task components are completed. In this way, the dependency relationships between the task components in the workflow can meet more complex and variable process scenarios. For example, in some scenarios, the second target task component requires the output of the first target task component as input. If the first target task component has not been executed yet, the second target task component may not be able to execute correctly due to lack of necessary data. By introducing virtual components, it can be ensured that all the required data is ready before the second target task component starts execution, avoiding the failure of the second target task component caused by the first target task component not being completed yet. In other scenarios, if the first target task component and the second target task component simultaneously attempt to access or modify the same resource (such as a database, a file system, etc.), resource conflicts or data inconsistencies may occur. By introducing virtual components, it can be ensured that all relevant task components have completed execution in the predetermined order before the resource is accessed or modified, thus avoiding resource conflicts.
[0009] In a possible implementation, in the target workflow, multiple parallel third target task components are located after the second virtual component; the scheduler is used to schedule multiple parallel third target task components simultaneously when the execution of the second virtual component is completed.
[0010] In this implementation, by using the second virtual component as an intermediate layer, the scheduler can schedule multiple parallel third target task components simultaneously, which is particularly important for scenarios such as large-scale data processing or real-time analysis using workflows. For example, in some scenarios of the workflow, when there is no data dependency or resource conflict between multiple third target task components, allowing multiple third target task components to execute simultaneously can fully utilize computing resources, reduce the overall execution time of the workflow, and improve the execution efficiency of the workflow.
[0011] In a possible implementation, the virtual component includes a preset script; the preset script is used to set the execution status of the virtual component to the completed status; the task component includes a task script; the task script is used to implement business operations and status setting operations, and the status setting operation is used to set the execution status of the task component to the completed status after the business operation is executed.
[0012] In this implementation, compared with the task script included in the task component, which is used to implement both business operations and set the execution status of the task component, the preset script included in the virtual component is used to set the execution status of the virtual component. This simplified design of the virtual component enables the virtual component to be executed quickly, reducing the execution latency of the entire workflow. At the same time, since the virtual component does not perform specific business operations, introducing the virtual component will not occupy too much computing resources. In addition, the quick execution of the virtual component means that other task components after the virtual component can be triggered as soon as possible, which helps to reduce the waiting time between task components and improve the response speed of the entire workflow.
[0013] In a possible implementation, the method further includes: obtaining the task script of the fourth target task component; removing the script for implementing business operations from the task script of the fourth target task component to obtain the script of the virtual component; and constructing the virtual component based on the script of the virtual component.
[0014] In a possible implementation, in the component bar, the virtual component is displayed with a first identifier, and the task component is displayed with a second identifier; the construction operations include: the user dragging the virtual component or the task component in the component bar to the canvas, configuring the task component in the canvas, and connecting different components in the canvas; the method further includes: displaying a flowchart representing the target workflow on the target interface; the flowchart includes the first identifier and the second identifier; the first identifier is used to indicate the target task component; the second identifier is used to indicate the virtual component.
[0015] In this implementation manner, in the target interface, the virtual component and the task component adopt different identifiers, enabling the user to quickly distinguish between the virtual component and the task component during the construction operation, and improving the intuitiveness of the user operation.
[0016] In a second aspect, a method for scheduling a workflow is provided. The method includes: obtaining a target workflow to be executed; the target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after the plurality of juxtaposed target task components; scheduling the target workflow according to the scheduling order, wherein the plurality of juxtaposed target task components before or after the virtual component are scheduled and aligned by scheduling the virtual component.
[0017] In the method for scheduling a workflow provided in this application, during the scheduling process of the workflow, each component is scheduled based on the scheduling order between the components, so that the components in the workflow can meet the complex and changeable process requirements between the components in the workflow.
[0018] In a possible implementation manner, in the target workflow, the first virtual component is located after the plurality of juxtaposed first target task components and before at least one second target task component; scheduling the target workflow according to the scheduling order includes: scheduling the first virtual component when all the plurality of juxtaposed first target task components are executed.
[0019] In a possible implementation manner, scheduling the target workflow according to the scheduling order includes: scheduling at least one second target task component when the first virtual component is executed.
[0020] In a possible implementation manner, in the target workflow, the plurality of juxtaposed third target task components are located after the second virtual component; scheduling the target workflow according to the scheduling order includes: scheduling the second virtual component; scheduling the plurality of juxtaposed third target task components when the second virtual component is executed.
[0021] In a third aspect, a terminal is provided, including: a display and a processor; the display is configured to display a target interface for constructing a workflow, the target interface includes a component bar and a canvas, the component bar includes one or more task components and virtual components, the task components are used to carry the business to be executed, and the virtual components are used to implement the scheduling alignment of one or more task components; the processor is configured to establish a target workflow in the canvas according to the user's construction operation, the target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after the plurality of parallel target task components; wherein, the target workflow is used to be scheduled by a scheduler in the scheduling order, so that the scheduler schedules and aligns the plurality of parallel target task components before or after the virtual component by scheduling the virtual component.
[0022] In a fourth aspect, a computing device is provided, including: a processor and a memory, and the processor is connected to the memory. The memory is used to store computer execution instructions, and the processor executes the computer execution instructions stored in the memory, so as to implement any method provided in the second aspect.
[0023] In a fifth aspect, a chip is provided, the chip includes: a processor and an interface circuit; the interface circuit is configured to receive code instructions and transmit them to the processor; the processor is configured to run the code instructions to execute any method provided in the first aspect or the second aspect above.
[0024] In a sixth aspect, a computer-readable storage medium is provided, storing computer execution instructions, when the computer execution instructions run on a computer, the computer is enabled to execute any method provided in the first aspect or the second aspect above.
[0025] In a seventh aspect, a computer program product is provided, including computer execution instructions, when the computer execution instructions run on a computer, the computer is enabled to execute any method provided in the first aspect or the second aspect above.
[0026] Wherein, for the technical effects brought by any implementation manner in the second aspect to the seventh aspect, reference can be made to the technical effects brought by different implementation manners in the first aspect, which will not be elaborated here. Description of the Drawings
[0027] Figure 1 It is a system architecture diagram of a scheduling system provided by an embodiment of the present application;
[0028] Figure 2 It is a system architecture diagram of a dolphin scheduling system provided by an embodiment of the present application;
[0029] Figure 3 It is a system architecture diagram of a computing node provided by an embodiment of the present application;
[0030] Figure 4 Flowchart of a method for constructing a workflow provided by an embodiment of the present application;
[0031] Figure 5 Flowchart of constructing a virtual component provided by an embodiment of the present application;
[0032] Figure 6 Scenario schematic diagram of a method for constructing a workflow provided by an embodiment of the present application;
[0033] Figure 7 Schematic diagram of constructing a workflow in a target interface provided by an embodiment of the present application;
[0034] Figure 8 Schematic diagram of a directed acyclic graph corresponding to a workflow provided by an embodiment of the present application;
[0035] Figure 9 Another schematic diagram of a directed acyclic graph corresponding to a workflow provided by an embodiment of the present application;
[0036] Figure 10 Another schematic diagram of a directed acyclic graph corresponding to a workflow provided by an embodiment of the present application;
[0037] Figure 11 Information interaction diagram of a method for scheduling a workflow provided by an embodiment of the present application;
[0038] Figure 12 Flowchart of a second computing node executing a task component provided by an embodiment of the present application;
[0039] Figure 13 Flowchart of a second computing node executing a virtual component provided by an embodiment of the present application;
[0040] Figure 14 Schematic diagram of a device for constructing a workflow provided by an embodiment of the present application;
[0041] Figure 15 Schematic diagram of a device for scheduling a workflow provided by an embodiment of the present application. Detailed implementation manners
[0042] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0043] Among them, in the description of this application, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship. For example, A / B can mean A or B. The "and / or" in this application is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural.
[0044] Moreover, in the description of this application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item(s) or plural item(s). For example, at least one (item) of a, b, or c can mean: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or plural.
[0045] In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, in the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different. At the same time, in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner for easy understanding.
[0046] Hereinafter, the terms related to the embodiments of this application will be introduced.
[0047] Directed acyclic graph (DAG): It is a kind of directed graph. In a directed acyclic graph, each edge has a direction, and there is no path that starts from a certain node and returns to that node after passing through several edges. In the embodiments of this application, a workflow includes multiple components, and one component corresponds to a task to be executed. A node in the DAG graph represents a component in the workflow. The connection relationship of multiple components in the DAG graph characterizes the dependency relationship between multiple components in the workflow.
[0048] An embodiment of the present application provides a method for constructing a workflow. Specifically, the method includes: First, display a target interface for constructing a workflow. The target interface includes a component bar and a canvas. The component bar includes one or more task components and virtual components. The task components are used to carry the business to be executed (such as data analysis business, image processing business, etc.), and the virtual components are used to realize the scheduling alignment of one or more task components. Then, according to the user's construction operation, establish a target workflow in the canvas. The target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components. The virtual components are located before or after the plurality of parallel target task components. Among them, the target workflow is used to be scheduled by a scheduler in the scheduling order, so that the scheduler schedules and aligns the plurality of parallel target task components before or after the virtual component by scheduling the virtual component.
[0049] In the method for constructing a workflow provided by the present application, during the process of constructing a workflow, the user is allowed to configure and specify complex dependency relationships between task components through construction operations based on actual needs. By introducing virtual components before or after the target task components, the scheduler schedules the target workflow based on the scheduling order between each component. That is, after scheduling the virtual component, it triggers the target task component to start execution, realizing the scheduling alignment of a plurality of parallel task components. For example, scheduling and aligning a plurality of target task components before the virtual component, that is, aligning the completion states of a plurality of target task components before the virtual component. Another example is to schedule and align a plurality of target task components after the virtual component, that is, aligning the start states of a plurality of target task components after the virtual component. By introducing virtual components before or after the target task components, it can meet the complex and changeable process requirements between each task component in the workflow, improving the flexibility of workflow design.
[0050] Next, an exemplary introduction to the system architecture of the embodiment of the present application will be given.
[0051] An embodiment of the present application also provides a scheduling system. Next, an exemplary introduction to the system architecture of the scheduling system in the embodiment of the present application will be given.
[0052] Figure 1 It is a system architecture diagram of a scheduling system. The scheduling system includes a terminal, a first computing node, and at least one second computing node.
[0053] The terminal is used to display a target interface for constructing a workflow; and establish a target workflow in the canvas of the target interface according to the user's construction operation.
[0054] Among them, the target interface includes not only a canvas but also a component bar. The component bar includes one or more task components and virtual components. The task components are used to carry the business to be executed, and the virtual components are used to implement the scheduling alignment of one or more task components. The target workflow includes multiple target task components arranged (or connected, etc.) in a scheduling order and one or more virtual components. The virtual components are located before or after multiple parallel target task components. The target workflow is used to be scheduled by a scheduler in the scheduling order, so that the scheduler schedules and aligns multiple parallel target task components before or after the virtual component by scheduling the virtual component.
[0055] Optionally, the construction operation includes the user's operation of dragging a virtual component or a task component in the component bar to the canvas, the configuration operation of the task component in the canvas, and the connection operation of different components in the canvas.
[0056] The display interface is also used to display a flowchart representing the target workflow. The flowchart includes a first identifier and a second identifier; the first identifier is used to indicate a task component; the second identifier is used to indicate a virtual component. In the target interface, the virtual component and the task component use different identifiers, so that the user can quickly distinguish between the virtual component and the task component during the construction operation, improving the intuitiveness of the user operation.
[0057] How the terminal constructs the workflow will be introduced in the first part of the subsequent embodiments and will not be elaborated here.
[0058] The first computing node is used to obtain the target workflow to be executed; schedule the target workflow in the scheduling order, and assign the tasks corresponding to the components in the target workflow to the corresponding second computing nodes.
[0059] The second computing node is used to receive the tasks corresponding to the components assigned by the first computing node and execute the corresponding components.
[0060] Optionally, the first computing node includes a scheduler, and schedules multiple components in the workflow through the scheduler, and assigns the tasks corresponding to the components to at least one second computing node.
[0061] In Figure 1 , the first computing node issues the task corresponding to the target task component 1 in the workflow to the second computing node 1, the task corresponding to the target task component 2 to the second computing node 2, and the task corresponding to the virtual component 1 to the second computing node 3. The second computing node 1 is used to execute the target task component 1. The second computing node 2 is used to execute the target task component 2. The second computing node 3 is used to execute the virtual component 1.
[0062] How the first computing node schedules components in the workflow and how the second computing node executes components in the workflow will be introduced in the second part of the following embodiments and will not be elaborated here.
[0063] In a possible implementation, the first computing node is further configured to obtain the execution status of components and the health status of other computing nodes in the scheduling system to ensure the stability of the scheduling system.
[0064] In a possible implementation, the second computing node is used to provide log services during the execution of components, such as log recording, log downloading, etc.
[0065] Figure 2 It is a system architecture diagram of a dolphin scheduling system. In the dolphin scheduling system, there are multiple first computing nodes. One of the multiple first computing nodes is used to implement the functions of the above-mentioned first computing node, which is called the main computing node, and the other first computing nodes are used as standby computing nodes for this main computing node. In the event of a failure of the main computing node, the standby computing node will automatically take over the work of the main computing node to ensure the high availability and stability of the dolphin scheduling system. In Figure 2 the dolphin scheduling system further includes a database for storing component information (such as component names, etc.) in the target workflow, the execution status of the target workflow, and so on. In addition, the dolphin scheduling system also provides a cluster management service and an alarm service. Among them, the cluster management service is used to perform cluster management and cluster fault tolerance on the first computing device and the second computing device. The alarm service is used to send an alarm message when there is an abnormality in the dolphin scheduling system (for example, when the second computing node executes a component abnormally) to prompt the user that there is an abnormality in the system.
[0066] In the embodiments of the present application, the terminal includes: a display and a processor. The display is used to display a target interface for constructing a workflow. The processor is used to establish a target workflow in the canvas according to the user's construction operation.
[0067] The terminal can be referred to as: user equipment (UE), terminal device, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device, etc. Specifically, the terminal can be a mobile phone, an augmented reality (AR) device, a virtual reality (VR) device, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc.
[0068] In the embodiments of the present application, the computing node may specifically be a network device. The network device may include a server, etc. Among them, the server may be a physical server, or may be two or more physical servers sharing different responsibilities and cooperating with each other to implement the various functions of the server. When the computing node is multiple servers, the scheduling system is a server cluster with high availability capabilities.
[0069] Exemplarily, the server may be a blade server, a high-density server, a rack server, or a tower server, etc. The terminal device may include a personal digital assistant (PDA), an ultra-mobile personal computer (UMPC), a laptop computer, a netbook, a desktop computer, an all-in-one computer, etc.
[0070] Among them, the hardware part of the computing node includes a processor, a basic input / output system (BIOS) chip, an out-of-band controller, and memory. The software part mainly includes BIOS, an out-of-band management module, and an operating system (OS), as Figure 3 shown.
[0071] The processor may include a central processing unit (CPU). The CPU includes one or more CPU cores, and the operations of processing data by the CPU are all executed by the CPU cores. The more CPU cores included in the CPU, the faster the data processing speed. In the embodiments of the present application, the processor in the first computing node is used as a scheduler to implement the scheduling of the workflow. The processor in the second computing node is used to execute the components in the workflow.
[0072] The BIOS chip is a chip set on the motherboard for initializing and detecting various hardware during the startup process of the computing node. The BIOS chip includes a flash memory area.
[0073] The out-of-band management module is located inside the out-of-band controller, and the operating system agent is located inside the processor.
[0074] The out-of-band management module may be a management unit for non-business modules. For example, the out-of-band management module may remotely maintain and manage the computing node through a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computing node and can communicate with the BIOS and the operating system agent through the out-of-band management interface of the computing node.
[0075] Exemplarily, the out-of-band management module may include a management unit for computing node operation status, a management system in a management chip, a computing node motherboard management unit (baseboard management controller, BMC), a system management module (system management mode, SMM), etc. It should be noted that the embodiments of the present application do not limit the specific form of the out-of-band management module, and the above is only an exemplary description. In the following embodiments, only the out-of-band management module is BMC as an example for description. In the following embodiments, BMC is used to obtain status data of the computing node.
[0076] OS is a computer program that manages and controls the hardware and software resources of the computing node. Any other software must be supported by the operating system to run. After the computing node is powered on, the BIOS first starts a series of operations such as self-test and initialization, and then guides the OS to start, so that users can use the computing node normally.
[0077] BIOS is a set of programs that are fixed to the BIOS chip on the motherboard of the computing node. The main function of BIOS is to provide the most basic and direct hardware settings and control for the computing node.
[0078] Memory, also called internal memory or main memory, is installed in memory slots on the motherboard of the compute node.
[0079] It should be noted that the embodiment of the present application does not limit the device form of the first computing node and the second computing node.
[0080] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0081] For ease of understanding, the following is an exemplary introduction to the workflow construction method and workflow scheduling method provided by the present application in conjunction with the accompanying drawings. The method is applicable to Figure 1 The scheduling system shown.
[0082] The following embodiments of the present application will be divided into two parts to exemplarily introduce the schemes of the workflow construction method and the workflow scheduling method.
[0083] Part I: Combination Figures 4 to 10 , introduces the workflow construction method provided in the embodiment of the present application, aiming to introduce the specific implementation method of the scheduling system determining the target workflow according to the user's construction operation.
[0084] The second part, in combination with Figures 11 to 13 , this section introduces the scheduling method of the workflow provided by the embodiments of the present application, aiming to introduce the specific working process of the scheduling system for executing the target workflow.
[0085] In some embodiments, when constructing a workflow, the user can flexibly configure and define the dependency relationships between complex components according to actual needs. Virtual components are introduced before or after the target task components, and these virtual components can trigger the execution of one or more target task components under the trigger of the scheduler. The scheduler schedules the workflow according to the scheduling order between components, ensuring that after the virtual components are scheduled, the corresponding target task components start to execute immediately, achieving the scheduling alignment of multiple parallel task components. For example, scheduling alignment is performed on multiple target task components before the virtual component, that is, aligning the execution completion status of multiple target task components before the virtual component. Another example is to perform scheduling alignment on multiple target task components after the virtual component, that is, aligning the execution start status of multiple target task components after the virtual component. By introducing virtual components before or after the target task components, it is possible to meet complex dependency relationships and flexibly respond to various complex and changeable process requirements.
[0086] Figure 4 FIG. is a flowchart of a method for constructing a workflow according to an exemplary embodiment. The execution subject of this method can be a terminal in the scheduling system. The method specifically includes the following steps:
[0087] S401: The terminal displays a target interface for constructing a workflow.
[0088] The target interface includes a component bar and a canvas. The component bar includes one or more task components and virtual components. The task components are used to carry the business to be executed, and the virtual components are used to achieve the scheduling alignment of one or more task components.
[0089] Exemplarily, the business to be executed can be a data processing task, a model inference task, and so on.
[0090] In one possible implementation, scheduling alignment of multiple target tasks before the virtual component means aligning the execution completion status of multiple target task components before the virtual component.
[0091] In one possible implementation, scheduling alignment of multiple target task components after the virtual component means aligning the execution start status of multiple target task components after the virtual component.
[0092] S402: The terminal establishes a target workflow in the canvas of the target interface according to the user's construction operation.
[0093] Among them, the target workflow includes multiple target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after the multiple parallel target task components. The target workflow is used to be scheduled by the scheduler in the scheduling order, so that the scheduler schedules and aligns the multiple parallel target task components before or after the virtual component by scheduling the virtual component.
[0094] In a possible implementation, the user's construction operation includes: the operation of the user dragging a virtual component or a task component in the component bar to the canvas, the configuration operation of the task component in the canvas, and the connection operation of different components in the canvas.
[0095] Optionally, the task component includes a task script. The configuration operation of the task component is used to configure the task script of the task component.
[0096] The connection operation is used to specify the scheduling order between different components in the target workflow. Specifically, the scheduling order between different components in the workflow indicates that the execution of one component depends on the execution of another or multiple components. For example, the scheduling order of component 1 is after component 2 and component 3, that is, component 1 needs to wait for both component 2 and component 3 to be executed before executing. Another example is that the scheduling orders of component 1 and component 2 in the workflow are the same, which means that component 1 and component 2 need to be scheduled and executed simultaneously in the workflow.
[0097] In a possible implementation, the second computing node implements a business operation (also known as completing the task of the task component) based on the task script in the task component. Exemplarily, the business operation corresponding to the task component is to perform denoising processing on the target image.
[0098] In addition, the task script of the task component is also used for status setting operations in addition to implementing business operations. Among them, the status setting operation is used to set the execution status of the task component to the completed status after the business operation is executed.
[0099] This application does not specifically limit the type of task components, which can be shell components, structured query language (SQL) components, Java components, procedure components, distributed computing framework (MapReduce program, MR) components, big data processing framework (Spark) components, Python components, hypertext transfer protocol (HTTP) components, and so on. Among them, shell components can be used to execute batch tasks. SQL components are used to manage and operate data in relational databases. Procedure components are components used to encapsulate a section of logical statements. Java components refer to components written in the Java language. MR components are a programming model and computing framework for processing large-scale data sets. Spark components are used to process large-scale data sets. Python components refer to components written in the Python language. HTTP components are components that implement data transmission based on the HTTP protocol.
[0100] In a possible implementation, the virtual component includes a preset script. The preset script is used to set the execution status of the virtual component to the completed status.
[0101] Figure 5 It is a flowchart for constructing a virtual component. The terminal constructs the virtual component through the following S501 - S503:
[0102] S501: The terminal obtains the initialization script in the virtual component.
[0103] Among them, the initialization script is used to initialize the component parameters of the virtual component. The component parameters of the virtual component can be memory parameters, path parameters, etc. Among them, the memory parameter is used to set the upper limit of memory usage for this virtual component, that is, the maximum value of the memory that the second computing node can use when executing the virtual component. The path parameter is used to define the storage location of the data output by the virtual component, etc.
[0104] S502: The terminal obtains the script in the virtual component that is used to implement the status setting operation.
[0105] Among them, the status setting operation is used to set the execution status of the virtual component to the completed status.
[0106] In a possible implementation, the terminal can obtain the script in the virtual component that is used to implement the status setting operation based on the task script of the fourth task component. The fourth task component can be a shell script, etc. Exemplarily, the above S502 can obtain the script for implementing the status setting operation through the following a1 - a4:
[0107] a1: The terminal obtains the task script of the fourth target task component.
[0108] a2: The terminal removes the scripts in the task script of the fourth target task component that are used to obtain business data and business scripts, and obtains the first script.
[0109] a3: The terminal removes the scripts in the first script that are used to perform business operations based on business data and business scripts, and obtains the second script.
[0110] a4: The terminal removes the scripts in the second script that are used to determine the execution information corresponding to the workflow, and obtains the third script.
[0111] Among them, in addition to being used to implement business operations and status setting operations, the task script is also used to determine the execution information corresponding to the workflow. The execution information corresponding to the workflow includes the execution result of the workflow, the execution duration of the workflow, and so on. Therefore, in order to obtain the script in the virtual component that is used to implement the status setting operation, it is also necessary to remove the scripts in the task script of the fourth target task component that are used to determine the execution information corresponding to the workflow.
[0112] a5: The terminal removes the scripts in the third script that determine the business data of the components related to the fourth target task component.
[0113] Among them, the task script is also used to determine the business data of the components related to the fourth target task component. The components related to the fourth target task component refer to the components whose business data depends on the execution information of the fourth target task component (the execution information of the task component includes the execution result of the business operation, the execution duration of the business operation, and so on).
[0114] In another possible implementation, the terminal can also extract the script used to implement the status setting operation from the task script of the fourth target task component.
[0115] S503: The terminal constructs a virtual component based on the initialization script and the script used to implement the status setting operation.
[0116] In this way, compared with the task script included in the task component that is used to implement both business operations and set the execution status of the task component, the preset script included in the virtual component is used to set the execution status of the virtual component. This simplified design of the virtual component enables the virtual component to be executed quickly, reducing the execution delay of the entire workflow. At the same time, since the virtual component does not perform specific business operations, introducing the virtual component will not occupy too many computing resources. In addition, the fast execution of the virtual component means that other task components after the virtual component can be triggered as soon as possible, which helps to reduce the waiting time between task components and improve the response speed of the entire workflow.
[0117] In a possible implementation, the target workflow can be represented by a flowchart. Exemplarily, the target workflow is represented by a DAG graph. In the DAG graph, a node represents a component in the workflow. The connection relationships of multiple components in the DAG graph represent the scheduling order of multiple components in the workflow. The user realizes the production of the flowchart corresponding to the target workflow through construction operations.
[0118] Figure 6 is a schematic diagram of a scenario of a method for constructing a workflow shown according to an exemplary embodiment. In Figure 6 it, the user's construction operations are used to configure the task scripts of task component 1 and task component 2 respectively, and specify the scheduling order between task component 1, task component 2 and the virtual component, that is, after the virtual component a finishes execution, schedule task component 1 and task component 2.
[0119] The virtual component is used to trigger one or more target task components to start execution in response to the scheduling of the scheduler. Among them, the target task component is a task component in the target workflow that depends on the virtual component, that is, a task component before or after the virtual component. In Figure 6 it, the target task components are task component 1 and task component 2, and the virtual component a triggers task component 1 and task component 2 to start execution under the scheduling of the scheduler of the first computing node.
[0120] Figure 7 is a schematic diagram of constructing a workflow in a target interface. The target interface is displayed when the scheduling system obtains the instruction for the user to construct a workflow. In the target interface, there is a component bar and a canvas. Among them, the component bar includes the virtual component a displayed with a first identifier and the task components 1, 2,... without configured task scripts displayed with a second identifier. The user first drags the virtual component a and task components 1, 2 in the component bar to the canvas; then configures the task scripts of task components 1, 2 in the canvas respectively to obtain target task component 1 and target task component 2; finally, connects the virtual component a and task components 1, 2 on the canvas respectively to obtain the flowchart corresponding to the target workflow, thereby realizing the construction of the workflow.
[0121] In a possible implementation, in the target workflow, the first virtual component is located after multiple parallel first target task components and before at least one second target task component. It can also be understood that the first virtual component depends on multiple parallel first target task components, and at least one second target task component depends on the first virtual component. Here, the multiple parallel first target task components refer to that the scheduling order of multiple first target task components in the workflow is the same.
[0122] The scheduler is used to schedule the first virtual component when multiple parallel first target task components have all been executed; the first virtual component is used to trigger the scheduler to schedule at least one second target task component in response to the scheduling of the scheduler. In this way, the second target task component is triggered to execute after all the first target task components are completed, so that the dependency relationships between the task components in the workflow can meet more complex and changeable process scenarios. For example, in some scenarios, the second target task component requires the output of the first target task component as input. If the first target task component has not been executed yet, the second target task component may not be able to execute correctly due to the lack of necessary data. By introducing virtual components, it can be ensured that all the required data is ready before the second target task component starts to execute, avoiding the failure of the second target task component caused by the incomplete execution of the first target task component. In other scenarios, if the first target task component and the second target task component simultaneously attempt to access or modify the same resource (such as a database, file system, etc.), it may lead to resource conflicts or data inconsistencies. By introducing virtual components, it can be ensured that all relevant task components have completed their execution in the predetermined order before the resource is accessed or modified, thus avoiding resource conflicts.
[0123] Figure 8 is a schematic diagram of a directed acyclic graph corresponding to a workflow. In Figure 8 the directed acyclic graph, there are 4 components, namely target task component 1, target task component 2, target task component 3, and virtual component a. Among them, the scheduling order of virtual component a in the workflow is after the parallel target task component 1 and target task component 2. That is, the scheduler in the first computing node schedules virtual component a when both target task component 1 and target task component 2 have been executed. The scheduling order of target task component 3 in the workflow is after virtual component a. That is, the scheduler in the first computing node schedules target task component 3 when virtual component a has been executed. By introducing virtual component a into the workflow, target task component 3 is scheduled when both target task component 1 and target task component 2 have been executed.
[0124] In a possible implementation, in the target workflow, multiple parallel third target task components are located after the second virtual component; the scheduler is used to schedule multiple parallel third target task components simultaneously when the second virtual component has completed execution. In this way, with the second virtual component as an intermediate layer, the scheduler can schedule multiple parallel third target task components simultaneously, enabling parallel execution of multiple third target task components, which is particularly important for scenarios such as large-scale data processing or real-time analysis using workflows. For example, in some scenarios of the workflow, when there is no data dependency or resource conflict between multiple third target task components, allowing multiple parallel third target task components to execute simultaneously can fully utilize computing resources, reduce the overall execution time of the workflow, and improve the execution efficiency of the workflow.
[0125] Figure 9 is a schematic diagram of a directed acyclic graph corresponding to another workflow. In Figure 9 the directed acyclic graph, there are 3 components, namely virtual component a, target task component 1, and target task component 2. Among them, target task component 1 and target task component 2 are after virtual component a, that is, the scheduler of the first computing node schedules target task component 1 and target task component 2 simultaneously when virtual component a has completed execution.
[0126] Figure 10 is a schematic diagram of a directed acyclic graph corresponding to another workflow. In Figure 10 the directed acyclic graph, there are 5 components, namely target task component 1, target task component 2, target task component 3, target task component 4, and virtual component a. Among them, virtual component a is after the parallel target task component 1 and target task component 2, that is, the scheduler in the first computing node schedules virtual component a when target task component 1 has completed execution. Target task component 3 and target task component 4 are after virtual component a, that is, the scheduler in the first computing node schedules target task component 3 and target task component 4 simultaneously when virtual component a has completed execution. By introducing virtual component a into the workflow, the scheduler schedules target task component 3 and target task component 4 simultaneously when target task component 1 and target task component 2 have both completed execution.
[0127] In the first part of the embodiments of the present application, during the process of constructing a workflow, the user is allowed to configure and specify complex dependencies between task components through construction operations based on actual needs. By introducing virtual components before or after the target task components, when the scheduler schedules the components in the workflow, it schedules based on the scheduling order between the components. That is, after scheduling the virtual components, the target task components are triggered to start execution, which can meet the complex and changeable process requirements between the various task components in the workflow and improve the flexibility of workflow design. In addition, different from task components, virtual components do not contain task scripts, that is, they do not contain specific business logic. This enables virtual components to implement complex dependencies between task components in the workflow without consuming a large amount of computing resources during execution and can be quickly executed, thus not affecting the execution efficiency of the entire workflow.
[0128] The above is the first part of the embodiments of the present application. Next, in combination with Figures 11 to 13 , the specific implementation process of the scheduling system for scheduling and executing the components in the workflow will be introduced.
[0129] Figure 11 It is an information interaction diagram of a scheduling method for a workflow shown according to an exemplary embodiment. This method is implemented through the interaction between the first computing node and the second computing node in the scheduling system. Exemplarily, this method includes the following S1101 - S1103.
[0130] S1101: The first computing node obtains the target workflow to be executed.
[0131] Among them, the target workflow includes a plurality of target task components arranged in the scheduling order and one or more virtual components, and the virtual components are located before or after the plurality of parallel target task components.
[0132] Optionally, the target workflow includes a plurality of components, and the plurality of components include task components and virtual components. The task components include task scripts. The virtual components include preset scripts.
[0133] S1102: The first computing node schedules the target workflow according to the scheduling order and assigns the tasks corresponding to each component to the corresponding second computing node.
[0134] Among them, the first computing node schedules and aligns the plurality of parallel target task components before or after the virtual components by scheduling the virtual components.
[0135] In a possible implementation manner, in the target workflow, the first virtual component is located after the plurality of parallel first target task components and before at least one second target task component. The above S1102 is implemented in the following manner:
[0136] b1: When multiple parallel first target task components in the first computing node have all been executed, schedule the first virtual component.
[0137] b2: When the first virtual component has been executed, the first computing node schedules at least one second target task component.
[0138] In a possible implementation, in the target workflow, multiple parallel third target task components are located after the second virtual component, and the above S1102 is implemented as follows:
[0139] c1: The first computing node schedules the second virtual component.
[0140] c2: When the second virtual component has been executed, the first computing node schedules multiple parallel third target task components.
[0141] Optionally, the scheduler in the first computing node schedules each component in the target workflow based on the flowchart corresponding to the target workflow.
[0142] Optionally, during the execution of the workflow, the scheduler in the first computing node repeatedly checks whether the workflow has been executed to completion, that is, repeatedly checks whether all components in the workflow have been executed. Each execution of the workflow generates a workflow instance, and each execution of a task component in the workflow also generates a task instance. That is to say, a workflow instance consists of multiple task instances. If the scheduler detects that the workflow instance has not been executed to completion, it determines the target task components to be executed in the workflow. During the process of determining the target task components to be executed in the workflow, based on the flowchart corresponding to the workflow, among all the task components to be executed in the workflow (also known as unexecuted task components), it determines whether the components on which the task component to be executed depends (i.e., the components in the workflow that are before the task component) have been executed. If the components on which the task component to be executed depends have been executed, it determines the task component to be depended on as the target task component to be executed; if not all the components on which the task component to be executed depends have been executed, it does not determine the task component to be depended on as the target task component to be executed.
[0143] In a possible implementation, the scheduler in the first computing node can match the tasks corresponding to each component with each second computing node to implement the allocation of the tasks corresponding to each component.
[0144] Exemplarily, if the task corresponding to the component is a big data processing task, during the execution of this component, a large amount of computing resources and storage resources are required, and there are high requirements for the processing speed of the second computing node. At this time, the second computing node allocated by the first computing node for this component needs to be equipped with a large amount of CPU resources and memory resources, that is, the second computing node should have sufficient CPU resources and memory resources to meet the requirements of the big data processing task.
[0145] Exemplarily, if the task corresponding to the component is a real-time data analysis task, during the execution of this component, there are high requirements for the processing latency of the second computing node, and it is necessary to quickly respond and output results. At this time, the second computing node allocated by the first computing node for this component needs to have low latency and high-speed network connection capabilities to ensure the quick response and output of results for the real-time data analysis task.
[0146] Exemplarily, if the task corresponding to the component is a machine learning model training task, after the execution of this component, high-performance computing resources are required, such as a graphics processing unit (GPU) and a large amount of memory. At this time, the second computing node allocated by the first computing node for this component needs to be equipped with a high-performance GPU and sufficient memory to support the training process of the machine learning model.
[0147] S1103: The second computing node receives the task corresponding to the component and executes this component.
[0148] In a possible implementation, the second computing node executes the task component in the target workflow in the following manner:
[0149] First, the second computing node responds to the scheduling of the task component by the scheduler and implements the business operation according to the task script.
[0150] Then, after the business operation is completed, the second computing node sets the execution status corresponding to the task component to the completed status.
[0151] Figure 12 It is a flowchart for a second computing node to execute a task component. Figure 12 The task component in is a shell component. The second computing node executes this task component through the following S1201 - S1206.
[0152] S1201: Initialize the component parameters of the task component.
[0153] Exemplarily, the component parameters of the shell component can be input / output path parameters, memory parameters, time parameters, and so on. Among them, the input / output path parameters are used to define the location of the data to be processed by the component and the storage location of the execution result output after processing the data. The memory parameters are used to set the upper limit of memory usage for the component. The time parameters are used to set the upper time limit for the execution of the component, so as to ensure that the task component can be executed in a timely manner.
[0154] S1202: Obtain the business data and business script of the task component.
[0155] Among them, the business script is used to execute business operations.
[0156] S1203: According to the business data, execute the business operations in the business script to obtain the execution information of the task component.
[0157] Among them, the execution information of the task component includes the execution result of the business operation, the execution duration of the business operation, and so on.
[0158] S1204: After the business operation is completed, set the execution status corresponding to the task component to the completed status.
[0159] S1205: Based on the execution information of the task component, determine the execution information of the workflow instance corresponding to the workflow.
[0160] Among them, the execution information of the workflow instance includes the execution result of the workflow, the execution duration of the workflow, and so on.
[0161] S1206: Based on the execution information of the task component, determine the business data of the component related to the task component.
[0162] Among them, the component related to the task component refers to that the business data of the related component depends on the execution information of the task component.
[0163] In a possible implementation manner, the second computing node executes the virtual component in the target workflow as follows: in response to the scheduling of the virtual component by the scheduler, set the execution status corresponding to the virtual component to the completed status. Since the virtual component contains a preset script for setting the execution status, during the execution of the virtual component, the execution status of the virtual component needs to be set to the completed status. That is to say, during the execution of the virtual component by the second computing node, the second computing node does not perform actual business processing or calculation, avoiding unnecessary waiting and delay, thereby reducing the overall execution time of the workflow.
[0164] Figure 13 It is a flowchart for the second computing node to execute the virtual component. The second computing node executes the virtual component through the following S1301 - S1302.
[0165] S1301: Initialize the component parameters of the virtual component.
[0166] Similar to the component parameters of the task component, the component parameters of the virtual component can be the time parameter, memory parameter, etc. of the virtual component. The embodiments of the present application do not make specific limitations on this, and can be limited according to the actual situation.
[0167] S1302: Set the execution status corresponding to the virtual component to the completed status.
[0168] From Figure 12 and Figure 13 It can be seen that during the execution of the task component, the second computing node first obtains the service data and service script based on the task script, then executes the service operation based on the service data and service script, and after the service operation is completed, it is also necessary to determine the execution information of the workflow instance and the service data of the components related to the task component based on the execution information. During the execution of the virtual component, the computing node does not need to obtain the steps of service data and service script, does not need the above service operations of the task component, and thus does not need to determine the execution information of the workflow instance and the service data of the components related to the virtual component. The computing node needs to initialize the component parameters of the virtual component and set the execution status of the virtual component. That is to say, the virtual component is separated from the service operation and plays a role of process control scheduling alignment in the workflow based on the dependency relationship between the virtual component and the task component. Therefore, compared with the task component, the execution steps of the virtual component are more simplified, the execution process is faster, the execution time is shorter, and the resources of the computing node consumed are less.
[0169] In the second part of the embodiments of the present application, during the execution of the workflow, each component is executed based on the dependency relationship between the components, so that the components in the workflow can meet the complex and changeable process requirements between the components in the workflow. In addition, different from the task component, the virtual component contains a preset script for setting the execution status, that is, it does not contain specific business logic, so that while the virtual component realizes the complex dependency relationship between the task components in the workflow, it will not consume a large amount of computing resources during the execution process, can be quickly executed and completed, and will not affect the execution efficiency of the entire workflow.
[0170] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of methods. To implement the above functions, the workflow construction device and the workflow scheduling device include the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0171] According to the above workflow construction method, the embodiments of the present application can exemplarily divide the functional modules of the workflow construction device. For example, the workflow construction device can include each functional module corresponding to each functional division, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0172] Exemplarily, Figure 14 FIG. shows a possible structural schematic diagram of the workflow construction device involved in the above embodiments. The workflow construction device includes: a display unit 1401, configured to display a target interface for constructing a workflow. The target interface includes a component bar and a canvas. The component bar includes one or more task components and virtual components. The task components are used to carry the business to be executed, and the virtual components are used to implement the scheduling alignment of one or more task components; a creation unit 1402, configured to create a target workflow in the canvas according to the construction operation of the user. The target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components. The virtual components are located before or after the plurality of juxtaposed target task components; wherein, the target workflow is used to be scheduled by a scheduler in a scheduling order, so that the scheduler schedules the plurality of juxtaposed target task components before or after the virtual component by scheduling the virtual component for scheduling alignment.
[0173] Optionally, in the device, in the target workflow, the first virtual component is located after multiple parallel first target task components and before at least one second target task component; the first virtual component is located after multiple parallel first target task components and before at least one second target task component; the scheduler is configured to schedule the first virtual component when multiple parallel first target task components are all executed; the first virtual component is configured to trigger the scheduler to schedule at least one second target task component in response to the scheduling of the scheduler.
[0174] Optionally, in the device, in the target workflow, multiple parallel third target task components are located after the second virtual component; the scheduler is configured to schedule multiple parallel third target task components simultaneously when the second virtual component is executed.
[0175] Optionally, in the device, the virtual component includes a preset script; the preset script is configured to set the execution status of the virtual component to the completed status; the task component includes a task script; the task script is configured to implement a service operation and a status setting operation, and the status setting operation is configured to set the execution status of the task component to the completed status after the service operation is executed.
[0176] Optionally, the device is further configured to: obtain the task script of the fourth target task component; remove the script for implementing the service operation in the task script of the fourth target task component to obtain the script of the virtual component; and construct the virtual component based on the script of the virtual component.
[0177] Optionally, in the component bar, the virtual component is displayed with a first identifier, and the task component is displayed with a second identifier; the construction operation includes: an operation in which the user drags the virtual component or the task component in the component bar to the canvas, a configuration operation on the task component in the canvas, and a connection operation on different components in the canvas. The display unit 1401 is further configured to display a flowchart for characterizing the target workflow on the target interface; the flowchart includes the first identifier and the second identifier; the first identifier is used to indicate the target task component; the second identifier is used to indicate the virtual component.
[0178] In the embodiments of the present application, the functional modules of the workflow scheduling device may be divided exemplarily according to the above workflow scheduling method. For example, the workflow scheduling device may include respective functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
[0179] Exemplarily, Figure 15FIG. 0 shows a possible structural diagram of a workflow scheduling device involved in the above embodiments. The workflow scheduling device includes: an acquisition unit 1501 and a scheduling unit 1502. The acquisition unit 1501 is configured to acquire a target workflow to be executed; the target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after the plurality of parallel target task components. The scheduling unit 1502 is configured to schedule the target workflow in the scheduling order, wherein the plurality of parallel target task components before or after the virtual components are scheduled and aligned by scheduling the virtual components.
[0180] Optionally, in the target workflow, a first virtual component is located after a plurality of parallel first target task components and before at least one second target task component; the scheduling unit 1502 is specifically configured to schedule the first virtual component when all the plurality of parallel first target task components are executed.
[0181] Optionally, the scheduling unit 1502 is specifically configured to schedule at least one second target task component when the first virtual component is executed.
[0182] Optionally, in the target workflow, a plurality of parallel third target task components are located after a second virtual component; the scheduling unit 1502 is specifically configured to schedule the second virtual component; and when the second virtual component is executed, schedule the plurality of parallel third target task components.
[0183] For the specific description of the above optional manner, reference may be made to the foregoing method embodiments, which will not be elaborated herein. In addition, the explanations and beneficial effects of any of the above-provided workflow construction devices and workflow scheduling devices may be referred to the corresponding method embodiments above, and will not be elaborated.
[0184] An embodiment of the present application further provides a computing device, which includes a processor and a memory. The processor is connected to the memory, and the memory stores computer-executable instructions. When the processor executes the computer-executable instructions, the workflow scheduling method in the above embodiments is implemented. The specific form of the computing device in the embodiment of the present application is not limited in any way. For example, the computing device may specifically be a network device. The network device may specifically be a server, etc. Among them, the server may be a physical or logical server, or may be two or more physical or logical servers sharing different responsibilities and cooperating with each other to implement the various functions of the server.
[0185] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program runs on a computer, the computer is enabled to execute the method executed by any of the above computing devices.
[0186] For the explanations and beneficial effects descriptions of the relevant content in any of the above-provided computer-readable storage media, reference can be made to the corresponding embodiments above, and details are not repeated here.
[0187] The embodiments of the present application further provide a chip. The chip integrates a control circuit for implementing the functions of the above-mentioned computing device and one or more ports. Optionally, the functions supported by the chip can be referred to above, and details are not repeated here. Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
[0188] The embodiments of the present application further provide a computer program product containing instructions. When the instructions run on a computer, the computer is caused to execute any of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as an SSD), etc.
[0189] It should be noted that the devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to, the above-mentioned memory, computer-readable storage medium, communication chip, etc., are all non-transitory.
[0190] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more media integrated therein. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0191] Although the present application has been described in conjunction with various embodiments herein, however, in the process of implementing the claimed present application, those skilled in the art can understand and realize other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude a plurality. A single processor or other unit can implement several functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0192] Although the present application has been described in connection with specific features and their embodiments, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. A method for constructing a workflow, characterized in that: The method comprises: Displaying a target interface for building a workflow, the target interface including a component bar and a canvas, the component bar including one or more task components and virtual components, the task component being used to carry the business to be executed, and the virtual component being used to implement scheduling alignment of one or more task components; According to the user's construction operation, a target workflow is established in the canvas, wherein the target workflow includes multiple target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after multiple parallel target task components; wherein the target workflow is used to be scheduled by a scheduler according to the scheduling order, so that the scheduler schedules and aligns multiple parallel target task components before or after the virtual components by scheduling the virtual components.
2. The workflow construction method according to claim 1, characterized in that: In the target workflow, the first virtual component is located after multiple parallel first target task components and before at least one second target task component; the scheduler is used to schedule the first virtual component when the multiple parallel first target task components are executed.
3. The workflow construction method according to claim 1 or 2, characterized in that: In the target workflow, a plurality of parallel third target task components are located after the second virtual component; the scheduler is used to schedule the plurality of parallel third target task components at the same time when the second virtual component is executed.
4. The method for constructing a workflow according to any one of claims 1 to 3, characterized in that: The virtual component includes a preset script; the preset script is used to set the execution status of the virtual component to a completed state; the task component includes a task script; the task script is used to implement business operations and status setting operations, and the status setting operation is used to set the execution status of the task component to a completed state after the business operation is completed.
5. The method for constructing a workflow according to any one of claims 1 to 4, characterized in that: In the component bar, the virtual component is displayed with a first identifier, and the task component is displayed with a second identifier; the construction operation includes: an operation of a user dragging the virtual component or the task component in the component bar to the canvas, an operation of configuring the task component in the canvas, and an operation of connecting different components in the canvas; The method further comprises: A flowchart representing the target workflow is displayed on the target interface; the flowchart includes a first identifier and a second identifier; the first identifier is used to indicate the target task component; and the second identifier is used to indicate the virtual component.
6. A workflow scheduling method, characterized in that: The method comprises: Acquire a target workflow to be executed; the target workflow includes a plurality of target task components arranged in a scheduling order and one or more virtual components, wherein the virtual components are located before or after the plurality of parallel target task components; The target workflow is scheduled according to the scheduling order, wherein the multiple parallel target task components before or after the virtual component are scheduled and aligned by scheduling the virtual component.
7. The workflow scheduling method according to claim 6, characterized in that: In the target workflow, the first virtual component is located after a plurality of parallel first target task components and before at least one second target task component; The step of scheduling the target workflow according to the scheduling order includes: When the plurality of parallel first target task components are all executed, the first virtual component is scheduled.
8. The workflow scheduling method according to claim 6 or 7, characterized in that: In the target workflow, a plurality of parallel third target task components are located after the second virtual component; and scheduling the target workflow according to the scheduling order includes: scheduling the second virtual component; When the second virtual component is executed, the plurality of parallel third target task components are scheduled.
9. A terminal, characterized in that: include: Display and processor; The display is used to display a target interface for building a workflow, the target interface includes a component bar and a canvas, the component bar includes one or more task components and virtual components, the task component is used to carry the business to be executed, and the virtual component is used to achieve scheduling alignment of one or more task components; The processor is used to establish a target workflow in the canvas according to the user's construction operation, wherein the target workflow includes multiple target task components arranged in a scheduling order and one or more virtual components, and the virtual components are located before or after multiple parallel target task components; wherein the target workflow is used to be scheduled by the scheduler according to the scheduling order, so that the scheduler schedules and aligns the multiple parallel target task components before or after the virtual components by scheduling the virtual components.
10. A computing device, characterized in that: include: Processor and memory; The processor is connected to a memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to enable the computing device to implement the method according to any one of claims 6 to 8.