Task scheduling processing method and device

By developing task scheduling and processing methods in the K8s server cluster, resource allocation is optimized based on the unused resources and task requirements of the regional cluster, the problem of low resource utilization under K8s is solved, and resource utilization and enterprise competitiveness are improved.

CN114237907BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111585247.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2024-12-20
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The resource utilization rate of server clusters under Kubernetes is not high, resulting in unreasonable resource scheduling, resulting in waste of resources, and increasing server deployment costs.

Method used

By developing a task scheduling processing method in the K8s server cluster, receiving tasks to be scheduled, obtaining the amount of resources not used in each regional cluster at the moment, and issuing the task to the amount of resources not used is greater than the required amount of resources required by the task Regional clusters ensure that regional clusters have the ability to undertake tasks, avoid tasks being unable to undertake new tasks due to the failure to arrive, monitor resource utilization in real time, and reduce idle resources.

Benefits of technology

It improves the resource utilization rate of server clusters under K8s, reduces server deployment costs, reduces resource waste, and enhances enterprise competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114237907B_ABST
    Figure CN114237907B_ABST
Patent Text Reader

Abstract

The present application provides a task scheduling processing method and device thereof. The method is applied to the management and control equipment of the K8s server cluster, including: receiving the task to be scheduled, parsing the amount of resources and execution requirements required for the task to be scheduled, the execution requirements at least including the execution time and execution duration; obtaining the amount of unused resources of each regional cluster in the server cluster at the current moment; determining the first regional cluster from the regional clusters of the server cluster, the amount of unused resources of the first regional cluster being greater than or equal to the amount of resources required for the task to be scheduled; sending the task to be scheduled and the execution requirements to the first regional cluster. The method of the present application can improve the resource utilization of the server cluster under K8s.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to cluster resource management technology, and in particular to a task scheduling processing method and device thereof. Background Art

[0002] Kubernetes (K8s) is a widely used container cluster management system. Based on Docker technology, it provides a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling for containerized applications, which improves the convenience of large-scale container cluster management.

[0003] Deploying K8s on server clusters has always been the choice of many enterprises. However, as the scale of enterprises continues to expand, the problem of low resource utilization of server clusters has been plaguing K8s developers and operators. If the resource utilization of server clusters under K8s can be improved, the cost of server deployment can be reduced, thereby improving the competitiveness of enterprises.

[0004] Therefore, how to improve the resource utilization of server clusters under K8s is still an urgent problem to be solved. Summary of the invention

[0005] The present application provides a task scheduling processing method and device thereof, which are used to improve the resource utilization of a server cluster under K8s.

[0006] On the one hand, the present application provides a task scheduling processing method, which is applied to the control device of the K8s server cluster, including:

[0007] Receiving a task to be scheduled, and analyzing the amount of resources and execution requirements required for the task to be scheduled, wherein the execution requirements at least include an execution time and an execution duration;

[0008] Obtaining the amount of unused resources of each regional cluster in the server cluster at the current moment;

[0009] Determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled;

[0010] The tasks to be scheduled and the execution requirements are sent to the first regional cluster.

[0011] Optionally, determining the first regional cluster from the regional clusters of the server cluster includes:

[0012] Determine a candidate regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the candidate regional cluster is greater than or equal to the amount of resources required by the task to be scheduled;

[0013] The first regional cluster is determined from the candidate regional clusters, where the first regional cluster is a regional cluster having the largest amount of unused resources among the candidate regional clusters.

[0014] Optionally, sending the to-be-scheduled task and the execution requirement to the first regional cluster includes:

[0015] determining a least utilized node from the first regional cluster;

[0016] The tasks to be scheduled and the execution requirements are sent to the node with the lowest utilization rate.

[0017] Optionally, sending the to-be-scheduled task and the execution requirement to the node with the lowest utilization rate includes:

[0018] Obtaining the execution time and execution duration of the task to be executed in the node with the lowest utilization rate;

