Resource scheduling method, device, electronic device and storage medium

By classifying and determining the resource schedule for cluster nodes, optimizing resource scheduling with application types and operation cycles, the problem of low resource utilization efficiency in distributed clusters is solved, and efficient resource utilization and waiting time are achieved.

CN112099952BActive Publication Date: 2024-12-31ASIAINFO TECH CHINA INC
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010976312.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-16
Publication Date
2024-12-31
Estimated Expiration
2040-09-16

AI Technical Summary

Technical Problem

When the scale of distributed clusters expands, resource utilization efficiency is low, resulting in resource waste and increased operation and maintenance complexity, making it difficult for the existing technology to effectively schedule computing and storage resources.

Method used

By classifying and determining the resource of cluster nodes and determining the schedule, combining application types and operation cycles, optimizing resource scheduling, matching resource types and idle time periods, efficient scheduling of target applications is achieved.

Benefits of technology

It improves resource utilization, reduces the waiting time for application operation, and improves the overall efficiency of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112099952B_ABST
    Figure CN112099952B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a resource scheduling method, device, electronic device and storage medium, which relates to the field of computer technology. The method includes: classifying cluster nodes according to the resources of the nodes to determine the resource type of each node, and determining the schedule of each node; determining the application type and corresponding operation cycle of each application; performing the following resource scheduling steps for the target application: determining the corresponding target node based on the application type of the target application and the resource type of each node; scheduling the target application based on the time period of the target application and the schedule of the target node. The implementation of this application can effectively improve resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource scheduling method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of computer technology, the requirements for the computing power and storage capacity of machines are getting higher and higher; and in real life, as the amount of enterprise data increases, the scale of distributed clusters is also getting larger and larger.

[0003] When the cluster scale increases to a certain extent, the cluster capacity will have a bottleneck, resulting in slow cluster capacity improvement and increased operation and maintenance complexity, making it difficult to effectively utilize machine resources, resulting in resource waste. Therefore, it is urgent to propose a technical solution that can efficiently utilize cluster resources. Summary of the invention

[0004] The purpose of this application is to solve at least one of the above technical defects, and the following technical solutions are proposed:

[0005] In a first aspect, a resource scheduling method is provided, comprising:

[0006] Classify cluster nodes according to their resources to determine the resource type of each node and determine the schedule of each node;

[0007] Determine the application type and corresponding operation cycle of each application;

[0008] The following resource scheduling steps are performed for the target application: determining the corresponding target node based on the application type of the target application and the resource type of each node; and scheduling the target application based on the time period of the target application and the schedule of the target node.

[0009] In combination with the first aspect, in a first implementation of the first aspect, the resource type and the application type include at least one of the following: a computing type, a storage type, and other types.

[0010] In combination with the first aspect, in a second implementation of the first aspect, determining the application type of each application and the corresponding application running cycle includes:

[0011] Classify the applications according to the running data of the applications and determine the application type of each application;

[0012] Determine the operation cycle of each application based on the historical operation time of the application;

[0013] The operation data includes data of application pre-operation and formal operation; the historical operation time includes the start time and end time of application operation; and the operation cycle includes the start time and operation duration.

[0014] In combination with the first aspect, in a third implementation of the first aspect, determining the corresponding target node based on the application type of the target application and the resource type of each node includes:

[0015] Based on the application type of the target application and the resource type of each node, at least one target node with the highest type matching degree is determined in each cluster node as the current node to be scheduled.

[0016] In combination with the third implementation of the first aspect, in a fourth implementation of the first aspect, the scheduling of the target application based on the operating cycle of the target application and the schedule of the target node includes:

[0017] If no application is currently running on any of the nodes to be scheduled, and the interval duration of each application running in the schedule corresponding to the node to be scheduled is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled;

[0018] If all the nodes to be scheduled currently have applications running, the target application is scheduled to the node to be scheduled with the shortest time to the next idle time in the corresponding schedule;

[0019] If all the nodes to be scheduled currently have applications running and there is no idle time in the corresponding schedule, the resource scheduling step is repeatedly executed until the scheduling of the target application is completed.

[0020] In combination with the fourth implementation of the first aspect, in a fifth implementation of the first aspect, repeatedly executing the resource scheduling step until the scheduling of the target application is completed includes:

[0021] Determine at least one target node whose type matching degree is second higher than that of the current node to be scheduled as the node to be scheduled for executing subsequent steps;

[0022] Repeat the step of scheduling the target application based on the operating cycle of the target application and the schedule of the target node.

