Cloud Resource Scheduling Method, Device, Electronic Device and Computer Storage Medium

The method addresses the challenge of hybrid cloud resource scheduling by calculating weight values for CPU, memory, and network resources to optimize server selection, enhancing flexibility and efficiency in resource allocation.

CN115348268BActive Publication Date: 2025-07-15ASIAINFO TECH CHINA INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210977005.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-07-15
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

The existing hybrid cloud resource scheduling methods fail to realize automatic scheduling based on the service-oriented characteristics of cloud computing, resulting in insufficient resource utilization efficiency and flexibility.

Method used

Through a configurable method based on weight values, combined with a comprehensive resource benchmark comparison algorithm, hybrid cloud resources are weighted and compared and selected to achieve automatic scheduling.

Benefits of technology

It improves the scheduling flexibility and effectiveness of hybrid cloud resources, and can achieve parallel and distributed effective management under the situation of large differences between heterogeneous computing resources and network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115348268B_ABST
    Figure CN115348268B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a cloud resource scheduling method, device, electronic device and computer storage medium, which relate to the technical field of cloud services. The method includes: for each resource scheduling period, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is respectively weighted and compared with the resource information of the first normally operating server, where the first normally operating server and other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information at least includes the central processing unit (CPU), memory information, disk information and network resources; then, according to the result of the weighted comparison, a target server is selected from other servers, and cloud resource services are provided through the target server. The embodiments of the present application can combine the weight value of cloud resources with the comprehensive resource benchmark comparison algorithm to realize the automatic scheduling of hybrid cloud resources and improve elasticity and utility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of cloud services. Specifically, this application relates to a cloud resource scheduling method, apparatus, electronic device, and computer storage medium. Background Art

[0002] Resource scheduling in a hybrid cloud environment generally employs economy-oriented scheduling, quality-of-service (QoS)-oriented scheduling, performance-oriented scheduling, and energy-saving-oriented scheduling. Economy-oriented scheduling uses price regulation based on genetic algorithms for scheduling. QoS-oriented cloud computing scheduling algorithms focus on aspects such as response time and resource availability. Performance-oriented scheduling methods mainly consider the method of dynamically optimizing the allocation of physical resources for virtual resources. Energy-saving-oriented scheduling aims to complete resource scheduling with minimal overhead from the perspective of cloud service providers, but its scheduling often sacrifices performance.

[0003] Existing scheduling methods and systems fail to achieve automatic scheduling of hybrid cloud resources from the service-oriented characteristics of cloud computing. Evidently, there is an urgent need for a weight-based and configurable method for hybrid cloud resource scheduling to achieve automatic scheduling of hybrid cloud resources and improve elasticity and utility. Summary of the Invention

[0004] Embodiments of this application provide a cloud resource scheduling method, apparatus, electronic device, and computer storage medium, which can solve the problem of automatic scheduling of hybrid cloud resources. The technical solutions are as follows:

[0005] According to one aspect of the embodiments of this application, a resource scheduling method is provided. The method includes:

[0006] For each resource scheduling cycle, based on the calculated weight values, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is respectively weighted and compared with the resource information of the first normally operating server, where the first normally operating server and other servers are all servers that provide resource services in hybrid cloud resource scheduling, and the resource information includes at least central processing unit (CPU), memory information, disk information, and network resources;

[0007] Based on the result of the weighted comparison, a target server is selected from other servers, and cloud resource services are provided through the target server.

[0008] In a possible implementation, the method further includes: calculating weight values within each resource scheduling cycle;

[0009] Calculating weight values includes:

[0010] Calculate the CPU occupancy score, the score for the use of balanced resources, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object respectively;

[0011] Determine the sum of the scores of the CPU occupancy score, the score for the use of balanced resources, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object as the weight value.

[0012] In a possible implementation, calculating the CPU occupancy score includes:

[0013] Based on a first predetermined calculation formula, calculate the CPU occupancy score according to the capacity information of the CPU and the request information for the CPU.

[0014] In a possible implementation, calculating the average disk access time score includes:

[0015] Calculate the seek time of the disk based on a predetermined seek time calculation formula;

[0016] Calculate the seek latency time of the disk based on a predetermined latency time calculation formula;

[0017] Calculate the transfer time of the disk based on a predetermined transfer time calculation formula;

[0018] Calculate the average disk access time score according to the seek time, the seek latency time, and the transfer time.

[0019] In a possible implementation, for each resource scheduling cycle, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, weighted compare the resource information of other servers with the resource information of the first normally working server respectively, including:

[0020] For each other server, calculate a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally working server, calculate a second ratio according to the second weight value, the memory information of each other server, and the memory information of the normally working server, calculate a third ratio according to the third weight value, the disk information of each other server, and the disk information of the normally working server, and calculate a fourth ratio according to the fourth weight value, the network resource utilization rate of each other server, and the network resource utilization rate of the normally working server;