[0019] When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

[0020] Optionally, also include:

[0021] When the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, and the execution time of the task to be scheduled is greater than the preset time, a task deletion instruction is sent to the node with the lowest utilization rate, so that the node with the lowest utilization rate deletes the tasks to be executed whose resource requirements are less than the preset resource requirements.

[0022] Optionally, the task carries an importance level, and the sending the task to be scheduled and the execution requirement to the node with the lowest utilization rate further includes:

[0023] Obtaining the importance level of the task to be executed in the node with the lowest utilization rate;

[0024] When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is less than the execution duration of the task to be executed, compare the importance levels of the task to be scheduled and the task to be executed;

[0025] When the importance level of the task to be scheduled is higher than the importance level of the task to be executed in the node with the lowest utilization rate, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

[0026] Optionally, obtaining the amount of unused resources of each regional cluster in the server cluster at the current moment includes:

[0027] When the importance level of the task to be scheduled is the highest level, sending a request to the superior terminal whether to execute the task to be scheduled;

[0028] When receiving the instruction fed back by the superior terminal to continue executing the task to be scheduled, the amount of unused resources of each regional cluster in the server cluster at the current moment is obtained.

[0029] Optionally, after comparing the importance level of the task to be scheduled and the importance level of the task to be executed, the method further includes:

[0030] When the importance level of the task to be scheduled is lower than the importance level of the task to be executed in the node with the lowest utilization rate, an instruction for giving priority to the execution of the task to be executed is sent to the node with the lowest utilization rate.

[0031] Optionally, also include:

[0032] When the amount of unused resources in any one of the regional clusters in the server cluster is less than a minimum amount of resources, the resource space in the any one of the regional clusters is adjusted until the amount of unused resources in the any one of the regional clusters is greater than or equal to the minimum amount of resources.

[0033] On the other hand, the present application provides a task scheduling processing device, which is applied to a management and control device of a K8s server cluster, including:

[0034] A task analysis module, used to receive the task to be scheduled, analyze the amount of resources and execution requirements required for the task to be scheduled, and the execution requirements at least include the execution time and execution duration;

[0035] A regional scheduling module, used to obtain the amount of unused resources of each regional cluster in the server cluster at the current moment;

[0036] The regional scheduling module is further used to determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled;

[0037] The task sending module is used to send the to-be-scheduled task and the execution requirement to the first regional cluster.

[0038] On the other hand, the present application provides a management and control device, including: a processor, and a memory communicatively connected to the processor;

[0039] The memory stores computer-executable instructions;

[0040] The processor executes the computer-executable instructions stored in the memory to implement the task scheduling processing method as described in the first aspect.

[0041] On the other hand, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the instructions are executed, the computer executes the task scheduling processing method as described in the first aspect.

[0042] On the other hand, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the task scheduling processing method as described in the first aspect.

[0043] The method provided by the embodiment of the present application obtains the amount of unused resources of each regional cluster in the server cluster at the current moment when receiving a task, and then sends the task to the regional cluster whose unused resources are greater than the amount of resources required for the task. As long as the regional cluster has the ability to undertake the task, it can execute the task, and will not be unable to undertake new tasks because the task executed by the regional cluster has not reached the specified time, thereby improving the resource utilization of the server cluster under K8s. In addition, real-time monitoring of the resource utilization status of the regional cluster can greatly reduce the amount of idle resources in the regional cluster, improving the resource utilization of the server cluster under K8s. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] Figure 1 A schematic diagram of an application scenario of the task scheduling processing method provided in this application.

[0046] Figure 2 A flowchart of a task scheduling method provided for one embodiment of the present application.

[0047] Figure 3 A flowchart of a task scheduling method provided for another embodiment of the present application.

[0048] Figure 4 A schematic diagram of a task scheduling processing device provided for one embodiment of the present application.

