Offline computing task scheduling method, device and equipment and readable storage medium

By obtaining the execution time and completion time of offline computing tasks, the number of target machines can be flexibly adjusted, which solves the problem of poor offline computing task scheduling in the existing technology and achieves efficient utilization of resources and rapid completion of tasks.

CN118550682APending Publication Date: 2024-08-27GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310211750.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When existing cloud servers schedule offline computing tasks, it is difficult to accurately reflect the system load, resulting in high hardware resource consumption, long execution time, and large fluctuations. Existing scheduling methods cannot effectively realize the scheduling of offline computing tasks.

Method used

By obtaining task information of offline computing tasks, the execution time and completion time are determined, and based on this information, the number of target machines is flexibly adjusted. Combined with real-time monitoring and prediction, the number of machines is automatically adjusted to optimize resource utilization.

Benefits of technology

It shortens the queuing time of offline computing tasks, reduces the waste of machine resources, ensures that tasks are completed as quickly as possible, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550682A
    Figure CN118550682A
Patent Text Reader

Abstract

The invention relates to the technical field of task scheduling, and discloses an off-line computing task scheduling method and device, equipment and a readable storage medium. The method comprises the following steps: acquiring an offline calculation task to be executed; based on the task information of the offline calculation task, determining execution time consumption of the offline calculation task; determining the execution completion time of the offline calculation task based on the execution time consumption; and based on the execution completion time and the to-be-executed number of the offline calculation tasks, elastically adjusting the number of target machines executing the offline calculation tasks. According to the technical scheme, the number of the target machines can be automatically adjusted, reasonable scheduling of the offline calculation tasks is achieved, the queuing time of the offline calculation tasks is shortened, waste of machine resources is reduced, and meanwhile it is guaranteed that the offline calculation tasks can be completed as soon as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of task scheduling, and in particular to a scheduling method, device, equipment and readable storage medium for offline computing tasks. Background Art

[0002] In a distributed system, the number of computing resources is usually adjusted according to the system load. When the number of system requests increases, the number of resources is increased to improve the system's processing capacity; when the number of requests decreases, the number of resources is reduced to reduce unnecessary costs. For example, cloud servers provided by ECS service providers such as Alibaba Cloud can provide a variety of elastic scaling modes. They can automatically create or remove ECS instances and adjust the number of machines of a specified type according to pre-set rules to meet business requirements.

[0003] Although existing cloud servers can be well adapted to the elastic scaling of online application services by monitoring hardware resource indicators such as CPU, for distributed systems used for offline computing, the real load is the offline computing tasks waiting to be executed, and hardware resource indicators cannot well reflect the system load. Offline computing tasks consume large amounts of hardware resources during the computing process, take a long time to execute, and have large fluctuations. Existing cloud server scheduling methods for online tasks cannot well implement the scheduling of offline computing tasks. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, device and readable storage medium for scheduling offline computing tasks to solve the problem of difficulty in scheduling offline computing tasks.

[0005] According to the first aspect, an embodiment of the present invention provides a scheduling method for offline computing tasks, including: obtaining offline computing tasks to be executed; determining the execution time of the offline computing tasks based on the task information of the offline computing tasks; determining the execution completion time of the offline computing tasks based on the execution time; and flexibly adjusting the number of target machines that execute the offline computing tasks based on the execution completion time and the number of offline computing tasks to be executed.

[0006] The scheduling method for offline computing tasks provided by the embodiment of the present invention determines the corresponding execution time through the task information of the offline computing tasks, and determines the execution completion time according to the execution time, so that the required number of target machines can be determined according to the number of offline computing tasks to be executed and the execution completion time of each offline computing task, and the number of target machines can be adjusted flexibly. The method can automatically adjust the number of target machines based on the situation of offline computing tasks to be executed, realize the reasonable scheduling of offline computing tasks, shorten the queuing time of offline computing tasks, reduce the waste of machine resources, and ensure that offline computing tasks can be completed as soon as possible.

[0007] In combination with the first aspect, in a first implementation of the first aspect, the target number of machines executing the offline computing task is flexibly adjusted based on the execution completion time and the number of machines to be executed of the offline computing task, including: determining a machine ready time range for executing the offline computing task; comparing the machine ready time range with the execution completion time, and determining a first number of machines whose execution completion time is within the ready time range; adjusting the first number of machines based on a comparison result of the number to be executed and the first number of machines; and determining the adjusted first number of machines as the target number of machines.

[0008] The scheduling method for offline computing tasks provided in an embodiment of the present invention performs real-time monitoring on machines executing offline computing tasks to determine the machine ready time range, and compares the execution completion time of the offline computing tasks with the machine ready time range to determine whether to start a new machine and the number of new machines to be started, thereby determining reasonable machine resources and improving the accuracy of elastic scaling of the number of machines.

[0009] In combination with the first implementation of the first aspect, in the second implementation of the first aspect, the first number of machines is adjusted based on the comparison result of the to-be-executed number and the first number of machines, including: obtaining the predicted number of offline computing tasks, the queued number, the lower limit of the number of machines, and the number of second machines in a non-offline state; when the queued number is zero, determining the maximum value between the lower limit of the number of machines and the predicted number; determining the number of machines to be shut down based on the maximum value and the second number of machines; and reducing the first number of machines according to the number of machines to be shut down.

[0010] The scheduling method for offline computing tasks provided in an embodiment of the present invention combines real-time queue monitoring of offline computing tasks and prediction of the number of future offline tasks, and reduces the number of machines when the queue number is zero, thereby ensuring that the reduction adjustment of the number of machines can take into account the burstiness and periodicity of offline computing tasks.

[0011] In combination with the second implementation of the first aspect, in the third implementation of the first aspect, the reduction and adjustment of the first number of machines according to the number of shut down machines includes: detecting whether the machine is currently in a cooling-down period; if the machine is not currently in a cooling-down period, releasing the machines in the ready state until the number of shut down machines is reached.

