Cloud platform resource allocation method and system based on joint selection and placement of virtual machines

By transforming the cloud platform resource allocation problem into two sub-problems of maximizing capacity and minimizing cost, and designing corresponding algorithms, the problem of difficulty in achieving global optimal resource allocation in the existing technology is solved, and efficient resource utilization and reducing resource waste are achieved.

CN114003389BActive Publication Date: 2025-02-28SUZHOU QUANSPATIOTEMPORAL INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111315536.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2025-02-28
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

The existing cloud platform resource allocation scheme regards virtual machine selection and virtual machine placement as two independent stages, making it difficult to ensure the global optimal system resource allocation, resulting in waste of resources and inefficient utilization.

Method used

Using the resource allocation method based on joint selection and placing virtual machines, RADF, the original problem is transformed into two independent sub-problems with maximizing capabilities and minimizing costs, and the optimal solution and heuristic algorithm are designed to solve these sub-problems respectively.

Benefits of technology

It realizes the optimization of resource utilization from the overall perspective of the system, ensures the global optimal solution for virtual machine selection and placement, reduces resource waste and improves the overall utilization efficiency of cloud platform resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003389B_ABST
    Figure CN114003389B_ABST
Patent Text Reader

Abstract

The present invention provides a cloud platform resource allocation method and system based on joint selection and placement of virtual machines, including converting the original joint resource allocation problem into a capacity maximization problem and a cost minimization problem through a new resource allocation task decomposition framework RADF; for the capacity maximization problem, an optimal solution algorithm and a heuristic algorithm are designed, and the optimal solution algorithm obtains the optimal solution through the dynamic programming of the knapsack problem; for the cost minimization problem, an optimal solution algorithm and a heuristic algorithm are also designed respectively, and similarly, the optimal solution algorithm obtains the optimal solution through the dynamic programming of the dual knapsack problem. The optimal solution algorithm is suitable for scenarios with small data scale and high performance requirements; the heuristic algorithm can obtain an approximate solution, which is suitable for scenarios with large data scale and strict time requirements. Compared with traditional methods, the present invention is based on the joint optimization of virtual machine selection and virtual machine placement, with relatively low problem solving complexity, to optimize resource utilization from the system as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource allocation such as virtual machine selection and placement in a cloud platform, and in particular to a cloud platform resource allocation method and system based on joint selection and placement of virtual machines. Background Art

[0002] More and more enterprises and organizations have adopted cloud computing platforms as computing infrastructure. How to improve resource utilization in cloud platforms has always been the focus of academic and industry attention. The reason is that optimized cloud platform resource allocation is the key and core to improve resource utilization in cloud platforms.

[0003] As a new computing model, cloud computing is widely used in data centers. It pools a large number of homogeneous / heterogeneous computing resources, network resources, storage resources, etc., allocates and uses these resources in the form of virtual machines, and provides users with various transparent services. Therefore, resource allocation is crucial to the efficiency of cloud platform use.

[0004] In the cloud platform, resource allocation includes two parts. The first is virtual machine selection, that is, how to determine the specifications and quantity of virtual machines to meet business needs. The key here is to ensure that the determined virtual machines can meet the task processing requirements while trying to avoid wasting virtual machine resources. The other is virtual machine placement, which is to deploy the determined virtual machine solution to the physical machine. The key technology is how to provide the specified virtual machine capabilities with the least physical resources.

[0005] The existing cloud platform resource allocation scheme regards the above-mentioned virtual machine selection and virtual machine placement as two independent stages and designs them separately; even if optimized allocation is achieved in each stage, it is difficult to ensure the global optimal allocation of the overall system resources, thus wasting the precious resources of the cloud computing system. This is a common problem faced by cloud platform resource allocation.

[0006] After searching the existing technical literature, it was found that Anton Beloglazov et al. (Anton Beloglazov, Jemal Abawajy, and Rajkumar Buyya. "Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing". In: Future generation computer systems 28.5 (2012), pp.755-768.) had summarized the traditional cloud platform resource allocation framework. In the traditional framework method, the resource allocation of the private cloud platform is decomposed into two sub-problems according to its functional process, which are the virtual machine selection problem and the virtual machine placement problem. Specifically, according to the research work of Rajkumar Buyya et al. (Rajkumar Buyya, Anton Beloglazov, and Jemal Abawajy. "Energy-efficient management of data center resources for cloud computing: a vision, architectural elements, and open challenges". In: arXiv preprint arXiv: 1006.0308 (2010)), the virtual machine selection strategy is responsible for determining a suitable virtual machine selection scheme (including virtual machines of different specifications and their corresponding quantities) to handle business needs. It needs to ensure that the selected virtual machine has sufficient task processing capabilities to meet all task processing requirements, while trying to avoid wasting virtual machine resources. The situation of virtual machine placement problem is that the cloud platform already knows all the virtual machines that need to be deployed for work. It needs to find an optimal placement plan to deploy all virtual machines on physical machines while ensuring that the physical machine resources used are minimal.