[0049] Figure 5 A schematic diagram of a control device provided for one embodiment of the present application.

[0050] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0052] Kubernetes (K8s) is a widely used container cluster management system. Based on Docker technology, it provides a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling for containerized applications, which improves the convenience of large-scale container cluster management.

[0053] Deploying K8s on server clusters has always been the choice of many enterprises. However, as the scale of enterprises continues to expand, the problem of low resource utilization of K8s clusters has been plaguing K8s developers and operators. The problem of reducing resource utilization of server clusters under K8s generally comes from unreasonable resource scheduling. For example, some regional clusters in the server cluster are idle most of the time due to low actual resource utilization, but no tasks are assigned to them, resulting in a large waste of resources. The problem of low actual resource utilization of regional clusters is caused by, for example, the user input demand (i.e. the task requirements sent to the cluster) is greater than the actual demand, resulting in the cluster being idle after the demand is completed.

[0054] If the resource utilization of the server cluster under K8s can be improved, the server deployment cost can be reduced, thereby improving the competitiveness of the enterprise.

[0055] Based on this, the present application provides a task scheduling processing method and device thereof, which is applied to the management and control equipment of the K8s server cluster. When the server cluster receives a task, it obtains the amount of unused resources of each regional cluster in the server cluster at the current moment, and then sends the task to the regional cluster whose unused resources are greater than the amount of resources required for the task. As long as the regional cluster has the ability to undertake the task, it can execute the task, and will not be unable to undertake new tasks because the task executed by the regional cluster has not reached the specified time, thereby improving the resource utilization of the server cluster under K8s. In addition, monitoring the resource utilization status of the regional cluster can greatly reduce the amount of idle resources in the regional cluster and improve the resource utilization of the server cluster under K8s.

[0056] The task scheduling processing method provided in this application is applied to the management and control equipment of the K8s server cluster, such as a dedicated server, computer, etc. Figure 1 This is an application diagram of the task scheduling processing method provided by the present application. In the figure, after receiving the task to be scheduled, the control device obtains the amount of unused resources of each regional cluster in the server cluster at the current moment, and then compares the amount of unused resources of the regional cluster with the amount of resources required for the task to be scheduled. For example, if the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required for the task to be scheduled, the task to be scheduled is sent to the node in the first regional cluster for processing.

[0057] See also Figure 2 , Embodiment 1 of the present application provides a task scheduling processing method, which is applied to a management and control device of a K8s server cluster, including:

[0058] S210, receiving a task to be scheduled, and parsing the amount of resources and execution requirements required by the task to be scheduled, where the execution requirements at least include an execution time and an execution duration.

[0059] The task to be scheduled is formulated by the user according to the requirements and sent to the control device. When formulating the task to be scheduled, the user can formulate the execution requirements of the task to be scheduled, which include the execution time and execution duration of the task to be scheduled. For example, the user specifies that the task to be scheduled starts at 10 o'clock in the evening and executes for a total of 20 minutes.

[0060] After receiving the task to be scheduled, it is also necessary to determine the amount of resources required for the task to be scheduled based on the task to be scheduled. The amount of resources can be understood as the amount of central processing unit (CPU) resources, memory resources, and storage-related resources required when the task to be scheduled is executed. Of course, the utilization rate required by the task to be scheduled can also be analyzed. The utilization rate can be understood as the utilization rate of the central processing unit (CPU), memory utilization rate, and storage-related utilization rate required when the task to be scheduled is executed.

[0061] S220, obtaining the amount of unused resources of each regional cluster in the server cluster at the current moment.

[0062] The server cluster includes at least two regional clusters, each of which includes multiple nodes. Each node is used to execute at least one task. The tasks being executed will increase the utilization rate of the node, which can also be understood as the amount of resources occupied by the node. Therefore, it is necessary to first obtain the amount of unused resources of each regional cluster in units of regional clusters.

[0063] S230: Determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled.