[0021] Determine the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server to the resource information of the first normally working server;

[0022] Among them, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value; the CPU information includes the CPU processing capacity and the CPU usage rate; the memory information includes the memory processing capacity and the memory usage rate, and the disk information includes the disk processing capacity and the disk usage rate.

[0023] In a possible implementation manner, calculating a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating servers includes:

[0024] Calculating a first product of the CPU processing capacity of each other server and the CPU usage rate of each other server;

[0025] Calculating a second product of the CPU processing capacity of the normally operating servers and the CPU usage rate of the normally operating servers;

[0026] Calculating the ratio between the first product and the second product, and determining the product of the first weight value and the ratio as the first ratio.

[0027] In a possible implementation manner, selecting a target server from other servers according to the result of weighted comparison includes:

[0028] Based on a predetermined sorting method, sorting the weighted comparison results, and determining the server corresponding to the smallest weighted ratio as the target server.

[0029] According to another aspect of the embodiments of the present application, a cloud resource scheduling device is provided, and the device includes:

[0030] A first processing module, for each resource scheduling cycle, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, respectively perform weighted comparison of the resource information of other servers with the resource information of the first normally operating server, where the first normally operating server and other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information at least includes a central processing unit CPU, memory information, disk information, and network resources;

[0031] A second processing module, for selecting a target server from other servers according to the result of weighted comparison, and providing cloud resource services through the target server.

[0032] In a possible implementation manner, the first processing module is further configured to: calculate a weight value within each resource scheduling cycle; where calculating the weight value includes:

[0033] Calculating the CPU occupancy score, the usage score of balanced resources, the disk average access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object respectively;

[0034] Determine the sum of the CPU occupancy score, the score for balanced resource usage, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object as the weight value.

[0035] In a possible implementation, when calculating the CPU occupancy score, the first processing module is used to:

[0036] Based on a first predetermined calculation formula, calculate the CPU occupancy score according to the capacity information of the CPU and the request information for the CPU.

[0037] In a possible implementation, when calculating the average disk access time score, the first processing module is used to:

[0038] Calculate the seek time of the disk based on a predetermined seek time calculation formula;

[0039] Calculate the seek latency time of the disk based on a predetermined latency time calculation formula;

[0040] Calculate the transfer time of the disk based on a predetermined transfer time calculation formula;

[0041] Calculate the average disk access time score according to the seek time, the seek latency time, and the transfer time.

[0042] In a possible implementation, for each resource scheduling cycle, when the first processing module weightedly compares the resource information of other servers with the resource information of the first normally operating server based on the calculated weight value according to the comprehensive resource benchmark comparison algorithm, it is used to:

[0043] For each other server, calculate a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server, calculate a second ratio according to the second weight value, the memory information of each other server, and the memory information of the normally operating server, calculate a third ratio according to the third weight value, the disk information of each other server, and the disk information of the normally operating server, and calculate a fourth ratio according to the fourth weight value, the network resource utilization rate of each other server, and the network resource utilization rate of the normally operating server;

[0044] Determine the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server to the resource information of the first normally operating server;

[0045] Among them, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value; the CPU information includes the CPU processing capacity and the CPU usage rate; the memory information includes the memory processing capacity and the memory usage rate, and the disk information includes the disk processing capacity and the disk usage rate.

[0046] In a possible implementation manner, when calculating the first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating servers, the first processing module is configured to:

[0047] Calculate the first product of the CPU processing capacity of each other server and the CPU usage rate of each other server;

[0048] Calculate the second product of the CPU processing capacity of the normally operating servers and the CPU usage rate of the normally operating servers;

[0049] Calculate the ratio between the first product and the second product, and determine the product of the first weight value and this ratio as the first ratio.

[0050] In a possible implementation manner, when selecting a target server from other servers according to the result of the weighted comparison, the second processing is configured to:

[0051] Based on a predetermined sorting method, sort the weighted comparison results, and determine the server corresponding to the smallest weighted ratio as the target server.

[0052] According to another aspect of the embodiments of the present application, there is provided an electronic device, which includes: a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the steps of the above cloud resource scheduling method.

[0053] According to still another aspect of the embodiments of the present application, there is provided a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above cloud resource scheduling method are implemented.

[0054] According to one aspect of the embodiments of the present application, there is provided a computer program product, and when the computer program is executed by a processor, the steps of the above cloud resource scheduling method are implemented.

[0055] The beneficial effects brought by the technical solution provided by the embodiment of the present application are as follows: Based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is weighted and compared with the resource information of the first normally operating server respectively, so that configurable hybrid cloud resource scheduling can be performed based on the weight value, and the weight value of cloud resources can be combined with the comprehensive resource benchmark comparison algorithm to realize the automatic scheduling of hybrid cloud resources, improving elasticity and utility; According to the results of the weighted comparison, a target server is selected from other servers, and cloud resource services are provided through the target server to realize the automatic scheduling of hybrid cloud resources starting from the service-oriented characteristics of cloud computing, so that in the face of heterogeneous computing resources with large differences in resource computing capabilities and network environments, etc., the effectiveness of scheduling can be ensured in parallel and distributed manner and effective management can be achieved. Brief Description of the Drawings

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application.

