Task scheduling method, device, equipment, storage medium and product
By automatically identifying and adding upstream task nodes of task nodes in the big data task scheduling platform and determining target priorities based on the initial priority, the resource utilization and performance problems caused by users setting their own priority are solved, and the reasonable task is achieved Sort and resource allocation improve overall performance.
Patent Information
- Application Number
- CN202411040485.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-31
AI Technical Summary
In the big data task scheduling platform, since users set tasks themselves, resource utilization rate decreases and overall performance decreases. How to improve the resource utilization rate and overall performance of task scheduling has become an urgent problem.
After the task node is added to the baseline, it automatically identifies and joins the current target upstream task node of the target task node, and selects the highest priority from the initial priority of the task node, upstream task node and baseline as the target priority to perform task scheduling , to ensure the smooth execution of dependencies between tasks and to allocate computing resources reasonably.
The resource utilization and overall performance of the task scheduling platform are improved, ensuring that tasks are executed in a reasonable order, avoiding high-priority tasks affecting the execution of low-priority tasks, and improving scheduling efficiency and task completion quality.
Smart Images

Figure CN118567817B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a task scheduling method, device, equipment, storage medium and product. Background Art
[0002] In large-scale big data task scheduling platforms, there are generally a large number of tasks (ranging from tens of thousands to hundreds of thousands) and the cluster load is high. The platform system will determine the order of resource allocation based on the priority of the tasks. The ideal task priority distribution is a pyramid structure, with the priority decreasing from low to high and the number of tasks decreasing in sequence.
[0003] Currently, in the scheduling platform, users judge the importance of tasks and set priorities for tasks, such as setting P0 priority for the most important tasks, P1 priority for important tasks, and P2 and P3 priorities for other tasks, to ensure that important tasks can obtain sufficient resources. However, in the actual management process, users can freely set task priorities, resulting in a decrease in resource utilization of the scheduling platform and a decrease in overall performance.
[0004] In summary, how to improve the resource utilization and overall performance of the scheduling platform when performing task scheduling has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0005] The main purpose of this application is to provide a task scheduling method, device, equipment, storage medium and product, aiming to improve the resource utilization and overall performance of the scheduling platform.
[0006] To achieve the above object, the present application provides a task scheduling method, which includes:
[0007] After adding a target task node in a task node set to a target baseline, adding a current target upstream task node of the target task node to the target baseline, wherein the target baseline is a baseline in a baseline set corresponding to each priority level;
[0008] Select the highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node;
[0009] Task scheduling is performed on the target task node and the current target upstream task node according to the target priority.
[0010] Optionally, before the step of adding the current target upstream task node of the target task node to the target baseline, the method further includes:
[0011] After receiving the creation request of the target baseline, determining whether to approve the creation request according to the review information carried in the creation request;
[0012] If it is determined that the creation request is approved, the target baseline is created, and the target task node corresponding to the creation request is added to the target baseline.
[0013] Optionally, when the target baseline is a first priority baseline, after receiving the creation request of the target baseline, the step of determining whether to approve the creation request according to the review information carried in the creation request includes:
[0014] After receiving the creation request of the first priority baseline, parsing the audit information carried in the creation request to obtain the target task node to be added to the first priority baseline;
[0015] Obtaining the importance of the target task node;
[0016] Determining the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node;
[0017] Determine the proportion of task nodes with a first target priority in the department to which the target task node belongs;
[0018] When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the proportion of task nodes is within a preset interval, it is determined that the creation request is approved.
[0019] Optionally, the step of adding the current target upstream task node of the target task node to the target baseline includes:
[0020] Real-time monitoring of changes in the blood relationship of the target task node;
[0021] The current target upstream task node of the target task node is determined according to the change of the blood relationship, the current target upstream task node is added to the target baseline, and the historical target upstream task node of the target task node is removed from the target baseline.
[0022] Optionally, the method further comprises:
[0023] For a first task node in the task node set, query the number of leaf task nodes of the first task node;
[0024] Multiplying the predicted task execution time of the first task node by the number of the leaf task nodes to obtain a first task weight of the first task node;
[0025] If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then the first task weight and the second task weight of the second task node are compared;
[0026] If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
[0027] Optionally, before the step of multiplying the predicted task execution time of the first task node by the number of leaf task nodes to obtain the first task weight of the first task node, the method further includes:
[0028] If the running state of the first task node is a stable running state, determining the average execution time of the first task node within a preset time range as the predicted task execution time of the first task node;
[0029] If the motion state of the first task node is the initial running state, the trial run execution time of the first task node during the trial run is determined as the predicted task execution time of the first task node.
[0030] In addition, to achieve the above purpose, the present application also provides a task scheduling device, the task scheduling device comprising:
[0031] A baseline adding module, for, after adding a target task node in a task node set to a target baseline, adding a current target upstream task node of the target task node to the target baseline, wherein the target baseline is a baseline in the baseline set corresponding to each priority level;
[0032] A priority determination module, used to select the highest priority among the first initial priority of the target task node, the second initial priority of the current target upstream task node and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node;
[0033] The task scheduling module is used to schedule tasks for the target task node and the current target upstream task node according to the target priority.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a terminal device, which includes: a memory, a processor, and a task scheduling program stored in the memory and executable on the processor, and the task scheduling program implements the steps of the task scheduling method described above when executed by the processor.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a task scheduling program is stored on the storage medium. When the task scheduling program is executed by a processor, the steps of the task scheduling method described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, which includes a task scheduling program, and when the task scheduling program is executed by a processor, the steps of the task scheduling method described above are implemented.
[0037] The embodiments of the present application propose a task scheduling method, apparatus, device, storage medium and product. The task scheduling method includes: after a task node is added to a baseline, the upstream task node of the task node is added to the baseline; the initial priorities of the task node, the upstream task node and the baseline are compared to determine the highest priority within the baseline, and the highest priority is determined as the target priority of the task node and the upstream task node; and task scheduling is performed for the task node and the upstream task node according to the target priority.
[0038] Compared with the traditional task scheduling method, after the target task node is added to the target baseline, the scheduling platform of the present application will automatically identify and add the current target upstream task node of the target task node to the target baseline, and then select the highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node. Since the target task node can only be executed after its current target upstream task node is executed, that is, the execution of the target task node depends on the execution of its current target upstream task node, The target priority is used as the real priority of the target task node and the current target upstream task node when scheduling. Making the real priorities of the two the same can ensure that the dependency relationship between the target task node and the current target upstream task node can be executed smoothly. At the same time, because the target priority is the highest priority among the first initial priority, the second initial priority and the belonging priority, it avoids the situation where the execution order of the target task node is affected by the second initial priority of the current target upstream task node being lower than the first initial priority of the target task node. By comprehensively comparing the belonging priorities of the baseline, it can ensure that the target task node and the current target upstream task node can obtain sufficient resources for scheduling.
[0039] Therefore, in the subsequent scheduling, the target task node and the current target upstream task node will be executed in order and resource allocated based on the target priority. In this way, the big data task scheduling platform can comprehensively consider the initial priority of the task, the initial priority of the baseline and the dependency relationship between tasks, determine the real priority of the task during scheduling, and reasonably allocate computing resources according to its real priority, so as to avoid high-priority tasks affecting the execution of low-priority tasks, and avoid low-priority tasks upstream of high-priority tasks affecting the execution of high-priority tasks, and ensure that tasks can be executed in a reasonable order, thereby improving the resource utilization and overall performance of the scheduling platform when scheduling tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the device structure of the hardware operating environment of the terminal device involved in the embodiment of the present application;
[0041] Figure 2 This is a flowchart of the first embodiment of the task scheduling method of the present application;
[0042] Figure 3 Add a schematic diagram for the baseline task involved in the first embodiment of the task scheduling method of this application;
[0043] Figure 4 A schematic diagram of the process of manually reviewing and creating a request involved in an embodiment of the task scheduling method of the present application;
[0044] Figure 5 A schematic diagram of a process for calculating target priority involved in an embodiment of a task scheduling method of the present application;
[0045] Figure 6 A flowchart of task weight calculation involved in an embodiment of a task scheduling method of the present application;
[0046] Figure 7 This is a functional module diagram of an embodiment of a task scheduling device of the present application.
[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0051] In this application, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0052] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0053] An embodiment of the present application provides a terminal device.
[0054] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment of the terminal device involved in the embodiment of the present application.
[0055] In this embodiment, the terminal device may be a computer, a server, a cloud server or other device.
[0056] like Figure 1As shown, in the hardware operating environment of the terminal device, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0057] Those skilled in the art will understand that Figure 1 The terminal device structure shown in the figure does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0058] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a task scheduling program.
[0059] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the task scheduling program stored in the memory 1005 and perform the following operations:
[0060] After adding a target task node in a task node set to a target baseline, adding a current target upstream task node of the target task node to the target baseline, wherein the target baseline is a baseline in a baseline set corresponding to each priority level;
[0061] Select the highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node;
[0062] Task scheduling is performed on the target task node and the current target upstream task node according to the target priority.
[0063] Optionally, the processor 1001 may also be configured to call a task scheduling program stored in the memory 1005 and perform the following operations:
[0064] After receiving the creation request of the target baseline, determining whether to approve the creation request according to the review information carried in the creation request;
[0065] If it is determined that the creation request is approved, the target baseline is created, and the target task node corresponding to the creation request is added to the target baseline.
[0066] Optionally, when the target baseline is the first priority baseline, the processor 1001 may also be configured to call a task scheduling program stored in the memory 1005 and perform the following operations:
[0067] After receiving the creation request of the first priority baseline, parsing the audit information carried in the creation request to obtain the target task node to be added to the first priority baseline;
[0068] Obtaining the importance of the target task node;
[0069] Determining the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node;
[0070] Determine the proportion of task nodes with a first target priority in the department to which the target task node belongs;
[0071] When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the proportion of task nodes is within a preset interval, it is determined that the creation request is approved.
[0072] Optionally, the processor 1001 may also be configured to call a task scheduling program stored in the memory 1005 and perform the following operations:
[0073] Real-time monitoring of changes in the blood relationship of the target task node;
[0074] The current target upstream task node of the target task node is determined according to the change of the blood relationship, the current target upstream task node is added to the target baseline, and the historical target upstream task node of the target task node is removed from the target baseline.
[0075] Optionally, the processor 1001 may also be configured to call a task scheduling program stored in the memory 1005 and perform the following operations:
[0076] For a first task node in the task node set, query the number of leaf task nodes of the first task node;
[0077] Multiplying the predicted task execution time of the first task node by the number of the leaf task nodes to obtain a first task weight of the first task node;
[0078] If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then the first task weight and the second task weight of the second task node are compared;
[0079] If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
[0080] Optionally, the processor 1001 may also be configured to call a task scheduling program stored in the memory 1005 and perform the following operations:
[0081] If the running state of the first task node is a stable running state, determining the average execution time of the first task node within a preset time range as the predicted task execution time of the first task node;
[0082] If the motion state of the first task node is the initial running state, the trial run execution time of the first task node during the trial run is determined as the predicted task execution time of the first task node.
[0083] Based on the above hardware structure, the overall concept of each embodiment of the task scheduling method of the present application is proposed.
[0084] In an embodiment of the present application, in a large-scale big data task scheduling platform, the number of tasks is generally large (ranging from tens of thousands to hundreds of thousands) and the cluster load is high. The platform system will determine the order of resource allocation based on the priority of the task. The ideal task priority distribution is a pyramid structure, with the priority decreasing from low to high and the number of tasks decreasing in sequence.
[0085] At present, in the scheduling platform, users judge the importance of tasks and set priorities for tasks, such as setting P0 priority for the most important tasks, P1 priority for important tasks, and P2 and P3 priorities for other tasks, to ensure that important tasks can obtain sufficient resources. However, in the actual management process, users can set task priorities freely, and most users believe that their tasks should be set to P0 or P1 priority. In some cases, if high-priority tasks are continuously submitted to the scheduling platform, low-priority tasks may not be executed for a long time. When low-priority tasks affect the execution of high-priority tasks, it will also cause confusion in the execution order of tasks, ultimately leading to a decrease in resource utilization of the scheduling platform and a decrease in overall performance.
[0086] In summary, how to enable the big data task scheduling platform to reasonably allocate computing resources according to the actual task priority has become a technical problem that needs to be solved urgently in this field.
[0087] In response to the above problems, an embodiment of the present application proposes a task scheduling method, which includes: after a task node is added to a baseline, the upstream task node of the task node is added to the baseline; comparing the initial priorities of the task node, the upstream task node and the baseline to determine the highest priority within the baseline, and determining the highest priority as the target priority of the task node and the upstream task node; and scheduling tasks for the task node and the upstream task node according to the target priority.
[0088] Compared with traditional task scheduling methods, the embodiment of the present application will automatically identify and add the upstream task nodes of the task node to the baseline after the task node is added to the baseline to ensure that the dependencies between tasks can be executed smoothly. Then, the initial priorities set by these task nodes, upstream task nodes and the baseline itself are compared. After the comparison is completed, the highest priority in the baseline is determined, and the highest priority is determined as the target priority of the task node and the current target upstream task node, and tasks are scheduled according to the target priority, so that these tasks will be executed in sequence and resource allocation based on the target priority during subsequent scheduling and execution. In this way, the big data task scheduling platform can comprehensively consider the priority of tasks and the dependency of tasks, reasonably allocate computing resources according to the actual task priority, ensure that tasks can be executed in a reasonable order, and thus improve the operating efficiency of task scheduling and the quality of task completion.
[0089] Based on the above-mentioned overall concept of the task scheduling method of the present application, various embodiments of the task scheduling method of the present application are proposed.
[0090] Please refer to Figure 2 , Figure 2 This is a flowchart of the first embodiment of the task scheduling method of the present application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0091] In this embodiment, for ease of understanding and explanation, a big data task scheduling platform is used as the direct execution subject in this embodiment, hereinafter referred to as the scheduling platform, to explain the task scheduling method of this application.
[0092] like Figure 2 As shown, in this embodiment, the task scheduling method of the present application may include:
[0093] Step S10: After adding the target task node in the task node set to the target baseline, the current target upstream task node of the target task node is added to the target baseline, wherein the target baseline is a baseline in the baseline set corresponding to each priority level.
[0094] It should be noted that, in this embodiment, the baseline is a management unit of a group of nodes, that is, a node grouping. There are one or more groups of dependencies between the task nodes in the baseline, and the baseline set contains baselines corresponding to different priorities; the task node set refers to a set of task nodes submitted to the scheduling platform, the target task node is one or more task nodes in the task node set, the current target upstream task node refers to the task node executed before the target task node, and it has a direct or indirect dependency relationship with the target task node. The current target upstream task node of a target task node can be one or more.
[0095] In this embodiment, after the target task node is added to the target baseline, the scheduling platform will first identify and obtain all current target upstream task nodes of the target task node. Once the current target upstream task nodes are identified, the platform will automatically add them to the corresponding target baseline, ensuring that the task nodes in the target baseline include not only the currently added target task nodes, but also the current target upstream task nodes that have a dependency relationship with the target task nodes, thereby ensuring the integrity and orderliness of task execution.
[0096] For example, Figure 3 As shown, the target task nodes added to the target baseline are Task D and Task E. The scheduling platform will identify Task B and Task A, the current target upstream task nodes of Task D and Task E, and automatically add Task B and Task A to the target baseline.
[0097] Step S20: Select the highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node.
[0098] In this embodiment, after adding the target task node and its current target upstream task node to the target baseline, the scheduling platform will confirm the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, wherein the initial priority is the priority set by the user when the task is created or modified, the first initial priority is the priority set by the target task node when it is created or modified, the second initial priority is the priority set by the current target upstream task node when it is created or modified, and the priority of the target baseline refers to the priority set by the user when the baseline is created or modified. The scheduling platform will compare these priorities to determine the highest priority with the highest priority in the baseline, which represents the utmost importance and urgency of task execution in the current baseline. After determining the highest priority, the scheduling platform will determine the highest priority as the target priority of the target task node and the current target upstream task node, that is, the target task node and the current target upstream task node will use the highest priority as the basis for their own execution order in subsequent task scheduling.
[0099] Step S30: Schedule tasks for the target task node and the current target upstream task node according to the target priority.
[0100] In this embodiment, the scheduling platform will sort the task nodes in the task node set according to the determined target priority, that is, the task nodes added to the baseline in the task node set can be regarded as the above-mentioned target task nodes or the current target upstream task nodes to perform the above steps, and each task node obtains its own target priority and is sorted according to its own target priority. After the sorting is completed, the scheduling platform will schedule the tasks according to the sorting results. Specifically, during the scheduling process, the scheduling platform will consider the task dependencies, resource requirements, and other preset constraints to ensure that the tasks can be executed in the correct order and priority.
[0101] It should be noted that in this embodiment, massive tasks may be added to multiple different baselines. If the scheduling platform detects that there are changes in the baseline to which the task belongs, changes in priority, or resource conflicts during the task execution process, it will dynamically adjust the task scheduling according to preset rules and strategies to ensure efficient execution of the task.
[0102] In an embodiment of the present application, after the target task node in the task node set is added to the target baseline, the current target upstream task node of the target task node is added to the target baseline, wherein the target baseline is a baseline in the baseline set corresponding to each priority level; the highest priority is selected from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority level of the target baseline, and the highest priority is determined as the target priority of the target task node and the current target upstream task node; and tasks are scheduled for the target task node and the current target upstream task node according to the target priority.
[0103] In this way, the embodiment of the present application introduces the concept of baseline when determining the priority of the task node. The baseline is a management unit of a group of task nodes, that is, a node grouping. There are one or more groups of dependencies between the task nodes in the baseline. After the target task node is added to the target baseline, the scheduling platform will automatically identify and add the current target upstream task node of the target task node to the target baseline. Then, the highest priority is selected from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, and the highest priority is determined as the target priority of the target task node and the current target upstream task node. Since the target task node can only be executed after its current target upstream task node is executed, that is, the target task The execution of a node depends on the execution of its current target upstream task node. Therefore, the target priority is used as the real priority of the target task node and the current target upstream task node when scheduling, so that the real priorities of the two are the same, which can ensure that the dependency relationship between the target task node and the current target upstream task node can be executed smoothly. At the same time, because the target priority is the highest priority among the first initial priority, the second initial priority and the belonging priority, it avoids the situation where the execution order of the target task node is affected by the second initial priority of the current target upstream task node being lower than the first initial priority of the target task node. By comprehensively comparing the belonging priorities of the baseline, it can ensure that the target task node and the current target upstream task node can obtain sufficient resources for scheduling.
[0104] Therefore, in the subsequent scheduling, the target task node and the current target upstream task node will be executed in order and resource allocated based on the target priority. In this way, the big data task scheduling platform can comprehensively consider the initial priority of the task, the initial priority of the baseline and the dependency relationship between tasks, determine the real priority of the task during scheduling, and reasonably allocate computing resources according to its real priority, so as to avoid high-priority tasks affecting the execution of low-priority tasks, and avoid low-priority tasks upstream of high-priority tasks affecting the execution of high-priority tasks, and ensure that tasks can be executed in a reasonable order, thereby improving the resource utilization and overall performance of the scheduling platform when scheduling tasks.
[0105] Furthermore, based on the above-mentioned first embodiment of the task scheduling method of the present application, a second embodiment of the task scheduling method of the present application is proposed.
[0106] In this embodiment, before the above step S10: adding the current target upstream task node of the target task node to the target baseline, the task scheduling method of the present application may further include:
[0107] Step S40: After receiving the target baseline creation request, determine whether to approve the creation request based on the review information carried in the creation request.
[0108] In this embodiment, the scheduling platform receives a request for creating a target baseline, which is usually initiated by a user or a specific application and contains the audit information required for creating the target baseline. The scheduling platform will parse the received creation request, specifically the audit information in the creation request, which includes the priority setting for creating the target baseline, the task nodes included in the target baseline, the relevant information of the task nodes, the information of the department creating the target baseline, etc. Then, the parsed audit information is judged to see whether it meets the creation conditions of the target baseline, and based on the judgment result, it is decided whether to approve the creation request of the target baseline. If the audit information meets all the creation conditions, the request is approved, otherwise, the request is rejected, and the corresponding rejection information or prompt can be returned.
[0109] It should be noted that the target baseline creation step is used when the baseline of the corresponding level has not been created. After the target baseline is created, the user can add the task node to the created target baseline according to the actual application needs, so that the task nodes added to the same target baseline have the same priority. When the task node is added to the target baseline, the scheduling platform receives a task node joining request for the target baseline. The request is usually initiated by the user or a specific application, and contains the audit information required for the task node to join the target baseline. Only when the audit information of the task node meets the joining conditions of the target baseline can the task node be added to the target node.
[0110] Further, in a feasible embodiment, when the target baseline is a first priority baseline, step S40 includes:
[0111] Step S401: after receiving a request to create a first priority baseline, a target task node to be added to the first priority baseline is obtained by parsing the audit information carried in the creation request.
[0112] It should be noted that the target baseline can be set as the first priority baseline, namely the PO baseline, according to the actual needs of the user. In another feasible embodiment, the target baseline can also be set as other priority baselines and reviewed according to their corresponding creation conditions.
[0113] In this embodiment, after receiving a request for creating a first priority baseline, the scheduling platform parses the audit information carried in the request and determines the target task node corresponding to the creation request based on the parsing result. The target task node is the task node that the requester hopes to add to the first priority baseline. The number of target task nodes can be one or more, which is selected by the applicant based on the actual application scenario. In this implementation, the number of target task nodes is not specifically limited.
[0114] Step S402: Obtain the importance of the target task node.
[0115] In this embodiment, the scheduling platform further obtains the importance of the target task node from the analysis results in the audit information, where the importance assessment can be based on multiple factors, such as the role, purpose, urgency, impact on the business, resource consumption, etc. of the target task node. The scheduling platform will comprehensively consider these factors and assign a corresponding importance value to the target task node.
[0116] Step S403: Determine the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node.
[0117] In this embodiment, the scheduling platform will analyze the blood relationship of the target task node, where the blood relationship refers to the dependency and execution order relationship between the target task node and other task nodes. The scheduling platform will calculate based on the blood relationship of the target task node how many related task nodes will be indirectly added to the first priority baseline after the target task node is added to the first priority baseline, so as to ensure that when creating the first priority baseline, too many tasks will not be promoted to the first priority due to the addition of a certain task node, thereby affecting the overall task scheduling effect.
[0118] Step S404: Determine the proportion of task nodes with a target priority of the first priority in the department to which the target task node belongs.
[0119] It should be noted that, in this embodiment, the department to which the target task node belongs refers to the department that submits the target task node, and the department has the authority to submit, modify and create a target baseline for the target task node.
[0120] In this embodiment, the scheduling platform will consider the task priority distribution of the department to which the target task node belongs, count the number of task nodes with the first priority in the department, and calculate the proportion of these task nodes in the department to which they belong, so that the scheduling platform can understand the department's demand for high-priority tasks, so as to make comprehensive considerations when creating the baseline.
[0121] Step S405: When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the task node ratio is within a preset interval, determine to approve the creation request.
[0122] In this embodiment, the scheduling platform will comprehensively evaluate the three factors of the importance of the task node, the number of tasks added to the baseline, and the proportion of the task nodes to determine whether the preset conditions are met. The preset conditions may include that the importance of the task node exceeds a preset first threshold, the number of tasks added to the baseline is lower than a preset second threshold, the proportion of the task nodes is within a reasonable preset range, etc. Only when these conditions are met, the scheduling platform will determine to agree to the creation request and allow the specified target task node to be added to the newly created first priority baseline. Otherwise, the scheduling platform will reject the request and give corresponding prompts or suggestions.
[0123] It should be noted that the scheduling platform divides task priorities into multiple levels, usually preferably into four levels, namely: very high (P0), high (P1), medium (P2), and low (P3). In this embodiment, the first priority is P0. In order to prevent an excessive number of P0 tasks, which would lead to an unreasonable priority distribution, when creating or modifying a task, only P1, P2, and P3 priorities can be set for the task. If the user wants to set a task to P0 priority, the P0 priority baseline, that is, the first priority baseline, must be added to the task. If the task is added to the first priority baseline, the above-mentioned creation request review process must be carried out to ensure the rationality of the priority distribution by limiting the number of high-priority tasks when creating a task.
[0124] It should also be noted that in order to further ensure the rationality of priority distribution, the scheduling platform can preset a threshold value for the proportion of tasks in each task priority file in each department to the total task volume. When the task volume in any task priority file exceeds the corresponding proportion threshold, the person in charge of the department will be prompted to manage the task priorities to avoid an imbalance in priority distribution.
[0125] In addition, in another feasible embodiment, the above-mentioned creation request review process can also be reviewed manually. Specifically, after receiving the creation request of the first priority baseline, the scheduling platform parses the creation request and displays it to the corresponding baseline person in charge for review. The baseline person in charge determines whether to agree to the creation request based on the review information carried in the creation request. To ensure the rationality of the priority distribution, the baseline person in charge and the persons in charge of all upstream tasks of the task node corresponding to the request can review them in turn. Only when all the reviews are passed, it is determined that the creation request is approved, and the scheduling platform creates the first priority baseline. Among them, the review of the baseline creation is conducted by platform review or manual review, specifically automatic platform review, manual review, or a combination of the two. It can be selected according to the actual application scenario, and this is not specifically limited in this embodiment.
[0126] In this way, in this embodiment, by setting the first priority baseline access to join the review mechanism, detailed information is provided on the task priority distribution and the proportion of each priority is controlled, so as to effectively and reasonably control the priority distribution of tasks, and ensure that critical or urgent tasks are given priority, thereby maximizing the resource utilization efficiency and task scheduling efficiency.
[0127] For example, in a feasible embodiment, the process of manually reviewing the creation request is as follows: Figure 4 As shown in the figure, the user initiates the process of adding a task to the first priority baseline, and then the baseline manager reviews it. If the review fails, the mounting fails and the process ends. The manager can determine whether the review is passed based on the review information. The review information is as follows: a: the role or purpose of the current task, the urgency or importance, to explain the sufficient reasons for adding the task to the first priority baseline; b: the number of first priority tasks whose priority is upgraded to the first priority task due to the task blood relationship after the current task is added to the first priority baseline; c: the percentage of first priority tasks in the current department; after the baseline manager reviews it, all upstream task managers need to review it. If the manager of one of the tasks fails to review it, the mounting fails and the process ends; if all reviews pass, the mounting is successful and the process ends.
[0128] Step S50: If it is determined that the creation request is approved, a target baseline is created, and the target task node corresponding to the creation request is added to the target baseline.
[0129] In this embodiment, if the scheduling platform determines that it agrees to the request to create the target baseline, it executes the creation operation of the target baseline and adds the target task node specified in the creation request to the newly created target baseline, that is, establishes an association relationship between the target baseline and the target task node in the internal data structure of the scheduling platform to ensure that they can be managed and operated as a whole.
[0130] Further, in a feasible embodiment, the above step S10: adding the current target upstream task node of the target task node to the target baseline includes:
[0131] Step S101: monitor changes in the blood relationship of the target task node in real time.
[0132] It should be noted that, in this embodiment, the blood relationship refers to the dependency relationship between tasks, and this dependency relationship can be the dependency on the execution order of tasks, or the dependency on data input and output of tasks.
[0133] In this embodiment, the scheduling platform monitors the changes in the blood relationship of the target task nodes in real time. When the blood relationship of the target task nodes changes, the execution order and priority of the tasks may also need to be adjusted accordingly.
[0134] Step S102: Determine the current target upstream task node of the target task node according to the change of the blood relationship, add the current target upstream task node to the target baseline, and remove the historical target upstream task node of the target task node from the target baseline.
[0135] In this embodiment, the scheduling platform determines the current target upstream task node of the target task node based on the monitored changes in blood relationship, and adds the determined current target upstream task node to the target baseline, and removes the historical target upstream task node of the target task node from the target baseline, so as to further compare the respective priorities of the target task node, the current target upstream task node and the target baseline to determine the highest priority within the baseline, and determine the highest priority as the target priority of the task node and the current target upstream task node.
[0136] It should also be noted that in this embodiment, because the frequency of changes in the task lineage relationship on the baseline is relatively high, tasks will be added to the baseline from time to time, or removed from the baseline. Therefore, the target priority confirmation of the task needs to be dynamically updated. This embodiment provides two target priority dynamic update methods: one is a scheduled update, such as updating every 5 minutes; the other is a real-time update. Once the lineage relationship between tasks changes, the task target priority update action is triggered, and the task target priority dynamic update begins.
[0137] Specifically, in a feasible embodiment, as Figure 5As shown in the figure, the scheduling platform queries all baselines and adds the baselines obtained by the query to the list; then, the baselines in the baseline list are traversed. If the list is empty, the process ends; if the list is not empty, all leaf tasks bound to the baselines in the list are queried, and the task lineage relationships of the upstream full links of these leaf tasks are parsed to obtain the lineage relationship graph of each task in the baseline. The graph is composed of one or more DAGs (Directed Acyclic Graphs) according to task dependencies and business scenarios; then, starting from the leaf task, the entire lineage relationship graph is traversed upward. During the traversal, the task priority is calculated, and the final target priority of the task is max (task priority, baseline priority), that is, the maximum priority is taken from the initial priorities of the task node, the upstream task node and the baseline as the target priority; then, it is determined whether the task priority calculation in the entire lineage relationship graph is completed. If not, the lineage relationship graph traversal will continue. After all are completed, the current baseline will be removed from the baseline list until the target priorities of all baselines in the baseline list are calculated.
[0138] In addition, when the dependency between the upstream task node and the task node in the baseline is disconnected, the blood relationship of the task node changes. Then, after the next target priority calculation cycle, the priority of the upstream task node with the disconnected dependency automatically changes from the target priority to its initial priority. If the upstream task node is added to another baseline, it participates in the target priority calculation of the other baseline and generates a new target priority.
[0139] In this way, in this embodiment, the task priority is dynamically adjusted according to the changes in the task's blood relationship, so that the task priority is quickly adjusted based on the task dependency link, thereby significantly improving the overall running speed of task scheduling from the link perspective, ensuring that critical tasks or link baselines are given priority.
[0140] Furthermore, in a feasible embodiment, the task scheduling method of the present application may also include:
[0141] Step A10: for the first task node in the task node set, query the number of leaf task nodes of the first task node.
[0142] It should be noted that, in this embodiment, the first task node can be any task node in the task node set, such as the above-mentioned target task node and the current target upstream task node can both be regarded as the first task node; the leaf task node refers to a node that is no longer connected to any task node, that is, the end task node in the task blood relationship diagram. In big data development scenarios, leaf tasks are usually important result data in the form of daily reports, emails or other forms, which are often the data that the company's decision-makers pay attention to. Therefore, the more leaf task nodes a task has, the larger the range of result data affected by the task, and therefore the higher the weight of the task.
[0143] In this embodiment, the scheduling platform can use the constructed task blood relationship graph or database to perform query operations to find all leaf task nodes that are directly or indirectly connected to the first task node. For each leaf task node queried, the scheduling platform will traverse and count to ensure that there is no repeated counting, and then store the calculated number of leaf task nodes for use in subsequent calculation of task weights.
[0144] Step A20: multiply the predicted task execution time of the first task node and the number of leaf task nodes to obtain the first task weight of the first task node.
[0145] In this embodiment, the scheduling platform obtains the predicted execution time of the first task node, and uses a predefined weight calculation formula to calculate the task weight of the upstream task node based on the predicted execution time of the task and the number of leaf task nodes. The task weight represents the impact range of the task.
[0146] For example, assuming that the predicted execution time of the first task node is T hours and the number of leaf task nodes is N, the weight calculation formula for the first task node is weight W=T*N, that is, the task predicted execution time is multiplied by the number of leaf task nodes to obtain the task weight of the first task node.
[0147] Furthermore, in a feasible embodiment, before step A20, the task scheduling method of the present application may further include:
[0148] Step A50: If the running state of the first task node is a stable running state, the average execution time of the first task node within a preset time range is determined as the predicted task execution time of the first task node.
[0149] Step A60: If the motion state of the first task node is the initial running state, the trial run execution time of the first task node during the trial run is determined as the task predicted execution time of the first task node.
[0150] It should be noted that, in this embodiment, if the number of executions of a task node in the past period of time (such as the last week or month) reaches a preset threshold, and key indicators such as the duration of each execution and the success rate fluctuate little, then the task node can be considered to be in a stable operating state; if the task node is newly added or modified recently, or its historical execution data is insufficient to be judged as a stable operating state, then the task node can be considered to be in an initial operating state.
[0151] In this embodiment, the scheduling platform determines the operating status of the first task node based on the historical operating data of the first task node, including the timestamp of each execution, the execution duration, the execution result and other information. For the first task node in a stable operating state, the scheduling platform determines the average execution duration of the first task node within a preset time range as the predicted task execution duration of the first task node. The preset time range can be 7 days or 14 days, etc., and can be set according to the actual application scenario. This embodiment does not make specific restrictions on this. For the first task node in the initial operating state, the scheduling platform determines the trial operation execution duration of the first task node during the trial operation as the predicted task execution duration of the first task node. After the node runs stably, the predicted task execution duration is calculated using the calculation method of the stable operating state.
[0152] Step A30: If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then compare the first task weight and the second task weight of the second task node.
[0153] Step A40: If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
[0154] It should be noted that, in this embodiment, the submission time refers to the time when the task node is submitted to the scheduling platform to request task scheduling. The submission time can be a specific time period, and the length of the time period can be adjusted according to the actual application scenario. This embodiment does not make specific limitations on this.
[0155] In this embodiment, when the first target priority of the first task node is the same as the second target priority of the second task node in the scheduling platform, and the submission time of the two is also the same, the scheduling platform will compare the first task weight of the first task node and the second task weight of the second task node, and give priority to the task with higher task weight, where the second task node refers to the task node other than the first task node in the task node set.
[0156] For example, in a feasible embodiment, the calculation process of task weight is as follows: Figure 6As shown in the figure, first, the scheduling platform queries all baselines and adds the baselines obtained by the query to the list; then, the baselines in the baseline list are traversed. If the list is empty, the process ends. If there is a baseline in the list, all leaf task nodes bound to the current baseline are queried, and then the task lineage of the entire upstream link in these leaf task nodes is parsed to obtain the entire lineage relationship graph; then, the entire lineage relationship graph is traversed upward from the leaf task node; the predicted execution time of the upstream task node is calculated, for example, the average running time of one week is used; during the traversal process, the task weight is calculated, which is equal to the predicted execution time of the current task multiplied by the number of leaf task nodes of the current task, and the task weight is calculated. Figure 3 For example, if the predicted running time of task A is 1 hour and the task has 3 leaf tasks D, E, and F, then the task weight of task A is the predicted execution time * the number of leaf task nodes = 3. Then, the scheduling platform determines whether the task weight calculation in the entire blood relationship graph is completed. If it is not completed, it will continue to traverse. If it is completed, the current baseline will be removed from the baseline list until the task weights in all baselines are calculated.
[0157] In addition, if there are upstream task nodes with the same target priority, submission time, and task weight, the scheduling platform can consider other factors to make scheduling decisions, such as the task submitting user, the task's historical execution record, etc., to ensure the fairness and efficiency of task scheduling.
[0158] In this way, in the scenario where the number of tasks is large and the cluster load is high, even if the task priority is already the highest priority, there will still be a large number of tasks queued. Compared with the traditional technology that adopts the first-in-first-out queuing strategy, the disadvantage of this solution is that the task may be stuck on a task that has a high priority but a small impact range, resulting in low overall concurrency and ultimately a long overall task execution time. In this embodiment, the execution order of tasks with the same priority and submitted at the same time will be sorted according to the size of the impact range of the task, that is, the task weight, so that tasks with a large impact range are executed first, thereby optimizing the overall performance of task scheduling.
[0159] In addition, an embodiment of the present application also provides a task scheduling device.
[0160] Please refer to Figure 7 , the task scheduling device of this application includes:
[0161] A baseline adding module 10 is used to add a current target upstream task node of the target task node to the target baseline after adding the target task node in the task node set to the target baseline, wherein the target baseline is a baseline in the baseline set corresponding to each priority level;
[0162] A priority determination module 20, configured to select a highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node;
[0163] The task scheduling module 30 is used to schedule tasks for the target task node and the current target upstream task node according to the target priority.
[0164] Optionally, the task scheduling device of the present application further includes:
[0165] The baseline creation module is used to determine whether to approve the creation request based on the audit information carried in the creation request after receiving the creation request of the target baseline; if it is determined that the creation request is approved, the target baseline is created and the target task node corresponding to the creation request is added to the target baseline.
[0166] Optionally, when the target baseline is a first priority baseline, the baseline creation module is further configured to:
[0167] After receiving the creation request of the first priority baseline, parsing the audit information carried in the creation request to obtain the target task node to be added to the first priority baseline;
[0168] Obtaining the importance of the target task node;
[0169] Determining the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node;
[0170] Determine the proportion of task nodes with a first target priority in the department to which the target task node belongs;
[0171] When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the proportion of task nodes is within a preset interval, it is determined that the creation request is approved.
[0172] Optionally, the baseline adding module 10 is further used for:
[0173] Real-time monitoring of changes in the blood relationship of the target task node;
[0174] The current target upstream task node of the target task node is determined according to the change of the blood relationship, the current target upstream task node is added to the target baseline, and the historical target upstream task node of the target task node is removed from the target baseline.
[0175] Optionally, the task scheduling module 30 is further used to:
[0176] For a first task node in the task node set, query the number of leaf task nodes of the first task node;
[0177] Multiplying the predicted task execution time of the first task node by the number of the leaf task nodes to obtain a first task weight of the first task node;
[0178] If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then the first task weight and the second task weight of the second task node are compared;
[0179] If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
[0180] Optionally, the task scheduling device of the present application further includes:
[0181] An execution time prediction module is used to determine the average execution time of the first task node within a preset time range as the predicted task execution time of the first task node if the running state of the first task node is a stable running state; if the motion state of the first task node is an initial running state, determine the trial run execution time of the first task node during the trial run as the predicted task execution time of the first task node.
[0182] Among them, the functional implementation of each module in the above-mentioned task scheduling device corresponds to each step in the above-mentioned task scheduling method embodiment, and its functions and implementation processes are no longer repeated here one by one.
[0183] In addition, the present application also proposes a storage medium on which a task scheduling program is stored. When the task scheduling program is executed by a processor, the steps of the task scheduling method of the present application as described above are implemented.
[0184] The specific embodiments of the storage medium of the present application are basically the same as the embodiments of the above-mentioned task scheduling method, and will not be described in detail here.
[0185] In addition, an embodiment of the present invention further provides a computer program product, including a task scheduling program, which implements the steps of the task scheduling method described above when executed by a processor.
[0186] The specific implementation manner of the computer program product of the present invention is basically the same as the various embodiments of the above-mentioned task scheduling method, and will not be repeated here.
[0187] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0188] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0190] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A task scheduling method, characterized in that: The task scheduling method comprises: After adding a target task node in a task node set to a target baseline, adding a current target upstream task node of the target task node to the target baseline, wherein the target baseline is a baseline in a baseline set corresponding to each priority level; Select the highest priority from the first initial priority of the target task node, the second initial priority of the current target upstream task node, and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node; Performing task scheduling on the target task node and the current target upstream task node according to the target priority; Before the step of adding the current target upstream task node of the target task node to the target baseline, the method further includes: After receiving the creation request of the target baseline, determining whether to approve the creation request according to the review information carried in the creation request; If it is determined that the creation request is approved, the target baseline is created, and the target task node corresponding to the creation request is added to the target baseline; When the target baseline is a first priority baseline, after receiving the creation request of the target baseline, the step of determining whether to approve the creation request according to the review information carried in the creation request includes: After receiving the creation request of the first priority baseline, parsing the audit information carried in the creation request to obtain the target task node to be added to the first priority baseline; Obtaining the importance of the target task node; Determining the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node; Determine the proportion of task nodes with a first target priority in the department to which the target task node belongs; When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the proportion of task nodes is within a preset interval, determining to approve the creation request; The method further comprises: For a first task node in the task node set, query the number of leaf task nodes of the first task node; Multiplying the predicted task execution time of the first task node by the number of the leaf task nodes to obtain a first task weight of the first task node; If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then the first task weight and the second task weight of the second task node are compared; If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
2. The task scheduling method according to claim 1, characterized in that: The step of adding the current target upstream task node of the target task node to the target baseline includes: Real-time monitoring of changes in the blood relationship of the target task node; The current target upstream task node of the target task node is determined according to the change of the blood relationship, the current target upstream task node is added to the target baseline, and the historical target upstream task node of the target task node is removed from the target baseline.
3. The task scheduling method according to claim 1, characterized in that: Before the step of multiplying the predicted task execution time of the first task node by the number of leaf task nodes to obtain the first task weight of the first task node, the method further includes: If the running state of the first task node is a stable running state, determining the average execution time of the first task node within a preset time range as the predicted task execution time of the first task node; If the motion state of the first task node is the initial running state, the trial run execution time of the first task node during the trial run is determined as the predicted task execution time of the first task node.
4. A task scheduling device, characterized in that: The task scheduling device comprises: A baseline adding module, for, after adding a target task node in a task node set to a target baseline, adding a current target upstream task node of the target task node to the target baseline, wherein the target baseline is a baseline in the baseline set corresponding to each priority level; A priority determination module, used to select the highest priority among the first initial priority of the target task node, the second initial priority of the current target upstream task node and the priority of the target baseline, and determine the highest priority as the target priority of the target task node and the current target upstream task node; A task scheduling module, used for scheduling tasks for the target task node and the current target upstream task node according to the target priority; The task scheduling device also includes: A baseline creation module is used to, after receiving a creation request for the target baseline, determine whether to approve the creation request based on the audit information carried in the creation request; if it is determined that the creation request is approved, create the target baseline and add the target task node corresponding to the creation request to the target baseline; When the target baseline is a first priority baseline, the baseline creation module is further configured to: After receiving the creation request of the first priority baseline, parsing the audit information carried in the creation request to obtain the target task node to be added to the first priority baseline; Obtaining the importance of the target task node; Determining the number of tasks to be added to the first priority baseline according to the blood relationship of the target task node; Determine the proportion of task nodes with a first target priority in the department to which the target task node belongs; When the importance exceeds a preset first threshold, the number of tasks is lower than a preset second threshold, and the proportion of task nodes is within a preset interval, determining to approve the creation request; The task scheduling module is also used for: For a first task node in the task node set, query the number of leaf task nodes of the first task node; Multiplying the predicted task execution time of the first task node by the number of the leaf task nodes to obtain a first task weight of the first task node; If the first target priority of the first task node is the same as the second target priority of the second task node in the task node set, and the submission time of the first task node is the same as the submission time of the second task node, then the first task weight and the second task weight of the second task node are compared; If the first task weight is greater than the second task weight, the first task node is preferentially scheduled.
5. A terminal device, characterized in that: The terminal device comprises: a memory, a processor, and a task scheduling program stored in the memory and executable on the processor, wherein the task scheduling program implements the steps of the task scheduling method according to any one of claims 1 to 3 when executed by the processor.
6. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a task scheduling program is stored on the storage medium. When the task scheduling program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 3 are implemented.
7. A computer program product, characterized in that The computer program product comprises a task scheduling program, and when the task scheduling program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 3 are implemented.