[0064] After obtaining the unused resource amount of each regional cluster, determine which regional cluster can process the task to be scheduled and then send the task to this regional cluster. That is, when the unused resource amount of the first regional cluster (the first does not represent the order, the first regional cluster represents any regional cluster) in the server cluster is greater than or equal to the resource amount required by the task to be scheduled, send the task to the first regional cluster.

[0065] The smaller the utilization rate of the regional cluster, the larger the amount of unused resources of the regional cluster. Therefore, the utilization rate of each regional cluster can also be used to determine which regional cluster the task to be scheduled should be sent to. As in step S210, after analyzing the utilization rate required for the task to be scheduled, the utilization rate of each regional cluster is analyzed again in this step. When the utilization rate of the first regional cluster is less than or equal to the utilization rate required for the task to be scheduled, the task to be scheduled is sent to the first regional cluster.

[0066] Optionally, the task to be scheduled may also be sent to the regional cluster with the largest amount of unused resources. That is, a candidate regional cluster is determined from the regional clusters of the server cluster, and the amount of unused resources of the candidate regional cluster is greater than or equal to the amount of resources required by the task to be scheduled. The first regional cluster is then determined from the candidate regional clusters, and the first regional cluster is the regional cluster with the largest amount of unused resources among the candidate regional clusters.

[0067] The more unused resources there are, the faster the regional cluster processes the tasks to be scheduled. Therefore, using more regional clusters with larger unused resources as clusters for processing tasks to be scheduled can improve the processing speed and efficiency of tasks to be scheduled, thereby further improving the resource utilization of the server cluster and reducing server deployment costs.

[0068] Optionally, before the task to be scheduled is processed, it is also possible to monitor in real time which regional cluster can provide a larger amount of resources, and then send the task to be scheduled to the regional cluster that can provide a larger amount of resources.

[0069] Optionally, if the amount of unused resources in each regional cluster in the server cluster is less than the amount of resources required by the task to be scheduled, then continue to wait and execute step S220 until the task to be scheduled is sent down. That is, the amount of unused resources in each regional cluster in the server cluster is monitored in real time until the task to be scheduled is sent down.

[0070] Optionally, the resource space of the regional cluster can also be adjusted to adjust the amount of unused resources of the regional cluster. That is, when the amount of unused resources of any regional cluster in the server cluster is less than the minimum amount of resources, the resource space in the any regional cluster is adjusted until the amount of unused resources of the any regional cluster is greater than or equal to the minimum amount of resources. The method for adjusting the resource space of the regional cluster can be to adjust the amount of resources occupied by the tasks that can be processed by the nodes in the regional cluster to improve the utilization rate of the nodes, thereby increasing the amount of unused resources of the any regional cluster.

[0071] In summary, the method provided in this embodiment obtains the amount of unused resources of each regional cluster in the server cluster at the current moment when receiving a task, and then sends the task to the regional cluster whose unused resources are greater than the amount of resources required for the task. As long as the regional cluster has the ability to undertake the task, it can execute the task, and will not be unable to undertake new tasks because the task executed by the regional cluster has not reached the specified time, thereby improving the resource utilization of the server cluster under K8s. In addition, real-time monitoring of the resource utilization status of the regional cluster can greatly reduce the amount of idle resources in the regional cluster and improve the resource utilization of the server cluster under K8s.

[0072] See also Figure 3 The second embodiment of the present application provides a task scheduling processing method, which further describes the execution process of the task to be scheduled after it is issued based on the first embodiment, and after the task to be scheduled is issued, it also includes:

[0073] S310: Determine a node with the lowest usage rate from the first regional cluster.

[0074] When determining the node to execute the scheduled task, any node with a small amount of tasks and the lowest utilization rate can be selected as the node to execute the scheduled task. The node with the lowest utilization rate, that is, the more resource space the node can provide, the greater the possibility that the scheduled task can be directly processed without waiting when processing the scheduled task.