[0057] Figure 1 It is a schematic flowchart of a cloud resource scheduling method provided by an embodiment of the present application;

[0058] Figure 2 It is a schematic structural diagram of a cloud resource scheduling device provided by an embodiment of the present application;

[0059] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments

[0060] The following describes the embodiments of the present application in conjunction with the drawings in the present application. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions of the embodiments of the present application.

[0061] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the", and "said" used herein may also include the plural forms. It should be further understood that the terms "comprising" and "including" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements, and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components, and / or their combinations supported by the technical field of the present invention. It should be understood that when we say an element is "connected" or "coupled" to another element, this element can be directly connected or coupled to the other element, or it can mean that this element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein can include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by this term. For example, "A and / or B" indicates being implemented as "A", or being implemented as "B", or being implemented as "A and B".

[0062] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0063] First, several terms related to the present application will be introduced and explained:

[0064] A private cloud is to create cloud infrastructure and software and hardware resources within a firewall for various departments within an institution or enterprise to share the resources in the data center. To create a private cloud, in addition to hardware resources, there is generally cloud device (IaaS, Infrastructure as a Service) software.

[0065] Private cloud computing also includes three layers: cloud hardware, cloud platform, and cloud service. The difference is that the cloud hardware is the user's own personal computer or server, rather than the data center of a cloud computing vendor. The purpose of a cloud computing vendor to build a data center is to provide public cloud services for millions of users, so it needs to have hundreds of thousands or even millions of servers. For private cloud computing, for an individual, it only serves relatives and friends, and for an enterprise, it only serves the enterprise's employees, customers, and suppliers. Therefore, an individual's or enterprise's own personal computer or server is sufficient to provide cloud services.

[0066] A public cloud generally refers to a cloud that can be used provided by a third-party provider for users. A public cloud can generally be used through the Internet and may be free or inexpensive. The core attribute of a public cloud is shared resource services. There are many instances of this kind of cloud that can provide services in the entire open public network today.

[0067] The hybrid cloud combines public cloud and private cloud, which is the main mode and development direction of cloud computing in recent years. The private cloud is mainly for enterprise users. Due to security considerations, enterprises are more willing to store data in the private cloud, but at the same time, they hope to obtain the computing resources of the public cloud. In this case, the hybrid cloud is increasingly adopted. It mixes and matches the public cloud and the private cloud to achieve the best effect. This personalized solution achieves the goal of saving money and ensuring security.

[0068] By integrating public cloud and private cloud, the hybrid cloud takes into account the advantages of both private cloud and public cloud, drawing on the strengths of various clouds. The resource scheduling of the hybrid cloud is directly related to the stability, availability, reliability, resource utilization efficiency, operating cost, and user satisfaction of cloud services. Currently, the resource scheduling methods under the hybrid cloud model mainly include:

[0069] 1. Amazon's scheduling system combines a performance-first and economic cost-constrained approach. It realizes cost optimization through the method of classifying and charging for computing resources, and at the same time allows users to pre-select and configure virtual machines to achieve resource scheduling.

[0070] 2. Eucalyptus adopts a hierarchical scheduling method and uses a manager to achieve resource allocation and scheduling. OpenNebula also adopts a hierarchical scheduling method to achieve resource scheduling.

[0071] 3. Google's MapReduce adopts a centralized scheduling, Hadoop uses a master-slave scheduling, and IBM's Blue Cloud system uses a virtual machine monitor agent to complete resource scheduling.

[0072] However, the above scheduling methods and systems fail to achieve the automatic scheduling of hybrid cloud resources from the characteristics of cloud computing facing services. Based on the above defects, there is an urgent need for a weight-based configurable hybrid cloud resource scheduling method to achieve the automatic scheduling of hybrid cloud resources, improve elasticity and utility.

[0073] In view of the above situation, this application proposes a cloud resource scheduling solution, which can perform configurable hybrid cloud resource scheduling based on weight values. It can combine the weight values of cloud resources with a comprehensive resource benchmark comparison algorithm to achieve the automatic scheduling of hybrid cloud resources, improve elasticity and utility, select a target server from other servers, and provide resource services through the target server to achieve the automatic scheduling of hybrid cloud resources from the characteristics of cloud computing facing services. When facing heterogeneous computing resources with large differences in resource computing capabilities and network environments, it can ensure the effectiveness of scheduling in parallel and distributed manner and achieve effective management.

