A task scheduling method, system, program product, device and medium

By clustering business scenarios on task processing nodes, the task scheduling process is simplified and resource waste is reduced. The problems of resource waste and high complexity in the existing technology are solved, and efficient task scheduling is achieved.

CN118193177BActive Publication Date: 2024-09-24JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620132.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-24
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

In cloud platform systems, existing task scheduling methods require the collection and screening of resource information for all nodes, leading to resource waste and high complexity.

Method used

By clustering nodes according to the business scenarios of task processing nodes, predetermining the target node cluster, and selecting the appropriate node from the target node cluster for task scheduling when a task is received, the scheduling process is simplified and resource waste is reduced.

Benefits of technology

It realizes the simplified process of task scheduling, reduces the complexity of working time, and reduces the waste of system resources through one-time pre-classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present invention provides a method, system, program product, device and medium for scheduling tasks, which are applied to the technical field of task scheduling. The method may include: the task scheduling system may cluster multiple task processing nodes in advance according to the business scenarios applied by each task processing node to obtain multiple node clusters; when receiving a target task, the task scheduling system may determine the target node cluster corresponding to the business scenario to which the target task belongs, and determine the target task processing node from the target node cluster; then, the task scheduling system may schedule the target task to the target task processing node for processing. Through the embodiments of the present invention, the process of task scheduling can be simplified and the complexity of working time can be reduced. And the pre-classification can be one-time, that is, after pre-classification is performed once in advance, all subsequent tasks can be performed based on the pre-classification, which can reduce the waste of system resources compared to the task scheduling method of the prior art.
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 task scheduling method, system, program product, device and medium. Background Art

[0002] In the cloud platform system, computing nodes are the core units for executing various tasks, and usually deploy different combinations of heterogeneous resources at the same time to meet the needs of different task types. These heterogeneous resources include CPU (Central Processing Unit), memory, GPU (Graphics Processing Unit), etc.

[0003] As a scheduling framework, Kubernetes plays a vital role in cloud computing business, and its task scheduling mechanism affects many open source projects.

[0004] Specifically, Figure 1 As shown: the task can be sent to a task scheduler first; the task scheduler can request the resource status from the resource manager.

[0005] The resource manager can collect resource information from each node and return the collected resource information to the task scheduler.

[0006] After receiving the resource information, the task scheduler can first screen out multiple nodes that meet the resource request amount of the task; then, determine the most suitable node from the screened multiple nodes for task scheduling.

[0007] In actual applications, the resource manager is mainly responsible for collecting resource information and sending it to the task scheduler. Figure 2 As shown, the nodes include node A, node B, node C, node D, node E, and node F; when the resource manager receives the request sent by the task scheduler, it can collect node A resource information corresponding to node A, node B resource information corresponding to node B, node C resource information corresponding to node C, node D resource information corresponding to node D, node E resource information corresponding to node E, and node F resource information corresponding to node F, and return the node A resource information, node B resource information, node C resource information, node D resource information, node E resource information, and node F resource information to the task scheduler.

[0008] The task scheduler then filters out node A, node E, and node C from node A, node B, node C, node D, node E, and node F based on the resource information of node A, node B, node C, node D, node E, and node F.

[0009] Then, the task scheduler selects the most suitable node from node A, node E, and node C for task scheduling.

[0010] During this process, the resource manager will send the resource information of all nodes to the task scheduler to ensure that the task scheduler can determine the most suitable node for task scheduling. However, this will also return information about nodes that are not suitable for processing tasks to the task scheduler, causing the task scheduler to invest a lot of operations in screening meaningless nodes.

[0011] And each time a task is scheduled, the above operation will be performed once, which is a huge waste of resources for the system. Summary of the invention

[0012] In view of the above problems, a method for scheduling a task, a task scheduling system, a computer program product, an electronic device and a non-volatile computer-readable storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:

[0013] A task scheduling method is applied to a task scheduling system, wherein the task scheduling system includes a plurality of task processing nodes, and different task processing nodes are applied to different business scenarios. The task scheduling method includes:

[0014] Clustering the multiple task processing nodes according to the business scenarios applied by each task processing node to obtain multiple node clusters;

[0015] When receiving a target task, determining a target node cluster corresponding to the business scenario to which the target task belongs;

[0016] Determining a target task processing node from the target node cluster;

[0017] The target task is dispatched to the target task processing node for processing.

[0018] Optionally, the task processing node is deployed with task processing resources, and the plurality of task processing nodes are clustered according to the business scenarios applied by each task processing node to obtain a plurality of node clusters, including:

[0019] Determine the business scenarios to which the task processing nodes are applied based on the task processing resources deployed in the task processing nodes;

[0020] Determine the node cluster to which the task processing node belongs based on the business scenario corresponding to the task processing node.

[0021] Optionally, determining the business scenario applied by the task processing node according to the task processing resources deployed in the task processing node includes:

[0022] Get the quotas of various task processing resources deployed in the task processing node;

[0023] Determine the business scenarios in which the task processing nodes are applied based on the task processing resources deployed in the task processing nodes and the corresponding quotas.

[0024] Optionally, the task processing resource includes at least one of the following:

[0025] Memory resources, CPU resources, GPU resources.

[0026] Optionally, the application scenario includes a first application scenario, and determining the business scenario applied by the task processing node according to the task processing resources deployed in the task processing node includes:

[0027] When the task processing node has memory resources and central processing unit resources, it is determined that the task processing node is applied to the first application scenario.

[0028] Optionally, the application scenario includes a second application scenario, and determining the business scenario applied by the task processing node according to the task processing resources possessed by the task processing node includes:

[0029] When the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is less than a first preset ratio, it is determined that the task processing node is applied to the second application scenario.

[0030] Optionally, the application scenario includes a third application scenario, and determining the business scenario applied by the task processing node according to the task processing resources possessed by the task processing node includes:

[0031] When the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is greater than the first preset ratio, it is determined that the task processing node is applied to the third application scenario.

[0032] Optionally, determining the target node cluster corresponding to the business scenario to which the target task belongs includes:

[0033] Determine the type of resources required for the target task;

[0034] A target node cluster is determined from the multiple node clusters according to the resource type required by the target task.

[0035] Optionally, determining a target node cluster from the multiple node clusters according to a resource type required by the target task includes:

[0036] Determine the requirements of the target task for various task processing resources;

[0037] A target node cluster is determined from the multiple node clusters according to the resource type required by the target task and the demand for processing resources of each task.

[0038] Optionally, the second application scenario corresponds to a second node cluster, and the third application scenario corresponds to a third node cluster;

[0039] The determining of the target node cluster from the plurality of node clusters according to the resource type required by the target task and the demand for processing resources of each task includes:

[0040] When the resource types required by the target task include central processing unit resources and graphics processing unit resources, determining the demand amount of the target task for the central processing unit resources and the demand amount of the graphics processing unit resources;

[0041] A target node cluster is determined from the second node cluster and the third node cluster according to a ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources.

[0042] Optionally, determining the target node cluster from the second node cluster and the third node cluster according to the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources includes:

[0043] When the ratio of the demand for GPU resources of the target task to the demand for CPU resources of the target task is greater than a second preset ratio, determining the third node cluster as the target node cluster;

[0044] When the ratio of the target task's demand for GPU resources to the target task's demand for CPU resources is not greater than the second preset ratio, the second node cluster is determined as the target node cluster.

[0045] Optionally, determining a target task processing node from the target node cluster includes:

[0046] The target task processing node is determined according to the demand of the target task for each task processing resource and the current remaining available resources of each task processing node in the target node cluster.

[0047] Optionally, the task scheduling method further includes:

[0048] In response to a preset update event, the plurality of task processing nodes are re-clustered.

[0049] The embodiment of the present invention further provides a task scheduling system, which includes a task scheduler, a resource manager and a plurality of task processing nodes, and different task processing nodes are applied to different business scenarios;

[0050] The resource manager is used to cluster the multiple task processing nodes according to the business scenarios applied by each task processing node to obtain multiple node clusters;

[0051] The task scheduler is used to obtain a target node cluster from the resource manager when receiving a target task; the target node cluster is determined by the resource manager according to the business scenario to which the target task belongs; the task scheduler is also used to determine a target task processing node from the target node cluster; and schedule the target task to the target task processing node for processing.

[0052] Optionally, the task scheduler is used to send a node cluster acquisition request to the resource manager when receiving the target task;

[0053] The resource manager is used to determine the resource type required by the target task according to the node cluster acquisition request; and determine the target node cluster from multiple node clusters according to the resource type required by the target task.

[0054] Optionally, the resource manager is used to determine that the task processing node belongs to the first node cluster when the task processing node has memory resources and central processing unit resources; determine that the task processing node belongs to the second node cluster when the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is less than a first preset ratio; and determine that the task processing node belongs to the third node cluster when the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is greater than the first preset ratio.

[0055] Optionally, the resource manager is used to determine the third node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is greater than a second preset ratio; and to determine the second node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than the second preset ratio.

[0056] Optionally, the task scheduling system further includes a configuration center, and the configuration center stores a second preset value;

[0057] The resource manager is used to obtain the second preset value from the configuration center.

[0058] An embodiment of the present invention further provides a computer program product, including computer instructions, which implement the above-mentioned task scheduling method when executed by a processor.

[0059] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above-mentioned task scheduling method when executed by the processor.

[0060] An embodiment of the present invention further provides a non-volatile computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for scheduling tasks as described above is implemented.

[0061] In an embodiment of the present invention, the task scheduling system can cluster multiple task processing nodes in advance according to the business scenarios applied by each task processing node to obtain multiple node clusters; when receiving the target task, the task scheduling system can determine the target node cluster corresponding to the business scenario to which the target task belongs, and determine the target task processing node from the target node cluster; then, the task scheduling system can schedule the target task to the target task processing node for processing. Through the embodiment of the present invention, the process of task scheduling can be simplified and the complexity of working time can be reduced. And the pre-classification can be one-time, that is, after pre-classification is performed once in advance, all subsequent tasks can be performed based on the pre-classification. Compared with the task scheduling method of the prior art, the embodiment of the present invention can reduce the waste of system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0063] Figure 1 It is a step flow chart of task scheduling in the prior art;

[0064] Figure 2 It is a flow chart of steps for determining nodes for task processing in the prior art;

[0065] Figure 3 is a flowchart of a method for scheduling tasks according to an embodiment of the present invention;

[0066] Figure 4 is a flowchart of another method for scheduling tasks according to an embodiment of the present invention;

[0067] Figure 5 is a structural diagram of a task scheduling system according to an embodiment of the present invention;