[0012] The offline computing task scheduling method provided by the embodiment of the present invention can avoid the waste of machine resources caused by frequent power on and off by setting the machine cooling period and detecting whether the machine is in the machine cooling period when the machine is turned off. At the same time, for machines that are in the machine cooling period and in the ready state, new offline computing tasks can be executed immediately when they are subsequently received, saving the time consumed by machine startup and further shortening the queuing time of offline computing tasks.

[0013] In combination with the second implementation of the first aspect, in the fourth implementation of the first aspect, the first number of machines is adjusted based on the comparison result of the to-be-executed number and the first number of machines, and also includes: when the queue number is greater than zero, the number of machines to be increased is determined based on the first number of machines and the predicted number; and the first number of machines is increased and adjusted according to the number of machines turned on.

[0014] The offline computing task scheduling method provided by the embodiment of the present invention combines the real-time queue monitoring of offline computing tasks and the prediction of the number of future offline tasks, and increases the number of machines when the queue number is not zero, thereby ensuring that the increase and adjustment of the number of machines can take into account the burstiness and periodicity of offline computing tasks, thereby scheduling multiple offline computing tasks to different machines for execution, reducing the waiting time of offline computing tasks.

[0015] In combination with the fourth implementation of the first aspect, in the fifth implementation of the first aspect, the number of the first machines is increased and adjusted according to the number of the turned-on machines, including: obtaining an upper limit value for the number of machines; constraining the increased number of machines based on the upper limit value for the number of machines to determine a target increased number; and increasing and adjusting the number of the first machines according to the target increased number.

[0016] The scheduling method for offline computing tasks provided by the embodiment of the present invention constrains the increase in the number of machines by setting an upper limit on the number of machines, thereby maintaining the use cost of machine resources to the greatest extent and avoiding unlimited increase in machine resource costs due to unlimited increase in the number of machines.

[0017] In combination with the first implementation of the first aspect, in the sixth implementation of the first aspect, determining the number of offline computing tasks to be executed includes: obtaining a scheduling period for the offline computing tasks; and predicting the number of offline computing tasks to be executed according to the scheduling period.

[0018] The scheduling method for offline computing tasks provided by the embodiment of the present invention, by setting the scheduling period of offline computing tasks, facilitates the prediction of the number of offline tasks to be executed according to the scheduling period, facilitates the elastic scaling of the number of machines while taking into account the periodicity of offline computing tasks. At the same time, compared with setting complex scaling rules, the setting of the scheduling period is relatively simple, which reduces the operation and maintenance costs.

[0019] In combination with the second implementation of the first aspect, in the seventh implementation of the first aspect, determining the machine ready time range for executing the offline computing task includes: obtaining the machine startup time for executing the offline computing task; and determining the machine ready time range for executing the offline computing task based on the current time and the machine startup time.

[0020] The offline computing task scheduling method provided by the embodiment of the present invention combines the machine startup time and the current time to determine the machine ready time range, so as to facilitate determining the number of new machines to be started subsequently according to the machine ready time obtained by starting the new machine.

[0021] In combination with the first aspect, in the eighth implementation of the first aspect, determining the execution time of the offline computing task based on the task information of the offline computing task includes: extracting the task execution data in the task information; preprocessing the task execution data to obtain target execution data; inputting the target execution data into a preset network model to obtain the execution time.

[0022] In combination with the first aspect or the eighth implementation of the first aspect, in the ninth implementation of the first aspect, determining the execution completion time of the offline computing task based on the execution time includes: obtaining the pulling time of the offline computing task and the target machine for pulling the offline computing task; superimposing the pulling time with the execution time to obtain the execution completion time of the target machine for the offline computing task.

[0023] The scheduling method for offline computing tasks provided by an embodiment of the present invention extracts task execution data from task information and uses a neural network model to predict the execution time of offline computing tasks, thereby improving the prediction accuracy of execution time, thereby improving the prediction accuracy of execution completion time, and facilitating accurate elastic scaling of the number of machines executing offline computing tasks based on the execution completion time.

[0024] According to the second aspect, an embodiment of the present invention provides a scheduling device for offline computing tasks, including: a task scheduling module, used to obtain offline computing tasks to be executed; a task execution time prediction module, used to determine the execution time of the offline computing task based on the task information of the offline computing task; a task execution completion prediction module, used to determine the execution completion time of the offline computing task based on the execution time; an elastic scaling module, used to elastically adjust the number of target machines executing the offline computing task based on the execution completion time and the number of offline computing tasks to be executed.

[0025] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the scheduling method for offline computing tasks described in the first aspect or any embodiment of the first aspect by executing the computer instructions.

[0026] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the scheduling method for offline computing tasks described in the first aspect or any implementation method of the first aspect.

[0027] It should be noted that the corresponding beneficial effects of the offline computing task scheduling device, electronic device and computer-readable storage medium provided in the embodiments of the present invention can be found in the description of the corresponding contents in the offline computing task scheduling method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 is a flow chart of a method for scheduling offline computing tasks according to an embodiment of the present invention;

[0030] Figure 2 is another flow chart of a method for scheduling offline computing tasks according to an embodiment of the present invention;

[0031] Figure 3 is another flow chart of a method for scheduling offline computing tasks according to an embodiment of the present invention;

[0032] Figure 4is a structural block diagram of a scheduling device for offline computing tasks according to an embodiment of the present invention;

