Resource scheduling method and device, computer equipment, readable storage medium and program product

By calculating the minimum availability rate and allocation offset ratio of the server, the resource allocation score and scheduling sequence are determined, which solves the problem of low resource utilization in cloud computing resource scheduling and achieves efficient resource allocation and stable operation.

CN121560554APending Publication Date: 2026-02-24CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764084.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing cloud computing resource scheduling methods cannot adapt to the dynamic changes in user resource requests, resulting in low resource utilization.

Method used

By calculating the minimum availability and allocation offset ratio of each server in the cloud computing server cluster, a resource allocation score is determined, and based on this, a server scheduling sequence is determined to allocate computing resources to user terminals.

Benefits of technology

It improves resource utilization, avoids resource idleness and fragmentation, and enhances the service performance and stable operation of cloud computing server clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560554A_ABST
    Figure CN121560554A_ABST
Patent Text Reader

Abstract

The invention relates to a resource scheduling method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: for each server in a cloud computing server cluster, respectively calculating the minimum selling rate and the distribution offset ratio of the server, and determining the resource distribution score of the server; determining a server scheduling sequence based on the resource allocation score of each server; and allocating computing resources in the servers to the user terminals corresponding to the user resource requests according to the arrangement order of the servers in the server scheduling sequence. By adopting the method, the determined resource allocation score can accurately represent the resource scheduling sequence of the server, and the computing resources are allocated according to the resource allocation score, so that the resource utilization rate and the service performance of the cloud computing server cluster can be improved, and the stable operation of the cluster is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a resource scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the continuous development of cloud computing technology, data centers containing massive numbers of servers have emerged. Each server has various resources such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), memory, and disk. Each type of resource has a certain quantity. A portion of the resources on each server is used for management overhead, called reserved resources; the remainder is for sale. Resources already sold to users are called sold resources, and those not yet sold are called available resources. Cloud computing vendors use virtualization technology to re-divide and assemble physical resources into different product specifications. Cloud computing users purchase resources on demand according to their business needs. The cloud computing platform schedules a server to run user services. The quality of the scheduling method directly determines the resource utilization rate; therefore, it is necessary to improve resource utilization through appropriate resource scheduling methods.

[0003] In related technologies, the scheduling method commonly used by cloud computing vendors is centralized scheduling, that is, scheduling to the next server only after one server is sold out. However, users' resource requests are continuous and dynamic, and resources are constantly being requested and released. The centralized scheduling resource scheduling strategy cannot adapt to the changes in users' resource requests, resulting in low resource utilization. Summary of the Invention

[0004] Therefore, it is necessary to provide a resource scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve resource utilization in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a resource scheduling method, including:

[0006] For each server in the cloud computing server cluster, calculate the minimum saleable rate and allocation offset ratio for that server; and determine the resource allocation score for that server based on the minimum saleable rate and allocation offset ratio.

[0007] Based on the resource allocation scores of each server, a server scheduling sequence is determined;

[0008] According to the order of the servers in the server scheduling sequence, computing resources in the server are allocated to the user terminal corresponding to the user resource request.

[0009] In some embodiments, the server is provided with multiple types of resources; calculating the minimum availability rate and allocation offset ratio of the server includes:

[0010] For each server, based on the available quantity and sold quantity of each type of resource on the server, calculate the available ratio of each type of resource, and determine the minimum available ratio of the resource among the available ratios of each type of resource as the minimum available ratio of the server.

[0011] Based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests for each type of resource on the server, the allocation ratio for each type is calculated, and the allocation offset ratio of the server is obtained based on the allocation ratio for each type.

[0012] In some embodiments, calculating the allocation ratio for each type of resource based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests on the server includes:

[0013] For each type on the server, calculate a first sum between the sold quantity and the requested quantity of resources for that type, and calculate a second sum between the sold quantity and the available quantity of resources for that type; determine the ratio of the first sum to the second sum as the allocation ratio of resources for that type.

[0014] In some embodiments, obtaining the allocation offset ratio of the server based on the allocation ratio of each of the aforementioned types includes:

[0015] Among the various types of resources contained in the server, determine the base type of resource that matches the user's resource request;

[0016] Calculate the offset ratios between the allocation ratio of the baseline resource type and the allocation ratios of other resource types on the server, and determine the allocation offset ratio of the server based on each offset ratio.

[0017] In some embodiments, determining the resource allocation score of the server based on the minimum saleable rate and the allocation offset ratio includes:

[0018] A first score is determined for each server in descending order of its minimum sellability; the first score is positively correlated with the minimum sellability.

[0019] The second score for each server is determined in ascending order of its allocation offset ratio; the second score is negatively correlated with the allocation offset ratio.

[0020] The resource allocation score for each server is obtained by weighting the first score and the second score of each server.

[0021] In some embodiments, the user resource request includes a requested resource type and a requested resource quantity; the servers in the server scheduling sequence are arranged in descending order of resource allocation scores; allocating computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence includes:

[0022] According to the order of the servers in the server scheduling sequence, determine the target server that matches the requested resource type and the requested resource quantity.

[0023] The computing resources in the target server are allocated to the user terminal corresponding to the user's resource request.

[0024] Secondly, this application also provides a resource scheduling device, comprising:

[0025] The first calculation module is used to calculate the minimum saleable rate and allocation offset ratio of each server in the cloud computing server cluster; and to determine the resource allocation score of the server based on the minimum saleable rate and allocation offset ratio.

[0026] The first determining module is used to determine the server scheduling sequence based on the resource allocation score of each server;

[0027] The first allocation module is used to allocate computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence.

[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0029] For each server in the cloud computing server cluster, calculate the minimum saleable rate and allocation offset ratio for that server; and determine the resource allocation score for that server based on the minimum saleable rate and allocation offset ratio.

[0030] Based on the resource allocation scores of each server, a server scheduling sequence is determined;

[0031] According to the order of the servers in the server scheduling sequence, computing resources in the server are allocated to the user terminal corresponding to the user resource request.

[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0033] For each server in the cloud computing server cluster, calculate the minimum saleable rate and allocation offset ratio for that server; and determine the resource allocation score for that server based on the minimum saleable rate and allocation offset ratio.

[0034] Based on the resource allocation scores of each server, a server scheduling sequence is determined;

[0035] According to the order of the servers in the server scheduling sequence, computing resources in the server are allocated to the user terminal corresponding to the user resource request.

[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0037] For each server in the cloud computing server cluster, calculate the minimum saleable rate and allocation offset ratio for that server; and determine the resource allocation score for that server based on the minimum saleable rate and allocation offset ratio.

[0038] Based on the resource allocation scores of each server, a server scheduling sequence is determined;

[0039] According to the order of the servers in the server scheduling sequence, computing resources in the server are allocated to the user terminal corresponding to the user resource request.

[0040] The aforementioned resource scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product, wherein the method includes, for each server in a cloud computing server cluster, calculating the minimum available rate and allocation offset ratio of the server; determining the resource allocation score of the server based on the minimum available rate and allocation offset ratio; determining the server scheduling sequence based on the resource allocation scores of each server; and allocating computing resources in the servers to the user terminal corresponding to the user's resource request according to the order of the servers in the server scheduling sequence. By adopting this method, a resource allocation score that can accurately characterize the resource scheduling order of the servers is determined according to the real-time minimum available rate and offset ratio of each server. Computing resources are allocated to the user terminal according to the descending order of the resource allocation scores of each server. This avoids unsold idle resources and fragmented resources, further improving resource utilization, and also avoids resource competition, further improving the service performance of the cloud computing server cluster and ensuring the stable operation of the cluster. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart illustrating a resource scheduling method in one embodiment;

[0043] Figure 2 This is a schematic diagram of server resources in one embodiment;

[0044] Figure 3 This is a schematic diagram of server resources in another embodiment;

[0045] Figure 4 This is a structural block diagram of a resource scheduling device in one embodiment;