[0007] A patent document with publication number CN109039954A discloses a method and system for adaptively scheduling virtual computing resources of a multi-tenant container cloud platform. Through a unified cloud computing service portal, users' container resource requests are uniformly collected at the cloud computing service portal and passed to a resource allocator; the resource allocator interacts with the D-Agent of each data center and uses a combinatorial auction-based method to decide on the deployment plan of the application, which is then implemented by each data center; during operation, the D-Agent collects relevant performance information of each container cluster and makes dynamic adjustments, enabling multiple data centers based on container technology to collaborate with each other.

[0008] However, when we solve the resource allocation problem of the cloud platform separately, whether we prioritize virtual machine selection or virtual machine placement, we can only get the corresponding local optimal solution. The virtual machine priority strategy can ensure that the virtual machine selection scheme is optimal, but it often leads to a waste of physical machine resources; while the physical machine priority strategy can ensure that the use of physical machine resources is optimal, but it often leads to a waste of virtual machine resources. Regardless of the order, the resource utilization efficiency can only be optimized from a local perspective, and the global optimal resource allocation cannot be guaranteed, which inevitably reduces the overall utilization efficiency of cloud platform resources. Therefore, it is necessary to propose a technical solution to improve the above technical problems. Summary of the invention

[0009] In view of the defects in the prior art, the object of the present invention is to provide a cloud platform resource allocation method and system based on joint selection and placement of virtual machines.

[0010] According to a cloud platform resource allocation method and system based on joint selection and placement of virtual machines provided by the present invention, the method comprises the following steps:

[0011] Step S1: Through the resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into a capacity maximization problem and a cost minimization problem;

[0012] Step S2: Design an optimal solution algorithm and a heuristic algorithm for the capacity maximization problem. The optimal solution algorithm is based on dynamic programming for the knapsack problem to obtain the optimal solution.

[0013] Step S3: For the cost minimization problem, an optimal solution algorithm and a heuristic algorithm are designed respectively; the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem; the heuristic algorithm obtains an approximate solution.

[0014] Preferably, step S1 comprises the following steps:

[0015] Step S1.1: Initialize cloud platform parameters including: virtual machine resource set in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p}, where K p It represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p}, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process;

[0016] Step S1.2: Determine a placement plan for each different type of physical machine;

[0017] Step S1.3: Select from the placed physical machines;

[0018] Step S1.4: Call the capacity maximization algorithm of step S2 and the cost minimization algorithm of step S3 to generate the following output: First, the selected virtual machine set N = {n v},n v It represents the total number of selected virtual machines of the vth type; secondly, the selected physical machine set M = {m p},m p It represents the total number of physical machines of the pth type selected; the third is the placement plan of the virtual machine on the physical machine It represents the number of the v-th virtual machines placed on the ith physical machine.

[0019] Preferably, step S2 comprises the following steps:

[0020] Step S2.1: Convert the capacity maximization problem into a knapsack problem, where the virtual machine is regarded as an item and the physical machine is regarded as a knapsack. The resource requirements of the virtual machine in different dimensions are the weight constraints of the items in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item.

[0021] Step S2.2: Solve the transformed knapsack problem by dynamic programming method;

[0022] Step S2.3: For application scenarios with high timeliness requirements, use heuristic algorithms;

[0023] Step S2.3.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining amount of resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources;

[0024] Step S2.3.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively;

[0025] Step S2.3.3: Based on the utility value U(v) of each type of virtual machine v, calculate the probability p of this type of virtual machine being selected v , p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its alternative virtual machines, which means the chance of virtual machine v being selected in this round, that is, p v The larger it is, the greater the chance that v will be selected;

[0026] Step S2.3.4: According to the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed;

[0027] Step S2.3.5: For the same type of physical machines, repeat steps S2.3.1 to S2.3.5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

[0028] Preferably, step S3 comprises the following steps:

[0029] Step S3.1: Convert the cost minimization problem into the dual problem of the multiple knapsack problem;

[0030] Step S3.2: Use dynamic programming to find the optimal solution to the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum available number of physical machines of the pth type;

[0031] Step S3.3: For application scenarios with high timeliness requirements, use a heuristic algorithm.

[0032] Preferably, the step S3.3 comprises the following steps:

[0033] Step S3.3.1: For each different type of physical machine, calculate the capacity cost ratio of each type of physical machine p T p and C p are the processing capacity and usage cost of the p-th physical machine respectively;

[0034] Step S3.3.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine to determine the selection order of the physical machines;

[0035] Step S3.3.3: selecting physical machines according to the determined selection order with the maximum available number of each physical machine type until the task processing requirements are met;

[0036] Step S3.3.4: remove the last selected physical machine and reselect the last physical machine; among all unselected physical machines, select a physical machine with the lowest cost, provided that it can meet the remaining task processing requirements; wherein in step S3.3.4, for the selection of the last physical machine, on the premise that its resources can meet the remaining task processing requirements, select the physical machine with the lowest cost rather than the physical machine with the highest capability-cost ratio.

