Task scheduling method, device, equipment and storage medium

By analyzing the task running table and the scheduling time of the scheduling unit, the task scheduling unit is reallocated, which solves the problem of unreasonable allocation of the traditional task scheduler, improves the efficiency and compatibility of task scheduling, and reduces operation and maintenance costs.

CN112395088BInactive Publication Date: 2024-08-27CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011284197.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-17
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional task schedulers lack intelligence in task allocation. As a result, maintenance personnel need to invest a lot of manpower to analyze whether the scheduler allocation is reasonable under high task loads. It is also difficult to find problems with unreasonable scheduler allocation, which increases operating costs.

Method used

By obtaining the task running table and the scheduling duration information of the scheduling unit, it is judged whether the task to be scheduled meets the minimum scheduling unit configuration rules. If not, the target scheduling unit is reassigned to ensure the rationality of task scheduling.

Benefits of technology

It improves the rationality and allocation efficiency of task scheduling, reduces maintenance costs, saves system resources, takes into account the coupling of front and rear tasks, and improves the compatibility and user experience of task scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395088B
    Figure CN112395088B
Patent Text Reader

Abstract

The present invention proposes a task scheduling method, device, equipment and storage medium, wherein the task scheduling method includes obtaining at least one scheduling unit, each of which corresponds to a scheduling duration; obtaining a task running table; obtaining the task to be scheduled and its target scheduling unit; judging whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule based on the running duration included in the running information in the task running table; if not, reallocating the target scheduling unit from the scheduling unit to the task to be scheduled based on the minimum scheduling unit configuration rule; and scheduling the reallocated target scheduling unit to execute the task to be scheduled. Through the above method, it is possible to analyze whether the allocation of scheduling units is reasonable according to the running time of the task, and to allocate appropriate scheduling units to the task to be scheduled when the allocation is unreasonable, thereby improving the rationality of task scheduling and reducing maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operation and maintenance / process optimization technology, and in particular to a task scheduling method, device, equipment and storage medium. Background Art

[0002] Task scheduling is the management of launching, issuing, and running tasks, and is the core work of the data system. Traditional schedulers only manage the operation of tasks, and the assignment of tasks depends on the operator to assign schedulers to tasks based on experience. Since traditional schedulers only manage the operation, the rationality of the assignment of tasks and schedulers can only be judged manually by maintenance personnel through analyzing the execution of tasks. In the case of a large number of tasks, the workload of maintenance personnel to analyze the execution results of all tasks one by one is very huge. Maintenance personnel generally perform simple analysis and processing of tasks based on task operation errors, so it is usually difficult to find tasks that are not reasonably assigned by the scheduler. It can be seen that it requires a lot of manpower investment to adapt all tasks to the appropriate scheduler, and the operating cost is high, which is not conducive to the construction of data systems. Summary of the invention

[0003] The present invention provides a task scheduling method, device, equipment and storage medium, which can analyze whether the allocation of scheduling units is reasonable according to the running time of the task, and allocate appropriate scheduling units to the tasks to be scheduled when the allocation is unreasonable, so as to improve the rationality of task scheduling and reduce maintenance costs.