[0046] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0049] In one embodiment, such as Figure 1As shown, a resource scheduling method is provided. This embodiment illustrates the method applied to a terminal, but it is understood that the method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server can be a standalone server or a server cluster composed of multiple servers. In this embodiment, the resource scheduling method includes the following steps:

[0050] Step 102: For each server in the cloud computing server cluster, calculate the minimum available rate and allocation offset ratio. Based on the minimum available rate and allocation offset ratio, determine the resource allocation score for the server.

[0051] A cloud computing server cluster is a data center for cloud computing services, comprising multiple cloud computing servers. Each cloud computing server is configured with various types of physical resources. Cloud computing vendors (i.e., providers of cloud computing physical resources) use virtualization technology to divide and assemble these physical resources into computing resources of different specifications. For example, each cloud computing server can be configured with a preset number of CPUs, GPUs, memory, and disks, among other types of physical resources. The minimum saleable ratio of a server refers to the minimum percentage of available resources among the various types configured on the server; the server allocation offset ratio measures the degree of balance in the sale of various types of resources on the server.

[0052] Specifically, after receiving a user resource request from a user terminal, the terminal can obtain resource information for each server in the cloud computing server cluster. Based on this resource information, the terminal calculates the minimum available rate and allocation offset ratio for each server. Then, based on the minimum available rate and allocation offset ratio, and weighted data matching the actual application scenario, a weighted calculation is performed to obtain the server's resource allocation score. This resource allocation score represents the priority / priority level of resource scheduling when responding to user resource requests from user terminals. For example, the terminal can determine that there is a positive correlation between the resource allocation score and the priority level; that is, the higher the server's resource allocation score, the higher its priority level when allocating computing resources to the user terminal.

[0053] Step 104: Determine the server scheduling sequence based on the resource allocation score of each server.

[0054] The server scheduling sequence includes servers arranged in descending order of resource allocation priority. The server scheduling sequence includes multiple servers, which can also be arranged in descending order of resource allocation score.

[0055] Specifically, the terminal can sort the servers according to their resource allocation scores from high to low to obtain a server scheduling sequence that can represent the priority level of resource scheduling.

[0056] Step 106: Allocate computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence.

[0057] A user resource request can be a resource request sent by a user terminal. This request may include the requested resource type and the requested resource quantity. The requested resource type represents the types of various physical resources the user terminal needs to request, and the requested resource quantity represents the number of various physical resources the user terminal needs to request. For example, the physical resources configured on the server may include R1, R2, R3, and R4, and the corresponding user resource requests could be 4 R1 resources, 8 R2 resources, 0 R3 resources, and 1 R4 resource.

[0058] Specifically, the terminal can determine the highest-ranking server in the server scheduling sequence as the target server, and allocate the corresponding type and number of resources from the target server to the user terminal according to the resource type and quantity requested in the user's resource request. If the resources in the target server cannot satisfy the user's resource request, the terminal can determine the next-order server in the server scheduling sequence as the target server, until the resources in the current target server can satisfy the user's resource request.

[0059] Optionally, the terminal can determine the scheduling order of each server according to the order of the servers in the server scheduling sequence from top to bottom, and perform matching processing based on the available quantity of various types of resources in each server and the resource type and number requested in the user resource request to determine the target server, and allocate the corresponding type and number of resources in the target server to the user terminal.

[0060] In the resource scheduling method described above, for each server in the cloud computing server cluster, the minimum available rate and allocation offset ratio are calculated. Based on these ratios, a resource allocation score is determined for each server. A server scheduling sequence is then established based on these resource allocation scores. Computational resources are allocated to the user terminals corresponding to user resource requests according to the order of the servers in the scheduling sequence. By employing this method, which determines the resource allocation score—accurately representing the resource scheduling order of servers—based on the real-time minimum available rate and offset ratio of each server, and allocates computing resources to user terminals in descending order of their resource allocation scores, this approach avoids unsold idle and fragmented resources, further improving resource utilization. It also avoids resource contention, further enhancing the service performance of the cloud computing server cluster and ensuring its stable operation.