[0074] The technical solutions of the embodiments of the present application and the technical effects brought about by the technical solutions of the present application will be described below through the description of several exemplary embodiments. It should be noted that the following embodiments can refer to, draw on, or combine with each other. For the same terms, similar features, and similar implementation steps in different embodiments, they will not be described repeatedly.

[0075] Figure 1 It is a schematic flowchart of the cloud resource scheduling method provided by the embodiments of the present application. As Figure 1 shown, the method includes: Step S110, for each resource scheduling period, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, weightedly compare the resource information of other servers with the resource information of the first normally operating server respectively, where the first normally operating server and other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information includes at least central processing unit (CPU), memory information, disk information, and network resources; Step S120, select a target server from other servers according to the result of the weighted comparison, and provide cloud resource services through the target server.

[0076] In each resource scheduling period (such as resource scheduling period T1), it is necessary to calculate the weight value (such as weight value Q1), and based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, weightedly compare the resource information of other servers with the resource information of the first normally operating server respectively. Among them, the number of other servers can be one, two, or more, and the embodiments of the present application do not limit it. When there are two other servers, such as server A and server B, it is necessary to weightedly compare the resource information of server A with the resource information of the first normally operating server (such as server S) based on the calculated weight value according to the comprehensive resource benchmark comparison algorithm to obtain the result of the weighted comparison (such as denoted as R1). Subsequently, it is necessary to weightedly compare the resource information of server B with the resource information of the first normally operating server (such as server S) based on the calculated weight value according to the comprehensive resource benchmark comparison algorithm to obtain the result of the weighted comparison (such as denoted as R2).

[0077] In practical applications, it is possible to weightedly compare the CPU, memory, disk, and network resources of other servers with the CPU, memory, disk, and network resources of the first normally operating server. It should be noted that when performing the weighted comparison, it is necessary to weightedly compare the CPU of other servers with the CPU of the first normally operating server, the memory information of other servers with the memory information of the first normally operating server, the disk of other servers with the disk information of the first normally operating server, and the network resources of other servers with the network cable resources of the first normally operating server.

[0078] After obtaining the results of weighted comparison (such as R1 and R2 above), a target server (such as server A) is selected from other servers (such as server A and server B above) according to the results of weighted comparison, and resource services are provided through the target server.

[0079] After the current resource scheduling cycle (such as resource scheduling cycle T1) ends and enters the next resource scheduling cycle (such as resource scheduling cycle T2), it is necessary to recalculate the weight value (such as weight value Q2) for the next resource scheduling cycle (such as resource scheduling cycle T2), and based on the calculated weight value, the resource information of other servers is respectively weighted and compared with the resource information of the first normally operating server according to the comprehensive resource benchmark comparison algorithm. The specific process is the same as the above content and will not be elaborated here.

[0080] The method provided in this application, based on the calculated weight value, respectively weights and compares the resource information of other servers with the resource information of the first normally operating server according to the comprehensive resource benchmark comparison algorithm, enabling configurable hybrid cloud resource scheduling based on the weight value, being able to combine the weight value of cloud resources with the comprehensive resource benchmark comparison algorithm to achieve automatic scheduling of hybrid cloud resources, improving elasticity and utility; according to the results of weighted comparison, a target server is selected from other servers, and resource services are provided through the target server to achieve automatic scheduling of hybrid cloud resources starting from the service-oriented characteristics of cloud computing, so that in the face of heterogeneous computing resources with large differences in resource computing capabilities and network environments, etc., the effectiveness of scheduling can be ensured in parallel and distributed manner and effective management can be achieved.

[0081] In a possible implementation manner of the embodiment of this application, the resource scheduling method further includes: calculating a weight value within each resource scheduling cycle; wherein, the process of calculating the weight value can be:

[0082] Calculate the CPU occupancy score, the usage score of balanced resources, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object respectively; then, determine the sum of the scores of the CPU occupancy score, the usage score of balanced resources, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score as the weight value.

[0083] Correspondingly, the weight value is calculated based on the CPU occupancy score, the balanced resource usage score, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object. In practical applications, the CPU occupancy score, the balanced resource usage score, the average disk access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object can be added together (i.e., summed), and the added result (i.e., the sum) is determined as the above-mentioned weight value.

[0084] In one example, based on a first predetermined calculation formula, the CPU occupancy score can be calculated according to the capacity information of the CPU and the request information for the CPU. In practical applications, the first predetermined calculation formula can be in the form of cpu((capacity - sum(requested)) * 10 / capacity), where capacity represents the capacity information of the CPU, requested represents the request information for the CPU, and (capacity - sum(requested)) * 10 / capacity represents the ratio of the remaining capacity to the total capacity. Among them, during the calculation process, the one with the highest CPU occupancy score wins. Correspondingly, the highest CPU occupancy score is selected from multiple CPU occupancy scores as the final CPU occupancy score and is used for subsequent calculation of the weight value.