[0033] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0035] Existing cloud servers are well suited for elastic scaling of online application services. However, for distributed systems of offline computing tasks, the real load is offline computing tasks that are waiting in line for execution. Offline computing tasks consume a lot of hardware resources during the computing process. It is usually impossible to execute multiple computing tasks simultaneously on the same worker machine, and tasks can only be executed serially on one machine. Forcing multiple tasks to be executed in parallel on one machine may cause the execution of tasks to take a long time and fluctuate greatly due to insufficient hardware resources. The existing cloud server scheduling methods for online tasks cannot well implement the scheduling of offline computing tasks.

[0036] Based on this, the technical solution of the present invention automatically adjusts the number of worker machines according to the offline computing tasks that need to be executed in the distributed scheduling system, shortens the queuing time of offline computing tasks while maintaining low costs, so that offline computing tasks can be completed as soon as possible.

[0037] According to an embodiment of the present invention, an embodiment of a scheduling method for offline computing tasks is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] In this embodiment, a scheduling method for offline computing tasks is provided, which can be used for electronic devices such as servers and scheduling controllers in a distributed scheduling system. Figure 1 is a flowchart of a method for scheduling offline computing tasks according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0039] S11, obtaining an offline computing task to be executed.

[0040] Offline computing tasks are computing tasks that do not require high real-time performance and allow a certain degree of delay, such as parsing of building information models and batch processing of model data.

[0041] The distributed scheduling system can monitor offline computing tasks in real time to determine whether there are offline computing tasks entering the distributed scheduling system. The distributed scheduling system is deployed with corresponding task scheduling devices. When it is detected that an offline computing task enters the distributed scheduling system, the task scheduling device in the distributed scheduling system can receive the offline computing task.

[0042] S12, determining the execution time of the offline computing task based on the task information of the offline computing task.

[0043] The execution time is the time taken for an offline computing task to be executed on a worker machine from the start to the completion. The execution parameters of the offline computing task are determined by parsing the task information, and the relevant execution data is determined based on the execution parameters. Then, the execution time of the offline computing task is predicted based on the relevant execution data.

[0044] Specifically, the relevant execution data can be input into the pre-built network model to output the execution time; the execution time of the current offline computing task can also be predicted by counting the historical execution time of the offline computing task. Of course, the execution time of the offline computing task can also be determined by other methods, which are not detailed here and can be determined by those skilled in the art according to actual needs.

[0045] S13, determining the execution completion time of the offline computing task based on the execution time consumption.

[0046] The execution completion time is the estimated time for an offline computing task to be completed on a worker machine. The execution completion time is determined by the worker machine start execution time plus the execution time. When a worker machine completes an offline computing task, it enters the ready state and waits to receive other offline computing tasks to be executed.

[0047] Specifically, when a worker machine obtains an offline computing task, the task scheduling device in the distributed scheduling system can obtain the unique identifier (machine IP or instance ID, etc.) of the worker machine that pulls the offline computing task, and adds the execution time of the offline computing task to the current timestamp to obtain the execution completion time of the offline computing task, that is, the time when the offline computing task is completed. At the same time, the worker machine will return to the ready state at the execution completion time, waiting to receive the next offline computing task. The information of the worker machine and the execution completion time will be saved as a set of corresponding data.

[0048] Specifically, a worker machine will only pull and execute one offline computing task at any time. The worker machine can passively receive offline computing tasks pushed by the task scheduler; it can also actively obtain offline computing tasks from the task scheduler.

[0049] When the number of worker machines is greater than the number of offline computing tasks, each offline computing task will be assigned to a separate machine for execution. Only when the number of offline computing tasks is greater than the number of machines, offline computing tasks need to enter the queue state, waiting for the machine to complete other offline computing tasks before executing the queued offline computing tasks.

[0050] The status of offline computing tasks include: queuing, executing, and completed. When an offline computing task enters the system, the task will first be set to "queuing"; when the offline computing task is pulled by the worker machine, it will enter the "executing" state; when the worker machine completes the execution of the offline computing task, it will enter the "completed" state.

[0051] S14, based on the execution completion time and the number of offline computing tasks to be executed, flexibly adjust the number of target machines for executing the offline computing tasks.

[0052] The number of tasks to be executed is the sum of the number of offline computing tasks that are predicted to be executed after a certain period of time in the future and the number of offline computing tasks that are currently in the queue. The prediction time depends on the ratio of the machine startup time to the scheduling cycle length. For example, if the scheduling cycle is 60 seconds and the machine startup time is 150 seconds, the prediction time is: round up (150 / 60)*60=3*60=180 seconds, that is, the number of offline computing tasks that are predicted to enter the distributed scheduling system after 180 seconds.

[0053] The target number of machines is the number of worker machines that execute offline computing tasks. The number of machines that need to be turned on or off can be determined based on the completion time of the offline computing tasks being executed and the number of offline computing tasks to be executed. The target number of machines can be flexibly adjusted based on the determined number of machines that need to be turned on / off.

[0054] The worker machine cluster that performs offline computing tasks can be a cloud server cluster provided by ECS service providers such as Alibaba Cloud, or a server cluster built locally. It can be deployed in physical machines or virtual servers such as virtual machines and containers. These worker machines can be started based on existing system images, and the processing program for offline computing tasks and the operating environment required by the processing program can be pre-loaded or temporarily loaded after startup.

[0055] The life cycle of a worker machine includes the following states: starting, not ready, ready, executing, and offline. After the machine is started (powered on), it enters the "starting" state; when the machine is successfully started (powered on), it enters the "not ready" state; when the processing program and its operating environment are ready, it enters the "ready" state, indicating that it can receive offline computing tasks at any time; when the machine receives a task and starts executing it, it enters the "executing" state; when the task is completed, the machine will re-enter the "ready" state and prepare to receive the next task; when the machine is released (powered off), it will enter the "offline" state.