[0061] In one embodiment, the server is configured with multiple types of resources. The specific processing steps for "calculating the minimum availability rate and allocation offset ratio of the server respectively" include:

[0062] For each server, based on the available and sold quantities of each type of resource on the server, the available ratio of each type of resource is calculated, and the minimum available ratio among all types of resource ratios is determined as the minimum available ratio of the server. Based on the available and sold quantities of each type of resource on the server and the requested resource quantity corresponding to the user resource request, the allocation ratio of each type is calculated, and based on the allocation ratio of each type, the allocation offset ratio of the server is obtained.

[0063] The various types of resources on the server include reserved resources, available resources, and sold resources. Reserved resources represent the resources that the server reserves to ensure the stable operation of the cloud computing platform's management services. The management server can be a monitoring process service of the cloud computing platform. For example, the resources that need to be reserved may be 1 CPU core and 2GB of memory. Available resources represent the amount of resources that can currently be sold to user terminals for use, and sold resources represent the amount of resources that have been allocated to user terminals for use.

[0064] Specifically, for each server in the cloud computing server cluster, the server can be configured with various types of physical resources, such as GPUs, CPUs, memory, etc. The terminal can calculate the sum of the available quantity and the sold quantity of each type of resource, and calculate the ratio between the available quantity and the sum of the available quantity and the total value. The ratio is determined as the available resource ratio for that type. The terminal can filter among the available resource ratios for each type of resource contained on the server, and determine the minimum available rate of the server by the lowest available resource ratio.

[0065] In addition, the terminal can calculate the allocation ratio for each type of resource based on the available quantity, sold quantity, and requested resource quantity in received user resource requests. The terminal can determine the base type of resources among the various resource types, and calculate the allocation offset ratio for the server based on the allocation ratio corresponding to each base type of resources, as well as the allocation ratio corresponding to other types of resources besides the base type.

[0066] In this embodiment, by performing detailed and comprehensive calculations on the available-for-sale ratio and allocation ratio of each type of resource on each server in the cluster, we can ensure accurate control over the real-time status of each type of resource on the current server, providing a reliable data foundation for determining the priority of server scheduling in the future.

[0067] In one embodiment, the specific processing steps for the step "calculating the allocation ratio for each type of resource based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests on the server" include:

[0068] For each type on the server, calculate a first sum between the sold quantity and the requested quantity of resources for that type, and a second sum between the sold quantity and the available quantity of resources for that type. Determine the ratio of the first sum to the second sum as the resource allocation ratio for that type.

[0069] The server can be configured with multiple types of resources.

[0070] Specifically, for each type of computing resource configured on the server, the terminal can obtain the available quantity, sold quantity, and requested resource quantity for that type of resource at the current moment. In this way, the terminal can calculate the first sum between the sold quantity and the requested resource quantity for that type, and calculate the second sum between the sold quantity and the available quantity for that type. The terminal can also calculate the ratio between the first sum and the second sum and determine the ratio as the allocation ratio (AR) for that type.

[0071] For example, the allocation ratio AR of the i-th type of resource i It can be calculated using the following formula:

[0072] AR i =(R sold +R allocate) / (R sold +R sellable ).

[0073] Among them, R sellable For available quantity, R allocate To request resources, R sold This represents the number of units sold.

[0074] In this embodiment, by calculating the available quantity, sold quantity, and requested quantity of each type of resource on the server, the accurate allocation ratio for that type can be determined. Based on the allocation ratio, the scheduling order of the server can be determined, which can better ensure the balance of resource sales on a single server.

[0075] In one embodiment, the specific processing steps for the step "obtaining the server's allocation offset ratio based on the allocation ratio of each type" include:

[0076] Among the various types of resources contained in the server, identify the baseline resource type that matches the user's resource request. Calculate the offset ratios between the allocation ratio of the baseline resource type and the allocation ratios of all other resource types on the server, and determine the server's allocation offset ratio based on these offset ratios.

[0077] Among them, the base type of resource can be memory type resources, etc., and is determined from the various types of resources contained on the server. That is, the base type of resource can be determined based on the application scenario of the user's resource request.