[0075] S320: Send the task to be scheduled and the execution requirement to the node with the lowest utilization rate.

[0076] After the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate, the node with the lowest utilization rate executes the task to be scheduled based on the execution requirement. Optionally, when executing the task to be scheduled based on the node with the lowest utilization rate, the computing speed of the server cluster at night is used by default (the computing speed at night is lower than the computing speed during the day), and the amount of resources in each regional cluster is reduced to a relatively low amount of resources. If the task to be scheduled needs to occupy too much resources, it is necessary to submit a request to the superior terminal of the cluster server, and the superior management personnel will decide whether to execute the task to be scheduled.

[0077] The control device can control and adjust the state of the node with the lowest utilization rate when executing the task to be scheduled. For example, when there may be tasks to be executed in the node with the lowest utilization rate that need to be executed at a future time, it is necessary to analyze the tasks to be executed and the tasks to be scheduled to determine whether there is a conflict, and decide how to execute the tasks if there is a conflict.

[0078] Specifically, the execution time and execution duration of the task to be executed in the node with the lowest utilization rate are obtained. When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate. That is, the task with a longer execution duration is executed as a priority task, and the task with a shorter execution duration can be temporarily postponed or the execution duration can be directly compressed, or transferred to other nodes for execution.

[0079] Optionally, when the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, and the execution time of the task to be scheduled is greater than the preset time, a task deletion instruction is sent to the node with the lowest utilization rate, so that the node with the lowest utilization rate deletes the tasks to be executed whose resource requirements are less than the preset resource requirements.

[0080] The reason for giving priority to tasks that take a long time to execute and deleting unimportant tasks is that the computing power of nodes is gradually weakening, and it is necessary to give priority to tasks that take up more resources so that these tasks can be completed quickly in a short time instead of taking up a lot of the node's time. Therefore, through time resource scheduling, the time it takes for a node to execute multiple tasks can be shorter and more efficient.