[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is: to provide a task scheduling method, the task scheduling method comprising:

[0005] Acquire at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration;

[0006] Obtaining a task running table, wherein the task running table is used to record the running information of the scheduled tasks, and the running information includes the running time of each task execution completion;

[0007] Get the task to be scheduled and its configured target scheduling unit;

[0008] According to the running time included in the running information in the task running table, it is judged whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule, and the minimum scheduling unit configuration rule includes: the scheduling time corresponding to the target scheduling unit configured for the task to be scheduled is greater than or equal to the running time of the task to be scheduled, and the scheduling time corresponding to the target scheduling unit is the smallest among the scheduling units whose scheduling time is greater than or equal to the running time;

[0009] If the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule, reallocating the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule;

[0010] The reallocated target scheduling unit is scheduled to execute the task to be scheduled.

[0011] According to one embodiment of the present invention,

[0012] The reallocating a target scheduling unit for the to-be-scheduled task from the scheduling unit according to the minimum scheduling unit configuration rule comprises:

[0013] Obtain the running time corresponding to the task to be scheduled from the task running table;

[0014] Obtaining the running time range of the task to be scheduled;

[0015] Sort the scheduling units in ascending order according to the scheduling duration of the scheduling units;

[0016] Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit;

[0017] The scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit.

[0018] According to an embodiment of the present invention, obtaining the running time range of the task to be scheduled includes:

[0019] Cluster calculation is performed on the running time of the tasks to be scheduled to obtain the running time range of the tasks to be scheduled.

[0020] According to one embodiment of the present invention, the task scheduling method further includes:

[0021] Acquire task information of the task to be scheduled, wherein the task information includes a predecessor task on which the task to be scheduled depends and a scheduling unit corresponding to the predecessor task;

[0022] The reallocating a target scheduling unit for the to-be-scheduled task from the scheduling unit according to the minimum scheduling unit configuration rule comprises:

[0023] Obtain the running time corresponding to the task to be scheduled from the task running table;

[0024] Obtaining the running time range of the task to be scheduled;

[0025] Sort the scheduling units in ascending order according to the scheduling duration of the scheduling units;

[0026] Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit;

[0027] Comparing the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units and the scheduling duration of the scheduling unit corresponding to the predecessor task;

[0028] If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit;

[0029] If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is smaller than the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

[0030] According to an embodiment of the present invention, after scheduling the reallocated target scheduling unit to execute the task to be scheduled, the method further includes:

[0031] The execution result of the task to be scheduled is obtained, wherein the execution result includes the running time of the task to be scheduled this time, and the execution result is recorded in the task running table as newly added running information.

[0032] According to an embodiment of the present invention, recording the execution result as newly added operation information in the task operation table further includes:

[0033] When the execution time of the task to be scheduled exceeds the execution time range, a task execution timeout alarm is reported.

[0034] According to an embodiment of the present invention, the task scheduling method further includes:

[0035] The running information of the task to be scheduled is displayed to an external display device according to the task running table.

[0036] In addition, in order to solve the above technical problems, the present invention also adopts a technical solution: providing a task scheduling device, the task scheduling device comprising:

[0037] An acquisition module is used to acquire at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration; acquire a task running table, which is used to record the running information of the scheduled tasks, and the running information includes the running duration of each task execution; and acquire the task to be scheduled and its configured target scheduling unit;

[0038] An analysis module is used to determine whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule based on the running time included in the running information in the task running table, and the minimum scheduling unit configuration rule includes: the scheduling time corresponding to the target scheduling unit configured for the task to be scheduled is greater than or equal to the running time of the task to be scheduled, and the scheduling time corresponding to the target scheduling unit is the smallest among the scheduling units whose scheduling time is greater than or equal to the running time;

[0039] an allocation module, configured to reallocate a target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule if the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule;

[0040] The scheduling module is used to schedule the reallocated target scheduling unit to execute the task to be scheduled.

[0041] In addition, to solve the above-mentioned technical problems, the present invention also adopts a technical solution: providing a task scheduling device, the task scheduling device comprising a processor and a memory coupled to the processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the task scheduling method as described in any one of the above-mentioned items.

[0042] In addition, to solve the above technical problems, the present invention also adopts a technical solution: providing a storage medium storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, one or more processors execute the steps of the task scheduling method as described in any of the above items.

[0043] The task scheduling method, device, equipment and storage medium proposed in the present invention analyze whether the target scheduling unit assigned to the task to be scheduled meets the minimum scheduling unit configuration rule based on the running time of the running information corresponding to the task to be scheduled in the task running table, and reconfigure the target scheduling unit when the minimum scheduling unit configuration rule is not met to make the allocation of the target scheduling unit more intelligent and reasonable, thereby reducing the subsequent maintenance investment and facilitating the construction of the data system.

[0044] Furthermore, by obtaining the first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the operating time range from the scheduling unit, and taking the scheduling unit with the smallest scheduling duration in the first scheduling unit as the target scheduling unit, the allocation efficiency of the scheduling unit can be improved and system resources can be saved.

[0045] Furthermore, by comparing the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task to allocate the target scheduling unit, the coupling of the predecessor and predecessor tasks can be taken into account, making task scheduling more stable and improving the compatibility of task scheduling.

[0046] Furthermore, by performing operation analysis on the tasks to be scheduled, an alarm can be issued for abnormal status of the tasks, prompting maintenance personnel to check and locate the problems in a timely manner, thereby improving task scheduling efficiency and reducing operation and maintenance costs.

[0047] Furthermore, by displaying the running information of the task to be scheduled to an external display device, the task scheduling status can be displayed to the outside in a timely manner, and the user experience is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of a task scheduling method according to an embodiment of the present invention;

[0049] Figure 2 is a structural diagram of a task scheduling device according to an embodiment of the present invention;

[0050] Figure 3 is a structural diagram of a task scheduling device according to an embodiment of the present invention;

[0051] Figure 4 It is a schematic diagram of the structure of a storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] 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.