[0078] Specifically, the terminal can identify a baseline resource type that matches the application scenario of the user's resource request from among the various types of resources configured on the server, and obtain the allocation ratio of the baseline resource type. In this way, the terminal can calculate the allocation ratios of all other resource types on the server besides the baseline resource type, and the multiple differences between them and the allocation ratio of the baseline resource type. The terminal can then determine the absolute value of each difference and determine the allocation offset ratio of the server based on the sum of the absolute values. For example, the sum of the absolute values ​​can be used as the allocation offset ratio of the server.

[0079] In this embodiment, by calculating the available quantity, sold quantity, and requested quantity of various types of resources on the server, the accurate allocation offset ratio of the server can be determined. Then, resources can be scheduled in an orderly manner based on the allocation offset ratio, which can better ensure the balance of resource sales on a single server.

[0080] In one embodiment, the specific processing steps for the step "determine the server's resource allocation score based on the minimum salability rate and the allocation offset ratio" include:

[0081] Each server is assigned a first score based on its minimum available rate, ordered from highest to lowest. The first score is positively correlated with the minimum available rate. Each server is then assigned a second score based on its allocation offset ratio, ordered from lowest to highest. The second score is negatively correlated with the allocation offset ratio. The first and second scores are then weighted to obtain the resource allocation score for each server.

[0082] The first weight corresponding to the minimum saleable rate and the second weight corresponding to the allocation offset ratio can be determined based on the current application scenario or can be preset. For example, if the current application scenario requires centralized server resource scheduling, then the first weight can be greater than the second weight; if the current application scenario requires server operation stability, then the first weight can be less than the second weight, and so on.

[0083] Specifically, the terminal can sort the servers according to their minimum sellable rates in descending order to obtain a first sequence. Then, based on the order within this first sequence, it determines the first score for each server in descending order. That is, the higher the minimum sellable rate, the earlier the server ranks, and the higher its corresponding first score; there is a positive correlation between the first score and the minimum sellable rate. For example, the terminal can obtain multiple scores within a preset range and assign these scores to the servers in the first sequence in descending order, thus obtaining the first score for each server.

[0084] Accordingly, the terminal can sort the servers according to their allocation offset ratios from smallest to largest, obtaining a second sequence. Then, based on the order in the second sequence, it determines the second score for each server from highest to lowest. That is, the smaller the allocation offset ratio, the higher the ranking, and the larger the corresponding second score; in other words, there is a negative correlation between the second score and the allocation offset ratio. For example, the terminal can obtain multiple scores within a preset range and allocate these scores sequentially to the servers in the second sequence from highest to lowest, obtaining the second score for each server.

[0085] Based on this, the terminal can perform weighted processing on each server in the cloud computing server cluster based on the server's first score, the first weight corresponding to the first score, the server's second score, and the second weight corresponding to the second score, to obtain a weighted result, and determine the weighted result as the resource allocation score of the server.

[0086] In this embodiment, by comprehensively considering the minimum availability rate and the allocation offset ratio to determine the server scheduling order, resource competition can be avoided, and resource utilization and performance can be improved while ensuring the stable operation of the cloud computing platform.

[0087] In one embodiment, a user resource request includes the requested resource type and the requested resource quantity. The servers in the server scheduling sequence are arranged in descending order of their resource allocation scores. Specifically, a user resource request can be a user resource request, which is demand data sent by a user terminal for various types of resources, including the required resource types and the required quantities of each type. Correspondingly, the specific processing procedure for the step "allocating computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence" includes:

[0088] Based on the order of servers in the server scheduling sequence, determine the target server that matches the requested resource type and quantity. Allocate the computing resources on the target server to the user terminal corresponding to the user's resource request.

[0089] Specifically, for each type of resource, the terminal can filter each server based on the requested resource type and quantity in the user resource request, the order of each server in the server scheduling sequence, and the available quantity of each server, to obtain the top target number of servers. The available quantity / sum of the top target number of servers is greater than or equal to the requested resource quantity. In other words, the top target number of servers are determined as target servers, and the resources on the target servers are allocated to the terminal that sent the user resource request.