[0056] The scheduling method for offline computing tasks provided in this embodiment determines the corresponding execution time through the task information of the offline computing tasks, and determines the execution completion time according to the execution time, so that the required number of target machines can be determined according to the number of offline computing tasks to be executed and the execution completion time of each offline computing task, and the number of target machines can be adjusted flexibly. This method can automatically adjust the number of target machines based on the situation of offline computing tasks to be executed, realize the reasonable scheduling of offline computing tasks, shorten the queuing time of offline computing tasks, reduce the waste of machine resources, and ensure that offline computing tasks can be completed as soon as possible.

[0057] In this embodiment, a scheduling method for offline computing tasks is provided, which can be used for electronic devices such as servers and scheduling controllers in a distributed scheduling system. Figure 2 is a flowchart of a method for scheduling offline computing tasks according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0058] S21, obtaining an offline computing task to be executed. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0059] S22, based on the task information of the offline computing task, determining the execution time of the offline computing task. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0060] S23, determining the execution completion time of the offline computing task based on the execution time consumption. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0061] S24, based on the execution completion time and the number of offline computing tasks to be executed, flexibly adjust the number of target machines executing the offline computing tasks.

[0062] Specifically, the above step S24 may include:

[0063] S241, determining a machine ready time range for executing an offline computing task.

[0064] The machine ready time range is the interval of the worker machine ready time, which is determined by counting the machine startup time. The minimum value of the machine ready time is the current time, and the maximum value is the sum of the current time and the machine startup time.

[0065] Specifically, the above step S241 may include:

[0066] (1) Obtain the startup time of the machine that performs the offline computing task.

[0067] (2) Based on the current time and the time it takes to start the machine, determine the machine’s ready time range for executing the offline computing task.

[0068] The machine startup time is the difference between the machine ready time and the machine startup time of the worker machine. The machine startup time is the timestamp when the worker machine is started; the machine ready time is the timestamp when the worker machine changes from a state in which it cannot execute offline computing tasks to a state in which it can execute offline computing tasks.

[0069] Since the startup time of the worker machine fluctuates little, we can directly use the average value of the actual startup time of the worker machines that have been started recently as the expected machine startup time, recorded as Tstartup, and then obtain the timestamp corresponding to the current moment, recorded as Tnow. The machine ready time range is [Tnow, Tnow+Tstartup].

[0070] The machine start-up time and the current time are combined to determine the machine ready time range, so as to determine the number of new machines to be started subsequently according to the machine ready time obtained by starting the new machines.

[0071] S242, comparing the machine ready time range with the execution completion time, and determining the number of first machines whose execution completion time is within the ready time range.

[0072] The distributed scheduling system stores information about worker machines and corresponding data on execution completion time. All execution completion times in the data are compared with the machine ready time range, and a machine set M whose execution completion time (i.e., the expected ready time of the worker machine) is in the interval [Tnow, Tnow+Tstartup] is screened out. The number of machines in the machine set M is the first machine number NumM.

[0073] The machine set M indicates that in the current scheduling cycle, the machines in the machine set M are expected to enter the "ready" state faster than the newly started machines and receive new offline computing tasks. Before the new machine enters the "ready" state, these machines are expected to receive at least NumM tasks.

[0074] For worker machines whose execution completion time is less than Tnow, it can be determined that the task execution time prediction of the offline computing tasks executed on them is inaccurate and is not considered in this scheduling. For machines whose execution completion time is greater than Tnow, it can be determined that a batch of new machines are temporarily started (powered on) in the current scheduling cycle, which can enter the "ready" state earlier than the machines whose execution completion time is greater than Tnow and receive new offline computing tasks.

[0075] S243: Based on the comparison result between the to-be-executed quantity and the first machine quantity, adjust the first machine quantity.

[0076] By comparing the number of tasks to be executed with the first number of machines, it is determined whether the number of the first machines currently in the ready state is consistent with the number of offline computing tasks to be executed. If the two are inconsistent, the number of worker machines can be adjusted according to the difference between the number of the first machines and the number of tasks to be executed, including starting a new worker machine or shutting down a worker machine that has completed the offline computing task.

[0077] Optionally, the above step S243 may include:

[0078] (1) Obtain the predicted number of offline computing tasks, the number of queues, the lower limit of the number of machines, and the number of second machines in a non-offline state.

[0079] (2) When the queue quantity is zero, determine the maximum value between the lower limit of the number of machines and the predicted number.

[0080] (3) Based on the maximum value and the second number of machines, the number of machines to be shut down is determined.

[0081] (4) The number of first machines is reduced and adjusted according to the number of machines shut down.

[0082] The technicians can pre-set the lower limit of the number of worker machines NumMin for the distributed scheduling system. The value range of NumMin is [0, +∞). NumMin indicates the number of worker machines that should be reserved in a non-"offline" state even if there are no offline tasks to be executed, so that offline computing tasks can be executed at any time.

[0083] The predicted number NumPreTask is the predicted value of the offline computing tasks to be executed after a certain period of time in the future, and the queue number NumQueueTask is the number of offline computing tasks currently in the queue. The method of obtaining the predicted number and the queue number can be found in the relevant description of the above embodiment, which will not be repeated here.

[0084] Monitor the status of each worker machine in the current distributed scheduling system in real time, obtain the number of second machines NumRunningNode whose status is not "offline" in the current system, and obtain the number of machines NumReadyNode whose status is "ready" in the current system.

[0085] If the queue number NumQueueTask is 0, it means that the current worker machines in the distributed scheduling system are redundant and the number of machines needs to be reduced. The number of machines that need to be reduced can be determined in the following ways:

[0086] 1) Determine the maximum value NumLowerLimit between the lower limit value NumMin of the number of machines and the predicted number NumPreTask, that is, NumLowerLimit = max(NumMin, NumPreTask), which means that at the end of the current scheduling cycle, at least NumLowerLimit worker machines should be retained.

[0087] 2) According to the maximum value in 1) above and the second number of machines NumRunningNode, determine the number of machines to be shut down. The specific expression is as follows:

[0088] NumReduce=min(NumReadyNode,NumRunningNode-NumLowerLimit)

[0089] Among them, NumReduce is the number of shut down machines; NumReadyNode indicates the number of all machines currently in the "ready" state, that is, the number of idle machines that are not currently executing offline computing tasks and are shut down; the value of NumRunningNode-NumLowerLimit indicates that the number of started machines should be shut down as much as possible while reserving a certain number of machines.

[0090] When the number of machine shutdowns NumReduce>0, it means that NumReduce worker machines need to be shut down, that is, the number of machines that need to be reduced in this scheduling cycle; when NumReduce<=0, it means that the number of worker machines does not need to be changed.

[0091] Combined with the real-time queue monitoring of offline computing tasks and the prediction of the number of future offline tasks, the number of machines is reduced when the queue number is zero, thereby ensuring that the reduction in the number of machines can take into account the burstiness and periodicity of offline computing tasks.

[0092] In order to avoid frequent switching of machines, when reducing the number of first machines, it is necessary to detect the cooling period of the machines, so as to adjust the reduced number according to the cooling period of the machines. Specifically, the above step (4) may include:

[0093] (41) Check whether the machine is currently in the cooling period.

[0094] (42) If the machine is not in the cooling period, the machines in the ready state are released until the machine shutdown quantity is reached.

[0095] The machine cooling period is the continuous operation period of the machine set for the machine to be turned on. The worker machine in the machine cooling period is prohibited from being shut down. The machine cooling period can be set according to actual needs, for example, 3 minutes is set as the machine cooling period.

[0096] When reducing the number of machines according to the elastic scaling solution, you first need to determine whether you are currently in the machine cooling period. If you are not currently in the machine cooling period, you can obtain all the worker machines that are currently in the ready state and release (shut down) the machines one by one until the number of released machines reaches the number of machines to be shut down, or all machines in the ready state are shut down. If you are currently in the machine cooling period, the machine number reduction will be ignored and the number of machines will not be reduced.

[0097] Since worker machines cannot receive offline computing tasks during the power-on and power-off process, setting a machine cooling period can avoid wasting machine resources caused by frequent power-on and power-off. At the same time, for machines that are in the machine cooling period and ready, new offline computing tasks can be executed immediately when they are received, saving the time spent on machine startup and further shortening the queue time for offline computing tasks.

[0098] Optionally, the above step S243 may further include:

[0099] (1) When the queue quantity is greater than zero, the number of machines to be added is determined based on the first machine quantity and the predicted quantity.

[0100] (2) The number of first machines is increased and adjusted according to the number of machines turned on.

[0101] If the queue number NumQueueTask is greater than 0, it means that the current number of worker machines in the distributed scheduling system is insufficient and the number of machines needs to be increased. The number of machines that need to be increased can be determined in the following ways:

[0102] The number of offline computing tasks that need to be executed in the current scheduling cycle is determined by combining the predicted number NumPreTask and the queue number NumQueueTask. The number of machines turned on can be obtained by subtracting the first number of machines NumM from the offline computing task data. The specific expression is as follows:

[0103] NumNeedAdd=F(NumQueueTask,NumPreTask)–NumM

[0104] Among them, NumNeedAdd is the number of machines to be turned on; NumM is the number of the first machine.

[0105] Among them, F(NumQueueTask, NumPreTask) is the number of offline computing tasks, which can be the maximum value of the current queue number NumQueueTask and the predicted number NumPreTask after a period of time, that is, max(NumQueueTask, NumPreTask); it can also be the sum of the current queue number NumQueueTask and the predicted number NumPreTask after a period of time, that is, NumQueueTask+NumPreTask.

[0106] By combining real-time queue monitoring of offline computing tasks and prediction of the number of future offline tasks, the number of machines is increased when the number to be executed is not zero, ensuring that the increase in the number of machines can take into account the burstiness and periodicity of offline computing tasks, so that multiple offline computing tasks can be scheduled to different machines for execution, reducing the waiting time of offline computing tasks.

[0107] The above-mentioned machine start-up number NumNeedAdd is the number of machines that are not currently queued and need to be added for all offline computing tasks. In order to avoid unlimited increase in the number of machines and thus unlimited increase in the cost of using machine resources, it is necessary to constrain the increase in the number of machines through the upper limit of the number of machines to maximize the cost of using machine resources. Specifically, the above-mentioned step (2) may include:

[0108] (21) Obtain the upper limit of the number of machines.

[0109] (22) Based on the upper limit of the number of machines, the number of additional machines is constrained and the target number of additional machines is determined.

[0110] (23) The number of the first machines is increased and adjusted according to the target increase number.

[0111] The technicians can pre-set the upper limit NumMax of the number of worker machines for the distributed scheduling system. The value range of NumMax is [0, +∞). Among them, NumMax means that even if there are many tasks to be executed, the number of machines will not exceed NumMax, which is used to prevent the unlimited increase of machines.

[0112] The number of machines to be added is constrained by the upper limit of the number of machines, and the target number of machines to be added is determined as follows:

[0113] 1) Determine the constraint value of the number of machines, the expression is as follows:

[0114] NumUpperLimit=min(NumMax,NumRunningNode+NumNeedAdd)

[0115] Among them, NumUpperLimit is the constraint value of the number of machines; NumRunningNode+NumAdd represents the number of machines that should remain running at the end of this scheduling cycle if there is no limit on the number of machines. The number of machines is limited by the upper limit of the number of machines NumMax.

[0116] 2) Calculate the target increase amount, the expression is as follows:

[0117] NumAdd=NumUpperLimit–NumRunningNode

[0118] Among them, NumAdd is the target increase number; NumRunningNode is the number of machines in the ready state.