[0085] In one example, for the way of using balanced resources, the degree of proximity (balance) of the CPU and memory occupancy rates is used as the evaluation criterion. The closer the two occupancies are, the higher the balanced resource usage score, and the one with the higher score wins. Correspondingly, the highest score is selected from multiple balanced resource usage scores as the final balanced resource usage score and is used for subsequent calculation of the weight value.

[0086] In one example, the seek time of the disk can be calculated based on a predetermined seek time calculation formula, and then, based on a predetermined latency time calculation formula, the seek latency time of the disk can be calculated; then, based on a predetermined transfer time calculation formula, the transfer time of the disk can be calculated; finally, the average disk access time score is calculated according to the seek time, the seek latency time, and the transfer time.

[0087] In practical applications, for a disk, the seek time Ts = m * n + s, where m is a constant related to the speed of the disk drive, n is the number of tracks, and s is the time to start the magnetic arm; that is, the formula for the predetermined seek time is Ts = m * n + s. The latency time Tr: Tr = 1 / (2 * r); where r is the rotational speed of the disk; that is, the formula for the predetermined latency time is Tr = 1 / (2 * r). The transfer time Tt: Tt = b / (r * N), where b is the number of bytes read / written each time, r is the number of revolutions per second of the disk; N is the number of bytes on a track, that is, the formula for the predetermined transfer time is Tt = b / (r * N). The total average access time Ta can be expressed as: Ta = Ts + Tr + Tt, that is, according to the seek time, seek latency time, and transfer time, calculate the average access time score of the disk. Among them, the smaller the total average access time value, the higher the score; equivalently, select the highest score from multiple disk average access time scores as the final disk average access time score and use it for subsequent weight value calculations.

[0088] In one example, the label score of the target object can be obtained by looking up the label selectors matched by the Service, StatefulSet, ReplicatSet, etc. corresponding to the current object (i.e., the target object). Among them, the fewer such labels running on the node, the higher the score (i.e., the label score of the target object). Equivalently, select the highest score from multiple label scores as the final label score and use it for subsequent weight value calculations. Among them, StatefulSet represents a stateful task. StatefulSet is a resource type generated to solve the problem of stateful services. The ReplicatSet controller supports the collective selector (selector). ReplicaSet creates the specified number of pod replicas on behalf of the user, ensures that the number of pod replicas meets the expected state, and supports the functions of rolling automatic scaling and shrinking. It is mainly composed of three components: (1) the number of pod replicas expected by the user, (2) the label selector to determine which pod is managed by itself, and (3) when the number of existing pods is insufficient, new pods will be created according to the pod resource template. It helps users manage stateless pod resources and accurately reflects the target quantity defined by the user. However, ReplicaSet is not the directly used controller.

[0089] In one example, the affinity score of the target object can be obtained by traversing the entries of the object (i.e., the target object) affinity. During the process of traversing the object affinity entries, the weights of the nodes that can be matched are added together. The higher the value, the higher the score, and the one with the higher score wins. Equivalently, the highest score is selected from multiple affinity scores as the final affinity score and is used for subsequent weight value calculation. Among them, affinity can refer to finding the situation where two objects co-occur. Object-node affinity refers to the specified object to be scheduled, including hard affinity and soft affinity.

[0090] In one example, the node matching degree score of the target object can be obtained by using the NodeSelector in the object to perform a matching degree check on the nodes. For example, according to the NodeSelector in the object, a matching degree check is performed on the nodes. The more successful matches, the higher the score, and the one with the higher score wins. Equivalently, the highest score is selected from multiple node matching degree scores as the final node matching degree score and is used for subsequent weight value calculation. Among them, NodeSelector is the simplest method to specify that a pod is assigned to a specified node, and it is implemented using the NodeSelector attribute in the Pod. NodeSelector will specify key-value pairs, and the pod will be assigned to a specific node that has all the labels corresponding to the specified key-value pairs. Usually, there is only one pair of key-value.

[0091] In a possible implementation manner, for each resource scheduling cycle, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is weighted and compared with the resource information of the first normally operating server respectively, including:

[0092] For each other server, calculate the first ratio according to the first weight, the CPU information of each other server, and the CPU information of the normally operating server, calculate the second ratio according to the second weight, the memory information of each other server, and the memory information of the normally operating server, calculate the third ratio according to the third weight, the disk information of each other server, and the disk information of the normally operating server, and calculate the fourth ratio according to the fourth weight, the network resource utilization rate of each other server, and the network resource utilization rate of the normally operating server;

[0093] Determine the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server to the resource information of the first normally operating server;

[0094] Among them, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value; the CPU information includes the CPU processing capacity and the CPU usage rate; the memory information includes the memory processing capacity and the memory usage rate, and the disk information includes the disk processing capacity and the disk usage rate.