[0037] The present invention also provides a cloud platform resource allocation system and system based on joint selection and placement of virtual machines, the system comprising the following modules:

[0038] Module M1: Through the resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into a capacity maximization problem and a cost minimization problem;

[0039] Module M2: Design optimal solution algorithms and heuristic algorithms for the capacity maximization problem. The optimal solution algorithm is based on dynamic programming for the knapsack problem to obtain the optimal solution.

[0040] Module M3: For the cost minimization problem, the optimal solution algorithm and heuristic algorithm are designed respectively; the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem; the heuristic algorithm obtains the approximate solution.

[0041] Preferably, the module M1 includes the following modules:

[0042] Module M1.1: Initialize cloud platform parameters including: virtual machine resource collection in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p}, where K p It represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p}, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process;

[0043] Module M1.2: Determine the placement plan for each different type of physical machine;

[0044] Module M1.3: Select from the placed physical machines;

[0045] Module M1.4: Call the capacity maximization algorithm of module M2 and the cost minimization algorithm of module M3, and generate the following outputs: First, the selected virtual machine set N = {n v},n v It represents the total number of selected virtual machines of the vth type; secondly, the selected physical machine set M = {m p},m p It represents the total number of physical machines of the pth type selected; the third is the placement plan of the virtual machine on the physical machine It represents the number of the v-th virtual machines placed on the ith physical machine.

[0046] Preferably, the module M2 includes the following modules:

[0047] Module M2.1: Convert the capacity maximization problem into a knapsack problem, where the virtual machine is regarded as an item and the physical machine is regarded as a knapsack. The resource requirements of the virtual machine in different dimensions are the weight constraints of the items in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item.

[0048] Module M2.2: Solve the transformed knapsack problem through a dynamic programming system;

[0049] Module M2.3: Use heuristic algorithms for application scenarios with high timeliness requirements;

[0050] Module M2.3.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources;

[0051] Module M2.3.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively;

[0052] Module M2.3.3: Based on the utility value U(v) of each virtual machine v, calculate the probability p of this type of virtual machine being selected v , p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its alternative virtual machines, which means the chance of virtual machine v being selected in this round, that is, p v The larger it is, the greater the chance that v will be selected;

[0053] Module M2.3.4: Based on the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed;

[0054] Module M2.3.5: For the same type of physical machines, repeat Module M2.3.1 to Module M2.3.5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

[0055] Preferably, the module M3 includes the following modules:

[0056] Module M3.1: Convert the cost minimization problem into the dual problem of the multiple knapsack problem;

[0057] Module M3.2: Through the dynamic programming system, find the optimal solution to the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum available number of physical machines of the pth type;

[0058] Module M3.3: Use heuristic algorithms for application scenarios with high timeliness requirements.

[0059] Preferably, the module M3.3 includes the following modules:

[0060] Module M3.3.1: For each different type of physical machine, calculate the capacity cost ratio of different types of physical machines p T p and C p are the processing capacity and usage cost of the p-th physical machine respectively;

[0061] Module M3.3.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine and determine the selection order of the physical machines;

[0062] Module M3.3.3: Select physical machines according to the determined selection order with the maximum available number of each physical machine type until the task processing requirements are met;

[0063] Module M3.3.4: Remove the last selected physical machine and reselect the last physical machine; among all unselected physical machines, select a physical machine with the lowest cost, provided that it can meet the remaining task processing requirements; in module M3.3.4, for the selection of the last physical machine, select the physical machine with the lowest cost rather than the physical machine with the highest capability-cost ratio, provided that its resources can meet the remaining task processing requirements.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] 1. The present invention proposes a joint optimization method for virtual machine selection and virtual machine placement to optimize resource utilization from the overall system, while the traditional two-stage resource allocation can only achieve local optimal resource allocation;

[0066] 2. The present invention proposes a decomposition method for the global resource optimization problem, that is, converting the optimal allocation of system resources into two independent sub-problems: capacity optimization and resource optimization. The former aims to determine the placement scheme for each physical machine so that its task processing capacity is maximized, and the latter aims to select from the already placed physical machines so that the cost of processing all tasks is minimized.

[0067] 3. The optimal solutions of the two decomposed sub-problems of the present invention can guarantee the global optimal solution to the joint virtual machine selection and placement problem. Therefore, by reducing the problem scale and ensuring the global optimization of the solution, the present invention can efficiently achieve the global optimal cloud platform resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0069] Figure 1 The cloud platform resource allocation method and system and system diagram of the present invention are based on the joint selection and placement of virtual machines. DETAILED DESCRIPTION

[0070] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0071] The purpose of the present invention is to find the global optimal resource allocation solution for the cloud platform, combine the originally separate virtual machine selection problem and virtual machine placement problem together, re-abstract the problem from a holistic perspective, and then design an algorithm from a global perspective to allocate resources.