[0081] Optionally, the tasks assigned to each node in the server cluster carry an importance level. When the control node executes multiple tasks, the execution time, execution duration and importance level of multiple tasks are comprehensively considered to determine the execution order and execution time period of the tasks (for example, executing tasks with short execution time at night when the node's computing power is weak).

[0082] Specifically, the importance level of the task to be executed in the node with the lowest utilization rate is obtained. When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is less than the execution duration of the task to be executed, the importance levels of the task to be scheduled and the task to be executed are compared. When the importance level of the task to be scheduled is higher than the importance level of the task to be executed in the node with the lowest utilization rate, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate. When the importance level of the task to be scheduled is lower than the importance level of the task to be executed in the node with the lowest utilization rate, an instruction to prioritize the execution of the task to be executed is sent to the node with the lowest utilization rate.

[0083] However, when the importance level of the task to be scheduled is the highest level, the control device needs to send a request to the superior terminal whether to execute the task to be scheduled, and the superior management personnel will decide whether to execute the task to be scheduled or allocate it to a specific node to execute the task to be scheduled.

[0084] The method provided in this embodiment further describes the specific execution method of the task to be scheduled on the basis of the first embodiment, and sorts the priority between the node with the lowest utilization rate to execute the task to be scheduled and other tasks to be executed according to the execution time, execution duration and importance level of the task to be scheduled. If the execution time of the task to be scheduled is earlier, the execution duration is longer, and the importance level is higher, then the task to be scheduled needs to be executed first. Similarly, if the execution time of other tasks to be executed is earlier, the execution duration is longer, and the importance level is higher, then the other tasks to be executed need to be executed first. In this way, the execution of tasks is sorted in time, and resource scheduling is realized when nodes execute tasks, so that tasks that are more difficult to execute can be executed faster and earlier, thereby improving the resource utilization of nodes and server clusters.

[0085] See also Figure 4 , Embodiment 3 of the present application further provides a task scheduling processing device 10, which is applied to a management and control device of a K8s server cluster, including:

[0086] The task analysis module 11 is used to receive the task to be scheduled, and analyze the resource amount and execution requirements required by the task to be scheduled, and the execution requirements at least include the execution time and execution duration.

[0087] The regional scheduling module 12 is used to obtain the amount of unused resources of each regional cluster in the server cluster at the current moment.

[0088] The regional scheduling module 12 is further configured to determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled.

[0089] The regional scheduling module 12 is further used to send the task to be scheduled and the execution requirement to the first regional cluster.

[0090] The regional scheduling module 12 is specifically used to determine a candidate regional cluster from the regional clusters of the server cluster, the amount of unused resources of the candidate regional cluster being greater than or equal to the amount of resources required for the task to be scheduled; and to determine the first regional cluster from the candidate regional clusters, the first regional cluster being the regional cluster with the largest amount of unused resources among the candidate regional clusters.

[0091] The node scheduling module 13 is used to determine the node with the lowest utilization rate from the first regional cluster; and send the task to be scheduled and the execution requirement to the node with the lowest utilization rate.

[0092] The task scheduling processing device 10 further includes a monitoring module 14 for monitoring the status of the tasks assigned to each node in each regional cluster in the server cluster, the requirements of the assigned tasks, the importance level, etc.

[0093] The node scheduling module 13 determines the priority of executing the task from the data monitored by the monitoring module 14. The node scheduling module 13 is specifically used to obtain the execution time and execution duration of the task to be executed in the node with the lowest utilization rate; when the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

[0094] The node scheduling module 13 is specifically used to obtain the importance level of the task to be executed in the node with the lowest utilization rate; when the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is less than the execution duration of the task to be executed, compare the importance level of the task to be scheduled and the task to be executed; when the importance level of the task to be scheduled is higher than the importance level of the task to be executed in the node with the lowest utilization rate, send the task to be scheduled and the execution requirement to the node with the lowest utilization rate.

[0095] The node scheduling module 13 is also used to send a task deletion instruction to the node with the lowest utilization rate when the execution time of the task to be scheduled is greater than the execution time of the task to be executed, and the execution time of the task to be scheduled is greater than the preset time, so that the node with the lowest utilization rate deletes the task to be executed whose resource requirement is less than the preset resource requirement.

[0096] The regional scheduling module 12 is specifically used to send a request to the superior terminal whether to execute the task to be scheduled when the importance level of the task to be scheduled is the highest level; when receiving the instruction of the terminal to continue to execute the task to be scheduled, obtain the unused resource amount of each regional cluster in the server cluster at the current moment. When the importance level of the task to be scheduled is lower than the importance level of the task to be executed in the node with the lowest utilization rate, send an instruction to the node with the lowest utilization rate to execute the task to be executed first.

[0097] The task scheduling processing device 10 also includes an over-allocation control module 15, which is used to adjust the resource space in any regional cluster in the server cluster when the unused resource amount of any regional cluster is less than the minimum resource amount until the unused resource amount of any regional cluster is greater than or equal to the minimum resource amount.

[0098] The task scheduling processing device 10 further includes a task time planning module 16, which is used to automatically reduce the computing power of the regional cluster when the nodes in the regional cluster are busy, and to increase the computing power of the regional cluster when the nodes are idle.

[0099] See also Figure 5, Embodiment 3 of the present application further provides a control device 20, including a processor 21 and a memory 22 in communication with the processor 21. The memory 22 stores computer-executable instructions, and the processor 21 executes the computer-executable instructions stored in the memory 22 to implement the task scheduling processing method described in any of the above embodiments.

[0100] The present application also provides a computer-readable storage medium, which stores computer execution instructions. When the instructions are executed, the computer execution instructions are executed by a processor to implement the task scheduling processing method provided in any of the above embodiments.

[0101] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the task scheduling processing method provided in any of the above embodiments.

[0102] It should be noted that the above-mentioned computer-readable storage medium may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories. It may also be various control devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0103] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0104] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0109] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A task scheduling processing method, characterized in that: Management and control devices used in K8s server clusters include: Receiving a task to be scheduled, and analyzing the amount of resources and execution requirements required for the task to be scheduled, wherein the execution requirements at least include an execution time and an execution duration; Obtaining the amount of unused resources of each regional cluster in the server cluster at the current moment; Determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled; determining a least utilized node from the first regional cluster; Obtaining the execution time and execution duration of the task to be executed in the node with the lowest utilization rate; When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