[0119] When NumAdd>0, it means that NumAdd worker machines need to be added, that is, the number of machines required to be added in this scheduling cycle; when NumAdd<=0, it means that the number of worker machines does not need to be changed.

[0120] S244: Determine the adjusted first machine quantity as the target machine quantity.

[0121] If you need to add more machines based on the first number of machines, call the ECS control interface directly, start the corresponding number of worker machines, get the target number of machines to be adjusted, and mark the status of the newly started machines as "starting". Then, start a scheduled task to regularly monitor the machine status of the newly added worker machines, or receive callback information from the ECS service provider to synchronize the machine status. For example, after the machine is started, change the machine status to "starting"; after 1 minute, the scheduled task detects that a machine has started successfully and changes the status of the machine to "not ready".

[0122] If it is necessary to reduce the number of machines based on the first number of machines, the ECS control interface is directly called to shut down the corresponding number of worker machines to obtain the target number of machines for reduction and adjustment.

[0123] It should be noted that in order to reduce the queuing time of offline computing tasks and complete offline computing tasks as soon as possible, there is no need to set a machine cooling period for the increase in the number of machines, so that the distributed scheduling system can respond to the increase in the number of offline computing tasks as soon as possible. If a machine cooling period is set for the increase in the number of machines, it will result in the inability to respond to the increase in the number of offline computing tasks during the machine cooling period, which is contrary to the goal.

[0124] As an optional implementation, the above step of determining the number of offline computing tasks to be executed may include:

[0125] (1) Obtain the scheduling period for offline computing tasks.

[0126] (2) Predict the number of offline computing tasks to be executed according to the scheduling period.

[0127] The scheduling cycle is the time interval between two consecutive machine elastic scaling operations. The number of offline computing tasks to be executed in the future is predicted based on the linear learning method combined with the scheduling cycle.

[0128] The details are as follows:

[0129] 1) Taking the scheduling period as the basic unit, obtain the historical task quantity sampling points [c1, c2, c3…cn] of the offline computing tasks in the previous n scheduling periods before the current scheduling period from the historical data.

[0130] 2) Fit the number change curve of offline computing tasks according to the number of historical tasks. Expressed as a linear equation: count = a*x + b. Where a and b represent the slope and offset in the linear relationship respectively.

[0131] 3) According to the least squares method, determine the parameters a and b in the quantity change curve.

[0132] 4) Build a web service to provide the predicted quantity values ​​of offline computing tasks within one or more scheduling cycles in the form of a RESTful interface.

[0133] 5) Based on the predicted quantity, determine whether the scheduling cycle is in the peak time period. If the scheduling cycle is in the peak time period, compare the predicted quantity value with the maximum value of the historical task quantity sampling points. If the predicted quantity value is less than the maximum value of the sampling point, the maximum value of the sampling point is used as the predicted quantity value.

[0134] Optionally, the hypothetical principle (the historical trend of the number of offline computing tasks can better reflect the trend of the number of offline computing tasks) can also be used to predict the number of offline computing tasks to be executed in the future. Specifically, the trend of the number of offline computing tasks in the same time period n days before the current time is calculated in a statistical manner as the trend of the number of offline computing tasks in the current same time period. The number of offline computing tasks is predicted based on the obtained trend of the current same time period.

[0135] Optionally, the number of offline computing tasks can also be predicted by a long short-term memory neural network (LSTM), which takes the number of offline computing tasks in the previous period as input and outputs the number of offline computing tasks in the next period.

[0136] The method for determining the predicted number of offline computing tasks is not limited here, and those skilled in the art can determine it according to actual needs.

[0137] By setting the scheduling period of offline computing tasks, it is convenient to predict the number of offline tasks to be executed according to the scheduling period, and to elastically scale the number of machines while taking into account the periodicity of offline computing tasks. At the same time, compared with setting complex scaling rules, the scheduling period is simpler to set, which reduces operation and maintenance costs.

[0138] The scheduling method for offline computing tasks provided in this embodiment monitors the machines executing offline computing tasks in real time to determine the machine ready time range, and compares the execution completion time of the offline computing tasks with the machine ready time range to determine whether to start new machines and the number of new machines to be started, thereby determining reasonable machine resources and improving the accuracy of elastic scaling of the number of machines.

[0139] In this embodiment, a scheduling method for offline computing tasks is provided, which can be used for electronic devices such as servers and scheduling controllers in a distributed scheduling system. Figure 3 is a flowchart of a method for scheduling offline computing tasks according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0140] S31, obtaining an offline computing task to be executed. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0141] S32: Determine the execution time of the offline computing task based on the task information of the offline computing task.

[0142] Specifically, the above step S32 may include:

[0143] S321, extracting task execution data from the task information.

[0144] Extract task information from the acquired offline computing task, including the input file of the task, the execution parameters of the task, etc. These task information will have a huge impact on the execution time of the offline computing task. For example, the size and format of the input file are directly related to the amount of data to be processed, and the presence or absence of a certain execution parameter directly affects whether a certain computing step will be performed.

[0145] Specifically, the task execution related data is extracted from the task information, and the data is divided into multiple dimensions, mainly including: task attribute values, including input file information, such as file size fileSize; parameters required for the task execution process paramater; actual execution time cost of the executed offline computing tasks.

[0146] S322, pre-processing the task execution data to obtain target execution data.

[0147] In order to reduce the impact of the input data dimension, the file size fileSize in the input file information is preprocessed according to fileSize*=(fileSize-μ) / σ. Among them, μ and σ represent the mean and variance of the original data respectively. At the same time, the parameters required for the task execution process are preprocessed using one-hot encoding, and the encoded parameter format is (1,0,0...) or (0,1,0...). The preprocessed task execution data is determined as the target execution data.

[0148] S323, input the target execution data into the preset network model to obtain the execution time.