[0023] In combination with the fourth implementation of the first aspect, in a sixth implementation of the first aspect, the idle time is a corresponding time period in the schedule when no application is running and the time period adapts to the running cycle of the target application.

[0024] In a second aspect, a resource scheduling device is provided, including:

[0025] A first determination module, used to classify cluster nodes according to the resources of the nodes to determine the resource type of each node, and determine the schedule of each node;

[0026] A second determination module is used to determine the application type and corresponding operation cycle of each application;

[0027] The scheduling module is used to perform the following resource scheduling steps for the target application: determine the corresponding target node based on the application type of the target application and the resource type of each node; and schedule the target application based on the time period of the target application and the schedule of the target node.

[0028] In combination with the second aspect, in a first implementation of the second aspect, the resource type and the application type include at least one of the following: a computing type, a storage type, and other types.

[0029] In combination with the second aspect, in a second implementation of the second aspect, the second determining module includes:

[0030] A first determining unit, configured to classify applications according to the running data of the applications and determine the application type of each application;

[0031] A second determining unit, configured to determine an operating cycle of each application according to a historical operating time of the application;

[0032] The operation data includes data of application pre-operation and formal operation; the historical operation time includes the start time and end time of application operation; and the operation cycle includes the start time and operation duration.

[0033] In combination with the second aspect, in a third implementation of the second aspect, the scheduling module includes:

[0034] The matching unit is used to determine at least one target node with the highest type matching degree in each cluster node as the current node to be scheduled based on the application type of the target application and the resource type of each node.

[0035] In combination with the third implementation of the second aspect, in a fourth implementation of the second aspect, the scheduling module includes:

[0036] A first scheduling unit is configured to schedule the target application to the node to be scheduled if no application is currently running on any of the nodes to be scheduled and the intervals between the running of each application in the schedule corresponding to the node to be scheduled are adapted to the running cycle of the target application;

[0037] A second scheduling unit is used for scheduling the target application to the node to be scheduled with the shortest time to the next idle time in the corresponding schedule if all the nodes to be scheduled currently have applications running;

[0038] The third scheduling unit is used to repeatedly execute the resource scheduling step until the scheduling of the target application is completed if all the nodes to be scheduled currently have applications running and there is no idle time in the corresponding schedule.

[0039] In combination with the fourth implementation of the second aspect, in a fifth implementation of the second aspect, the third scheduling unit includes:

[0040] A repeated matching subunit, used to determine at least one target node whose type matching degree is second higher than that of the current node to be scheduled as a node to be scheduled for executing subsequent steps;

[0041] The repeating subunit is used to repeatedly execute the step of scheduling the target application based on the operation cycle of the target application and the schedule of the target node.

[0042] In combination with the fourth implementation of the second aspect, in a sixth implementation of the second aspect, the idle time is a corresponding time period in the schedule when no application is running and the time period adapts to the running cycle of the target application.

[0043] In a third aspect, an electronic device is provided, the electronic device comprising:

[0044] one or more processors;

[0045] Memory;

[0046] One or more applications, wherein one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: execute the resource scheduling method described in the first aspect of the present application and any implementation method of the first aspect.

[0047] In a fourth aspect, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the resource scheduling method described in the first aspect of the present application and any implementation method of the first aspect is implemented.

[0048] The beneficial effects of the technical solution provided by this application are:

[0049] The present application determines the resource type of each node by classifying the existing cluster nodes based on resources, and also determines the schedule of each node; then, in combination with the application type and the corresponding operation cycle of each application, the target application is scheduled for resource scheduling, and the target application is scheduled to a similar or identical type, and the target application is scheduled to a relatively idle node considering the node schedule and the application operation cycle, so as to make full use of the characteristics of the resources, reduce the waiting time of the application operation, and improve the resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0051] Figure 1 A flowchart of a resource scheduling method provided in an embodiment of the present application;

[0052] Figure 2 A flowchart of a resource scheduling method provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of the structure of a resource scheduling device provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0056] Those skilled in the art will appreciate that, unless expressly stated otherwise, the singular forms "a", "an", "" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other elements, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" as used herein includes all or any unit and all combinations of one or more associated listed items.