[0053] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0055] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a task scheduling method according to an embodiment of the present invention. According to an embodiment of the present invention, the task scheduling method comprises the following steps:

[0056] Step S101: obtaining at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration.

[0057] Among them, the scheduling unit is a scheduling controller that controls the execution of tasks. According to one embodiment of the present invention, each of the scheduling units may correspond to a scheduling duration, and the scheduling duration is the time for the scheduling unit to execute task scheduling. For example, if the scheduling duration of the scheduling unit is 2 hours, the scheduling unit can schedule the task execution within 2 hours; if the scheduling duration of the scheduling unit is 24 hours, the scheduling unit can schedule the task execution within 24 hours. The scheduling unit can plan different scheduling durations according to different task requirements.

[0058] Step S102: Obtain a task running table, where the task running table is used to record running information of tasks that have been scheduled for execution, and the running information includes the running time of each task execution.

[0059] A task can only obtain system resources for execution after being scheduled by a scheduling unit, so before the task is executed, it is necessary to configure the task into the scheduling unit in order to control the execution of the task. Usually, development and maintenance personnel will assign corresponding scheduling units to tasks based on experience, and execute tasks through the scheduling of the scheduling unit. In this embodiment, each time the scheduling unit completes a schedule, the task configured in the scheduling unit is executed once and generates running information once. The task running table is used to record the running information of the executed tasks, and the running information includes the running time of each task execution.

[0060] Step S103: Obtain the task to be scheduled and its configured target scheduling unit, and determine whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule based on the running duration included in the running information in the task running table. If the target scheduling unit configured for the task to be scheduled does not meet the minimum scheduling unit configuration rule, execute step S104.

[0061] The scheduling unit that relies on experience in configuration may have problems such as the scheduling duration of the scheduling unit not meeting the requirements for task execution, the scheduling duration of the scheduling unit being too long causing waste of system resources, etc. In order to ensure that the task can be executed and completed within the scheduling duration of the scheduling unit and achieve efficient use of resources, in this embodiment, before the task needs to be scheduled for execution again, it can be determined whether the scheduling unit assigned to the task to be scheduled meets the minimum scheduling unit configuration rule. The minimum scheduling unit configuration rule includes: the scheduling duration corresponding to the target scheduling unit configured for the task to be scheduled is greater than or equal to the running duration of the task to be scheduled, and the scheduling duration corresponding to the target scheduling unit is the smallest among the scheduling units whose scheduling duration is greater than or equal to the running duration.

[0062] Step S104: reallocating a target scheduling unit from the scheduling unit for the task to be scheduled according to the minimum scheduling unit configuration rule.

[0063] When the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule, a more suitable target scheduling unit will be automatically allocated to the task to be scheduled.

[0064] Specifically, according to an embodiment of the present invention, step S104 may include the following steps:

[0065] Step S104a: Obtain the running time corresponding to the task to be scheduled from the task running table.

[0066] Specifically, the corresponding running information can be searched in the task running table through the task name, task ID, etc. of the task to be scheduled, and the running duration of the task to be scheduled before is obtained from the running information. It should be noted that if the task to be scheduled is a task that has not been executed before, there is no record of the running information corresponding to the task to be scheduled in the task running table, and the running duration of the task to be scheduled is initially set to a minimum default value, such as a duration of 0.

[0067] Step S104b: Obtain the running time range of the task to be scheduled.

[0068] For the tasks to be scheduled that have the operation information records, according to one embodiment of the present invention, the operation durations in all the operation information can be clustered and calculated, and abnormal values ​​can be eliminated to obtain the operation time range of the tasks to be scheduled. For example, if the operation duration of a task to be scheduled is 1h23m, 1h33m, 3h03m, 1h12m, or 1h45m, the clustering result is that the operation time range of the tasks to be scheduled is 1h to 2h. For the tasks to be scheduled that do not have the operation records, the operation time range is still the minimum default value, such as 0h.