[0149] The target execution data obtained after preprocessing is used as the input of the preset network model, that is, input = [fileSize*, parameter], and the execution time is output through the preset network model, that is, output = cost.

[0150] The preset network model is a pre-trained neural network model, which can be trained based on sample execution data and sample output data, where the sample execution data corresponds to the target execution data and the sample output data corresponds to the execution time. That is, the number of neurons in the input layer is the number of inputs Input.length, and the number of neurons in the output layer is 1.

[0151] According to the trained neural network model, a web service is built. The web service can be used as a task execution time predictor to provide execution time prediction function with a restful API interface. The main process of building the web service is as follows: Use the Java language and spring boot framework to build the service, call the python script to execute the prediction process inside the web service, and then deploy the service to the same network where the task scheduler is located.

[0152] After the offline computing task enters the task scheduler, the task scheduler can push the information of the offline computing task to the execution time predictor in the form of interface parameters. The execution time predictor can call the preset neural network model, output the predicted value of the execution time for the offline computing task, and return the execution time to the task scheduler.

[0153] Optionally, the preset network model can also be constructed based on the statistical value of execution time. For example, through a time series database such as Prometheus, the actual execution time of several recently completed historical offline computing tasks is collected, and their average, median, 99% quantile and other statistical values ​​are calculated, and the calculated value is output as the predicted value of execution time.

[0154] S33, determining the execution completion time of the offline computing task based on the execution time consumption.

[0155] Specifically, the above step S33 may include:

[0156] S331, obtaining the pulling time of the offline computing task and the target machine for pulling the offline computing task.

[0157] The pull time is the time when the worker machine obtains the offline computing task and is ready to execute. The target machine can be determined by identifying the machine where the offline computing task is located. The target machine has unique identification information, such as machine ID, machine hardware serial number, etc. Specifically, a worker machine can only pull one offline computing task at a time, and the offline computing task can be mapped to the corresponding worker machine.

[0158] S332, adding the pulling time and the execution time to obtain the execution completion time of the target machine for the offline computing task.

[0159] The pull time is the start time when the worker machine executes the offline computing task. By adding the execution time to the pull time, we can get the end time of the offline computing task on the worker machine, that is, the execution completion time of the offline computing task.

[0160] S34, based on the execution completion time and the number of offline computing tasks to be executed, flexibly adjust the number of target machines for executing offline computing tasks. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0161] The scheduling method for offline computing tasks provided in this embodiment extracts task execution data from task information and uses a neural network model to predict the execution time of offline computing tasks, thereby improving the prediction accuracy of execution time, thereby improving the prediction accuracy of execution completion time, and facilitating accurate elastic scaling of the number of machines executing offline computing tasks based on the execution completion time.

[0162] In the present embodiment, a scheduling device for offline computing tasks is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0163] This embodiment provides a scheduling device for offline computing tasks, such as Figure 4 As shown, including:

[0164] The task scheduling module 41 is used to obtain offline computing tasks to be executed.

[0165] The task execution time consumption prediction module 42 is used to determine the execution time consumption of the offline computing task based on the task information of the offline computing task.

[0166] The task execution completion prediction module 43 is used to determine the execution completion time of the offline computing task based on the execution time consumption.

[0167] The elastic scaling module 44 is used to elastically adjust the number of target machines executing offline computing tasks based on the execution completion time and the number of offline computing tasks to be executed.

[0168] Optionally, the elastic expansion module 44 may include:

[0169] The time range determination submodule is used to determine the machine readiness time range for executing offline computing tasks.

[0170] The comparison submodule is used to compare the machine ready time range with the execution completion time, and determine the number of first machines whose execution completion time is within the ready time range.

[0171] The adjustment submodule is used to adjust the first number of machines based on the comparison result between the number to be executed and the first number of machines.

[0172] The quantity determination submodule is used to determine the adjusted first machine quantity as the target machine quantity.

[0173] Optionally, the time range determination submodule is specifically used to: obtain the machine startup time for executing the offline computing task; and determine the machine ready time range for executing the offline computing task based on the current time and the machine startup time.

[0174] Optionally, the above-mentioned adjustment submodule is specifically used to: obtain the predicted number of offline computing tasks, the queue number, the lower limit of the number of machines, and the number of second machines in a non-offline state; when the queue number is zero, determine the maximum value between the lower limit of the number of machines and the predicted number; based on the maximum value and the second number of machines, determine the number of machines to be shut down; and reduce the number of first machines according to the number of machines to be shut down.

[0175] Optionally, the adjustment submodule is further used to: detect whether the machine is currently in a cooling period; if the machine is not currently in a cooling period, release the machines in the ready state until the number of machine shutdowns is reached.

[0176] Optionally, the above adjustment submodule is further used to: when the queue quantity is greater than zero, determine the number of machines to be increased based on the first machine quantity and the predicted quantity; and increase and adjust the first machine quantity according to the number of machines turned on.

[0177] Optionally, the above adjustment submodule is further specifically used to: obtain an upper limit value of the number of machines; constrain the number of machines to be increased based on the upper limit value of the number of machines, and determine a target increase number; and increase and adjust the first number of machines according to the target increase number.

[0178] Optionally, the elastic expansion module 44 may further include:

[0179] The cycle acquisition submodule is used to obtain the scheduling cycle for offline computing tasks.

[0180] The prediction submodule is used to predict the number of offline computing tasks to be executed according to the scheduling period.

[0181] Optionally, the task execution time-consuming prediction module 42 may include:

[0182] The extraction submodule is used to extract the task execution data in the task information.

[0183] The preprocessing submodule is used to preprocess the task execution data to obtain the target execution data.

[0184] The execution time determination submodule is used to input the target execution data into a preset network model to obtain the execution time.

[0185] Optionally, the task execution completion prediction module 43 may include:

[0186] The acquisition submodule is used to obtain the pull time of the offline computing task and the target machine for pulling the offline computing task.