[0095] Specifically, in the process of calculating the first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating servers, the following processing can be performed: First, calculate the first product of the CPU processing capacity of each other server and the CPU usage rate of each other server; then, calculate the second product of the CPU processing capacity of the normally operating servers and the CPU usage rate of the normally operating servers; then, calculate the ratio between the first product and the second product, and determine the product of the first weight value and this ratio as the first ratio.

[0096] In practical applications, for each other server, calculate the sum of the products of the product of the first weight value and the first ratio, the product of the second weight value and the second ratio, the product of the third weight value and the third ratio, and the product of the fourth weight value and the fourth ratio, and determine this sum of products as the weighted ratio of the resource information of each other server and the resource information of the first normally operating server; among them, the first ratio is the ratio between the first product and the second product, the first product is the product of the CPU processing capacity of each other server and the CPU usage rate of each other server, and the second product is the product of the CPU processing capacity of the normally operating server and the CPU usage rate of the normally operating server; the second ratio is the ratio between the third product and the fourth product, the third product is the product of the memory processing capacity of each other server and the memory usage rate of each other server, and the fourth product is the product of the memory processing capacity of the normally operating server and the memory usage rate of the normally operating server; the third ratio is the ratio between the fifth product and the sixth product, the fifth product is the product of the disk processing capacity of each other server and the disk usage rate of each other server, and the sixth product is the product of the disk processing capacity of the normally operating server and the disk usage rate of the normally operating server; the fourth ratio is the ratio of the network resource usage rate of each other server to the network resource usage rate of the normally operating server.

[0097] In an example, according to the comprehensive resource benchmark comparison algorithm, taking the first normally operating server as the benchmark, the resource information of each other server and the resource information of the benchmark server are weighted and compared according to the following formula:

[0098]

[0099] Among them, P is the processing capacity, that is, P cpu represents the CPU processing capacity of other servers, Indicates the CPU processing capacity of the reference server, P mem Indicates the memory processing capacity of other servers Indicates the memory processing capacity of the reference server, P disk Indicates the disk processing capacity of other servers Indicates the disk processing capacity of the reference server. cpu, mem, disk, and net are their respective usage rates, that is, cpu represents the CPU usage rate of other servers, cpu sta Indicates the CPU usage rate of the reference server, mem represents the memory usage rate of other servers, mem sta Indicates the memory usage rate of the reference server, disk represents the disk usage rate of other servers, disk sta Indicates the disk usage rate of the reference server, net represents the network resource usage rate of other servers, net sta Indicates the network resource usage rate of the reference server. a, b, c, and d are weight values respectively. For example, a is the first weight value, b is the second weight value, c is the third weight value, and d is the fourth weight value; moreover, the values of a, b, c, and d are dynamically configured according to the weight values obtained from the above calculations, and the values are taken by enhancing or weakening the performance load in a certain aspect, that is, the weight values are dynamically adjusted by enhancing or weakening the performance load in a certain aspect. ratio is the weighted ratio.

[0100] In a possible implementation, in the process of selecting a target server from other servers according to the result of weighted comparison, the weighted comparison results can be sorted based on a predetermined sorting method, and the server corresponding to the smallest weighted ratio is determined as the target server. Equivalently, after obtaining the weighted ratio ratio of each other server and the first normally working server, the various ratios can be sorted based on a predetermined sorting method (such as sorting from small to large, or from large to small), and then, according to the sorting result, the server with the smallest weighted ratio (i.e., ratio) is selected as the server with the lightest load (i.e., the target server), that is, the server corresponding to the smallest weighted ratio is determined as the target server (i.e., the server with the lightest load), and resource services are provided through this target server.

[0101] It can be seen that the embodiments of the present application combine the weight values of cloud resources and the comprehensive resource benchmark comparison algorithm to achieve automatic scheduling of hybrid cloud resources, improving elasticity and utility. First, the optimal solution of the weight values of cloud resources is calculated according to dimensions such as cpu and the usage method of balanced resources. Then, according to the comprehensive resource benchmark comparison algorithm, the obtained optimal weight values are configured preset to achieve automatic scheduling of hybrid cloud resources, improving elasticity and utility.

[0102] An embodiment of the present application provides a cloud resource scheduling device, such as Figure 2 As shown, the resource scheduling device 200 may include: a first processing module 201 and a second processing module 202, wherein

[0103] According to another aspect of the embodiment of the present application, a resource scheduling device is provided, and the device includes:

[0104] The first processing module 201 is configured to, for each resource scheduling period, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, perform weighted comparison of the resource information of other servers with the resource information of the first normally operating server respectively, wherein the first normally operating server and other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information includes at least the central processing unit CPU, memory information, disk information, and network resources;

[0105] The second processing module 202 is configured to select a target server from other servers according to the result of the weighted comparison, and provide cloud resource services through the target server.