[0090] In this embodiment, by allocating resource scores to schedule various types of resources on each server, resource idleness and fragmentation can be further avoided, thereby further improving resource utilization.

[0091] The following describes in detail the specific implementation steps of the above resource scheduling method with reference to a specific embodiment:

[0092] When cloud computing vendors use virtualization technology to re-divide and reassemble physical resources into different product specifications, cloud computing users can purchase resources on demand according to their own business needs. The cloud computing platform will schedule a server to run user services. The quality of the scheduling method is directly related to the resource utilization rate. Among the relevant technologies, resource scheduling can be carried out in the following ways: performance-based scheduling, such as scheduling computing-enhanced resources to servers with higher CPU frequencies and better performance, and scheduling disk I / O-intensive resources to servers with NVMe SSD data disks; resource planning-based scheduling, where different resource pools are pre-defined during data center construction, and different business types are scheduled to different resource pools; centralized scheduling, where a server is scheduled to be the next one after it is sold out, and servers with no resources sold can be powered off to save costs.

[0093] However, as resources are continuously requested and released, the fragmentation and imbalance of resources on servers become increasingly serious. Situations arise where a server's CPU is sold out but there is still a large amount of memory remaining, CPU and memory are sold out but there is still a large amount of disk space remaining, or even inexpensive resources such as CPU and memory are sold out but expensive resources such as GPUs remain. This affects the utilization rate of physical resources in cloud computing. Based on this, this embodiment provides a resource scheduling method, which may include methods such as priority scheduling based on minimum available ratio, priority scheduling based on allocation offset ratio, and priority scheduling combining minimum available ratio and allocation offset ratio.

[0094] Specifically, prioritizing scheduling based on the minimum available ratio ensures that sold resources are evenly distributed across all servers in the cluster, preventing situations where some servers are fully stocked while others are idle. Prioritizing scheduling based on allocation offset ratio ensures that multiple resources on a single server are sold evenly, preventing situations where some resources are sold out while others remain unsold. Optionally, the method in this embodiment can be used in conjunction with the aforementioned methods such as "performance requirement-based scheduling," "resource planning-based scheduling," and "centralized scheduling" to further ensure the balance of resource scheduling, improve resource utilization, and ultimately increase the profits of the companies providing physical resources.

[0095] Optionally, the minimum sellable ratio (MSR) of a server refers to the minimum sellable ratio (MSR) among the various types of resources available to the server, and can be calculated using, for example, the following formula:

[0096] MSR=min(R1 sellable / (R1 sellable +R1 sold R2 sellable / (R2 sellable +R2 sold ), ..., Rn sellable / (Rn sellable +Rn sold ));

[0097] The minimum available ratio priority scheduling method sorts all servers that meet the demand in descending order of their minimum available ratio, with higher-ranked servers having higher priority. For example... Figure 2 As shown, this can be a scheduling method based on the minimum available resources. Taking a cluster of three servers as an example, including server1, server2, and server3, the resources on each server can be as shown in Table 1:

[0098] Table 1

[0099]

[0100] The minimum available ratio priority scheduling scheme proceeds as follows: Calculate the minimum available ratio (MSR) of the servers; for example, server1 has an MSR of 50%, server2 has an MSR of 0%, and server3 has an MSR of 22%. Correspondingly, the terminal can sort the servers based on their MSRs. The larger the MSR, the higher the priority. Finally, it can be determined that the scheduling priority of server1 is greater than that of server2, and the scheduling priority of server2 is greater than that of server3.

[0101] Optionally, prioritizing the allocation offset ratio of servers can maximize the balanced sale of multiple resources on a single server, avoiding situations where some resources are sold out while others remain unsold.

[0102] The allocation ratio (AR) of a server resource is the ratio of sold and currently requested resources to sold and available resources. The formula for calculation is:

[0103] AR=(Rsold+Rallocate) / (Rsold+Rsellable).

[0104] The Allocate Offset Ratio (AOR) of a server refers to the sum of the absolute values ​​of the differences between the allocation ratios of the remaining resources and the allocation ratios of the baseline resource when a specific server is selected for a baseline resource. It can be calculated using the following formula:

[0105] AOR=sum(|AR R1 -AR Rbase |,|AR R2 -AR Rbase |,……,|AR Rn -AR Rbase |);

[0106] The minimum sold offset rate priority scheduling scheme has the following steps: Calculate the allocation ratio AR of various types of resources on the server, select a base resource among various types of resources, calculate the offset rate of all resources relative to the base resource, and sum the absolute values ​​of the offset rates to obtain the allocation offset ratio, that is, calculate the server's allocation offset ratio AOR, sort the servers' AOR, the lower the AOR, the higher the priority, arrange the servers in ascending order of AOR, and allocate server resources in order.

[0107] like Figure 3As shown, this can be a scheduling method based on the minimum sold offset. Taking a cluster of three servers as an example, including server1, server2, and server3, the resources on each server can be configured as R1, R2, R3, and R4. The resource request type and the requested resource quantity in the user resource request can be R1=4, R2=8, R3=0, and R4=1. The specific values ​​of each type of resource configured on the server can be as shown in Table 2.

[0108] Table 2

[0109]

[0110] For example, server1 has an AOR of 49, server2 has an AOR of 89, and server3 has an AOR of 61. The terminal can sort the servers based on their AORs. The larger the AOR, the higher the priority. Finally, it can be determined that server1 has a higher scheduling priority than server3, and server3 has a higher scheduling priority than server2.

[0111] The resource scheduling method provided in this embodiment can schedule server resources using a strategy that prioritizes allocation offset ratios. This ensures that multiple resources on a single server are sold evenly, avoiding low resource utilization caused by some resources being sold out and others being idle. Furthermore, by prioritizing the minimum available ratio, the sold resources can be distributed across all servers in the cluster, reducing performance degradation caused by centralized resource competition. This also reduces the impact of server failures, shortens recovery time, and improves product availability. The computer device implementing the allocation offset ratio-priority scheduling and minimum available ratio-priority scheduling methods can supplement existing scheduling methods, reducing resource idleness and fragmentation, improving resource utilization, and enhancing product performance and availability.

[0112] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0113] Based on the same inventive concept, this application also provides a resource scheduling apparatus for implementing the resource scheduling method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more resource scheduling apparatus embodiments provided below can be found in the limitations of the resource scheduling method described above, and will not be repeated here.

[0114] In one exemplary embodiment, such as Figure 4 As shown, a resource scheduling device 400 is provided, comprising:

[0115] The first calculation module 402 is used to calculate the minimum saleable rate and allocation offset ratio of each server in the cloud computing server cluster; and to determine the resource allocation score of the server based on the minimum saleable rate and allocation offset ratio.

[0116] The first determining module 404 is used to determine the server scheduling sequence based on the resource allocation score of each server;

[0117] The first allocation module 406 is used to allocate computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence.

[0118] In some embodiments, the server is configured with multiple types of resources; the first computing module is specifically used for:

[0119] For each server, based on the available and sold quantities of each type of resource on the server, calculate the available ratio of each type of resource, and determine the minimum available ratio of the resource among all types of resources as the minimum available ratio of the server.

[0120] Based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests for each type of resource on the server, the allocation ratio for each type is calculated, and the allocation offset ratio of the server is obtained based on the allocation ratio for each type.

[0121] In some embodiments, the first computing module is specifically used for:

[0122] For each type on the server, calculate the first sum between the sold quantity and the requested quantity of resources for that type, and calculate the second sum between the sold quantity and the available quantity of resources for that type; determine the ratio of the first sum to the second sum as the allocation ratio of resources for that type.

[0123] In some embodiments, the first computing module is specifically used for:

[0124] Among the various types of resources contained in the server, determine the base type of resource that matches the user's resource request;

[0125] Calculate the offset ratios between the allocation ratio of the baseline resource type and the allocation ratios of other resource types on the server, and determine the server's allocation offset ratio based on each offset ratio.