[0072] The present invention is implemented through the following technical solutions. Specifically, the present invention calls the simultaneous consideration of virtual machine selection and virtual machine placement in the cloud platform a joint resource allocation problem. In order to achieve optimized resource allocation in the cloud platform, the invention first proposes a new task decomposition framework RADF (resource allocation decomposition framework). RADF transforms the original joint resource allocation problem into two independent sub-problems: the maximal capability problem and the minimal cost problem. The key here is that the two new sub-problems are independent of each other, avoiding the previous problem of mutual coupling between the virtual machine selection problem and the virtual machine placement problem. Therefore, the global optimal solution to the resource allocation problem of the private cloud platform can be obtained by respectively obtaining the optimal solutions to these two sub-problems, thereby greatly reducing the complexity of solving the original problem. Next, for these two sub-problems, the present invention designs an optimal solution algorithm based on theoretical tools and a more efficient heuristic algorithm, respectively, to suit different scenario requirements.

[0073] In the above method, the goal of the RADF framework is to decompose the original resource allocation problem into two independent sub-problems: maximal capability and minimal cost. Specifically, when there are a certain number of tasks to be processed in the cloud platform, the algorithm can obtain the allocation scheme of tasks to virtual machines and the placement scheme of virtual machines to physical machines, so that the resource usage cost of the cloud platform is minimized under these schemes.

[0074] The input that the framework needs to receive is as follows: virtual machine resource collection in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p}, where K p It represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p}, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process;

[0075] The output generated by the framework is as follows: The set of selected virtual machines N = {n v}, where n v It represents the total number of selected virtual machines of type v; the selected physical machine set M = {m p}, where m p It represents the total number of physical machines of the pth type selected; the placement scheme of virtual machines on physical machines (i.e. the set of physical machines deployed by each virtual machine) in It represents the number of virtual machines of the vth type placed on the ith physical machine. The logical flow of the framework is as follows: first, determine the placement plan for each different type of physical machine so that its task processing capability is maximized (i.e., the maximal capability problem); then select from the placed physical machines so that the cost of processing all tasks is minimized (i.e., the minimal cost problem).

[0076] In the above method, the goal of designing an algorithm to solve the maximal capability problem is to generate a virtual machine placement plan for a specific type of physical machine so that after placing the virtual machines according to this plan, the task processing capacity of the physical machine is maximized. The input parameters received by the algorithm to solve the maximal capability problem are as follows: the specifications of different types of virtual machines in It represents the number of resources owned by the vth virtual machine in the dth resource dimension; the task processing capabilities of different types of virtual machines in It indicates the task processing capacity of the vth virtual machine after being placed on the pth physical machine; the specifications of different types of virtual machines in It represents the number of resources that the p-th physical machine has in the d-th resource dimension. The output of the maximal capability problem solving algorithm is as follows: The placement plan of virtual machines on each type of physical machine in T represents the number of virtual machines of type v that need to be placed on the physical machine of type p; p Indicates the task processing capacity of the physical machine after the virtual machine is placed.

[0077] The present invention proposes two algorithms for the maximal capability problem, namely the optimal solution algorithm and the heuristic algorithm. The optimal solution algorithm can obtain the optimal solution, which is suitable for scenarios with small data scale and high performance requirements; the heuristic algorithm can obtain an approximate solution, which is suitable for scenarios with large data scale and strict time requirements.

[0078] The optimal solution algorithm process is as follows:

[0079] First, the problem is transformed into a knapsack problem, where the virtual machine can be regarded as an item and the physical machine can be regarded as a knapsack. The resource requirements of the virtual machine in different dimensions (such as CPU core threads, memory size, storage space) are the weight constraints of the item in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item. Then, the transformed knapsack problem is solved by the dynamic programming method.

[0080] The heuristic algorithm process is as follows:

[0081] 1. For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources;

[0082] 2. Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Here, Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively;

[0083] 3. Based on the utility value U(v) of each virtual machine v, calculate the probability p of this type of virtual machine being selected v , here, p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its candidate virtual machines, which means the chance of virtual machine v being selected in this round, that is: p v The larger it is, the greater the chance that v will be selected;

[0084] 4. Based on the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed.

[0085] 5. For the same type of physical machines, repeat steps 1 to 5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

[0086] In the above method, the goal of designing the minimal cost problem solving algorithm is to find the optimal physical machine selection solution so that the cost of the solution is the minimum. The input parameters received by the minimal cost algorithm are as follows: {T p} represents the task processing capabilities of different types of physical machines, {C p} represents the usage cost of different types of physical machines, {K p} represents the maximum number of available physical machines of different types, and T represents the total number of tasks that need to be processed. The output of the algorithm for solving the Minimal Cost problem is as follows. p} represents the number of different types of physical machines selected, where m p Indicates the number of physical machines of the pth type selected. Cost indicates the total cost to be incurred under this selection scheme.

[0087] Two algorithms are designed for the minimal cost problem, namely the optimal solution algorithm and the heuristic algorithm. Similarly, the optimal solution algorithm can obtain the optimal solution, which is suitable for scenarios with small data scale and high performance requirements; the approximate solution algorithm can obtain an approximate solution, which is suitable for scenarios with large data scale and strict time requirements.