[0106] The device of the embodiment of the present application performs weighted comparison of the resource information of other servers with the resource information of the first normally operating server respectively based on the calculated weight value according to the comprehensive resource benchmark comparison algorithm, so that configurable hybrid cloud resource scheduling can be performed based on the weight value, and the weight value of cloud resources and the comprehensive resource benchmark comparison algorithm can be combined to realize automatic scheduling of hybrid cloud resources, improving elasticity and utility; according to the result of the weighted comparison, a target server is selected from other servers, and resource services are provided through the target server, so as to realize automatic scheduling of hybrid cloud resources starting from the service-oriented characteristics of cloud computing, so that in the face of heterogeneous computing resources, and there are large differences in resource computing capabilities and network environments, etc., the effectiveness of scheduling can be guaranteed in parallel and distributed manner and effective management can be achieved.

[0107] In a possible implementation manner, the first processing module is further configured to: calculate a weight value within each resource scheduling period; wherein, calculating the weight value includes:

[0108] Calculate the CPU occupancy score, the usage score of balanced resources, the disk average access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object respectively;

[0109] Determine the sum of the scores of the CPU occupancy score, the usage score of balanced resources, the disk average access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object as the weight value.

[0110] In a possible implementation, when calculating the CPU occupancy score, the first processing module is used to:

[0111] Based on a first predetermined calculation formula, calculate the CPU occupancy score according to the capacity information of the CPU and the request information for the CPU.

[0112] In a possible implementation, when calculating the average disk access time score, the first processing module is used to:

[0113] Calculate the seek time of the disk based on a predetermined seek time calculation formula;

[0114] Calculate the seek latency time of the disk based on a predetermined latency time calculation formula;

[0115] Calculate the transfer time of the disk based on a predetermined transfer time calculation formula;

[0116] Calculate the average disk access time score according to the seek time, seek latency time, and transfer time.

[0117] In a possible implementation, for each resource scheduling cycle, when the first processing module performs weighted comparison of the resource information of other servers with the resource information of the first normally operating server based on the calculated weight value according to the comprehensive resource benchmark comparison algorithm, it is used to:

[0118] For each other server, calculate a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server, calculate a second ratio according to the second weight value, the memory information of each other server, and the memory information of the normally operating server, calculate a third ratio according to the third weight value, the disk information of each other server, and the disk information of the normally operating server, and calculate a fourth ratio according to the fourth weight value, the network resource utilization rate of each other server, and the network resource utilization rate of the normally operating server;

[0119] Determine the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server to the resource information of the first normally operating server;

[0120] Wherein, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value; the CPU information includes CPU processing capacity and CPU utilization rate; the memory information includes memory processing capacity and memory utilization rate, and the disk information includes disk processing capacity and disk utilization rate.

[0121] In a possible implementation, when calculating the first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server, the first processing module is used to:

[0122] Calculate a first product of the CPU processing capacity of each other server and the CPU usage rate of each other server;

[0123] Calculate a second product of the CPU processing capacity of the normally operating server and the CPU usage rate of the normally operating server;

[0124] Calculate a ratio between the first product and the second product, and determine a first ratio as the product of the first weight value and the ratio.

[0125] In a possible implementation manner, when the second processing selects a target server from other servers according to the result of the weighted comparison, it is used for:

[0126] Sort the weighted comparison results based on a predetermined sorting method, and determine the server corresponding to the smallest weighted ratio as the target server.

[0127] The cloud resource scheduling device in the embodiments of the present application can execute the resource scheduling method shown in the above embodiments of the present application, and its implementation principle is similar. The actions performed by each module in the device in the embodiments of the present application correspond to the steps in the methods in the embodiments of the present application. For the detailed function descriptions of each module of the device, reference can specifically be made to the descriptions in the corresponding methods shown above, and details are not described herein again.

[0128] In the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory. The processor executes the above computer program to implement the steps of the resource scheduling method. Compared with the prior art, it can be realized that: based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is respectively weighted compared with the resource information of the first normally operating server, so that configurable hybrid cloud resource scheduling can be performed based on the weight value, and the weight value of cloud resources and the comprehensive resource benchmark comparison algorithm can be combined to realize automatic scheduling of hybrid cloud resources, improve elasticity and utility; according to the result of the weighted comparison, select a target server from other servers, and provide resource services through the target server to realize automatic scheduling of hybrid cloud resources starting from the characteristics of cloud computing for services, so that when facing heterogeneous computing resources and there are large differences in resource computing capabilities and network environments, etc., the effectiveness of scheduling can be ensured in parallel and distributed manner and effective management can be achieved.

[0129] In an alternative embodiment, an electronic device is provided, as Figure 3 shown Figure 3The electronic device 4000 shown includes: a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as being connected through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 can be used for data interaction between this electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical 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.

[0130] The processor 4001 may be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 4001 may also be a combination that implements a computing function, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0131] The bus 4002 may include a path for transmitting information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0132] 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. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, which is not limited herein.

[0133] The memory 4003 is used to store the computer program for implementing the embodiments of the present application, and is controlled by the processor 4001 to execute. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0134] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.