[0069] Step S104c: sorting the scheduling units in ascending order according to the scheduling duration of the scheduling units.

[0070] Since the scheduling units can plan different scheduling durations according to different task requirements, the scheduling units are sorted in ascending order according to their scheduling durations.

[0071] Step S104d: Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit of the running time range from the scheduling units.

[0072] Specifically, a scheduling unit in the scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range is taken as the first scheduling unit. For example, the scheduling unit is configured with a 1-hour scheduling unit, a 2-hour scheduling unit, and a 12-hour scheduling unit according to the task requirements. For the task to be scheduled with an running time range of 1 to 2 hours, the upper limit value of its running time range is 2 hours, then the first scheduling unit is a 2-hour scheduling unit and a 12-hour scheduling unit. It can be understood that for the task to be scheduled without the running information record, the upper limit value of its running time range is also the minimum default value. Therefore, the first scheduling unit of the task to be scheduled can be a scheduling unit with a scheduling duration greater than or equal to the minimum default value. If the minimum default value is 0 hour, then for the task to be scheduled without the running information record, its first scheduling unit is a 1-hour scheduling unit, a 2-hour scheduling unit, and a 12-hour scheduling unit.

[0073] Step S104e: taking the scheduling unit with the shortest scheduling duration in the first scheduling units as the target scheduling unit.

[0074] Select the scheduling unit with the smallest scheduling time from the first scheduling units as the target scheduling unit of the task to be scheduled. Still using the above example for explanation, for the task to be scheduled with an operating time range of 1 to 2 hours, the first scheduling unit is a 2-hour scheduling unit or a 12-hour scheduling unit, then the target scheduling unit is a 2-hour scheduling unit; for the task to be scheduled without the operating information record, its first scheduling unit is a 1-hour scheduling unit, a 2-hour scheduling unit, or a 12-hour scheduling unit, then the target scheduling unit is a 1-hour scheduling unit.

[0075] The task scheduling method of this embodiment can improve the allocation efficiency of the scheduling unit and save system resources by obtaining the first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit, and taking the scheduling unit with the smallest scheduling duration in the first scheduling unit as the target scheduling unit.

[0076] According to another embodiment of the present invention, the step S104 further includes the following steps:

[0077] Step S204: Acquire task information of the task to be scheduled, where the task information includes the predecessor task that the task to be scheduled depends on and the scheduling unit corresponding to the predecessor task.

[0078] Usually, there is a dependency relationship between the scheduling of tasks. Only after the predecessor task is completed, the successor task is eligible for execution. Therefore, before assigning a scheduling unit to the task to be scheduled, it is necessary to first know the task information of the task to be scheduled. The task information is used to record the predecessor task that the task to be scheduled depends on and the scheduling unit corresponding to the predecessor task.

[0079] In this embodiment, step S104 may include the following steps:

[0080] Step S204a: Obtain the running time corresponding to the task to be scheduled from the task running table.

[0081] Step S204b: Obtain the running time range of the task to be scheduled.

[0082] Step S204c: sorting the scheduling units in ascending order according to the scheduling duration of the scheduling units.

[0083] Step S204d: Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit of the running time range from the scheduling units.

[0084] In this embodiment, steps S204a, S204b, S204c, and S204d are similar to steps S104a, S104b, S104c, and S104d of the above embodiment, and are not described again for simplicity.

[0085] Step S204e: Compare the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task. If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, execute step S204f; if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is less than the scheduling duration of the scheduling unit corresponding to the predecessor task, execute step S204g.

[0086] Step S204f: taking the scheduling unit with the shortest scheduling duration in the first scheduling units as the target scheduling unit.

[0087] When the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit.

[0088] Step S204g: taking the scheduling unit corresponding to the predecessor task as the target scheduling unit.

[0089] When the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is smaller than the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

[0090] In this embodiment, the scheduling durations of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task are compared, and the larger one is allocated as the target scheduling unit to the task to be scheduled. For example, if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is 2 hours and the scheduling duration of the scheduling unit corresponding to the predecessor task is 12 hours, the scheduling unit with a scheduling duration of 12 hours will be used as the target scheduling unit of the task to be scheduled.