[0057] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0058] Resource scheduling is commonly used in cloud computing and big data clusters (due to the limitations of the computing, storage and other capabilities of a single machine, cloud computing platforms and big data platforms are generally deployed and run in a distributed cluster manner, which can effectively support high-concurrency application scenarios). In the prior art, resource scheduling is mainly carried out by scheduling computing resources such as CPU and memory, and storage resources such as disk. During scheduling, only resources are distinguished, and the application type, node type, time and other issues mentioned in the resource scheduling method provided in this application are not taken into account. The resource scheduling method in the prior art is difficult to utilize resources efficiently.

[0059] The resource scheduling method, device, electronic device and storage medium provided in this application are intended to solve the above technical problems in the prior art.

[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0061] The resource scheduling method provided in the present application can be applied to the electronic device provided in the present application, and the electronic device can be a server.

[0062] See also Figure 1 In an embodiment of the present application, a resource scheduling method is provided, and the method includes the following steps S101-S103:

[0063] Step S101: Classify cluster nodes according to the resources of the nodes to determine the resource type of each node, and determine the schedule of each node.

[0064] Optionally, cluster nodes are classified according to the resources of the nodes, mainly including classifying the host nodes according to the resource conditions on each host node. For example, for a certain node A, when the current resource usage of the node A is better than the storage performance in terms of computing performance, the node A is marked as a computing type using a label. In one embodiment, the resource types may include three categories: computing type, storage type, and other types; wherein the computing type is that the performance of the resource application corresponding to the node in computing is better than the performance in storage; the storage type is that the performance of the resource application corresponding to the node in storage is better than the performance in computing; the other types are that the performance of the resource application corresponding to the node in computing and storage is equivalent (other types may also be types measured based on performance other than computing and storage, which is not limited in this application).

[0065] In one embodiment, a classification algorithm may be used to classify each node. The classification process of the classification algorithm may be understood as establishing a classification model to describe a set data set, and constructing a model by analyzing the resource attribute description of each node. In an embodiment of the present application, the classification algorithm may use a Naive Bayesian Classifier (NBC), a Logistic Regress (LR), a decision tree algorithm, etc., and the present application does not limit this.

[0066] In a feasible embodiment, the resource type corresponding to each node can be marked with a dynamic label. For example, the initial label of node A corresponds to the computing type, and a computing type application runs in node A. At this time, the resource status of the node is dynamically monitored. If the performance applied to storage is better than the performance of computing, the label of node A will be adjusted to correspond to the storage type.

[0067] Optionally, the schedule of each node is composed of tasks to be processed by each node, including information describing the start time and running time of each task. The running status of the node at the current moment (such as idle, running applications, etc.) can be understood through the schedule of the node.

[0068] Step S102: Determine the application type and corresponding operation cycle of each application.

[0069] Specifically, the application type can be classified by using a classification algorithm according to the running conditions of each application, such as using a label to mark each application; the application type may include a computing type, a storage type, and other types. The label used when marking the application can be consistent with the label marked for each node in step S101, that is, the same type of nodes and applications can be marked with labels with the same label attributes.

[0070] Optionally, considering the consistency between application type and resource type, the same classification algorithm as in step S101 may be used when classifying each application to avoid improper resource scheduling due to different classification accuracies caused by machine learning problems.

[0071] In one embodiment, if the user knows the type of the application, the corresponding label can be set when the application is released; when executing the resource scheduling method provided by the present application, a classification algorithm can also be used to further classify the application and predict the type corresponding to the application to correct the label set by the user.

[0072] The operation cycle can use LSTM (Long Short-Term Memory) to predict the next operation cycle of the application by analyzing the start time and end time of the application's historical runtime.

[0073] Step S103: Execute the following resource scheduling steps for the target application: determine the corresponding target node based on the application type of the target application and the resource type of each node; schedule the target application based on the time period of the target application and the schedule of the target node.

[0074] Specifically, the target application is the application to be scheduled. When scheduling the target application, it will be matched with each node based on the type. For example, based on the application type A of the target application, the target node corresponding to the resource type B that is suitable for the application type A is screened out from each node; then, in the target node, scheduling is performed based on the operating cycle of the target application and the schedule of the target node, and the target application is scheduled to run on a relatively idle node.

[0075] The embodiment of the present application determines the resource type of each node by classifying the existing cluster nodes based on resources, and also determines the schedule of each node; then, in combination with the application type and the corresponding operation cycle of each application, the target application is scheduled for resources, and the target application is scheduled to a similar or identical type, and the target application is scheduled to a relatively idle node considering the node schedule and the application operation cycle, so as to make full use of the characteristics of the resources, reduce the waiting time of application operation, and improve resource utilization.