[0068] Figure 6 is a schematic diagram of a node cluster after clustering task processing nodes according to an embodiment of the present invention;

[0069] Figure 7 is a flowchart of a task scheduling step based on a task scheduling system according to an embodiment of the present invention;

[0070] Figure 8 is another step flow chart of task scheduling based on a task scheduling system according to an embodiment of the present invention;

[0071] Fig. 9 is a schematic diagram of the structure of a computer program product according to an embodiment of the present invention;

[0072] Fig.10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;

[0073] Fig.11 It is a structural schematic diagram of a non-volatile computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0075] In order to simplify the task scheduling process and reduce the complexity of working time, an embodiment of the present invention provides a task scheduling method, which can be applied to a task scheduling system. The task scheduling system can be Kubernetes or other types of task scheduling systems, which are not limited by the embodiment of the present invention.

[0076] The task scheduling system may include multiple task processing nodes, and different task processing nodes may be applied to different business scenarios; illustratively, different combinations of heterogeneous resources may be deployed in the task processing nodes, such as: CPU, memory, GPU, etc., to meet the needs of different business scenarios.

[0077] For example, the combination of CPU and memory is usually suitable for business scenarios with small computing and less complex tasks. However, for business scenarios with high computing and high complexity tasks, the combination of CPU and GPU is required.

[0078] Based on this, the embodiment of the present invention can pre-classify the business scenarios to which the task processing nodes are applied; then, when task scheduling is required, first determine the business scenario to which the task belongs; and then determine the target processing node from the node cluster corresponding to the business scenario to process the task. Compared with the task scheduling method in the prior art, the embodiment of the present invention can simplify the task scheduling process and reduce the complexity of working time.

[0079] And the pre-classification can be one-time, that is, after pre-classification is performed once in advance, all subsequent tasks can be performed based on the pre-classification. Compared with the task scheduling method in the prior art, the embodiment of the present invention can reduce the waste of system resources.

[0080] For details, please refer to Figure 3 , Figure 3 FIG. 1 is a flowchart showing a method for scheduling a task according to an embodiment of the present invention; Figure 3 As shown, the task scheduling method may include the following steps:

[0081] Step 301: Cluster multiple task processing nodes according to the business scenarios applied by each task processing node to obtain multiple node clusters.

[0082] In some feasible embodiments, task processing nodes may be clustered in advance according to the business scenarios in which they are applied, thereby obtaining multiple node clusters; a task processing node in a node cluster may be used to specifically process tasks of a type of business scenario.

[0083] Exemplarily, business scenarios can be divided based on actual needs; for example, business scenarios can include regular business scenarios, business scenarios with ordinary computing requirements, and business scenarios with high computing requirements, etc.; among them, regular business scenarios only need to use ordinary task processing nodes, business scenarios with ordinary computing requirements need to use task processing nodes with certain GPU resources, and business scenarios with high computing requirements need to use task processing nodes with more GPU resources.

[0084] As another example, business scenarios can be divided according to specific businesses, such as businesses that require a large amount of computing, businesses that require data reading and writing and a small amount of computing, etc. The embodiments of the present invention do not impose specific restrictions on the division of business scenarios.

[0085] It should be noted that the above-mentioned pre-classification process of task processing nodes can be performed once by the task scheduling system when the system is initialized; when tasks are subsequently received, the tasks can be directly scheduled based on the pre-classification results, thereby reducing system resource consumption.

[0086] Exemplarily, one business scenario may correspond to one or more node clusters; a node cluster may also correspond to one or more business scenarios. The embodiment of the present invention does not limit the specific corresponding relationship, and the specific corresponding relationship may be set according to actual needs.

[0087] Step 302: When a target task is received, a target node cluster corresponding to the business scenario to which the target task belongs is determined.

[0088] In some feasible embodiments, when the task scheduling system receives a target task, it may first determine the business scenario to which the target task belongs, and further determine the target node cluster corresponding to the business scenario to which the target task belongs.

[0089] Step 303: Determine a target task processing node from the target node cluster.

[0090] After determining the target node cluster, the task scheduling system can determine a target task processing node that is most suitable for processing the target task from the task processing nodes in the target node cluster.

[0091] Step 304: Schedule the target task to the target task processing node for processing.

[0092] Then, the task scheduling system may schedule the target task to the target task processing node; after receiving the target task, the target task processing node may call its deployed resources to process the target task.

[0093] In an embodiment of the present invention, the task scheduling system can cluster multiple task processing nodes in advance according to the business scenarios applied by each task processing node to obtain multiple node clusters; when receiving the target task, the task scheduling system can determine the target node cluster corresponding to the business scenario to which the target task belongs, and determine the target task processing node from the target node cluster; then, the task scheduling system can schedule the target task to the target task processing node for processing. Through the embodiment of the present invention, the process of task scheduling can be simplified and the complexity of working time can be reduced. And the pre-classification can be one-time, that is, after pre-classification is performed once in advance, all subsequent tasks can be performed based on the pre-classification. Compared with the task scheduling method of the prior art, the embodiment of the present invention can reduce the waste of system resources.

[0094] Reference Figure 4 , Figure 4 FIG. 4 is a flowchart showing another method for scheduling tasks according to an embodiment of the present invention; Figure 4 As shown, the task scheduling method may include the following steps:

[0095] Step 401: Task processing resources are deployed on the task processing node. The business scenario to which the task processing node is applied is determined according to the task processing resources deployed on the task processing node.

[0096] In some feasible embodiments, task processing resources may be deployed in the task processing node. Exemplarily, the task processing resources may include at least one of the following: memory resources, central processing unit resources, and graphics processing unit resources. Of course, the task processing resources may also include other resources, such as MIC (microphone), DPU (Data Processing Unit), etc., which are not limited in the embodiments of the present invention.

[0097] In practical applications, the task scheduling system can determine the business scenarios to which the task processing nodes are applied in advance based on the task processing resources deployed in the task processing nodes. Specifically, the scenarios to which the task processing nodes are applied can be determined based on the types of task processing resources deployed in the task processing nodes.

[0098] For example: when the task processing node is deployed with memory resources and central processing unit resources, it can be determined that the task processing node is applied to conventional business scenarios; when the task processing node is deployed with central processing unit resources and graphics processing unit resources, it can be determined that the task processing node is applied to business scenarios that require a large amount of calculations. The embodiments of the present invention do not limit this.

[0099] In one embodiment of the present invention, step 401 may be implemented by the following sub-steps:

[0100] Sub-step 11: Obtain the quotas of various task processing resources deployed in the task processing node.

[0101] In some feasible embodiments, in order to classify the task processing nodes in a refined manner, the quotas of various task processing resources deployed in the task processing nodes can also be obtained; specifically, the quotas of memory resources, central processing unit resources, graphics processing unit resources and other resources in the task processing nodes can be obtained.

[0102] Sub-step 12: Determine the business scenario to which the task processing node is applied based on the task processing resources deployed in the task processing node and the corresponding quota.

[0103] Next, the task scheduling system may determine the business scenario to which the task processing node is applied according to the type of task processing resources deployed in the task processing node and the quotas of various deployed task processing resources.

[0104] For example: when a task processing node is deployed with central processing unit resources and graphics processing unit resources, the task processing node can be more finely classified according to the quotas of central processing unit resources and graphics processing unit resources; specifically: when the quota of central processing unit resources is much larger than the quota of graphics processing unit resources, it can be determined that the task processing node is applied to a business scenario that requires some calculations; when the coordination of graphics processing unit resources is much larger than the quota of central processing unit resources, it can be determined that the task processing node is applied to a business scenario that requires a large amount of calculations. The embodiments of the present invention do not limit this.

[0105] In one embodiment of the present invention, application scenarios may include a first application scenario, a second application scenario and a third application scenario; wherein the first application scenario may refer to a conventional business scenario, that is, a general scenario with low business complexity and small computational complexity, and the tasks in this business scenario do not require high computing resources.

[0106] The second application scenario may refer to a business scenario that requires certain computing resources, and the third application scenario may refer to a business scenario that requires a large amount of computing resources.

[0107] For the first application scenario, the second application scenario and the third application scenario, the scenario to which the task processing node is applied can be determined in the following manner:

[0108] As an example, when the task processing node has memory resources and central processing unit resources, it is determined that the task processing node is applied to the first application scenario.

[0109] As another example, when the task processing node has CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is less than a first preset ratio, it is determined that the task processing node is applied to the second application scenario.

[0110] As another example, when the task processing node has CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is greater than a first preset ratio, it is determined that the task processing node is applied to the third application scenario.

[0111] In actual applications, when a task processing node has memory resources and central processing unit resources but does not have graphics processing unit resources, it can be determined that the task processing node is a task processing node applied to the first application scenario.

[0112] When the task processing node has central processing unit resources and graphics processing unit resources, it can be determined that the task processing node is a task processing node applied to the second application scenario or the third application scenario.

[0113] Specifically, when the ratio of the quota of the graphics processor resources in the task processing node to the quota of the central processing unit resources is less than the first preset ratio, it can be determined that the task processing node is a task processing node applied to the second application scenario. Conversely, when the ratio of the quota of the graphics processor resources in the task processing node to the quota of the central processing unit resources is greater than the first preset ratio, it can be determined that the task processing node is a task processing node applied to the third application scenario. Among them, the first preset ratio can be set according to actual conditions, for example: 1, the embodiment of the present invention does not limit this.

[0114] Exemplarily, the first application scenario may correspond to the first node cluster, the second application scenario may correspond to the second node cluster, and the third application scenario may correspond to the third node cluster; wherein the first node cluster may refer to a node cluster composed of task processing nodes deployed with memory resources and CPU resources; the second node cluster may refer to a node cluster composed of task processing nodes deployed with CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is less than a first preset ratio; the third node cluster may refer to a node cluster composed of task processing nodes deployed with CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is greater than the first preset ratio.

[0115] Step 402: Determine the node cluster to which the task processing node belongs according to the business scenario corresponding to the task processing node.

[0116] After determining the business scenario corresponding to the task processing node, the task processing node may be clustered based on the business scenario to determine the node cluster to which the task processing node belongs.

[0117] Exemplarily, when the task processing node belongs to the first business scenario, it can be determined that the task processing node belongs to the first node cluster; when the task processing node belongs to the second business scenario, it can be determined that the task processing node belongs to the second node cluster; when the task processing node belongs to the third business scenario, it can be determined that the task processing node belongs to the third node cluster.

[0118] Step 403: upon receiving the target task, determining the resource type required for the target task.