[0088] The optimal solution algorithm process is as follows:

[0089] First, we transform this problem into the dual problem of the multiple knapsack problem. Then, through the dynamic programming method, we can find the optimal solution of the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum number of available physical machines of the pth type.

[0090] The heuristic algorithm process is as follows:

[0091] 1. For each different type of physical machine, calculate the capacity cost ratio of different types of physical machines p Here, T p and C p are the processing capacity and usage cost of the p-th physical machine respectively;

[0092] 2. Sort the physical machine types according to the capacity-cost ratio of each type of physical machine and determine the order in which the physical machines are selected.

[0093] 3. In accordance with the determined selection order, select physical machines with the maximum available number of each physical machine type until the task processing requirements are met.

[0094] 4. Remove the last selected physical machine and reselect the last physical machine. Among all the unselected physical machines, select the one with the lowest cost, provided that it can meet the processing requirements of the remaining tasks. In step 4, for the selection of the last physical machine, under the premise that its resources can meet the processing requirements of the remaining tasks, we select the physical machine with the lowest cost rather than the physical machine with the highest cost-performance ratio to avoid wasting resources.

[0095] like Figure 1 As shown, the cloud platform resource allocation method and system based on joint selection and placement of virtual machines of the present invention include the following steps:

[0096] Step 1: Through the novel resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into two independent sub-problems: maximal capability problem and minimal cost problem.

[0097] Step 2: For the problem of maximizing capacity, design an optimal solution algorithm and a heuristic algorithm. The former is based on dynamic programming for the knapsack problem to obtain the optimal solution, but it is only applicable to scenarios with small data scale and high performance requirements. The latter is suitable for scenarios with large data scale or high time limit requirements.

[0098] Step 3: Design an optimal solution algorithm and a heuristic algorithm for the cost minimization problem. Similarly, the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem, which is suitable for scenarios with small data scale and high performance requirements; the approximate solution algorithm can obtain an approximate solution, which is suitable for scenarios with large data scale and strict time requirements.

[0099] The following is a further description of the technical solution of the present invention in conjunction with a specific cloud resource allocation process:

[0100] Step 1: Based on RADF, the original joint resource allocation problem is transformed into two independent sub-problems: maximal capability problem and minimal cost problem.

[0101] Step 1.1: Initialize cloud platform parameters, including: virtual machine resource collection in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p}, where K pIt represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p}, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process;

[0102] Step 1.2: Determine a placement plan for each different type of physical machine so that its task processing capability is maximized (i.e., the maximal capability problem).

[0103] Step 1.3: Select from the placed physical machines so that the cost of processing all tasks is minimized (i.e., the minimal cost problem).

[0104] Step 1.4: Call the capacity maximization algorithm of step 2 and the cost minimization algorithm of step 3 to generate the following outputs: First, the virtual machine selection scheme N = {n v},n v It represents the total number of selected virtual machines of the vth type; second, the physical machine selection scheme M = {m p},m p It represents the total number of physical machines of the pth type selected; the third is the placement plan of the virtual machine on the physical machine It represents the number of the v-th virtual machines placed on the ith physical machine.

[0105] Step 2: For the problem of maximizing capacity, design an optimal solution algorithm and a heuristic algorithm. The former is based on dynamic programming for the knapsack problem to obtain the optimal solution, but it is only applicable to scenarios with small data scale and high performance requirements. The latter is suitable for scenarios with large data scale or high time limit requirements.

[0106] Step 2.1: The specific steps of the optimal solution algorithm are as follows:

[0107] Step 2.1.1: Convert the problem into a knapsack problem, where the virtual machine can be regarded as an item and the physical machine can be regarded as a knapsack. The resource requirements of the virtual machine in different dimensions (such as CPU core threads, memory size, storage space) are the weight constraints of the item in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item.

[0108] Step 2.1.2: Solve the transformed knapsack problem using dynamic programming methods.

[0109] Step 2.2: For application scenarios with high timeliness requirements, use a heuristic algorithm. The steps are as follows:

[0110] Step 2.2.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources;

[0111] Step 2.2.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Here, Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively;

[0112] Step 2.2.3: Based on the utility value U(v) of each virtual machine v, calculate the probability p of this type of virtual machine being selected v , here, p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its candidate virtual machines, which means the chance of virtual machine v being selected in this round, that is: p v The larger it is, the greater the chance that v will be selected;

[0113] Step 2.2.4: Based on the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed;

[0114] Step 2.2.5: For the same type of physical machines, repeat steps 1 to 5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

[0115] Step 3: For the cost minimization problem, the optimal solution algorithm and the heuristic algorithm are designed. Similarly, the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem, which is suitable for scenarios with small data scale and high performance requirements; the approximate solution algorithm can obtain an approximate solution, which is suitable for scenarios with large data scale and strict time requirements.

[0116] Step 3.1: The process of the optimal solution algorithm is as follows:

[0117] Step 3.1.1: Convert this problem into the dual problem of the multiple knapsack problem.