[0076] In one embodiment, step S102 of determining the application type of each application and the corresponding application running cycle includes the following steps A1-A2:

[0077] Step A1: Classify applications according to their operation data and determine the application type of each application.

[0078] The operation data includes the data of the pre-operation and the formal operation of the application.

[0079] Specifically, the applications may be classified according to the proportion of machine resources required when the applications are running. Generally speaking, during the classification, each application corresponds to an application type.

[0080] Step A2: Determine the running cycle of each application according to the historical running time of the application.

[0081] The historical running time includes the start time and end time of the application running; the running cycle includes the start time and running duration.

[0082] Specifically, when an application is running, the start time and end time are recorded. By using networks such as LSTM, the application's historical running time can be analyzed to predict the next running cycle of the application (the next running start time and running duration).

[0083] See also Figure 2In one embodiment, in the step of performing resource scheduling for the target application, the corresponding target node is determined based on the application type of the target application and the resource type of each node, including: based on the application type of the target application and the resource type of each node, at least one target node with the highest type matching degree is determined in each cluster node as the current node to be scheduled.

[0084] Optionally, one node corresponds to one resource type, but there may be multiple nodes of the same resource type. Assuming that the application type of the target application is a computing type, all nodes of the computing type are selected from the cluster nodes as target nodes, and the target nodes may include one or more nodes.

[0085] It is possible that none of the current cluster nodes has a resource type that corresponds to the application type of the target application (e.g., the application type of the target application is storage type, and none of the current nodes has a resource type that is storage type), then a node corresponding to another type can be selected as the target node. That is, in the matching process, assuming that the application type of the target application is storage type, the matching degree with the resource type of the target node is ranked from high to low as storage type, other types, and computing type.

[0086] See also Figure 2 In one embodiment, in the step of executing resource scheduling for the target application, scheduling the target application based on the operation cycle of the target application and the schedule of the target node includes one of the following steps B1-B3:

[0087] Step B1: If no application is currently running on any node to be scheduled, and the interval duration of each application in the schedule corresponding to the node to be scheduled is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled.

[0088] Optionally, there are multiple target nodes corresponding to the same target application, and there are also multiple corresponding nodes to be scheduled. Assuming that the current number of nodes to be scheduled includes 3 (there may be more in actual applications, the number here is only used as an example), among the 3 nodes (nodes A, B, C), nodes A and node B currently have no applications running, while node C has applications running, then only nodes A and node B are further considered to analyze whether the interval duration of each application running in the schedule corresponding to each node A and node B is adapted to the operating cycle of the target application; if the current operating cycle of the target application is to run once every 4 seconds, and the running time is 0.7 seconds (assuming that there are 4 seconds left from the start time of the operation), and the interval duration in node A is 3 seconds, then node A cannot adapt to the operating cycle of the target application; and the interval duration in node B is 5 seconds, then node B can adapt to the operating cycle of the target application, and the target application is scheduled to run in node B.

[0089] In one embodiment, if no application is currently running on any node to be scheduled, but the interval duration of each application running in the schedule corresponding to the scheduling node cannot adapt to the operation cycle of the target application, the node to be scheduled is regarded as a node to be scheduled with an application running in step B2 and / or step B3.

[0090] Step B2: If all the nodes to be scheduled currently have applications running, the target application is scheduled to the node to be scheduled with the shortest time to the next idle time in the corresponding schedule.

[0091] Optionally, the node to be scheduled with the shortest time to the next idle moment in the schedule is determined by the end time of the current application running at the node and the start time of the next application running; assuming that the end time of the currently running application of the node to be scheduled A is 3 seconds away, and the start time of the next application running is 5 seconds away, and the time from the start of the target application running in the running cycle of the target application is 3.2 seconds, and the required running time is 1.8 seconds, then the node to be scheduled can adapt to the running cycle of the target application, and the target application can be scheduled to run in this node.

[0092] Step B3: If all the nodes to be scheduled currently have applications running and there is no idle time in the corresponding schedule, the resource scheduling steps are repeated until the scheduling of the target application is completed.

[0093] The idle time is a time period in the schedule when no application is running and the time period is adapted to the running cycle of the target application.

[0094] In one embodiment, see Figure 2 In the step of executing resource scheduling for the target application, a loop step may be included in certain circumstances. Specifically, if the schedules corresponding to all nodes to be scheduled cannot adapt to the operation cycle of the target application, the resource scheduling step may be repeatedly executed until the scheduling of the target application is completed.

