Workflow scheduling method and computing device
By querying and replacing the updated versions in the database in the workflow scheduling method and passing verification task component scripts, the problem of inflexible script modification methods in the workflow is solved, and independent management of task components and high-reliability scheduling are achieved.
Patent Information
- Application Number
- CN202412000112.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the script modification method of task components in the workflow is not flexible enough to achieve flexible management of scripts in the workflow.
By obtaining the target workflow, the script for each task component is queried from the database for whether there is an updated version of the target script that has passed the script verification, and replaced it into the workflow, decoupling scripts and process orchestration to achieve flexible script management.
It realizes the separate management and control of task components, improves user experience, and reduces the risk of errors in task components during scheduling and execution, and improves the reliability of scheduling.
Smart Images

Figure CN120066702A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of servers, and in particular, to a workflow scheduling method and a computing device. Background Art
[0002] In a scheduling system, the design of a workflow often involves the process orchestration of multiple task components. Multiple task components are connected to each other in a specific scheduling order to jointly form a complete workflow. After the process orchestration of the workflow is completed, the workflow is put online, so that users can start, pause, and other operations on the workflow.
[0003] However, the current method for modifying the scripts of task components in a workflow is not flexible enough to achieve flexible management of the scripts in the workflow. Summary of the Invention
[0004] Embodiments of this application provide a workflow scheduling method and a computing device, which can decouple the script of a task component from the process orchestration and achieve flexible management of the script.
[0005] To achieve the above object, the embodiments of this application adopt the following technical solutions:
[0006] In a first aspect, a workflow scheduling method is provided. The workflow scheduling method includes:
[0007] Obtain a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, and each task component is configured with at least one script; for the script of each task component in the target workflow, query from a database whether there is a target script with an updated version and passing script verification, and the script verification is used to indicate whether the script conforms to a preset verification rule; if there is a target script with an updated version and passing script verification in the database, replace the script of the corresponding task component in the target workflow with the target script to obtain an updated target workflow; schedule the updated target workflow.
[0008] In the embodiments of this application, during the scheduling process of the target workflow, when there is a target script with an updated version and passing verification of a task component in the database, the script of the task component is replaced with the target script. On the one hand, the script of the updated version of the task component can be stored in the database according to actual needs, so that during the workflow scheduling process, the task components of the target workflow can be scheduled based on the updated script, decoupling the script from the process orchestration of the workflow, realizing the separate management and control of the task components, and improving the user experience. On the other hand, since the target script is a script passing script verification, it can ensure that the script conforming to the preset rules can be updated into the target workflow, thereby reducing the risk of errors occurring during the scheduling execution of the task component and improving the reliability of scheduling.
[0009] In a possible implementation, in a database, for each task component, each script has version information, which is used to indicate the configuration time of the script and to determine the target script when scheduling the task component.
[0010] In this implementation, the introduction of version information enables the configuration time of each script to be clearly recorded. On the one hand, this helps to clearly understand the change history of the script and can also group multiple scripts of the same task component based on the configured time point or time period range to achieve fine-grained management of the script. On the other hand, when scheduling a task component, the target script can be determined according to the version information, and the script with the latest configuration can be used as the target script, thereby improving the accuracy of scheduling. For example, when a problem occurs with the script, it is possible to roll back to a script without problems based on the version information, enhancing the reliability of scheduling.
[0011] In a possible implementation, the method further includes: obtaining a first script of a target task component; the target task component is one of multiple task components; the first script is a script of an updated version of the target task component; storing the first script in the database; in the database, there is a corresponding relationship between the first script and the target task component.
[0012] In this implementation, the updated version of the script of the target task component, that is, the first script, is stored in the database, and a corresponding relationship between the first script and the target task component is established. In this way, using the database to centrally manage the scripts makes operations such as finding, modifying, and deleting the scripts simpler and more efficient.
[0013] In a possible implementation, the target workflow is a workflow that has passed verification; the verification includes one or more of script passing verification, component loop verification, and data loop verification; script passing verification is used to verify whether the scripts of the task components in the target workflow pass the script verification; component loop verification is used to verify whether the scheduling order of each task component in the target workflow forms a loop; data loop verification is used to verify whether the data output by each task component in the target workflow forms a loop.
[0014] In this implementation, the script improves the reliability and stability of the target workflow through verification, component loop verification, and data loop verification. Specifically, the script ensures through verification that the scripts of task components have passed the preset verification rules, which helps prevent the failure of the workflow to run or the generation of abnormal results caused by errors or non-compliant code in the scripts. Component loop verification prevents the scheduling order of task components in the workflow from forming a loop, avoiding infinite loops and deadlocks, thereby improving the stability and reliability of the workflow. Data loop verification ensures that there is no loop among the data output by task components, preventing infinite loops in data dependencies and further ensuring the normal operation of the workflow. Through the above three verifications, potential problems can be discovered and fixed in a timely manner, avoiding a decrease in performance during the actual operation of the workflow, improving the overall execution efficiency of the workflow, and further enhancing the user experience.
[0015] In a possible implementation, the scripts configured for task components include Structured Query Language (SQL) scripts; the preset verification rules include syntax verification rules and / or database verification rules; the syntax verification rules are used to verify the syntax of SQL scripts; the database verification rules are used to enhance the data development performance of SQL scripts.
[0016] In this implementation, the syntax verification rules ensure that the SQL scripts comply with the syntax specifications of the SQL language, effectively preventing execution failures or abnormal results caused by syntax errors. The database verification rules help improve the data development performance of SQL scripts, such as query efficiency and index usage.
[0017] In a possible implementation, scheduling the updated target workflow includes: in the case of an error occurring during the scheduling of the updated target workflow, replacing the target script of the task component with an error with the script before replacement, and scheduling the task component with the error based on the script before replacement.
[0018] In this implementation, when scheduling the updated workflow, if an error occurs, that is, the task components in the workflow fail to be successfully executed, the target script of the updated task component will be replaced and rolled back to the script before replacement, and the task component will be rescheduled to ensure that the scheduling process will not be interrupted due to errors in the execution of task components, guaranteeing the continuity and stability of the scheduled workflow.
[0019] In a second aspect, a workflow scheduling method is provided. The method includes: obtaining a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, and each task component is configured with a target script; verifying the target workflow, and the verification at least includes whether the target script of each task component in the target workflow passes the script verification, and the script verification is used to indicate whether the target script conforms to a preset verification rule; scheduling the target workflow when the target workflow passes the verification.
[0020] In an embodiment of the present application, during the process of scheduling task components, by verifying the scripts of each task component in the target workflow, errors or non-compliant parts in the scripts can be discovered and corrected in a timely manner, thereby avoiding problems during the execution of task components, improving the success rate of workflow execution, and enhancing the user experience.
[0021] In a possible implementation manner, the target script is the latest configured script among at least one script.
[0022] In this implementation manner, the latest script often contains the latest business logic and data processing rules. Therefore, selecting the latest configured script as the target script can ensure that the task component can be executed according to the latest requirements, ensuring the timeliness and accuracy of the script content.
[0023] In a possible implementation manner, obtaining the target workflow includes: obtaining an initial workflow; the initial workflow includes a plurality of task components arranged in a scheduling order, and each task component in the initial workflow is configured with at least one script; for the script of each task component in the initial workflow, query in the database whether there is an updated version of the target script; if there is an updated version of the target script in the database, replace the script of the corresponding task component in the initial workflow with the target script to obtain the target workflow.
[0024] In this implementation manner, during the scheduling process of the target workflow, when there is an updated version of the target script for the task component in the database, the script of the task component is replaced with the target script. In this way, the updated version of the task component can be stored in the database according to actual needs, so that during the workflow scheduling process, the task components of the target workflow can be scheduled based on the updated script, decoupling the script from the process orchestration of the workflow, realizing the separate management and control of task components, and enhancing the user experience.
[0025] In a third 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, thereby implementing any one of the methods provided in the second aspect.
[0026] Fourthly, a chip is provided, which includes: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any of the methods provided in the first aspect or the second aspect above.
[0027] Fifthly, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions run on a computer, the computer is enabled to execute any of the methods provided in the first aspect or the second aspect above.
[0028] Sixthly, a computer program product is provided, which includes computer-executable instructions. When the computer-executable instructions run on a computer, the computer is enabled to execute any of the methods provided in the first aspect or the second aspect above.
[0029] Among them, for the technical effects brought by any implementation manner in the third aspect to the sixth aspect, reference can be made to the technical effects brought by different implementation manners in the first aspect or the second aspect, which will not be elaborated here. Description of the Drawings
[0030] Figure 1 It is a system framework diagram of a computing device provided by an embodiment of the present application;
[0031] Figure 2 It is a flowchart of a workflow scheduling method provided by an embodiment of the present application;
[0032] Figure 3 It is a DAG graph corresponding to a target workflow provided by an embodiment of the present application;
[0033] Figure 4 It is a schematic diagram of a workflow provided by an embodiment of the present application;
[0034] Figure 5 It is a schematic diagram of data cyclic redundancy check provided by an embodiment of the present application;
[0035] Figure 6 It is a schematic diagram of workflow scheduling provided by an embodiment of the present application;
[0036] Figure 7 It is a flowchart of another workflow scheduling method provided by an embodiment of the present application;
[0037] Figure 8 It is a schematic diagram of a workflow scheduling device provided by an embodiment of the present application;
[0038] Figure 9 It is a schematic diagram of a workflow scheduling device provided by an embodiment of the present application. Detailed Embodiments
[0039] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
[0040] Among them, in the description of the present application, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B may be singular or plural.
[0041] Moreover, in the description of the present 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 (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or plural.
[0042] In addition, for the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, words 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 words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit being different. At the same time, in the embodiments of the present 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 the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.
[0043] The embodiments of the present application provide a workflow scheduling method. The method includes: First, obtain a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, and each task component is configured with at least one script. Then, for the script of each task component in the target workflow, query from the database whether there is a target script with an updated version and passing the script verification, and the script verification is used to indicate whether the script conforms to a preset verification rule. If there is a target script with an updated version and passing the script verification in the database, replace the script of the corresponding task component in the target workflow with the target script to obtain an updated target workflow. Finally, schedule the updated target workflow.
[0044] In the embodiments of the present application, during the scheduling process of the target workflow, when there is an updated version of the task component in the database and the target script passes the verification, the script of the task component is replaced with the target script. On the one hand, the script of the updated version of the task component can be stored in the database according to actual needs, so that during the workflow scheduling process, the task components of the target workflow can be scheduled based on the updated script, decoupling the script from the process orchestration of the workflow, realizing the separate management and control of the task components, and improving the user experience. On the other hand, since the target script is a script that passes the script verification, it can ensure that only scripts that meet the preset rules can be updated to the target workflow, thereby reducing the risk of errors occurring during the scheduling and execution of the task components and improving the reliability of the scheduling.
[0045] Next, an exemplary introduction to the system architecture of the embodiments of the present application will be given.
[0046] The embodiments of the present application also provide a computing device.
[0047] In the embodiments of the present application, the computing device 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 device is multiple servers, the computing device is a server cluster with high availability capabilities.
[0048] Exemplarily, the server may be a blade server, a high-density server, a rack server, or a tower server, etc. It should be noted that the embodiments of the present application do not limit the device form of the computing device. Hereinafter, taking the server as an example, the system architecture of the computing device provided in the embodiments of the present application will be described.
[0049] As Figure 1 shown, it is the system framework diagram of the computing device provided in the embodiments of the present application. The hardware part of the computing device includes a processor, a basic input output system (BIOS) chip, an out-of-band controller, and a memory. The software part mainly includes BIOS, an out-of-band management module, and an operating system (OS).
[0050] The processor may include a central processing unit (CPU). The CPU includes one or more CPU cores, and the operations of the CPU for processing data 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 computing device executes the workflow scheduling method.
[0051] The BIOS chip is a chip installed on the motherboard and used to initialize and detect various hardware during the startup process of the computing device. The BIOS chip includes a flash memory area.
[0052] The out-of-band management module is located in the out-of-band controller, and the operating system is located in the processor.
[0053] The out-of-band management module may be a management unit of a non-business module. For example, the out-of-band management module may remotely maintain and manage a computing device through a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computing device and may communicate with the BIOS and the operating system through the out-of-band management interface of the computing device.
[0054] Exemplarily, the out-of-band management module may include a management unit for computing device operation status, a management system in a management chip, a computing device 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.
[0055] OS is a computer program that manages and controls the hardware and software resources of a computing device. Any other software must be supported by the operating system to run. After the computing device 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 the user can use the computing device normally.
[0056] BIOS is a set of programs that are fixed on the BIOS chip on the motherboard of a computing device. The main function of BIOS is to provide the lowest-level and most direct hardware settings and controls for computing devices.
[0057] Memory, also called internal storage or main memory, is installed in memory slots on the motherboard of a computing device.
[0058] 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.
[0059] For ease of understanding, the workflow scheduling method provided in this application is exemplarily introduced below with reference to the accompanying drawings.
[0060] The following embodiments of this application will exemplarily introduce the solution of the workflow scheduling method in two parts.
[0061] In the first part, in combination with Figures 2 to 6 , the workflow scheduling method provided by the embodiments of this application is introduced, aiming to introduce a specific implementation manner of scheduling the workflow.
[0062] In the second part, in combination with Figure 7 , the workflow scheduling method provided by the embodiments of this application is introduced, aiming to introduce another specific implementation manner of how to schedule the workflow.
[0063] In some embodiments, during the scheduling process of the target workflow, it is queried in the database whether there is an updated version of the task component and a target script that passes the script verification. And when there is an updated version of the task component and a target script that passes the verification in the database, the script of the task component is replaced with the target script. On the one hand, when updating and modifying the script of the task component, the script of the updated version can be stored in the database, so that during the workflow scheduling process, the task components of the target workflow can be scheduled based on the updated script, decoupling the script from the process orchestration of the workflow, without the need to re-orchestrate the workflow, realizing the separate management and control of the task components and improving the user experience. On the other hand, since the target script is a script that passes the script verification, it can ensure that the script that conforms to the preset rules can be updated to the target workflow, thereby reducing the risk of errors occurring during the scheduling execution of the task component and improving the reliability of the scheduling.
[0064] Figure 2 FIG. is a flowchart of a workflow scheduling method shown according to an exemplary embodiment. This method can be executed by the above computing device. Exemplarily, this method includes the following S201 - S204.
[0065] S201: The computing device obtains the target workflow.
[0066] The target workflow includes a plurality of task components arranged in the scheduling order, and each task component is configured with at least one script.
[0067] Optionally, the script configured for the task component is used to carry the business to be executed. For example, data development business to realize the development and processing of raw data. Another example is image processing business to realize the preprocessing of images, image recognition, etc. Exemplarily, the script configured for the task component can be a structured query language (SQL) script, a python script, a shell script, etc.
[0068] Optionally, in addition to carrying the business to be executed, the script of the task component can also be used to configure the running resources of the task component, set parameters, and so on. Among them, the running resource configuration refers to setting the processor resources, memory resources, etc. used when the task component is scheduled for execution. Parameter setting is used to set the storage location of the input data, the storage location of the output data, etc. in the task component.
[0069] Optionally, the scripts configured for the task components in the target workflow can be stored in a preset storage area, such as a database. The computing device obtains the scripts configured for multiple task components in the target workflow by accessing the preset storage area. In the preset storage area, there is a corresponding relationship between the script and the task component. The script corresponding to the task component is the script configured for the task component.
[0070] In a workflow, there can be complex dependencies between task components. For example, since task component 3 depends on the output data of task component 1 and the output data of task component 2. Another example is that task component 4 and task component 5 need to be executed simultaneously. Also, for example, task component 6 is used to input the input data to different task components when the input data meets different conditions. The scheduling order between task components is determined based on the dependencies of each task component in the workflow. Continuing with the example where task component 3 depends on the output data of task component 1 and task component 2, in this case, task component 3 needs to be executed after task component 1 and task component 2. When task component 4 and task component 5 need to be executed simultaneously, the scheduling order of task component 4 and the scheduling order of task component 5 are the same in the workflow. When task component 6 indicates that the input data is greater than the first threshold, the input data is input to task component 7. When the input data is less than or equal to the first threshold, the input data is input to task component 8. At this time, the scheduling order of task component 7 and the scheduling order of task component 8 are after task component 6.
[0071] In a possible implementation, the target workflow can be represented by a process diagram. Exemplarily, the target workflow is represented by a directed acyclic graph (DAG). In the DAG graph, a node represents a task component in the workflow. The connection relationship of multiple task components in the DAG graph represents the scheduling order of multiple task components in the workflow.
[0072] Figure 3 is a DAG graph corresponding to a target workflow. As Figure 3As shown in the figure, the task components included in the target workflow are task component 1, task component 2, and task component 3. In the DAG graph, the arrows represent the scheduling order among task component 1, task component 2, and task component 3 in the target workflow. The scheduling order of task component 1 and the scheduling order of task component 2 are before task component 3. The computing device schedules each task component based on the scheduling order among the task components in the target workflow, that is, schedules task component 3 after scheduling task component 1 and task component 2.
[0073] In one possible implementation, the target workflow is a workflow that has passed the verification.
[0074] Optionally, the verification of the target workflow includes that the script passes the verification. The script passing the verification is used to verify whether the script of the task component in the target workflow passes the script verification. The script verification rule is used to indicate whether the script conforms to the preset verification rule. When the script conforms to the preset verification rule, the script passes the script verification.
[0075] Exemplarily, the preset verification rule includes a syntax verification rule. The syntax verification rule is used to detect the syntactic correctness of the script. For example, when the script configured for the task component includes an SQL script, a shell script, or a Python script, the syntax verification rule is used to verify the syntax of the SQL script, the shell script, and the Python script to ensure the syntactic correctness of the SQL script, the shell script, and the Python script.
[0076] Exemplarily, the preset verification rule includes a database verification rule, and the script configured for the task component includes an SQL script. Using the database verification rule can enhance the data development performance of the SQL script. The SQL script is used to perform data operations (such as querying, inserting, updating, and deleting the database, etc.). The database development performance of the SQL script includes but is not limited to improving the data processing speed and enhancing the data quality, etc. For example, the database verification rule can be used to check whether the tables, columns, functions, etc. in the SQL script exist and whether the relationships between them are correct. Another example is that the database verification rule can be used to check whether there are unnecessary table joins, etc., so as to improve the execution efficiency of the SQL script.
[0077] Optionally, the verification of the target workflow includes component loop verification. The component loop verification is used to verify whether the scheduling order of each task component in the target workflow forms a loop. When the scheduling order of each task component in the target workflow does not form a loop, the target workflow passes the component loop verification.
[0078] Figure 4 It is a schematic diagram of a workflow. In Figure 4In it, the arrows indicate the scheduling order of each task component in the target workflow. The scheduling order of task component 1 in the target workflow is before task component 2, the scheduling order of task component 2 is before task component 3, while the scheduling order of task component 3 is before task component 1. At this time, there is a loop in the scheduling order among task component 1, task component 2, and task component 3, and a circular dependency problem occurs. In this way, when the computing device schedules the target workflow, it cannot determine the scheduling order of task component 1, task component 2, and task component 3, and further causes the entire workflow to not be correctly scheduled and executed. By performing component loop verification on the target workflow, the circular dependency problem among task components is timely detected, avoiding infinite loops and deadlock situations, thereby improving the stability and reliability of the workflow.
[0079] Optionally, the verification of the target workflow includes data loop verification. The data loop verification is used to verify whether there is a loop among the data output by each task component in the target workflow. When there is no loop among the output data of each task component in the target workflow, the target workflow passes the data loop verification. Among them, the data output by the task component can be a table, a field value, etc.
[0080] Figure 5 It is a schematic diagram of a data loop verification. As Figure 5 shown, task component 1 outputs data 1, task component 2 outputs data 2 based on data 1, task component 3 outputs data 3 based on data 2, and task component 4 outputs data 1 based on data 3. That is to say, there is a loop among data 1, data 2, and data 3. At this time, task component 1 is very likely to continuously reprocess the data 1 output by task component 4, resulting in the exhaustion of resources when the computing device schedules and executes the target workflow, and causing the scheduling of the target workflow to be unable to be completed. The data loop verification ensures that there is no loop among the data output by the task components, prevents infinite loops of data dependencies, and further guarantees the normal operation of the workflow.
[0081] The script improves the reliability and stability of the target workflow through verification, component loop verification, and data loop verification. Through the above three verifications, potential problems in the target workflow can be timely detected and repaired, avoiding the situation of performance degradation during the actual scheduling and execution process of the target workflow, improving the overall execution efficiency of the workflow, and further enhancing the user experience.
[0082] S202: For the script of each task component in the target workflow, the computing device queries from the database whether there is an updated version and the target script that passes the script verification.
[0083] Among them, script verification is used to indicate whether a script conforms to a preset verification rule. The preset verification rule has been described in S201 above and will not be elaborated here. For how to perform script verification on a script, reference can be made to the description of S702 in the second part of the embodiments of this application and will not be elaborated here.
[0084] In a possible implementation manner, in addition to including the scripts of the updated versions of the task components, the database may further include the scripts that have been configured for the task components in the target workflow.
[0085] In the database, for each task component, each script has version information, which is used to indicate the configuration time of the script and to determine the target script when the computing device schedules the task component. The computing device can determine whether there is a script of an updated version of the task component based on the version information of the scripts of the task component in the database. For example, the computing device compares the version information of the script that has been configured for the task component currently with the version information of the updated version stored in the database, so as to determine whether the script that has been configured for the task component currently is the latest version of the script.
[0086] Exemplarily, in the database, the version information may be a version number, a configuration time, etc. Among them, the version number is usually a series of numbers based on a preset naming rule. Exemplarily, the preset naming rule may be that the larger the version number value, the later the configuration time of the script. For example, for the same task component, the configuration time of the script with a version number of "2" is later than that of the script with a version number of "1".
[0087] In this way, the introduction of version information enables the configuration time of each script in the database to be clearly recorded. On the one hand, this helps to clearly understand the change history of the script and can also group multiple scripts of the same task component based on the configured time point or time period range to achieve fine-grained management of the scripts. On the other hand, when the computing device schedules the task component, it can determine the target script according to the version information, that is, use the script with the latest configuration as the target script, thereby improving the accuracy of scheduling. For another example, when there is a problem with the script of the task component, it can be rolled back to the script without problems based on the version information, enhancing the reliability of scheduling.
[0088] In a possible implementation manner, the scripts of the task components included in the database may be scripts that have passed the verification or scripts that have not passed the script verification.
[0089] In the database, for each task component, there is verification information for each script, and the verification information is used to indicate whether the script conforms to a preset verification rule. Exemplarily, the scripts that pass the script verification are stored in the database with a first identifier, and the scripts that do not pass the script verification are stored in the database with a second identifier. In this way, through different identifiers (such as colors, symbols, or text labels), the scripts that pass the verification and those that do not pass the verification can be visually distinguished, and the computing device can quickly identify the verification status of the scripts. Exemplarily, the scripts that pass the script verification are displayed as an online state, and the scripts that do not pass the script verification are displayed as an offline state.
[0090] In a possible implementation, in the database, there is a corresponding relationship between the scripts of the task components and the task components. In the embodiments of the present application, the scripts in the database in S202 above can be obtained through the following methods a1 - a2:
[0091] a1: The computing device obtains the first script of the target task component.
[0092] Among them, the target task component is one of the multiple task components; the first script is the updated version of the script of the target task component.
[0093] Exemplarily, the user obtains the first script of the target task component through an input device, and the input device sends the first script to the computing device.
[0094] a2: The computing device stores the first script in the database.
[0095] Among them, in the database, there is a corresponding relationship between the first script and the target task component. In this way, using the database to centrally manage the scripts makes operations such as searching, modifying, and deleting the scripts simpler and more efficient.
[0096] Exemplarily, the first script and the target task component can be stored in the database in the form of key - value pairs. In the database, each key represents the identifier of the task component, and the corresponding value is the first script of the task component or a reference to the first script. Specifically, the identifier of the task component can be the name, ID, etc. of the task component. The value corresponding to the task component can be the first script or the storage location of the first script in the database, etc. The present application does not make a specific limitation on the storage form of the first script, and it can be set according to the actual situation.
[0097] S203: If there is an updated version and the target script that passes the script verification in the database, the computing device replaces the script of the corresponding task component in the target workflow with the target script to obtain the updated target workflow.
[0098] In a possible implementation, in the database, each script has version information and verification information. Among them, the version information is used to indicate the configuration time of the script, and the identification information is used to indicate whether the script conforms to the preset verification rules. In this way, the computing device determines whether there is a target script for the task component in the database based on the version information and the verification information.
[0099] In another possible case, if there is an updated script in the database, but the updated script fails the script verification, the computing device will not replace the script of the task component in the target workflow, avoiding scheduling a script that fails the script verification and ensuring the reliability of the workflow scheduling.
[0100] Of course, if there is no updated script in the database, the computing device will not replace the script of the task component in the target workflow.
[0101] S204: The computing device schedules the updated target workflow.
[0102] Of course, if there is no updated target script that passes the script verification in the database, the computing device will not replace the script of the task component in the target workflow. In this case, the computing device schedules the target workflow.
[0103] In a possible implementation, the computing device can send the task corresponding to the task component to other computing devices. The task corresponding to the task component is used to instruct other computing devices to execute the task component based on the script of the task component. In this way, when other computing devices receive the task corresponding to the task component, they execute the task component based on the configured script and obtain the execution result of the task component.
[0104] In a possible implementation, in the above S204, in the case of an error occurring during the scheduling of the updated target workflow, the target script of the task component with an error is replaced with the script before replacement, and the task component with an error is scheduled based on the script before replacement.
[0105] Here, an error in the target workflow after scheduling update means that at least one task component in the updated target workflow fails to be successfully executed. There are various scenarios where a task component fails to be successfully executed. For example, due to an error in the script of the task component (such as a syntax error, etc.), the task component cannot be executed by other computing devices. Another example is that the quantity of hardware resources (such as memory, etc.) used by the task component during execution exceeds the quantity of the preset device resources of other computing devices, resulting in the task component not being executable. Or, the computing device fails to schedule and complete the task component within the preset duration, that is, within the preset duration, the computing device does not send the task corresponding to the task component to other computing devices, which means that other computing devices do not receive the instruction to execute the task component, and so on.
[0106] In this way, when the updated script causes an error in workflow scheduling, quickly rolling back to the script before replacement can quickly restore scheduling and reduce potential losses caused by errors in scheduling task components.
[0107] Figure 6 It is a schematic diagram of a workflow scheduling. The computing device schedules each task component based on the scheduling order among the task components in the workflow. The target script of the task component is stored in the database. When the computing device performs the first scheduling of Workflow 1, in the script of Task Component 1 (Script 1), the script (Script 1) is determined as the script for scheduling Task Component 1. Before the second scheduling of Task Component 1 (the target task component), the database already stores the updated version of Task Component 1 and the target script (i.e., Script 2) that has passed the script verification. When performing the second scheduling of Workflow 1, the computing device selects Script 2 as the script for scheduling Task Component 1 from Script 1 and Script 2 of Task Component 1. If an error occurs during the second scheduling of Task Component 1, the computing device performs a rollback operation on the script of the task component, replaces the target script (Script 2) of the task component with an error with the script before replacement (Script 1), and schedules the task component with an error based on the script before replacement (Script 1).
[0108] In another possible implementation manner, in S204 above, in the case where an error occurs in scheduling the updated target workflow, the method provided by the embodiments of the present application further includes the following:
[0109] b1: When the computing device fails to schedule a task component based on the target script, based on a preset condition, it selects a script from at least one script of the task component in the database as the updated target script of the task component.
[0110] Exemplarily, the preset conditions can be defined according to actual needs. For example, the preset conditions can be the script that was successfully executed last time, the script with the most usage times, etc. Selecting the script that was successfully executed last time as the updated target script can minimize the task interruption time caused by script errors, quickly resume the execution of the task, and ensure the continuity of the scheduling workflow. While the script with the most usage times means that the script has been executed multiple times and has high reliability, which can further improve the success rate of the scheduling workflow.
[0111] b2: The computing device schedules the updated workflow based on the updated target script.
[0112] In this way, by providing the updated target script as an alternative, it can automatically switch to the updated target script when there is a problem with the target script, ensuring that the task components can be successfully scheduled and executed. This improves the fault tolerance and stability of the scheduling, reduces the business impact caused by abnormal workflow execution, quickly resumes the business, and enhances the user experience.
[0113] Optionally, after the computing device schedules the task components, it can provide the scheduling logs, prompt messages, etc. of the task components. Among them, the scheduling logs of the task components include but are not limited to the running results, running durations, etc. of the task components. The prompt messages of the task components include execution exception messages, execution completion messages, etc.
[0114] Similarly, after the computing device schedules the workflow (i.e., all task components in the workflow have been scheduled), it can also provide the scheduling logs, prompt messages of the workflow.
[0115] In addition, the computing device can also schedule a single task component in the workflow to meet the user's scheduling requirements for the task component.
[0116] Of course, the computing device can also select the starting task component to be scheduled among multiple task components in the workflow, and start scheduling from this starting task component, and sequentially schedule other task components after this starting task component.
[0117] Optionally, the computing device can also set parameters such as the scheduling period and running resources of the workflow to meet the diverse scheduling needs of users. Among them, the scheduling period refers to the frequency and time interval at which the computing device executes the workflow. By setting the scheduling period, the start time of the workflow can be precisely controlled, as well as the time interval between two workflow schedules, thereby meeting the diverse needs of scheduling the workflow. The scheduling period includes, but is not limited to, fixed periods, interval periods, conditional triggers, etc. The fixed period means setting a fixed time such as every day or every week to schedule the workflow. For example, scheduling the workflow at 10 o'clock every day. The interval period refers to the time interval between two workflow schedules. For example, if the interval period is 30 hours, it means scheduling the workflow once every 30 hours. Conditional trigger means triggering the workflow scheduling when a preset condition is met. For example, triggering the scheduling of the computing device workflow when the preset parameters meet the threshold. The running resources refer to the resources in the computing device used during the workflow scheduling process, such as central processing unit resources, memory resources, bandwidth resources, etc.
[0118] Of course, in the case where an error occurs during the scheduling of the updated target workflow, the computing device can also replace the updated target workflow with the target workflow and schedule the target workflow.
[0119] In the first part of the embodiments of the present application, a specific implementation method of workflow scheduling is described. On the one hand, during the workflow scheduling process, the script of the task component is replaced with a verified and up-to-date target script. This replacement mechanism enables the updated version of the task component to be flexibly stored in the database according to actual needs. In this way, during workflow scheduling, the computing device can schedule the task components in the target workflow based on the latest script, realizing the effective decoupling of the script and the process orchestration of the workflow, making the management and control of the task components more independent and flexible, thereby greatly improving the user experience. On the other hand, since the target script has passed strict script verification before replacement, this ensures that only those scripts that meet the preset rules can be updated to the target workflow. In this way, the risk of errors that may occur during the scheduling execution of the task component is effectively reduced, further improving the stability and reliability of the scheduling.
[0120] The above is the first part of the embodiments of the present application. Below, in combination with Figure 7 , another specific implementation process of scheduling the workflow is introduced.
[0121] Figure 7 FIG. is a flowchart of another workflow scheduling method shown according to an exemplary embodiment. This method can be executed by a computing device. Exemplarily, this method includes the following S701-S703.
[0122] S701: The computing device obtains a target workflow.
[0123] The target workflow includes multiple task components arranged in a scheduling order, and each task component is configured with a target script.
[0124] In a possible implementation, the target workflow is obtained in the following manner:
[0125] c1: The computing device obtains an initial workflow.
[0126] The initial workflow includes multiple task components arranged in a scheduling order, and each task component in the initial workflow is configured with at least one script.
[0127] c2: For the script of each task component in the initial workflow, the computing device queries from the database whether there is an updated version of the target script.
[0128] c3: If there is an updated version of the target script in the database, the computing device replaces the script of the corresponding task component in the initial workflow with the target script to obtain the target workflow.
[0129] S702: The computing device verifies the target workflow.
[0130] In a possible implementation, verifying the target workflow includes whether the target script of each task component in the target workflow passes the script verification. The script verification is used to indicate whether the target script conforms to the preset verification rules. The task component corresponding to the script that passes the script verification can be used for the scheduling of the workflow. In this way, ensuring that the script of the task component conforms to the preset verification rules through the script verification helps prevent the workflow from running failures or generating abnormal results caused by errors or non-compliant scripts in the script.
[0131] Of course, after the computing device performs the script verification on the script of the task component, the script can also be further audited manually to strictly control the quality of the script.
[0132] In a possible implementation, the preset verification rules include syntax verification rules.
[0133] Exemplarily, when the script configured for the task component includes an SQL script, the syntax verification rule is used to verify the syntax of the SQL script to ensure the syntactic correctness of the SQL script. When the terminal verifies the SQL script, it first parses the SQL script, decomposes the SQL script into recognizable syntax units (such as keywords, operators, etc.), and then verifies the decomposed syntax units based on the syntax specifications of the SQL language. Through the syntax verification rule, it is ensured that there are no syntax errors in the SQL script of the task component before execution, avoiding errors when scheduling the task component.
[0134] Exemplarily, in the case where the scripts configured for the task component include shell scripts and Python scripts, the syntax verification rules are used to verify the syntax of the shell scripts and Python scripts to ensure the syntactic correctness of the shell scripts and Python scripts. Verifying shell scripts and Python scripts is similar to verifying SQL scripts, which will not be elaborated here.
[0135] In a possible implementation, the preset verification rules include database verification rules.
[0136] In the case where the scripts configured for the task component include SQL scripts, through the SQL scripts, the user can define the database structure (such as creating tables, indexes, views, etc.), operate on data (such as inserting, updating, deleting data, etc.), and control the access rights of the database, etc., so as to achieve interaction with the database. The database verification rules are used to enhance the data development performance of the SQL scripts.
[0137] Exemplarily, the database verification rules include but are not limited to: "There is no Cartesian product in the data in the database involved in the SQL script", "Containing preset comments", "Using preset field selection", "The level of subqueries does not exceed the preset level", "No preset type conversion", "No unused variables or fields", "No unused temporary tables or table variables", "The fields corresponding to the data to be inserted are consistent with the fields defined in the table", etc.
[0138] Among them, the Cartesian product refers to the cross-join of two or more tables in the database involved in the SQL script without connection. The existence of a Cartesian product in the data in the database involved in the SQL script usually results in a large amount of unnecessary duplicate data.
[0139] For the rule of "using preset field selection", taking the query of data in the database as an example, the use of SELECT * should be avoided because SELECT * in the SQL script will return all fields in the table, which may cause unnecessary data transmission and performance problems. Therefore, specifying the required fields explicitly in the SQL script can reduce the amount of data transmission and improve the query efficiency.
[0140] For the rule of "the level of subqueries does not exceed the preset level", it is because complex subqueries may cause query performance problems. For example, in the database verification rules, the depth of the subquery level is set not to exceed 5. If the level of the subquery exceeds 5 levels, it will reduce the readability of the query and the query time, etc.
[0141] Regarding the rule of "no preset type conversion", it is to avoid the situation that unnecessary type conversion will increase the processing burden of the database and may cause performance problems during the scheduling task component process. For example, Script 1 contains two data processing operations. Among them, Code 1 is used to convert the data type of Data A from string to integer, and Code 2 converts the data type of Data A from integer to string.
[0142] Similarly, regarding the rule of "no unused variables or fields", it is because unused temporary tables or table variables will occupy memory and database resources.
[0143] Regarding the rule of "the fields corresponding to the data to be inserted are consistent with the fields defined in the table", the data to be inserted refers to the data to be inserted into the table. This rule is to ensure that when inserting data into a database table, the data types of the fields corresponding to the data match the fields defined in the table to prevent abnormal data insertion.
[0144] In a possible implementation, verifying the target workflow also includes component loop verification. When the scheduling order of each task component in the workflow does not form a loop, the workflow passes the workflow verification. Component loop verification ensures that the task components in the workflow can be executed in a preset loop-free order, significantly improving the stability and reliability of the workflow.
[0145] In a possible implementation, verifying the target workflow also includes data loop verification. When the data output by each task component in the workflow does not form a loop, the workflow passes the workflow verification. Data loop verification can detect data dependencies that may cause infinite loops, thereby preventing data from flowing infinitely between task components and preventing system exceptions or stalls caused by data dependency problems.
[0146] Of course, the computing device can combine the above script verification, component loop verification, and data loop verification to verify the workflow. For example, all of the above three verifications are used for workflow verification. In this way, when the workflow passes all of the above three verifications, the workflow passes the workflow verification. Another example is that two of the three verifications can be selected for workflow verification according to actual needs.
[0147] In addition, workflow verification can also be used to verify whether all the preset configurations involved in each task component in the workflow have been set, such as running resource configuration, parameter setting, etc. When all the preset configurations are completed, the workflow passes the workflow verification.
[0148] Of course, after the computing device performs workflow verification on the workflow, the workflow can be further reviewed manually to strictly control the quality of the workflow.
[0149] S703: When the target workflow passes the verification, the computing device schedules the target workflow.
[0150] In a possible implementation, the task components in the target workflow are in a running state or a non-running state. The task component being in a running state means that the task component is being scheduled. The task component being in a non-running state means that the task component is not being scheduled. The non-running state of the task component includes a paused state, a terminated state, etc. The paused state of the task component means that the task component is temporarily stopped during the scheduling process. In the paused state, the task component will not be executed and will continue to be executed after the task component is resumed. The terminated state of the task component means that the task component has been executed or has been prematurely ended due to certain reasons (such as an error occurring during the execution process, user cancellation, etc.).
[0151] The target workflow is in a running state or a non-running state. The workflow being in a running state means that at least one task component in the workflow is in a state of being scheduled and executed. The workflow being in a non-running state means that the workflow is not being scheduled or executed. The non-running state of the workflow includes a paused state, a terminated state, etc. The paused state of the workflow means that the workflow is temporarily stopped during the scheduling and execution process. In the paused state, the task components in the workflow will not be scheduled and executed continuously, and will continue to schedule and execute subsequent task components after the workflow is resumed. The terminated state of the workflow means that the workflow has completed execution or has been prematurely ended due to certain reasons (such as an error occurring during the scheduling and execution of the workflow, user cancellation, etc.).
[0152] In the second part of the embodiments of the present application, another implementation of the computing device scheduling the target workflow is described. During the process of scheduling task components, by verifying each task component in the target workflow, such as script verification, component loop verification, data loop verification, errors or non-compliant places in the workflow can be timely discovered and corrected, thereby avoiding problems during the execution process, improving the success rate of workflow execution, and enhancing the user experience.
[0153] The above mainly introduced the solution provided by the embodiments of the present application from the perspective of methods. To implement the above functions, the workflow scheduling device includes 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 herein, 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 form of hardware or computer software driving the 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.
[0154] According to the above workflow scheduling method, the embodiments of the present application can exemplarily divide the functional modules of the workflow scheduling device. For example, the workflow scheduling device may include each functional module corresponding to each functional division, or two or more functions may 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 functional division, and there may be other division methods in actual implementation.
[0155] Exemplarily, Figure 8 FIG. shows a possible structural schematic diagram of the workflow scheduling device involved in the above embodiments. The workflow scheduling device includes: a first acquisition unit 801, a query unit 802, a replacement unit 803, and a first scheduling unit 804. Among them, the acquisition unit 801 is used to acquire a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, and each task component is configured with at least one script; the query unit 802 is used to query from the database whether there is a target script with an updated version and passing the script verification for each script of each task component in the target workflow, and the script verification is used to indicate whether the script conforms to a preset verification rule; the replacement unit 803 is used to, if there is a target script with an updated version and passing the script verification in the database, replace the script of the corresponding task component in the target workflow with the target script to obtain an updated target workflow; the first scheduling unit 804 is used to schedule the updated target workflow.
[0156] Optionally, in this device, in the database, for each task component, each script has version information, and the version information is used to indicate the configuration time of the script and to determine the target script when scheduling the task component.
[0157] Optionally, the apparatus further includes a second obtaining unit, configured to obtain a first script of a target task component, where the target task component is one of a plurality of task components, and the first script is an updated version of the script of the target task component; and a storage unit, configured to store the first script in a database, where in the database, the first script has a corresponding relationship with the target task component.
[0158] Optionally, in the apparatus, the target workflow is a workflow that has passed verification. The verification includes one or more of script passing verification, component loop verification, and data loop verification. Script passing verification is used to verify whether the scripts of the task components in the target workflow pass script verification. Component loop verification is used to verify whether the scheduling order of the task components in the target workflow forms a loop. Data loop verification is used to verify whether the data output by the task components in the target workflow forms a loop.
[0159] Optionally, in the apparatus, the script configured for the task component includes a Structured Query Language (SQL) script. The preset verification rules include a syntax verification rule and / or a database verification rule. The syntax verification rule is used to verify the syntax of the SQL script. The database verification rule is used to enhance the data development performance of the SQL script.
[0160] Optionally, the first scheduling unit 804 is specifically configured to, when an error occurs in scheduling the updated target workflow, replace the target script of the faulty task component with the script before replacement, and schedule the faulty task component based on the script before replacement.
[0161] In an embodiment of the present application, the workflow scheduling apparatus may be functionally divided according to the above workflow scheduling method. For example, the workflow scheduling apparatus 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 module may 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, and is only a logical function division. There may be other division methods in actual implementation.
[0162] Exemplarily, Figure 9FIG. 0 shows a possible structural diagram of the workflow scheduling device involved in the above embodiments. The workflow scheduling device includes: a second acquisition unit 901, a verification unit 902, and a second scheduling unit 903. Among them, the second acquisition unit 901 is configured to acquire a target workflow. The target workflow includes a plurality of task components arranged in a scheduling order, and each task component is configured with a target script. The verification unit 902 is configured to verify the target workflow. The verification at least includes whether the target script of each task component in the target workflow passes the script verification, and the script verification is used to indicate whether the target script conforms to a preset verification rule. The second scheduling unit 903 schedules the target workflow when the target workflow passes the verification.
[0163] Optionally, in this device, the target script of the task component is the script with the latest configuration.
[0164] Optionally, in this device, the second acquisition unit 901 is specifically configured to acquire a target workflow, including: acquiring an initial workflow. The initial workflow includes a plurality of task components arranged in a scheduling order, and each task component in the initial workflow is configured with at least one script. For the script of each task component in the initial workflow, query whether there is an updated version of the target script in the database. If there is an updated version of the target script in the database, replace the script of the corresponding task component in the initial workflow with the target script to obtain the target workflow.
[0165] For the specific description of the above optional manner, reference may be made to the foregoing method embodiments, and details are not described herein again. In addition, the explanations and descriptions of the beneficial effects of any of the above-provided workflow scheduling devices may refer to the corresponding method embodiments above, and details are not described again.
[0166] 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 data processing 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.
[0167] 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 caused to execute the method executed by any of the above-provided computing devices.
[0168] For the explanations and beneficial effects 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.
[0169] An embodiment of the present application further provides 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 a program instructing relevant hardware. 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.
[0170] An embodiment of the present application further provides 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 dedicated 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, a computer, a server, or a data center to another website, a computer, a server, or a data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (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 a 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.
[0171] It should be noted that the above-mentioned 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.
[0172] 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 wireless (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, data center, etc. that contains 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.
[0173] 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 implement 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 "an" 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.
[0174] 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 workflow scheduling method, characterized in that: The method comprises: Acquire a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, each of the task components being configured with at least one script; For each script of the task component in the target workflow, query from a database whether there is an updated version of the target script that has passed script verification, wherein the script verification is used to indicate whether the script complies with a preset verification rule; If there is an updated version of the target script in the database that passes the script verification, the script of the corresponding task component in the target workflow is replaced with the target script to obtain an updated target workflow; Schedule the updated target workflow.
2. The workflow scheduling method according to claim 1, characterized in that: In the database, for each of the task components, each script has version information, and the version information is used to indicate the configuration time of the script and to determine the target script when scheduling the task component.
3. The workflow scheduling method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining a first script of a target task component; the target task component is one of the multiple task components; the first script is an updated version of the target task component; The first script is stored in the database; in the database, there is a corresponding relationship between the first script and the target task component.
4. The workflow scheduling method according to any one of claims 1 to 3, characterized in that: The target workflow is a workflow that has passed verification; the verification includes one or more of script verification, component loop verification and data loop verification; the script verification is used to verify whether the script of the task component in the target workflow passes the script verification; The component loop check is used to check whether the scheduling order of each task component in the target workflow forms a loop; the data loop check is used to check whether the data output by each task component in the target workflow forms a loop.
5. The workflow scheduling method according to any one of claims 1 to 4, characterized in that: The script configured by the task component includes a structured query language SQL script; the preset verification rules include syntax verification rules and / or database verification rules; the syntax verification rules are used to verify the syntax of the SQL script; the database verification rules are used to enhance the data development performance of the SQL script.
6. The workflow scheduling method according to any one of claims 1 to 5, characterized in that: The scheduling of the updated target workflow includes: In the case that an error occurs in scheduling the updated target workflow, the target script of the erroneous task component is replaced with the script before the replacement, and the erroneous task component is scheduled based on the script before the replacement.
7. A workflow scheduling method, characterized in that: The method comprises: Acquire a target workflow; the target workflow includes a plurality of task components arranged in a scheduling order, each of the task components being configured with a target script; Verifying the target workflow, wherein the verification at least includes whether the target script of each task component in the target workflow passes the script verification, wherein the script verification is used to indicate whether the target script complies with a preset verification rule; When the target workflow passes the verification, the target workflow is scheduled.
8. The workflow scheduling method according to claim 7, characterized in that: The target script of the task component is the latest configured script.
9. The workflow scheduling method according to claim 7 or 8, characterized in that: The obtaining of the target workflow includes: Acquire an initial workflow; the initial workflow includes a plurality of task components arranged in a scheduling order, and each task component in the initial workflow is configured with at least one script; For each script of the task component in the initial workflow, querying from a database whether there is an updated version of the target script; If there is a newer version of the target script in the database, the script of the corresponding task component in the initial workflow is replaced with the target script to obtain the target workflow.
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 1 to 9.