[0135] The embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.

[0136] It should be understood that although the flowcharts of the embodiments of the present application indicate each operation step by arrows, the execution order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders according to requirements. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenarios. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage among these sub-steps or stages can also be executed at different times respectively. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiments of the present application do not limit this.

[0137] The above are only optional implementation manners of some implementation scenarios of the present application. It should be noted that for those of ordinary skill in the art, without departing from the technical concept of the solution of the present application, adopting other similar implementation means based on the technical idea of the present application also belongs to the protection scope of the embodiments of the present application.

Claims

1. A cloud resource scheduling method, characterized in that, Including: For each resource scheduling cycle, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, the resource information of other servers is weighted and compared with the resource information of the first normally operating server respectively, where the first normally operating server and the other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information includes at least central processing unit (CPU), memory information, disk information, and network resources; According to the result of the weighted comparison, select a target server from the other servers and provide cloud resource services through the target server; The step of, for each resource scheduling cycle, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, weighting and comparing the resource information of other servers with the resource information of the first normally operating server respectively includes: For each other server, calculate a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server, calculate a second ratio according to the second weight value, the memory information of each other server, and the memory information of the normally operating server, calculate a third ratio according to the third weight value, the disk information of each other server, and the disk information of the normally operating server, and calculate a fourth ratio according to the fourth weight value, the network resource utilization rate of each other server, and the network resource utilization rate of the normally operating server; Determine the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server to the resource information of the first normally operating server; Wherein, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value.

2. The method according to claim 1, characterized in that, It also includes: Calculate the weight value within each resource scheduling cycle; The step of calculating the weight value includes: Calculate the CPU occupancy score, the usage score of balanced resources, the disk average access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object respectively; Determine the sum of the CPU occupancy score, the usage score of balanced resources, the disk average access time score, the label score of the target object, the affinity score of the target object, and the node matching degree score of the target object as the weight value.

3. The method according to claim 2, wherein The step of calculating the CPU occupancy score includes: Based on a first predetermined calculation formula, calculate the CPU occupancy score according to the capacity information of the CPU and the request information for the CPU.

4. The method according to claim 2, characterized in that, The step of calculating the disk average access time score includes: Calculate the seek time of the disk based on a predetermined seek time calculation formula; Calculate the seek latency time of the disk based on a predetermined latency time calculation formula; Calculate the transfer time of the disk based on a predetermined transfer time calculation formula; Calculate the disk average access time score according to the seek time, the seek latency time, and the transfer time.

5. The method according to claim 1, characterized in that The CPU information includes the CPU processing capacity and the CPU utilization rate; the memory information includes the memory processing capacity and the memory utilization rate, and the disk information includes the disk processing capacity and the disk utilization rate.

6. The method according to claim 5, wherein The calculating of the first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server includes: Calculating a first product of the CPU processing capacity of each other server and the CPU utilization rate of each other server; Calculating a second product of the CPU processing capacity of the normally operating server and the CPU utilization rate of the normally operating server; Calculating the ratio between the first product and the second product, and determining the product of the first weight value and this ratio as the first ratio.

7. The method according to any one of claims 1-6, characterized in that, The selecting of the target server from the other servers according to the result of the weighted comparison includes: Based on a predetermined sorting method, sorting the weighted comparison results, and determining the server corresponding to the smallest weighted ratio as the target server.

8. A cloud resource scheduling device, characterized in that, Includes: A first processing module, for each resource scheduling period, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, performing weighted comparison of the resource information of other servers with the resource information of the first normally operating server respectively, where the first normally operating server and the other servers are all servers providing resource services in hybrid cloud resource scheduling, and the resource information at least includes the central processing unit CPU, memory information, disk information, and network resources; A second processing module, for selecting a target server from the other servers according to the result of the weighted comparison, and providing cloud resource services through the target server; For each resource scheduling period, based on the calculated weight value, according to the comprehensive resource benchmark comparison algorithm, performing weighted comparison of the resource information of other servers with the resource information of the first normally operating server respectively, includes: For each other server, calculating a first ratio according to the first weight value, the CPU information of each other server, and the CPU information of the normally operating server, calculating a second ratio according to the second weight value, the memory information of each other server, and the memory information of the normally operating server, calculating a third ratio according to the third weight value, the disk information of each other server, and the disk information of the normally operating server, and calculating a fourth ratio according to the fourth weight value, the network resource utilization rate of each other server, and the network resource utilization rate of the normally operating server; Determining the sum value of the first ratio, the second ratio, the third ratio, and the fourth ratio as the weighted ratio of the resource information of each other server and the resource information of the first normally operating server; Wherein, the first weight value, the second weight value, the third weight value, and the fourth weight value are all obtained by dynamically adjusting the weight value.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Unified resource scheduling method and system in cloud environment

    CN107239329A