[0091] The task scheduling method of this embodiment allocates the target scheduling unit by comparing the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task. This can take into account the coupling of the predecessor and predecessor tasks, making task scheduling more stable and improving the compatibility of task scheduling.

[0092] Step S105: Scheduling the reallocated target scheduling unit to execute the task to be scheduled.

[0093] When the target scheduling unit is reallocated to the task to be scheduled, the task to be scheduled is scheduled to be executed by scheduling the reallocated target scheduling unit.

[0094] The task scheduling method of this embodiment analyzes whether the target scheduling unit assigned to the task to be scheduled meets the minimum scheduling unit configuration rule based on the running time of the running information in the task running table, and reconfigures the target scheduling unit when the minimum scheduling unit configuration rule is not met to make the allocation of the target scheduling unit more intelligent and reasonable, thereby reducing the subsequent maintenance investment and facilitating the construction of the data system.

[0095] According to an embodiment of the present invention, after step S105, the following steps may also be included:

[0096] Step S106: Obtain the execution result of the task to be scheduled, the execution result including the running time of the task to be scheduled this time, and record the execution result as newly added running information in the task running table.

[0097] After the task to be scheduled is assigned to the target scheduling unit, it starts to be executed when the target scheduling unit is scheduled. After the execution is completed, the running result of the task to be scheduled is recorded in the task running table as a new running record. Before each scheduling, the configuration of the task to be scheduled can be analyzed again in combination with the previous running record and the newly added running record to ensure that each time the task is scheduled, the target scheduling unit configured by the task to be scheduled meets the minimum scheduling unit configuration rule.

[0098] According to another embodiment of the present invention, after step S106, the task to be scheduled can also be analyzed for operation according to the task operation table. For example, when the execution time of the task to be scheduled exceeds the running time range, a task execution timeout alarm is reported. By performing operation analysis on the task to be scheduled, an alarm can be issued for abnormal status of the task, prompting maintenance personnel to check and locate the problem in time, thereby improving task scheduling efficiency and reducing operation and maintenance costs.

[0099] According to an embodiment of the present invention, the task scheduling method may further include the following steps:

[0100] Step S107: displaying the running information of the task to be scheduled to an external display device according to the task running table.

[0101] The task scheduling method of this embodiment displays the running information of the task to be scheduled to an external display device, so that the task scheduling status can be displayed to the outside in a timely manner, and the user experience is better.

[0102] Figure 2 FIG. 1 is a schematic diagram of the structure of a task scheduling device 1 according to an embodiment of the present invention. Figure 2 As shown, the task scheduling device 1 includes an acquisition module 11 , an analysis module 12 , an allocation module 13 , and a scheduling module 14 .

[0103] The acquisition module 11 is used to acquire at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of the tasks configured in the scheduling unit within the corresponding scheduling duration; acquire a task running table, which is used to record the running information of the scheduled tasks, and the running information includes the running duration of each task execution; and acquire the task to be scheduled and its configured target scheduling unit;

[0104] The analysis module 12 is used to determine whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule according to the running time included in the running information in the task running table, and the minimum scheduling unit configuration rule is that the scheduling time corresponding to the target scheduling unit of the task to be scheduled is the smallest among the scheduling units whose scheduling time is greater than or equal to the running time;

[0105] An allocation module 13, configured to reallocate a target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule if the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule;

[0106] The scheduling module 14 is used to schedule the reallocated target scheduling unit to execute the task to be scheduled.

[0107] According to one embodiment of the present invention, the allocation module 13 can also be used to obtain the running time corresponding to the task to be scheduled from the task running table; obtain the running time range of the task to be scheduled; sort the scheduling units in ascending order according to the scheduling time of the scheduling units; obtain the first scheduling unit whose scheduling time is greater than or equal to the upper limit value of the running time range from the scheduling units and use the scheduling unit with the smallest scheduling time in the first scheduling unit as the target scheduling unit.

[0108] According to an embodiment of the present invention, the allocation module 13 may also be used to perform cluster calculation on the running time of the tasks to be scheduled to obtain the running time range of the tasks to be scheduled.

[0109] According to another embodiment of the present invention, the acquisition module 11 may also be used to acquire task information of the task to be scheduled, where the task information includes a predecessor task that the task to be scheduled depends on and a scheduling unit corresponding to the predecessor task.