[0118] Step 3.1.2: Use dynamic programming to find the optimal solution to the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum number of available physical machines of the pth type.

[0119] Step 3.2: For application scenarios with high timeliness requirements, use a heuristic algorithm. The process is as follows:

[0120] Step 3.2.1: For each different type of physical machine, calculate the capacity cost ratio of different types of physical machines p Here, T p and C p are the processing capacity and usage cost of the p-th physical machine respectively;

[0121] Step 3.2.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine and determine the selection order of the physical machines.

[0122] Step 3.2.3: Select physical machines according to the determined selection order with the maximum available number of each physical machine type until the task processing requirements are met.

[0123] Step 3.2.4: Remove the last selected physical machine and reselect the last physical machine. Among all the unselected physical machines, select a physical machine with the lowest cost, provided that it can meet the remaining task processing requirements. In step 4, for the selection of the last physical machine, under the premise that its resources can meet the remaining task processing requirements, we select the physical machine with the lowest cost rather than the physical machine with the highest cost-performance ratio to avoid wasting resources.

[0124] The present invention also provides a cloud platform resource allocation system based on joint selection and placement of virtual machines, the system comprising the following modules:

[0125] Module M1: Through the new resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into a capacity maximization problem and a cost minimization problem; Module M1.1: Initialize cloud platform parameters including: virtual machine resource set in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p}, where K pIt represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p}, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the v-th virtual machine after being placed on the p-th physical machine; T represents the total number of tasks that the cloud platform needs to process; Module M1.2: Determine the placement plan for each different type of physical machine; Module M1.3: Make a selection from the already placed physical machines; Module M1.4: Call the capacity maximization algorithm of module M2 and the cost minimization algorithm of module M3, and generate the following output: First, the set of selected virtual machines N = {n v},n v It represents the total number of selected virtual machines of the vth type; secondly, the selected physical machine set M = {m p},m p It represents the total number of physical machines of the pth type selected; the third is the placement plan of the virtual machine on the physical machine (that is, the set of physical machines deployed by each virtual machine) It represents the number of the v-th virtual machines placed on the ith physical machine.

[0126] Module M2: Design an optimal solution algorithm and a heuristic algorithm for the capacity maximization problem. The optimal solution algorithm is based on dynamic programming for the knapsack problem to obtain the optimal solution. It is suitable for scenarios with small data scale and high performance requirements. The heuristic algorithm is suitable for scenarios with large data scale or high time limit requirements. Module M2.1: Convert the capacity maximization problem into a knapsack problem, where virtual machines can be regarded as items and physical machines can be regarded as knapsacks. The resource requirements of virtual machines in different dimensions are the weight constraints of items in different dimensions, and the task processing capacity of virtual machines corresponds to the value of items. Module M2.2: Solve the converted knapsack problem through a dynamic programming system. Module M2.3: Use heuristic algorithms for application scenarios with high timeliness requirements.

[0127] Module M2.3.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining resources in each dimension after v is deployed on the physical machine; U(v) is used to measure the capacity-cost ratio of the virtual machine; Module M2.3.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Here, Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in the resource dimension d respectively; Module M2.3.3: Based on the utility value U(v) of each virtual machine v, calculate the probability p of this type of virtual machine being selected v , here, p v It is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its alternative virtual machines. The probability corresponds to the chance of this type of virtual machine being selected in this round. Module M2.3.4: According to the probability of each type of virtual machine, a virtual machine is randomly selected from the alternative types for placement, and the above process is repeated until the physical machine is fully placed. Module M2.3.5: For physical machines of the same type, repeat modules M2.3.1 to M2.3.5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

[0128] Module M3: For the cost minimization problem, the optimal solution algorithm and heuristic algorithm are designed respectively; the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem, which is suitable for scenarios with small data scale and high performance requirements; the approximate solution algorithm obtains approximate solution, which is suitable for scenarios with large data scale and strict time requirements.

[0129] Module M3.1: Convert the cost minimization problem into the dual problem of the multiple knapsack problem;

[0130] Module M3.2: Through dynamic programming, find the optimal solution to the dual knapsack problem, which is denoted as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum number of available physical machines of the pth type.

[0131] Module M3.3: For application scenarios with high timeliness requirements, use heuristic algorithms. Module M3.3.1: For each different type of physical machine, calculate the capacity cost ratio of each type of physical machine p Module M3.3.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine and determine the selection order of the physical machines; Module M3.3.3: Select physical machines with the maximum available number of each type of physical machine according to the determined selection order until the task processing requirements are met; Module M3.3.4: Remove the last selected physical machine and reselect the last physical machine; among all unselected physical machines, select a physical machine with the lowest cost on the premise that it can meet the remaining task processing requirements; Among them, for the selection of the last physical machine in module M3.3.4, on the premise that its resources can meet the remaining task processing requirements, select the physical machine with the lowest cost rather than the physical machine with the highest capacity-cost ratio.