[0119] When the task scheduling system receives a target task, it can first determine the resource type of the resource required to process the target task, which may include a memory resource type, a central processing unit resource type, a graphics processing unit resource type, and the like.

[0120] Step 404: Determine a target node cluster from multiple node clusters according to the resource type required by the target task.

[0121] After determining the resource types of resources required for processing the target task, a target node cluster in which the task processing nodes in the cluster have resources of these resource types can be determined from multiple node clusters based on the resource types required for the target task.

[0122] In one embodiment of the present invention, the target node cluster may be determined by the following sub-steps:

[0123] Sub-step 21: Determine the demand of the target task for various task processing resources.

[0124] In some feasible embodiments, when determining the target node cluster, the target task's demand for various task processing resources can also be determined; illustratively, the target task's demand for memory resources, the demand for central processing unit resources, and the demand for graphics processing unit resources can be determined.

[0125] Sub-step 22: determining a target node cluster from multiple node clusters according to the resource type required by the target task and the demand for processing resources of each task.

[0126] After determining the resource types required for the target task and the demand for various task processing resources, the target node cluster capable of processing the target task can be determined from multiple node clusters based on the resource types required for the target task and the demand for each task processing resource.

[0127] Exemplarily, a node cluster can be determined from pre-classified node clusters based on the resource types required by the target task and the demand for each task processing resource; then, based on the demand for each task processing resource of the target task, a secondary screening is performed on the node cluster to eliminate nodes whose currently available resources do not meet the requirements of the target task, and then the target node cluster is obtained.

[0128] As another example, the target node cluster may be determined directly based on the resource type required by the target task and the demand for processing resources for each task; that is, the target node cluster may be determined directly from the pre-classified node clusters based on the resource type required by the target task and the demand for processing resources for each task. This embodiment of the present invention does not impose any restrictions on this.

[0129] In one embodiment of the present invention, the second application scenario corresponds to the second node cluster, and the third application scenario corresponds to the third node cluster. In this scenario, the target node cluster may be determined in the following manner, including:

[0130] When the resource types required by the target task include central processing unit resources and graphics processing unit resources, determine the target task's demand for central processing unit resources and demand for graphics processing unit resources; determine the target node cluster from the second node cluster and the third node cluster based on the ratio of the target task's demand for graphics processing unit resources to the target task's demand for central processing unit resources.

[0131] In some feasible embodiments, when the resource types required by the target task include CPU resources and GPU resources, the CPU resource requirements and GPU resource requirements of the target task may be further determined.

[0132] After determining the CPU resource requirements of the target task and the GPU resource requirements of the target task, the task scheduling system may further determine the ratio of the GPU resource requirements of the target task to the CPU resource requirements of the target task.

[0133] Then, a target node cluster may be determined from the second node cluster and the third node cluster according to the ratio.

[0134] In one embodiment of the present invention, the target node cluster may be determined from the second node cluster and the third node cluster based on the following method:

[0135] When the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is greater than a second preset ratio, the third node cluster is determined as the target node cluster; when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than the second preset ratio, the second node cluster is determined as the target node cluster.

[0136] In practical applications, when determining that the target task requires CPU resources and GPU resources, the target node cluster for processing the target task can be further determined based on the ratio of the target task's demand for GPU resources to the target task's demand for CPU resources.

[0137] Specifically, if the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is greater than a second preset ratio, it may indicate that the target task has a greater demand for graphics processor resources and the target task is a task with high computational intensity; at this time, the third node cluster may be used as the target node cluster.

[0138] On the contrary, if the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than a second preset ratio, it can be said that the target task's demand for graphics processor resources is small and the target task is a task with less computational effort; at this time, the second node cluster can be used as the target node cluster.

[0139] Step 405: Determine the target task processing node according to the demand of the target task for each task processing resource and the current remaining available resources of each task processing node in the target node cluster.

[0140] In some feasible embodiments, after determining the target node cluster, the task scheduling system may determine the target task processing node according to the demand of the target task for each task processing resource and the current remaining available resources of each task processing node in the target node cluster.

[0141] Among them, the currently remaining available resources may refer to other task processing resources in the task processing node except for the task processing resources being used; in practical applications, a task processing node may process multiple tasks at the same time. When the task processing node is processing tasks, some of its resources may have been occupied; therefore, it is necessary to determine the target task processing node in combination with the currently remaining available resources of each task processing node in the target node cluster to ensure that the determined target task processing node has sufficient available resources to process the target task.

[0142] Step 406: Schedule the target task to the target task processing node for processing.

[0143] After determining the target task processing node that processes the target task, the task scheduling system can schedule the target task to the target task processing node; after receiving the target task, the target task processing node can call its deployed resources to process the target task.

[0144] In an embodiment of the present invention, the above method may further include the following steps:

[0145] In response to a preset update event, the plurality of task processing nodes are re-clustered.

[0146] In some feasible embodiments, the task processing nodes may be updated, online or offline, etc.; therefore, a preset update event can be set, which can include task scheduling system update and reset, and can also include task processing node changes, etc.; when a preset update event is detected, the multiple task processing nodes can be re-clustered in response to the preset update event to obtain new multiple node clusters.