[0095] See also Figure 2 , the resource scheduling step in step B3 is repeatedly executed until the scheduling of the target application is completed, including the following steps C1-C2:

[0096] Step C1: Determine at least one target node whose type matching degree is second higher than that of the current node to be scheduled as the node to be scheduled for executing subsequent steps.

[0097] Optionally, assuming that the application type of the current target application is a computing type, and the resource type corresponding to the current node to be scheduled is a computing type, a target node with a resource type of other types can be obtained as the node to be scheduled for executing step C2; if the resource type corresponding to the current node to be scheduled is other types, a target node with a resource type of storage type can be obtained as the node to be scheduled for executing step C2.

[0098] Step C2: Repeat the step of scheduling the target application based on the operation cycle of the target application and the schedule of the target node.

[0099] Specifically, step C2 can be understood as repeatedly executing steps B1-B3 provided in the above embodiment.

[0100] Compared with the prior art, the embodiments of the present application classify machine resources by using classification methods of different dimensions, such as computing type, storage type and other types, etc., which can make full use of the characteristics of different resources to process different applications, thereby achieving the effect of improving resource utilization.

[0101] See also Figure 3 The embodiment of the present application provides a resource scheduling device 300, which may include: a first determination module 301, a second determination module 302, and a scheduling module 303, wherein:

[0102] The first determination module 301 is used to classify the cluster nodes according to the resources of the nodes to determine the resource type of each node and determine the schedule of each node; the second determination module 302 is used to determine the application type of each application and the corresponding operation cycle; the scheduling module 303 is used to perform the following resource scheduling steps for the target application: determine the corresponding target node based on the application type of the target application and the resource type of each node; schedule the target application based on the time period of the target application and the schedule of the target node.

[0103] In one embodiment, the resource type and the application type include at least one of the following: computing type, storage type, and other types.

[0104] In one embodiment, the second determination module 302 includes: a first determination unit, used to classify applications according to their running data to determine the application type of each application; a second determination unit, used to determine the running cycle of each application according to the historical running time of the application; wherein the running data includes data during pre-running and formal running of the application; the historical running time includes the start time and end time of the application running; the running cycle includes the start time and running duration.

[0105] In one embodiment, the scheduling module 303 includes: a matching unit, configured to determine at least one target node with the highest type matching degree in each cluster node as the current node to be scheduled based on the application type of the target application and the resource type of each node.

[0106] In one embodiment, the scheduling module 303 includes: a first scheduling unit, which is used to schedule the target application to any node to be scheduled if no application is currently running on the node to be scheduled, and the interval duration of the running of each application in the schedule corresponding to the node to be scheduled is adapted to the running cycle of the target application; a second scheduling unit, which is used to schedule the target application to the node to be scheduled with the shortest distance to the next idle time in the corresponding schedule if all the nodes to be scheduled currently have applications running; and a third scheduling unit, which is used to repeat the resource scheduling steps until the scheduling of the target application is completed if all the nodes to be scheduled currently have applications running and there is no idle time in the corresponding schedule.

[0107] In one embodiment, the third scheduling unit includes: a repeated matching sub-unit, which is used to determine at least one target node whose type matching degree is second higher than that of the current node to be scheduled as a node to be scheduled for executing subsequent steps; and a repeated execution sub-unit, which is used to repeatedly execute the step of scheduling the target application based on the operating cycle of the target application and the schedule of the target node.

[0108] In one embodiment, the idle time is a time period in the schedule in which no application is running and the time period is adapted to the running cycle of the target application.

[0109] The resource scheduling device of the embodiment of the present application can execute a resource scheduling method provided by the embodiment of the present application, and the implementation principle is similar. The actions performed by each module in the resource scheduling device in each embodiment of the present application correspond to the steps in the resource scheduling method in each embodiment of the present application. For the detailed functional description of each module of the resource scheduling device, please refer to the description in the corresponding resource scheduling method shown in the previous text, which will not be repeated here.

[0110] See also Figure 4 In an optional embodiment, an electronic device is provided, and the electronic device 4000 includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0111] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0112] The bus 4002 may include a path for transmitting information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0113] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0114] The memory 4003 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the contents shown in the above method embodiment.

[0115] Among them, electronic devices include but are not limited to: servers.