2. The method according to claim 1, characterized in that: The determining of the first regional cluster from the regional clusters of the server cluster includes: Determine a candidate regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the candidate regional cluster is greater than or equal to the amount of resources required by the task to be scheduled; The first regional cluster is determined from the candidate regional clusters, where the first regional cluster is a regional cluster having the largest amount of unused resources among the candidate regional clusters.

3. The method according to claim 1, characterized in that Also includes: When the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, and the execution time of the task to be scheduled is greater than the preset time, a task deletion instruction is sent to the node with the lowest utilization rate, so that the node with the lowest utilization rate deletes the tasks to be executed whose resource requirements are less than the preset resource requirements.

4. The method according to claim 1, characterized in that: The task carries an importance level, and the sending of the to-be-scheduled task and the execution requirement to the node with the lowest utilization rate further includes: Obtaining the importance level of the task to be executed in the node with the lowest utilization rate; When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is less than the execution duration of the task to be executed, compare the importance levels of the task to be scheduled and the task to be executed; When the importance level of the task to be scheduled is higher than the importance level of the task to be executed in the node with the lowest utilization rate, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

5. The method according to claim 4, characterized in that The obtaining of the unused resource amount of each regional cluster in the server cluster at the current moment comprises: When the importance level of the task to be scheduled is the highest level, sending a request to the superior terminal whether to execute the task to be scheduled; When receiving the instruction fed back by the superior terminal to continue executing the task to be scheduled, the amount of unused resources of each regional cluster in the server cluster at the current moment is obtained.

6. The method according to claim 4, characterized in that After comparing the importance level of the task to be scheduled and the importance level of the task to be executed, the method further includes: When the importance level of the task to be scheduled is lower than the importance level of the task to be executed in the node with the lowest utilization rate, an instruction for giving priority to the execution of the task to be executed is sent to the node with the lowest utilization rate.

7. The method according to claim 1, characterized in that Also includes: When the amount of unused resources in any one of the regional clusters in the server cluster is less than a minimum amount of resources, the resource space in the any one of the regional clusters is adjusted until the amount of unused resources in the any one of the regional clusters is greater than or equal to the minimum amount of resources.

8. A task scheduling processing device, characterized in that: Management and control devices used in K8s server clusters include: A task analysis module, used to receive the task to be scheduled, analyze the amount of resources and execution requirements required for the task to be scheduled, and the execution requirements at least include the execution time and execution duration; A regional scheduling module, used to obtain the amount of unused resources of each regional cluster in the server cluster at the current moment; The regional scheduling module is further used to determine a first regional cluster from the regional clusters of the server cluster, wherein the amount of unused resources of the first regional cluster is greater than or equal to the amount of resources required by the task to be scheduled; A task issuing module, used to determine the node with the lowest utilization rate from the first regional cluster; Obtaining the execution time and execution duration of the task to be executed in the node with the lowest utilization rate; When the execution time of the task to be executed in the node with the lowest utilization rate is the same as the execution time of the task to be scheduled, and the execution duration of the task to be scheduled is greater than the execution duration of the task to be executed, the task to be scheduled and the execution requirement are sent to the node with the lowest utilization rate.

9. A control device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the task scheduling processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the instructions are executed, the computer executes the task scheduling processing method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the task scheduling processing method according to any one of claims 1 to 7 is implemented.