[0147] In the embodiment of the present invention, the task processing node is deployed with task processing resources. According to the task processing resources deployed in the task processing node, the business scenario applied by the task processing node is determined; according to the business scenario corresponding to the task processing node, the node cluster to which the task processing node belongs is determined; when receiving the target task, the resource type required by the target task is determined; according to the resource type required by the target task, the target node cluster is determined from multiple node clusters; according to the demand of the target task for each task processing resource and the current remaining available resources of each task processing node in the target node cluster, the target task processing node is determined; the target task is scheduled to the target task processing node for processing. Through the embodiment of the present invention, the process of task scheduling can be simplified and the complexity of working time can be reduced. And the pre-classification can be one-time, that is, after pre-classification is performed once in advance, all subsequent tasks can be performed based on the pre-classification. Compared with the task scheduling method of the prior art, the embodiment of the present invention can reduce the waste of system resources.

[0148] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0149] Reference Figure 5 , shows a schematic diagram of the structure of a task scheduling system according to an embodiment of the present invention, which may include a task scheduler 501, a resource manager 502 and a plurality of task processing nodes 503, and different task processing nodes 503 are applied to different business scenarios;

[0150] The resource manager 502 is used to cluster the multiple task processing nodes 503 according to the business scenarios applied by each task processing node 503 to obtain multiple node clusters;

[0151] The task scheduler 501 is used to obtain the target node cluster from the resource manager 502 when receiving the target task; the target node cluster is determined by the resource manager 502 according to the business scenario to which the target task belongs; the task scheduler 501 is also used to determine the target task processing node from the target node cluster; and schedule the target task to the target task processing node for processing.

[0152] In some feasible embodiments, the resource manager 502 may cluster the task processing nodes 503 in advance according to the business scenarios to which the task processing nodes 503 are applied, thereby obtaining a plurality of node clusters.

[0153] When the task scheduler 501 receives a target task, it can obtain the target node cluster from the resource manager 502; specifically, when the task scheduler 501 receives the target task, it can request to obtain the target node cluster from the resource manager 502; after receiving the request, the resource manager 502 can first determine the business scenario to which the target task belongs, and further determine the target node cluster corresponding to the business scenario to which the target task belongs.

[0154] After determining the target node cluster, the resource manager 502 may return the target node cluster to the task scheduler 501 ; then, the task scheduler 501 may determine the target task processing node from the target node cluster and schedule the target task to the target task processing node for processing.

[0155] In one embodiment of the present invention, the task scheduler 501 is used to send a node cluster acquisition request to the resource manager 502 when receiving a target task;

[0156] The resource manager 502 is used for determining the resource type required for the target task according to the node cluster acquisition request; and determining the target node cluster from multiple node clusters according to the resource type required for the target task.

[0157] In some feasible embodiments, after receiving the target task, the task scheduler 501 may generate a node cluster acquisition request based on the target task and send the node cluster acquisition request to the resource manager 502; the node cluster acquisition request may include the task processing resources required for the target task and the demand for each task processing resource.

[0158] When receiving the node cluster acquisition request, the resource manager 502 can determine the resource type required for the target task based on the node cluster acquisition request; next, the resource manager 502 can determine the target node cluster from multiple node clusters based on the resource type of the task processing resources required by the target task.

[0159] Then, the target node cluster is returned to the task scheduler 501; specifically, the node list of the target node cluster may be returned to the task scheduler 501, so that the task scheduler 501 may determine a target task processing node suitable for processing the target task based on the node list of the target node cluster.

[0160] In one embodiment of the present invention, the resource manager 502 is used to determine that the task processing node 503 belongs to the first node cluster when the task processing node 503 has memory resources and central processing unit resources; when the task processing node 503 has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is less than the first preset ratio, determine that the task processing node 503 belongs to the second node cluster; when the task processing node 503 has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is greater than the first preset ratio, determine that the task processing node 503 belongs to the third node cluster.

[0161] In some feasible embodiments, when performing clustering, the resource manager 502 may first determine the resource type of the task processing resources possessed by the task processing node 503 .

[0162] When the task processing node 503 has memory resources and central processing unit resources, the resource manager 502 may determine that the task processing node 503 belongs to the first node cluster.

[0163] When the task processing node 503 has CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is less than the first preset ratio, the resource manager 502 may determine that the task processing node 503 belongs to the second node cluster.

[0164] When the task processing node 503 has CPU resources and GPU resources, and the ratio of the GPU resource quota to the CPU resource quota is greater than the first preset ratio, the resource manager 502 may determine that the task processing node 503 belongs to the third node cluster.

[0165] In one embodiment of the present invention, the resource manager 502 is used to determine the third node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is greater than a second preset ratio; and to determine the second node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than the second preset ratio.

[0166] In some feasible embodiments, when determining the target node cluster, the resource manager 502 may first determine the ratio of the target task's demand for GPU resources to the target task's demand for CPU resources.

[0167] If the ratio of the target task's demand for graphics processor resources to the target task's demand for CPU resources is greater than a second preset value, the resource manager 502 may determine the third node cluster as the target node cluster; conversely, if the ratio of the target task's demand for graphics processor resources to the target task's demand for CPU resources is not greater than the second preset value, the resource manager 502 may determine the second node cluster as the target node cluster.

[0168] In one embodiment of the present invention, the system further includes a configuration center 504, and the configuration center 504 stores a second preset value;

[0169] The resource manager 502 is used to obtain a second preset value from the configuration center 504 .