[0116] An electronic device is provided in an embodiment of the present application, and the electronic device includes: a memory and a processor; at least one program, stored in the memory, for implementing the corresponding content in the aforementioned method embodiment when executed by the processor, and compared with the prior art, it can achieve: by classifying the existing cluster nodes based on resources, determining the resource type of each node, and also determining the schedule of each node; then combining the application type and the corresponding operation cycle of each application, scheduling the target application with resources, scheduling the target application to a similar or identical type, and scheduling the target application to a relatively idle node considering the node schedule and the application operation cycle, so as to make full use of the characteristics of the resources, reduce the waiting time of application operation, and improve resource utilization.

[0117] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.

[0118] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0119] The above are only some embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A resource scheduling method, characterized in that: include: Classify cluster nodes according to their resources to determine the resource type of each node and determine the schedule of each node; The schedule of each node includes a description of the start time and running time of each task to be processed by each node; Determine the application type and corresponding operation cycle of each application; Perform the following resource scheduling steps for the target application: Determine a corresponding target node based on the application type of the target application and the resource type of each node; schedule the target application based on the time period of the target application and the schedule of the target node; The determining the corresponding target node based on the application type of the target application and the resource type of each node includes: Based on the application type of the target application and the resource type of each node, determining at least one target node with the highest type matching degree in each cluster node as the current node to be scheduled; The scheduling of the target application based on the operation cycle of the target application and the schedule of the target node includes: If no application is currently running on any of the nodes to be scheduled, and the interval duration of each application running in the schedule corresponding to the node to be scheduled is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled; If all the nodes to be scheduled currently have applications running, or there is no node to be scheduled whose running interval of each application in the schedule is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled in the corresponding schedule with the shortest distance to the next idle time; if there is no node to be scheduled that includes an idle time in the schedule, the resource scheduling step is repeated until the scheduling of the target application is completed.

2. The method according to claim 1, characterized in that The resource type and application type include at least one of the following: computing type, storage type, and other types.

3. The method according to claim 1, characterized in that Determining the application type of each application and the corresponding application operation cycle includes: Classify the applications according to the running data of the applications and determine the application type of each application; Determine the operation cycle of each application based on the historical operation time of the application; The operation data includes data of application pre-operation and formal operation; the historical operation time includes the start time and end time of application operation; and the operation cycle includes the start time and operation duration.

4. The method according to claim 1, characterized in that: The repeatedly executing the resource scheduling step until the scheduling of the target application is completed includes: Determine at least one target node whose type matching degree is second higher than that of the current node to be scheduled as the node to be scheduled for executing subsequent steps; Repeat the step of scheduling the target application based on the operating cycle of the target application and the schedule of the target node.

5. The method according to claim 1, characterized in that The idle time is a time period in the schedule during which no application is running and the time period is adapted to the running cycle of the target application.

6. A resource scheduling device, characterized in that: include: A first determination module, used to classify cluster nodes according to the resources of the nodes to determine the resource type of each node, and determine the schedule of each node; The schedule of each node includes a description of the start time and running time of each task to be processed by each node; A second determination module is used to determine the application type and corresponding operation cycle of each application; The scheduling module is used to perform the following resource scheduling steps for the target application: determine the corresponding target node based on the application type of the target application and the resource type of each node; schedule the target application based on the time period of the target application and the schedule of the target node; The determining the corresponding target node based on the application type of the target application and the resource type of each node includes: Based on the application type of the target application and the resource type of each node, determining at least one target node with the highest type matching degree in each cluster node as the current node to be scheduled; The scheduling of the target application based on the operation cycle of the target application and the schedule of the target node includes: If no application is currently running on any of the nodes to be scheduled, and the interval duration of each application running in the schedule corresponding to the node to be scheduled is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled; If all the nodes to be scheduled currently have applications running, or there is no node to be scheduled whose running interval of each application in the schedule is adapted to the running cycle of the target application, the target application is scheduled to the node to be scheduled in the corresponding schedule with the shortest distance to the next idle time; if there is no node to be scheduled that includes an idle time in the schedule, the resource scheduling step is repeated until the scheduling of the target application is completed.

7. An electronic device, characterized in that: It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the method according to any one of claims 1 to 5.

8. A storage medium, the storage medium being a computer-readable storage medium, on which a computer program is stored, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Performance-driven resource management in a distributed computer system

    CN104252393A

  • Resource distribution method and explorer

    CN107045456A

  • Resource scheduling method and device

    CN107291546A

  • Resource scheduling method and device, electronic equipment and computer readable storage medium

    CN111026552A

  • Cluster resource allocation processing method and device, equipment and storage medium

    CN111158909A