[0110] According to one embodiment of the present invention, the allocation module 13 can also be used to obtain the running time corresponding to the task to be scheduled from the task running table; obtain the running time range of the task to be scheduled; sort the scheduling units in ascending order according to the scheduling time of the scheduling units; obtain the first scheduling unit whose scheduling time is greater than or equal to the upper limit value of the running time range from the scheduling units; compare the scheduling time of the scheduling unit with the smallest scheduling time in the first scheduling unit and the scheduling time of the scheduling unit corresponding to the predecessor task; if the scheduling time of the scheduling unit with the smallest scheduling time in the first scheduling unit is greater than or equal to the scheduling time of the scheduling unit corresponding to the predecessor task, then the scheduling unit with the smallest scheduling time in the first scheduling unit is used as the target scheduling unit; if the scheduling time of the scheduling unit with the smallest scheduling time in the first scheduling unit is less than the scheduling time of the scheduling unit corresponding to the predecessor task, then the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

[0111] According to one embodiment of the present invention, the scheduling module 14 can also be used to obtain the execution result of the task to be scheduled, the execution result including the running time of the task to be scheduled, and record the execution result as new running information in the task running table.

[0112] According to an embodiment of the present invention, the analysis module 12 may also be configured to report a task execution timeout alarm when the execution time of the task to be scheduled exceeds the execution time range.

[0113] According to an embodiment of the present invention, the analysis module 14 may also be used to display the running information of the to-be-scheduled task to an external display device according to the task running table.

[0114] It can be understood that the specific manner in which each module of the above device implements each function can refer to the specific steps corresponding to the above embodiment, so it will not be described in detail here.

[0115] See also Figure 3 , Figure 3 FIG. 3 is a schematic diagram of the structure of a task scheduling device 30 according to an embodiment of the present invention. Figure 3As shown, the task scheduling device 30 includes a memory 32, a processor 31, and a computer program stored in the memory 32 and executable on the processor 31. When the processor 31 executes the computer program, the following steps are implemented: obtaining at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration; obtaining a task running table, the task running table is used to record the running information of the scheduled tasks, and the running information includes the running duration of each task execution; obtaining the task to be scheduled and the target scheduling unit configured therein; according to the According to the running duration included in the running information in the task running table, it is judged whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule, and the minimum scheduling unit configuration rule is that the scheduling duration corresponding to the target scheduling unit of the task to be scheduled is the smallest among the scheduling units with a scheduling duration greater than or equal to the running duration; if the target scheduling unit configured for the task to be scheduled does not meet the minimum scheduling unit configuration rule, then according to the minimum scheduling unit configuration rule, the target scheduling unit is reallocated from the scheduling unit for the task to be scheduled; and the reallocated target scheduling unit is scheduled to execute the task to be scheduled.

[0116] According to one embodiment of the present invention, the reallocation of the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule includes: obtaining the running time corresponding to the task to be scheduled from the task running table; obtaining the running time range of the task to be scheduled; sorting the scheduling units in ascending order of the scheduling time of the scheduling units; obtaining the first scheduling unit whose scheduling time is greater than or equal to the upper limit of the running time range from the scheduling unit; and taking the scheduling unit with the smallest scheduling time in the first scheduling unit as the target scheduling unit.

[0117] According to an embodiment of the present invention, obtaining the running time range of the task to be scheduled includes: performing cluster calculation on the running time of the task to be scheduled to obtain the running time range of the task to be scheduled.

[0118] According to one embodiment of the present invention, the task scheduling method also includes: obtaining task information of the task to be scheduled, the task information being the predecessor task on which the task to be scheduled depends and the scheduling unit corresponding to the predecessor task; reallocating the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule, including: obtaining the running time corresponding to the task to be scheduled from the task running table; obtaining the running time range of the task to be scheduled; sorting the scheduling units in ascending order of the scheduling time of the scheduling units; obtaining the scheduling units with a scheduling time greater than or equal to 1 from the scheduling units. The first scheduling unit of the upper limit value of the running time range; compare the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task; if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, then the scheduling unit with the smallest scheduling duration in the first scheduling unit is used as the target scheduling unit; if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is less than the scheduling duration of the scheduling unit corresponding to the predecessor task, then the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

[0119] According to one embodiment of the present invention, after the scheduling of the reallocated target scheduling unit executes the task to be scheduled, it also includes: obtaining the execution result of the task to be scheduled, the execution result including the running time of the task to be scheduled this time, and recording the execution result as newly added running information in the task running table.