[0170] In some feasible embodiments, the task scheduling system 500 may also be provided with a configuration center 504 , and the configuration center 504 may store a second preset value; when determining the target node cluster, the resource manager 502 may obtain the second preset value from the configuration center 504 .

[0171] Based on the above task scheduling method and task scheduling system, the following is combined Figure 6 - Figure 8 The present invention is exemplified as follows:

[0172] like Figure 6 - Figure 8 As shown, the resource manager can first divide the task processing nodes in the system into general computing node clusters, hybrid computing node clusters and high computing node clusters.

[0173] Among them, the task processing nodes in the general computing node cluster can be deployed with central processing unit resources and memory resources; the task processing nodes in the general computing node cluster are mainly used for tasks in general business scenarios with low business complexity and small computing volume. Since these tasks usually do not require high computing resources, the general computing node cluster can meet the needs of most routine tasks.

[0174] The task processing nodes in the hybrid computing node cluster can be deployed with CPU resources and GPU resources, where the CPU resource quota is basically the same as the GPU resource quota; the task processing nodes in the hybrid computing node cluster can give full play to the computing advantages of the CPU and GPU to improve the efficiency of job execution. For example, in some applications that require a lot of data processing and model training, the task processing nodes in the hybrid computing node cluster can provide powerful computing support to ensure that tasks can be completed quickly and accurately.

[0175] The task processing nodes in the high-computing computing node cluster can be deployed with CPU resources and GPU resources, and the GPU resource quota is much larger than the CPU resource quota. The resource types of the task processing nodes in the high-computing computing node cluster are the same as those of the task processing nodes in the hybrid computing node cluster, and they also mainly include CPU resources and GPU resources. However, the difference is that the GPU resource quota of the task processing nodes in the high-computing computing node cluster is much larger than the CPU resource quota, and the tasks they carry are also high-computing and heavy-reasoning tasks, such as model training and image detection. The GPU is the core task computing carrier, and the CPU resources mainly play the role of assisting the GPU. Tasks suitable for this node cluster usually require a large amount of computing resources and high-speed data transmission capabilities. This node cluster can provide a more professional computing environment to meet the needs of these tasks.

[0176] After the nodes are clustered, when a task is sent to the task scheduler, the task scheduler can send a request to the resource manager to obtain available nodes; after receiving the request, the resource manager can first determine whether there is a node cluster that meets the resource type requirements of the task.

[0177] When it is determined that there is a node cluster that meets the resource type requirements of the task, the resource manager can further determine whether the current resources of each task processing node in the node cluster are sufficient to process the task; next, the resource manager can return to the task scheduler a node list of task processing nodes under the node cluster whose current resources are sufficient to process the task. The task scheduler can determine a target task processing node from the node list to process the task.

[0178] When determining the node cluster, the resource manager can select a suitable node cluster from the three node clusters based on the resource type required by the task and the demand for each resource, and return it to the task scheduler for screening; at this time, the task scheduler does not traverse and screen all the task processing nodes in the system, reducing the time complexity of the screening process.

[0179] Among them, since the types of resources distributed in high-computing computing node clusters and hybrid computing node clusters are the same, they need to be distinguished based on the demand for resources required by the tasks.

[0180] Specifically, high-computing computing node clusters and hybrid computing node clusters can be set in the configuration center; when selecting a node cluster, the resource manager can read the configuration difference value in the configuration center and compare the sizes to return a suitable node cluster to the task scheduler.

[0181] Among them, a second preset value can be set in the configuration center; when the ratio of the task's demand for graphics processor resources to the target task's demand for central processor resources is greater than the second preset value, the resource manager can select a high-computing computing node cluster and return it to the task scheduler; when the ratio of the task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than the second preset value, the resource manager can select a hybrid computing node cluster and return it to the task scheduler.

[0182] The present invention also provides a computer program product. Fig. 9 As shown, the computer program product 9 includes computer instructions 901, and when the computer instructions 901 are executed by a processor, the above task scheduling method is implemented.

[0183] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, the electronic device 10 includes a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and capable of running on the processor. When the computer program is executed by the processor, the above task scheduling method is implemented.

[0184] The embodiment of the present invention also provides a non-volatile computer-readable storage medium, such as Fig.11 As shown, the non-volatile computer-readable storage medium 11 stores a computer program 1101, and when the computer program 1101 is executed by a processor, the above task scheduling method is implemented.

Claims

1. A task scheduling method, characterized in that: Applied to a task scheduling system, the task scheduling system includes multiple task processing nodes, different task processing nodes are applied to different business scenarios, and the task scheduling method includes: Clustering the multiple task processing nodes according to the business scenarios applied by each task processing node to obtain multiple node clusters; When receiving a target task, determining a target node cluster corresponding to the business scenario to which the target task belongs; Determining a target task processing node from the target node cluster; Dispatching the target task to the target task processing node for processing; The task processing nodes are deployed with task processing resources. According to the business scenarios applied by each task processing node, the multiple task processing nodes are clustered to obtain multiple node clusters, including: Determine the business scenarios to which the task processing nodes are applied based on the task processing resources deployed in the task processing nodes; Determine the node cluster to which the task processing node belongs based on the business scenario corresponding to the task processing node; The determining of the business scenario applied by the task processing node according to the task processing resources deployed in the task processing node includes: Get the quotas of various task processing resources deployed in the task processing node; Determine the business scenarios in which the task processing nodes are applied based on the task processing resources deployed in the task processing nodes and the corresponding quotas.