[0187] The superposition submodule is used to superimpose the pulling time and the execution time to obtain the execution completion time of the target machine for the offline computing task.

[0188] The scheduling device for offline computing tasks in this embodiment is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0189] The further functional description of the above modules and sub-modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0190] The scheduling device for offline computing tasks provided in this embodiment determines the corresponding execution time through the task information of the offline computing tasks, and determines the execution completion time according to the execution time, so that the required number of target machines can be determined according to the number of offline computing tasks to be executed and the execution completion time of each offline computing task, and the number of target machines can be adjusted flexibly. The device can automatically adjust the number of target machines based on the situation of offline computing tasks to be executed, realize the reasonable scheduling of offline computing tasks, shorten the queuing time of offline computing tasks, reduce the waste of machine resources, and ensure that offline computing tasks can be completed as soon as possible.

[0191] The embodiment of the present invention also provides an electronic device having the above Figure 4 The scheduling device of the offline computing task is shown.

[0192] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 5As shown, the electronic device may include: at least one processor 501, such as a central processing unit (CPU), at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The communication interface 503 may include a display screen (Display) and a keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a wireless interface. The memory 504 may be a high-speed volatile random access memory (Random Access Memory, RAM) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 504 may optionally be at least one storage device located away from the aforementioned processor 501. The processor 501 may be combined with Figure 4 In the described device, the memory 504 stores an application program, and the processor 501 calls the program code stored in the memory 504 to execute any of the above method steps.

[0193] The communication bus 502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0194] Among them, the memory 504 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 504 may also include a combination of the above types of memory.

[0195] The processor 501 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0196] The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0197] Optionally, the memory 504 is also used to store program instructions. The processor 501 can call the program instructions to implement the scheduling method of the offline computing task as shown in the above embodiment of the present application.

[0198] The embodiment of the present invention also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the scheduling method of offline computing tasks in any of the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0199] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A scheduling method for offline computing tasks, characterized in that: include: Get offline computing tasks to be executed; Determining the execution time of the offline computing task based on the task information of the offline computing task; Determining the execution completion time of the offline computing task based on the execution time consumption; Based on the execution completion time and the number of the offline computing tasks to be executed, the number of target machines executing the offline computing tasks is flexibly adjusted.

2. The method according to claim 1, characterized in that The step of flexibly adjusting the number of target machines executing the offline computing task based on the execution completion time and the number of offline computing tasks to be executed includes: Determining a machine ready time range for executing the offline computing task; Comparing the machine ready time range with the execution completion time, and determining the number of first machines whose execution completion time is within the ready time range; Based on a comparison result between the to-be-executed quantity and the first number of machines, adjusting the first number of machines; The adjusted first number of machines is determined as the target number of machines.

3. The method according to claim 2, characterized in that The adjusting the first number of machines based on the comparison result between the to-be-executed number and the first number of machines includes: Obtaining the predicted number, the queued number, the lower limit of the number of machines, and the number of second machines in a non-offline state of the offline computing tasks; When the queue quantity is zero, determining the maximum value between the lower limit value of the number of machines and the predicted quantity; determining a machine shutdown quantity based on the maximum value and the second machine quantity; The first number of machines is reduced and adjusted according to the number of shut-down machines.

4. The method according to claim 3, characterized in that The reducing and adjusting the first number of machines according to the number of shut-down machines includes: Check whether the machine is currently in the cooling period; If the machine is not in the cooling period currently, the machines in the ready state are released until the machine shutdown number is reached.

5. The method according to claim 3, characterized in that: The adjusting the first number of machines based on the comparison result between the to-be-executed number and the first number of machines also includes: When the queue quantity is greater than zero, determining the number of machines to be added based on the first number of machines and the predicted number; The first number of machines is increased and adjusted according to the number of machines turned on.

6. The method according to claim 5, characterized in that Increasing and adjusting the first number of machines according to the number of machines turned on, including: Get the upper limit of the number of machines; Based on the upper limit value of the number of machines, the number of machines to be increased is constrained to determine the target number of machines to be increased; The first number of machines is increased and adjusted according to the target increase number.

7. The method according to claim 1 or 2, characterized in that: Determining the number of offline computing tasks to be executed includes: Obtaining a scheduling period for the offline computing task; The number of offline computing tasks to be executed is predicted according to the scheduling period.

8. The method according to claim 2, characterized in that: The determining of a machine ready time range for executing the offline computing task includes: Obtaining the startup time of a machine that executes the offline computing task; Based on the current time and the time taken to start the machine, a machine ready time range for executing the offline computing task is determined.

9. The method according to claim 1, characterized in that: The determining, based on the task information of the offline computing task, the execution time of the offline computing task includes: Extracting task execution data from the task information; Preprocessing the task execution data to obtain target execution data; The target execution data is input into a preset network model to obtain the execution time.

10. The method according to claim 1 or 9, characterized in that: The determining the execution completion time of the offline computing task based on the execution time consumption includes: Obtaining the pulling time of the offline computing task and the target machine for pulling the offline computing task; The pulling time and the execution time are added together to obtain the execution completion time of the target machine for the offline computing task.

11. A scheduling device for offline computing tasks, characterized in that: include: Task scheduling module, used to obtain offline computing tasks to be executed; A task execution time prediction module, used to determine the execution time of the offline computing task based on the task information of the offline computing task; A task execution completion prediction module, used to determine the execution completion time of the offline computing task based on the execution time consumption; The elastic scaling module is used to elastically adjust the number of target machines executing the offline computing tasks based on the execution completion time and the number of offline computing tasks to be executed.

12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the scheduling method for offline computing tasks described in any one of claims 1 to 10 by executing the computer instructions.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the scheduling method for offline computing tasks according to any one of claims 1 to 10.