[0120] According to an embodiment of the present invention, recording the execution result as newly added running information in the task running table further includes: when the running time of the to-be-scheduled task exceeds the running time range, reporting a task execution timeout alarm.

[0121] According to an embodiment of the present invention, the task scheduling method further includes: displaying the running information of the to-be-scheduled task to an external display device according to the task running table.

[0122] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the structure of a storage medium according to an embodiment of the present invention. Figure 4The storage medium shown stores computer-readable instructions 41, and when the computer-readable instructions 41 are executed by one or more processors, the one or more processors perform the following steps: obtaining at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration; obtaining a task running table, the task running table is used to record the running information of the scheduled tasks, and the running information includes the running duration of each task execution; obtaining the task to be scheduled and the target scheduling unit configured therein; judging whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule based on the running duration included in the running information in the task running table, the minimum scheduling unit configuration rule being that the scheduling duration corresponding to the target scheduling unit of the task to be scheduled is the smallest among the scheduling units whose scheduling duration is greater than or equal to the running duration; if the target scheduling unit configured for the task to be scheduled does not meet the minimum scheduling unit configuration rule, reallocating the target scheduling unit for the task to be scheduled from the scheduling unit based on the minimum scheduling unit configuration rule; and scheduling the reallocated target scheduling unit to execute the task to be scheduled.

[0123] According to one embodiment of the present invention, the reallocation of the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule includes: obtaining the running time corresponding to the task to be scheduled from the task running table; obtaining the running time range of the task to be scheduled; sorting the scheduling units in ascending order of the scheduling time of the scheduling units; obtaining the first scheduling unit whose scheduling time is greater than or equal to the upper limit of the running time range from the scheduling unit; and taking the scheduling unit with the smallest scheduling time in the first scheduling unit as the target scheduling unit.

[0124] According to an embodiment of the present invention, obtaining the running time range of the task to be scheduled includes: performing cluster calculation on the running time of the task to be scheduled to obtain the running time range of the task to be scheduled.

[0125] According to one embodiment of the present invention, the task scheduling method also includes: obtaining task information of the task to be scheduled, the task information being the predecessor task on which the task to be scheduled depends and the scheduling unit corresponding to the predecessor task; reallocating the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule, including: obtaining the running time corresponding to the task to be scheduled from the task running table; obtaining the running time range of the task to be scheduled; sorting the scheduling units in ascending order of the scheduling time of the scheduling units; obtaining the scheduling units with a scheduling time greater than or equal to 1 from the scheduling units. The first scheduling unit of the upper limit value of the running time range; compare the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit and the scheduling duration of the scheduling unit corresponding to the predecessor task; if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, then the scheduling unit with the smallest scheduling duration in the first scheduling unit is used as the target scheduling unit; if the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling unit is less than the scheduling duration of the scheduling unit corresponding to the predecessor task, then the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

[0126] According to one embodiment of the present invention, after the scheduling of the reallocated target scheduling unit executes the task to be scheduled, it also includes: obtaining the execution result of the task to be scheduled, the execution result including the running time of the task to be scheduled this time, and recording the execution result as newly added running information in the task running table.

[0127] According to an embodiment of the present invention, recording the execution result as newly added running information in the task running table further includes: when the running time of the to-be-scheduled task exceeds the running time range, reporting a task execution timeout alarm.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0129] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0130] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A task scheduling method, It is characterized in that The task scheduling method comprises: Acquire at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration; Obtaining a task running table, wherein the task running table is used to record the running information of the scheduled tasks, and the running information includes the running time of each task execution completion; Get the task to be scheduled and its configured target scheduling unit; According to the running time included in the running information in the task running table, it is judged whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule, and the minimum scheduling unit configuration rule includes: the scheduling time corresponding to the target scheduling unit configured for the task to be scheduled is greater than or equal to the running time of the task to be scheduled, and the scheduling time corresponding to the target scheduling unit is the smallest among the scheduling units whose scheduling time is greater than or equal to the running time; If the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule, reallocating the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule; Scheduling the reallocated target scheduling unit to execute the task to be scheduled; Acquire task information of the task to be scheduled, wherein the task information includes a predecessor task on which the task to be scheduled depends and a scheduling unit corresponding to the predecessor task; The reallocating a target scheduling unit for the to-be-scheduled task from the scheduling unit according to the minimum scheduling unit configuration rule comprises: Obtain the running time corresponding to the task to be scheduled from the task running table; Obtaining the running time range of the task to be scheduled; Sort the scheduling units in ascending order according to the scheduling duration of the scheduling units; Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit; Comparing the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units and the scheduling duration of the scheduling unit corresponding to the predecessor task; If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit; If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is smaller than the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit corresponding to the predecessor task is used as the target scheduling unit.