2. The task scheduling method according to any one of claim 1, characterized in that: The task processing resource includes at least one of the following: Memory resources, CPU resources, GPU resources.

3. The task scheduling method according to claim 2, characterized in that: The application scenario includes a first application scenario, wherein determining the business scenario applied by the task processing node according to the task processing resources deployed in the task processing node also includes: When the task processing node has memory resources and central processing unit resources, it is determined that the task processing node is applied to the first application scenario.

4. The task scheduling method according to claim 3, characterized in that: The application scenario includes a second application scenario, wherein determining the business scenario applied by the task processing node according to the task processing resources possessed by the task processing node further includes: When the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is less than a first preset ratio, it is determined that the task processing node is applied to the second application scenario.

5. The task scheduling method according to claim 4, characterized in that: The application scenario includes a third application scenario, wherein the business scenario applied by the task processing node is determined according to the task processing resources possessed by the task processing node, and further includes: When the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is greater than the first preset ratio, it is determined that the task processing node is applied to the third application scenario.

6. The task scheduling method according to claim 5, characterized in that: The determining of the target node cluster corresponding to the business scenario to which the target task belongs includes: Determine the type of resources required for the target task; A target node cluster is determined from the multiple node clusters according to the resource type required by the target task.

7. The task scheduling method according to claim 6, characterized in that: The step of determining a target node cluster from the plurality of node clusters according to the resource type required by the target task includes: Determine the requirements of the target task for various task processing resources; A target node cluster is determined from the multiple node clusters according to the resource type required by the target task and the demand for processing resources of each task.

8. The task scheduling method according to claim 7, characterized in that: The second application scenario corresponds to a second node cluster, and the third application scenario corresponds to a third node cluster; The determining of the target node cluster from the plurality of node clusters according to the resource type required by the target task and the demand for processing resources of each task includes: When the resource types required by the target task include central processing unit resources and graphics processing unit resources, determining the demand amount of the target task for the central processing unit resources and the demand amount of the graphics processing unit resources; A target node cluster is determined from the second node cluster and the third node cluster according to a ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources.

9. The task scheduling method according to claim 8, characterized in that: The step of determining a target node cluster from the second node cluster and the third node cluster according to a ratio of a demand amount of the target task for graphics processor resources to a demand amount of the target task for central processor resources comprises: When the ratio of the demand for GPU resources of the target task to the demand for CPU resources of the target task is greater than a second preset ratio, determining the third node cluster as the target node cluster; When the ratio of the target task's demand for GPU resources to the target task's demand for CPU resources is not greater than the second preset ratio, the second node cluster is determined as the target node cluster.

10. The task scheduling method according to claim 1, characterized in that: Determining a target task processing node from the target node cluster includes: The target task processing node is determined according to the demand of the target task for each task processing resource and the current remaining available resources of each task processing node in the target node cluster.

11. The task scheduling method according to claim 1, characterized in that: The task scheduling method also includes: In response to a preset update event, the plurality of task processing nodes are re-clustered.

12. A task scheduling system, characterized in that: The task scheduling system includes a task scheduler, a resource manager and multiple task processing nodes, and different task processing nodes are applied to different business scenarios; The resource manager is used to cluster the multiple task processing nodes according to the business scenarios applied by each task processing node to obtain multiple node clusters; The task scheduler is used to obtain a target node cluster from the resource manager when receiving a target task; The target node cluster is determined by the resource manager according to the business scenario to which the target task belongs; the task scheduler is also used to determine the target task processing node from the target node cluster; and schedule the target task to the target task processing node for processing; Among them, the task processing node is deployed with task processing resources, and the resource manager is used to obtain the quotas of various task processing resources deployed in the task processing node; determine the business scenarios applied by the task processing node according to the task processing resources deployed in the task processing node and the corresponding quotas; determine the node cluster to which the task processing node belongs according to the business scenarios corresponding to the task processing node.

13. The task scheduling system according to claim 12, characterized in that: The task scheduler is used to send a node cluster acquisition request to the resource manager when receiving the target task; The resource manager is used to determine the resource type required by the target task according to the node cluster acquisition request; and determine the target node cluster from multiple node clusters according to the resource type required by the target task.

14. The task scheduling system according to claim 12, characterized in that: The resource manager is used to determine that the task processing node belongs to the first node cluster when the task processing node has memory resources and central processing unit resources; determine that the task processing node belongs to the second node cluster when the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is less than a first preset ratio; and determine that the task processing node belongs to the third node cluster when the task processing node has central processing unit resources and graphics processing unit resources, and the ratio of the quota of the graphics processing unit resources to the quota of the central processing unit resources is greater than the first preset ratio.

15. The task scheduling system according to claim 14, characterized in that: The resource manager is used to determine the third node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is greater than a second preset ratio; and to determine the second node cluster as the target node cluster when the ratio of the target task's demand for graphics processor resources to the target task's demand for central processor resources is not greater than the second preset ratio.

16. The task scheduling system according to claim 15, characterized in that: The task scheduling system further includes a configuration center, wherein the configuration center stores a second preset value; The resource manager is used to obtain the second preset value from the configuration center.

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

18. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for scheduling tasks as claimed in any one of claims 1 to 11 is implemented.

19. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for scheduling tasks as claimed in any one of claims 1 to 11 is implemented.