[0132] The present invention proposes a joint optimization method for virtual machine selection and virtual machine placement, which optimizes resource utilization from the overall system, while traditional two-stage resource allocation can only achieve local optimal resource allocation; the present invention proposes a decomposition method for the global resource optimization problem, which transforms the system resource optimization allocation into two sub-problems: capacity optimization and resource optimization. The former aims to determine a placement plan for each physical machine so that its task processing capacity is maximized, and the latter aims to make a selection from the placed physical machines so that the cost of processing all tasks is minimized; the optimal solution of the two decomposed sub-problems of the present invention can guarantee the global optimal solution to the joint virtual machine selection and placement problem. Therefore, by reducing the problem scale and ensuring the global optimization of the solution, the present invention can efficiently achieve the global optimal cloud platform resource allocation.

[0133] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0134] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A cloud platform resource allocation method based on joint selection and placement of virtual machines, characterized in that: The method comprises the following steps: Step S1: Through the resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into a capacity maximization problem and a cost minimization problem; Step S2: Design an optimal solution algorithm and a heuristic algorithm for the capacity maximization problem. The optimal solution algorithm is based on dynamic programming for the knapsack problem to obtain the optimal solution. Step S3: Design an optimal solution algorithm and a heuristic algorithm for the cost minimization problem; the optimal solution algorithm obtains the optimal solution through dynamic programming of the dual knapsack problem; Heuristic algorithms obtain approximate solutions; The step S1 comprises the following steps: Step S1.1: Initialize cloud platform parameters including: virtual machine resource set in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p }, where K p It represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p }, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process; Step S1.2: Determine a placement plan for each different type of physical machine; Step S1.3: Select from the placed physical machines; Step S1.4: Call the capacity maximization algorithm of step S2 and the cost minimization algorithm of step S3 to generate the following output: First, the selected virtual machine set N = {n v },n v It represents the total number of selected virtual machines of the vth type; secondly, the selected physical machine set M = {m p },m p It represents the total number of the p-th type of physical machines selected; The third is the placement plan of virtual machines on physical machines It represents the number of the v-th virtual machines placed on the ith physical machine.

2. The cloud platform resource allocation method based on joint selection and placement of virtual machines according to claim 1, characterized in that: The step S2 comprises the following steps: Step S2.1: Convert the capacity maximization problem into a knapsack problem, where the virtual machine is regarded as an item and the physical machine is regarded as a knapsack. The resource requirements of the virtual machine in different dimensions are the weight constraints of the items in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item. Step S2.2: Solve the transformed knapsack problem by dynamic programming method; Step S2.3: For application scenarios with high timeliness requirements, use heuristic algorithms; Step S2.3.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining amount of resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources; Step S2.3.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively; Step S2.3.3: Based on the utility value U(v) of each type of virtual machine v, calculate the probability p of this type of virtual machine being selected v , p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its alternative virtual machines, which means the chance of virtual machine v being selected in this round, that is, p v The larger it is, the greater the chance that v will be selected; Step S2.3.4: According to the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed; Step S2.3.5: For the same type of physical machines, repeat steps S2.3.1 to S2.3.5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

3. The cloud platform resource allocation method based on joint selection and placement of virtual machines according to claim 1, characterized in that: The step S3 comprises the following steps: Step S3.1: Convert the cost minimization problem into the dual problem of the multiple knapsack problem; Step S3.2: Use dynamic programming to find the optimal solution to the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum available number of physical machines of the pth type; Step S3.3: For application scenarios with high timeliness requirements, use heuristic algorithms.

4. The cloud platform resource allocation method based on joint selection and placement of virtual machines according to claim 3, characterized in that: The step S3.3 comprises the following steps: Step S3.3.1: For each different type of physical machine, calculate the capacity cost ratio of each type of physical machine p T p and C p are the processing capacity and usage cost of the p-th physical machine respectively; Step S3.3.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine to determine the selection order of the physical machines; Step S3.3.3: selecting physical machines according to the determined selection order with the maximum available number of each physical machine type until the task processing requirements are met; Step S3.3.4: remove the last selected physical machine and reselect the last physical machine; among all the unselected physical machines, select a physical machine with the minimum cost under the premise of meeting the processing requirements of the remaining tasks; In step S3.3.4, when selecting the last physical machine, on the premise that its resources meet the processing requirements of the remaining tasks, the physical machine with the lowest cost is selected instead of the physical machine with the highest capability-cost ratio.