2. According to the task scheduling method of claim 1, It is characterized in that The reallocating a target scheduling unit for the to-be-scheduled task from the scheduling unit according to the minimum scheduling unit configuration rule comprises: Obtain the running time corresponding to the task to be scheduled from the task running table; Obtaining the running time range of the task to be scheduled; Sort the scheduling units in ascending order according to the scheduling duration of the scheduling units; Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit; The scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit.

3. According to the task scheduling method of claim 2, It is characterized in that The obtaining of the running time range of the task to be scheduled includes: Cluster calculation is performed on the running time of the tasks to be scheduled to obtain the running time range of the tasks to be scheduled.

4. According to the task scheduling method of claim 1, It is characterized in that After the reallocated target scheduling unit is scheduled to execute the task to be scheduled, the method further includes: The execution result of the task to be scheduled is obtained, wherein the execution result includes the running time of the task to be scheduled this time, and the execution result is recorded in the task running table as newly added running information.

5. According to the task scheduling method of claim 4, It is characterized in that The step of recording the execution result as newly added operation information into the task operation table further includes: When the execution time of the task to be scheduled exceeds the execution time range, a task execution timeout alarm is reported.

6. According to the task scheduling method of claim 1, It is characterized in that The task scheduling method further includes: The running information of the task to be scheduled is displayed to an external display device according to the task running table.

7. A task scheduling device, It is characterized in that The task scheduling device comprises: An acquisition module is used to acquire at least one scheduling unit, each of which corresponds to a scheduling duration, and the scheduling unit schedules the execution of tasks configured in the scheduling unit within the corresponding scheduling duration; acquire a task running table, which is used to record the running information of scheduled tasks, and the running information includes the running duration of each task execution; and acquire the task to be scheduled and its configured target scheduling unit, and acquire the task information of the task to be scheduled, and the task information is the predecessor task that the task to be scheduled depends on and the scheduling unit corresponding to the predecessor task; An analysis module is used to determine whether the target scheduling unit configured for the task to be scheduled meets the minimum scheduling unit configuration rule based on the running time included in the running information in the task running table, and the minimum scheduling unit configuration rule includes: the scheduling time corresponding to the target scheduling unit configured for the task to be scheduled is greater than or equal to the running time of the task to be scheduled, and the scheduling time corresponding to the target scheduling unit is the smallest among the scheduling units whose scheduling time is greater than or equal to the running time; An allocation module, configured to reallocate a target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule if the target scheduling unit configured for the task to be scheduled does not satisfy the minimum scheduling unit configuration rule, wherein the reallocation of the target scheduling unit for the task to be scheduled from the scheduling unit according to the minimum scheduling unit configuration rule comprises: Obtain the running time corresponding to the task to be scheduled from the task running table; Obtaining the running time range of the task to be scheduled; Sort the scheduling units in ascending order according to the scheduling duration of the scheduling units; Acquire a first scheduling unit whose scheduling duration is greater than or equal to the upper limit value of the running time range from the scheduling unit; Comparing the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units and the scheduling duration of the scheduling unit corresponding to the predecessor task; If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is greater than or equal to the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit with the smallest scheduling duration in the first scheduling units is used as the target scheduling unit; If the scheduling duration of the scheduling unit with the smallest scheduling duration in the first scheduling units is less than the scheduling duration of the scheduling unit corresponding to the predecessor task, the scheduling unit corresponding to the predecessor task is used as the target scheduling unit; The scheduling module is used to schedule the reallocated target scheduling unit to execute the task to be scheduled.

8. A task scheduling device, It is characterized in that The task scheduling device includes a processor and a memory coupled to the processor, wherein: The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the task scheduling method according to any one of claims 1 to 6.

9. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the task scheduling method according to any one of claims 1 to 6.