[0126] In some embodiments, the first computing module is specifically used for:

[0127] The first score for each server is determined in descending order of its minimum available rate; the first score is positively correlated with the minimum available rate.

[0128] The second score for each server is determined in ascending order of its allocation offset ratio; the second score is negatively correlated with the allocation offset ratio.

[0129] The first and second scores of each server are weighted and calculated to obtain the resource allocation score for each server.

[0130] In some embodiments, a user resource request includes a requested resource type and a requested resource quantity; the servers in the server scheduling sequence are arranged in descending order of resource allocation scores; the first allocation module is specifically used for:

[0131] Determine the target server that matches the type and amount of the requested resource according to the order of the servers in the server scheduling sequence.

[0132] Allocate computing resources from the target server to the user terminal corresponding to the user's resource request.

[0133] Each module in the aforementioned resource scheduling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0134] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores resource data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a resource scheduling method.

[0135] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0136] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0137] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0138] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0140] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0141] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0142] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A resource scheduling method, characterized in that, The method includes: For each server in the cloud computing server cluster, calculate the minimum saleable rate and allocation offset ratio for that server; and determine the resource allocation score for that server based on the minimum saleable rate and allocation offset ratio. Based on the resource allocation scores of each server, a server scheduling sequence is determined; According to the order of the servers in the server scheduling sequence, computing resources in the server are allocated to the user terminal corresponding to the user resource request.

2. The method according to claim 1, characterized in that, The server is equipped with various types of resources; the calculation of the minimum saleability and allocation offset ratio of the server includes: For each server, based on the available quantity and sold quantity of each type of resource on the server, calculate the available ratio of each type of resource, and determine the minimum available ratio of the resource among the available ratios of each type of resource as the minimum available ratio of the server. Based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests for each type of resource on the server, the allocation ratio for each type is calculated, and the allocation offset ratio of the server is obtained based on the allocation ratio for each type.

3. The method according to claim 2, characterized in that, The calculation of the allocation ratio for each type of resource based on the available quantity, sold quantity, and requested resource quantity corresponding to user resource requests on the server includes: For each type on the server, calculate a first sum between the sold quantity and the requested quantity of resources for that type, and calculate a second sum between the sold quantity and the available quantity of resources for that type; determine the ratio of the first sum to the second sum as the allocation ratio of resources for that type.

4. The method according to claim 2, characterized in that, The process of obtaining the allocation offset ratio of the server based on the allocation ratio of each of the aforementioned types includes: Among the various types of resources contained in the server, determine the base type of resource that matches the user's resource request; Calculate the offset ratios between the allocation ratio of the baseline resource type and the allocation ratios of other resource types on the server, and determine the allocation offset ratio of the server based on each offset ratio.

5. The method according to claim 1, characterized in that, The determination of the server's resource allocation score based on the minimum saleable rate and the allocation offset ratio includes: A first score is determined for each server in descending order of its minimum sellability; the first score is positively correlated with the minimum sellability. The second score for each server is determined in ascending order of its allocation offset ratio; the second score is negatively correlated with the allocation offset ratio. The resource allocation score for each server is obtained by weighting the first score and the second score of each server.

6. The method according to claim 1, characterized in that, The user resource request includes the requested resource type and the requested resource quantity; the servers in the server scheduling sequence are arranged in descending order of resource allocation score; The step of allocating computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence includes: According to the order of the servers in the server scheduling sequence, determine the target server that matches the requested resource type and the requested resource quantity. The computing resources in the target server are allocated to the user terminal corresponding to the user's resource request.

7. A resource scheduling device, characterized in that, The device includes: The first calculation module is used to calculate the minimum saleable rate and allocation offset ratio of each server in the cloud computing server cluster; and to determine the resource allocation score of the server based on the minimum saleable rate and allocation offset ratio. The first determining module is used to determine the server scheduling sequence based on the resource allocation score of each server; The first allocation module is used to allocate computing resources in the server to the user terminal corresponding to the user resource request according to the order of the servers in the server scheduling sequence.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. 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 to 6.

10. 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 to 6.