5. A cloud platform resource allocation system based on joint selection and placement of virtual machines, characterized in that: The system includes the following modules: Module M1: Through the resource allocation task decomposition framework RADF, the original joint resource allocation problem is transformed into a capacity maximization problem and a cost minimization problem; Module M2: Design optimal solution algorithms and heuristic algorithms for the capacity maximization problem. The optimal solution algorithm is based on dynamic programming for the knapsack problem to obtain the optimal solution. Module M3: Design optimal solution algorithm and heuristic algorithm for cost minimization problem; the optimal solution algorithm obtains the optimal solution through dynamic programming of dual knapsack problem; the heuristic algorithm obtains the approximate solution; The module M1 includes the following modules: Module M1.1: Initialize cloud platform parameters including: virtual machine resource collection in It represents the number of resources that the p-th physical machine has in the d-th resource dimension; the maximum number of physical machines that can be allocated K = {K p }, where K p It represents the maximum number of p-th physical machines used; the cost of using a physical machine C = {C p }, where C p It represents the cost of using the p-th physical machine; the amount of resources owned by the virtual machine in It represents the number of resources owned by the v-th virtual machine in the d-th resource dimension; virtual machine capacity in It represents the task processing capacity of the vth virtual machine after being placed on the pth physical machine; T represents the total number of tasks that the cloud platform needs to process; Module M1.2: Determine the placement plan for each different type of physical machine; Module M1.3: Select from the placed physical machines; Module M1.4: Call the capacity maximization algorithm of module M2 and the cost minimization algorithm of module M3, and generate the following outputs: First, the selected virtual machine set N = {n v },n v It represents the total number of selected virtual machines of the vth type; secondly, the selected physical machine set M = {m p },m p It represents the total number of physical machines of the pth type selected; the third is the placement plan of the virtual machine on the physical machine It represents the number of the v-th virtual machines placed on the ith physical machine.

6. The cloud platform resource allocation system based on joint selection and placement of virtual machines according to claim 5, characterized in that: The module M2 includes the following modules: Module M2.1: Convert the capacity maximization problem into a knapsack problem, where the virtual machine is regarded as an item and the physical machine is regarded as a knapsack. The resource requirements of the virtual machine in different dimensions are the weight constraints of the items in different dimensions, and the task processing capacity of the virtual machine corresponds to the value of the item. Module M2.2: Solve the transformed knapsack problem through a dynamic programming system; Module M2.3: Use heuristic algorithms for application scenarios with high timeliness requirements; Module M2.3.1: For a given type of physical machine, calculate the balance effect V(v) brought by virtual machine v and the utility U(v) brought by the virtual machine for each type of virtual machine; where v is the virtual machine, V(v) represents the variance of the remaining resources in each dimension after v is deployed on the physical machine, which is used to ensure the balanced use of physical machine resources in each dimension; U(v) is used to measure the capacity-cost ratio of the virtual machine. The larger U(v) is, the more tasks can be processed with the same resources; Module M2.3.2: Before placing a virtual machine on a physical machine in each round, sort the types of virtual machines according to the size of V(v), and retain the top-ranked virtual machine types in a certain proportion O(p). Where D is the total resource dimension of the physical machine, d is any resource dimension, and R d and S d are the remaining resources and total resources of the physical machine in resource dimension d, respectively; Module M2.3.3: Based on the utility value U(v) of each virtual machine v, calculate the probability p of this type of virtual machine being selected v , p v is the ratio of the utility value of virtual machine v to the sum of the utility values ​​of all its alternative virtual machines, which means the chance of virtual machine v being selected in this round, that is, p v The larger it is, the greater the chance that v will be selected; Module M2.3.4: Based on the probability of each type of virtual machine being selected, select the virtual machine with the highest probability for placement, and repeat the above process until all physical machines are placed; Module M2.3.5: For the same type of physical machines, repeat Module M2.3.1 to Module M2.3.5 to obtain different placement schemes, compare their task processing capabilities, and select the optimal scheme.

7. The cloud platform resource allocation system based on joint selection and placement of virtual machines according to claim 5, characterized in that: The module M3 includes the following modules: Module M3.1: Convert the cost minimization problem into the dual problem of the multiple knapsack problem; Module M3.2: Through the dynamic programming system, find the optimal solution to the dual knapsack problem, which is recorded as p is a certain physical machine type, P is a set of physical machine types; the optimal solution to the Min-Resource problem is Where K p is the maximum available number of physical machines of the pth type; Module M3.3: Use heuristic algorithms for application scenarios with high timeliness requirements.

8. The cloud platform resource allocation system based on joint selection and placement of virtual machines according to claim 7, characterized in that: The module M3.3 includes the following modules: Module M3.3.1: For each different type of physical machine, calculate the capacity cost ratio of different types of physical machines p T p and C p are the processing capacity and usage cost of the p-th physical machine respectively; Module M3.3.2: Sort the physical machine types according to the capacity-cost ratio of each type of physical machine and determine the selection order of the physical machines; Module M3.3.3: Select physical machines according to the determined selection order with the maximum available number of each physical machine type until the task processing requirements are met; Module M3.3.4: Remove the last selected physical machine and reselect the last physical machine; among all unselected physical machines, select a physical machine with the lowest cost, provided that it can meet the remaining task processing requirements; in module M3.3.4, for the selection of the last physical machine, select the physical machine with the lowest cost rather than the physical machine with the highest capability-cost ratio, provided that its resources can meet the remaining task processing requirements.

Citation Information

Patent Citations

  • Multi-tenant container cloud platform virtual computing resource adaptive scheduling method and system

    CN109039954A

  • Mobile cloud calculation adaptive virtual machine scheduling method based on improved particle swarm

    CN110795208A