Cloud data center construction and virtual machine integration-based cloud data center energy-saving method

By adopting the DQN model and virtual machine consolidation strategy in cloud data centers, optimizing physical machine selection and virtual machine migration, the problems of resource fragmentation and energy waste were solved, and resource utilization and energy efficiency were improved.

CN115617526BActive Publication Date: 2026-05-15CHONGQING JINYUYUN ENERGY TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING JINYUYUN ENERGY TECH CO LTD
Filing Date
2022-11-07
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing cloud data centers suffer from energy waste due to resource fragmentation and idle resources. Current methods have failed to effectively address the resource fragmentation and energy consumption issues in dynamic cloud data centers, and have not comprehensively considered various resource constraints.

Method used

We adopt a physical machine selection and virtual machine integration method based on the DQN model. By establishing a resource model, we use deep reinforcement learning to optimize physical machine selection and combine migration out and migration in operator pools to optimize virtual machine migration, thereby reducing resource fragmentation and energy consumption.

Benefits of technology

It effectively reduces the number of virtual machine and system resource fragments, reduces energy consumption, and improves resource utilization and energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_38
    Figure SMS_38
  • Figure SMS_39
    Figure SMS_39
  • Figure SMS_57
    Figure SMS_57
Patent Text Reader

Abstract

The application provides a cloud data center energy-saving method based on cloud data center construction and virtual machine integration, comprising the following steps: S1, establishing a cloud data center resource model; S2, if the data center resource is insufficient, using a DQN model to select a physical machine to expand the data center; if the data center resource is sufficient, the next step is executed; S3, performing virtual machine integration to optimize idle resources and reduce the energy consumption of the cloud data center. The application can reduce the number of virtual machines and system resource fragments by selecting a physical machine, and dynamically integrate virtual machines on different host computers and shut down part of the low-load physical machines, so as to reduce idle resources and reduce the energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing energy consumption, and in particular to a cloud data center energy-saving method based on cloud data center construction and virtual machine integration. Background Technology

[0002] Cloud computing, as a gradually maturing service computing model, has significant practical application value. In recent years, cloud computing technology architecture and business models have become increasingly mature, and its excellent compatibility with numerous types of applications and computing scenarios has enabled it to serve various industries, including enterprises, government agencies, and research institutions. Cloud computing technology has provided convenience for people's daily work and life, and its user base is growing rapidly, leading to increasingly intensive user demand for cloud data centers. To cope with this massive user demand, cloud providers need to build large-scale cloud data centers. Today, large-scale data centers are equipped with thousands or even tens of thousands of physical machines, which can lead to problems such as low resource utilization and high energy consumption.

[0003] User requests are typically deployed on a host machine as virtual machines or containers. When a host machine hosts multiple different virtual machines, it's easy for certain hardware resources to become unusable due to limitations in their availability. This resource idleness leads to unnecessary resource fragmentation in the data center. A key reason for resource fragmentation is the affinity between host and virtual machine resource availability; that is, the resource requirements of virtual machines and the available resources on the host machine are not always perfectly matched. In actual industrial production conditions, the types and resource quantities of physical machines constituting a cloud data center often differ, and the types of virtual machines rented out by cloud providers also vary in terms of resource availability. The type of physical machine chosen to host virtual machines and the resulting resource fragmentation are closely related to the operation of the cloud data center cluster.

[0004] In the current business model, users typically request services from cloud providers through lease agreements. Virtual machines running on the host machine are released after the user's lease expires, resulting in idle resources on the host machine. Host machines within cloud data centers require significant energy consumption during operation; resource fragmentation and idle resources both increase unnecessary power consumption, leading to energy waste. Dynamically consolidating virtual machines on different host machines can reduce idle resources, shut down some low-load physical machines, and lower energy consumption.

[0005] After extensive and in-depth research, we found that current research on reducing resource fragmentation and idle resources in the cloud environment still has some shortcomings:

[0006] (1) Most existing cloud data center optimization strategies set the research object as a static cloud data center, while few studies set the research object as a dynamic cloud data center with constantly changing resource holding and carrying capacity.

[0007] (2) Existing methods do not consider the impact of user resource requirements on physical machine selection strategies during the establishment of cloud data centers, and do not conduct in-depth research on the issue of optimizing cloud data center resource fragmentation.

[0008] (3) Most existing virtual machine consolidation strategies only consider a single resource limitation (e.g., the number of CPU cores or the size of memory) without taking into account multiple resource limitations. Summary of the Invention

[0009] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a cloud data center energy-saving method based on cloud data center construction and virtual machine integration.

[0010] To achieve the above-mentioned objectives of this invention, this invention provides a cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation, comprising the following steps:

[0011] S1, Establish a cloud data center resource model;

[0012] S2. If data center resources are insufficient, use the DQN model to select physical machines to expand the data center; if data center resources are sufficient, proceed to the next step.

[0013] S3 performs virtual machine consolidation to optimize idle resources and reduce energy consumption in cloud data centers.

[0014] Further, S1 includes the following steps:

[0015] S1-1, Setting up the cloud provider Different types of virtual machines are rented to users, and the user's resource request sequence is defined as follows: ,in Indicates the first in the request sequence One resource request; each user request corresponds to one virtual machine. Virtual machines The amount of resources is , Indicates a request Requested number of CPUs Indicates a request The amount of memory requested;

[0016] S1-2, totaling Physical machines with different amounts of resources can be used to build cloud data centers. Each type of physical machine has a different number of CPU cores, memory resources, and maximum daily energy consumption.

[0017] S1-3, Establish a cloud data center resource model based on constraints:

[0018] Constructing the sequence of physical machines that make up a cloud data center: ,in Representative type is The Each physical machine contains three attributes. ,in This indicates the number of CPUs in the physical machine. This indicates the amount of memory in the physical machine. This indicates the daily energy consumption of the physical machine;

[0019] All user requests are deployed on corresponding physical machines via virtual machines. Therefore, the resources available to the physical machines used to build the cloud data center must always meet the following constraints:

[0020] ;

[0021] ;

[0022] in Represents the total number of physical machines;

[0023] Indicates the number of requests made by the user;

[0024] Indicates that it is located in the physical machine virtual machine The number of CPU cores;

[0025] Indicates that it is located in the physical machine virtual machine Memory size;

[0026] The purpose of the above constraints is to ensure that the resources available to the target physical machine are greater than the resources requested by the virtual machine; otherwise, the current physical machine cannot meet the conditions for forming a cloud data center infrastructure.

[0027] There is a one-to-one correspondence between physical machines and their corresponding virtual machines. This mapping is unique throughout the entire data center cluster and is expressed using a Boolean variable. ={0,1} indicates the user request. and physical machine The mapping relationship. And each physical machine and its load virtual machine It is a one-to-many relationship, for a given first... Taiwan Physical Machine The load conditions should all meet the following requirements:

[0028]

[0029]

[0030] in, Indicates the first in the request sequence One user request;

[0031] Representative type is The Taiwan physical machine.

[0032] The purpose of this constraint is to specify the threshold for each resource of a single physical machine, thereby constraining the upper limit of resources for a single physical machine in the model.

[0033] Further, S2 includes the following steps:

[0034] S2-1, Determine the agent's state set, action set, and reward value in the DQN model;

[0035] S2-2 uses the DQN model for physical machine selection, treating the selection problem as a Markov decision process.

[0036] Further, S2-1 includes the following steps:

[0037] (1) Obtain the physical machines in the cloud data center The system state at any given time, the state set ,in, Represents the type in the cluster The average CPU utilization of the physical machine, Represents the type in the cluster The average memory utilization of the physical machine;

[0038] (2) Set the action set to cover all A variety of physical machines to be selected, actions ,in Includes two states in one dimension The To decide whether or not to add this type of physical machine to the cluster; The set of actions for all types of physical machines is called the action set;

[0039] (3) Obtain the reward function related to the state set and action set:

[0040] First, calculate the amount of idle resources generated by each physical machine that has joined the cluster, as follows:

[0041]

[0042]

[0043] in, The type is The number of idle CPUs on the physical machine;

[0044] The type is The amount of free memory on the physical machine;

[0045] Indicates that it is located in the physical machine virtual machine The number of CPU cores;

[0046] Indicates that it is located in the physical machine virtual machine Memory size;

[0047] The type is The physical machine set.

[0048] Then, calculate the resource fragmentation rate of the physical machine at a certain moment. The resource fragmentation rate includes CPU fragmentation rate and memory fragmentation rate, which are recorded separately:

[0049] , superscript Indicates a certain moment ;

[0050] The goal of DQN model optimization is to reduce the total number of resource fragments. To reduce the computational complexity of the algorithm, these fragments are normalized.

[0051]

[0052] in Resource fragmentation rate;

[0053] Parameters used to adjust the unit value between CPU and memory;

[0054] Type is The reward value R for a physics machine is set as follows: the physics machine that produces less fragment resources will receive a higher reward:

[0055]

[0056] in, The type is The physical mechanism in The reward value at any given moment.

[0057] Furthermore, the update rules for the Q-value table during the selection process are as follows:

[0058] S2-2-1, Current State By performing a single feedforward operation, the Q-values ​​for all predicted actions can be obtained:

[0059]

[0060] Indicate the next state ;

[0061] Indicates the next action ;

[0062] S2-2-2, for the next state Perform one feedforward operation and calculate the maximum output value of the entire network:

[0063]

[0064] in The type is The physical mechanism in The reward value at any given moment;

[0065] S2-2-3 sets the Q value for the action target;

[0066] S2-2-4, using a deep convolutional neural network to approximate the value function;

[0067] S2-2-5, utilizes experience playback to train and reinforce the learning process.

[0068] Further, S3 includes the following steps:

[0069] S3-1, Determine the list of source hosts for the virtual machines to be migrated out;

[0070] S3-1-1, Establish the migration operator pool ,in These represent different migration operators, each representing a different physical machine migration priority determination strategy;

[0071] The migration operator includes:

[0072] Operator The migration priority is determined according to the load of physical machines in the cluster, with physical machines with low load being migrated first.

[0073] Operator The migration priority is determined by the CPU resource utilization of physical machines in the cluster, with physical machines with higher resource utilization being migrated first.

[0074] Operator The migration priority is determined based on the memory resource utilization of physical machines in the cluster, with physical machines with low memory utilization being migrated first.

[0075] Operator The migration priority is determined by the difference between the CPU utilization and memory utilization of physical machines in the cluster, with physical machines having a larger difference in utilization being migrated first.

[0076] S3-1-2, assign weights to each operator, denoted as follows: ,in Correspondence operator The weights;

[0077] S3-1-3, determine the number of virtual machines that can be migrated for each operator based on the daily virtual machine migration limit and the weight of each operator;

[0078] S3-1-4, update the weight values ​​of each operator;

[0079] S3-1-5, Calculate each operator with the new weights. The new total energy cost of the system after allocating migration times and Size, This represents the total energy cost after the pre-relocation is completed; if Then output the migration sequence. ;if If so, return to step S3-1-4 and perform the weight update again;

[0080] S3-2, Determine the list of target hosts for the virtual machines to be migrated;

[0081] S3-2-1, Obtain the list of migrated virtual machines output in step S3-1-5. As input for this step;

[0082] S3-2-2, Establish the migration operator pool ,in These represent different migration operators, each of which represents a different virtual machine migration priority determination strategy;

[0083] The immigration operator includes: operator The target physical machines are prioritized based on CPU resources, and virtual machines are migrated to physical machines with high CPU idle rates first.

[0084] Operator The target physical machines are prioritized based on memory resources, and virtual machines are moved to physical machines with high memory availability first.

[0085] Operator The target physical machines are prioritized based on their total resource availability, and virtual machines are migrated to physical machines with higher total resource idle rates.

[0086] S3-2-3, save the current state of the cluster, perform pre-migration using each migration operator, and calculate the increased energy cost;

[0087] S3-2-4: Select the operator with the lowest energy consumption cost and complete the migration operation.

[0088] Furthermore, the daily maximum number of virtual machines that can be migrated is:

[0089]

[0090] in, This is the number of virtual machines that can be migrated per day;

[0091] Represents the total number of physical machines;

[0092] Indicates the number of requests made by the user;

[0093] ={0,1} represents the user request. and physical machine The mapping relationship;

[0094] ={0,1} indicates that after the virtual machine migration is complete, the user request... The mapping between the new physical machine and the new physical machine;

[0095] This represents the number of virtual machines in the entire data center.

[0096] Furthermore, the weight value update for each operator includes the following steps:

[0097] (1) Assign the number of migrated virtual machines to each operator, perform virtual machine pre-migration, and add the virtual machines that have completed pre-migration to the migration list. Calculate the total energy cost saved after the pre-relocation is completed;

[0098] (2) The operator weight consists of two parts: the basic weight and the temporary weight. The temporary weight of the operator will be updated after each pre-migration.

[0099] (3) Calculate the energy cost saved by each operator. Select the operator that saves the most cost and denote it as Update its temporary weights according to the following formula:

[0100]

[0101] in, Operator Temporary weights;

[0102] Operator The initial weight;

[0103] This operator Reduced energy consumption after pre-migration;

[0104] finger operator Reduced energy consumption after pre-migration;

[0105] This represents the total number of operators removed from the operator pool;

[0106] (4) Update the temporary weights of other operators according to the following formula:

[0107]

[0108] in, This operator The initial weight;

[0109] , where is the temporary weight of the operator;

[0110] This operator Reduced energy consumption after pre-migration;

[0111] This represents the total number of operators removed from the operator pool;

[0112] (5) Update the operator weights according to the following formula:

[0113] ,

[0114] in, These are the updated weight values ​​after the operator is called;

[0115] It is an operator Base weights before updates;

[0116] These are the temporary weights of the operator;

[0117] For a parameter, the binary search method is used to adjust the weight ratio of the weighted sum of the base weight and the temporary weight when it is not updated to the optimal weight.

[0118] In summary, by adopting the above technical solutions, this invention can reduce the number of resource fragments generated by virtual machines and systems by selecting appropriate physical machines; and dynamically integrate virtual machines on different host machines, shut down some low-load physical machines, thereby reducing idle resources and energy consumption.

[0119] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Detailed Implementation

[0120] The embodiments of the present invention are described in detail below, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0121] S1, Establish a cloud data center resource model.

[0122] S1-1, Setting up the cloud provider Different types of virtual machines are rented to users. The user's resource request sequence is defined as: ,in Indicates the first in the request sequence Each user request corresponds to one virtual machine. Virtual machines The amount of resources is , Indicates a request Requested number of CPUs (unit: cores). Indicates a request The amount of memory requested (in GB).

[0123] S1-2, setting a total Physical machines with varying amounts of resources can be used to build cloud data centers. Each type of physical machine has a different number of CPU cores, memory resources, and maximum daily energy consumption.

[0124] S1-3 establishes a cloud data center resource model through constraints.

[0125] Constructing the sequence of physical machines that make up a cloud data center: ,in Representative type is The Each physical machine contains three attributes. ,in This indicates the number of CPUs (in units: cores) of the physical machine. This indicates the amount of memory in the physical machine (unit: GB). This indicates the daily energy consumption of the physical machine (unit: kw / h).

[0126] All user requests are deployed on corresponding physical machines via virtual machines. Therefore, the resources available to the physical machines used to build the cloud data center must always meet the following constraints:

[0127] ;

[0128] ;

[0129] in Represents the total number of physical machines;

[0130] Indicates the number of requests made by the user;

[0131] Indicates that it is located in the physical machine virtual machine The number of CPU cores;

[0132] Indicates that it is located in the physical machine virtual machine Memory size;

[0133] The purpose of the above constraints is to ensure that the resources available to the target physical machine are greater than the resources requested by the virtual machine; otherwise, the current physical machine cannot meet the conditions for forming a cloud data center infrastructure.

[0134] There is a one-to-one correspondence between physical machines and their corresponding virtual machines. This mapping is unique throughout the entire data center cluster and is expressed using a Boolean variable. ={0,1} indicates the user request. and physical machine The mapping relationship. And each physical machine and its load virtual machine It is a one-to-many relationship, for a given first... Taiwan Physical Machine The load conditions should all meet the following requirements:

[0135]

[0136]

[0137] The purpose of this constraint is to specify the threshold for each resource of a single physical machine, thereby constraining the upper limit of resources for a single physical machine in the model.

[0138] S2, Use the DQN model to select physical machines to expand the data center. The DQN model is a deep reinforcement learning model.

[0139] We define insufficient cloud data center resources as bottleneck resources. When expanding data center resources, physical machine selection needs to be dynamically based on user requests for different types of virtual machines and the remaining status of various resources in the current cloud data center. The core idea of ​​Virtual Machine DQN is to identify agents in the model, enabling them to execute action sequences to interact with the surrounding environment and obtain rewards, and to optimize the action sequences based on the reward values ​​until the model converges. In this model, the fragmentation of physical machine resources is used as a learning agent, interacting with indicators such as cloud data center resource availability, load changes, and user request patterns to optimize and learn.

[0140] S2-1, Determine the agent's state set, action set, reward value, and system environment in the DQN model.

[0141] (1) Obtain the physical machines in the cloud data center The system state at any given time, the state set ,in, Represents the type in the cluster The average CPU utilization of the physical machine, Represents the type in the cluster The average memory utilization of the physical machine;

[0142] (2) Set the action set to cover all There are several types of physical machines to choose from, and their actions... ,in Includes two states in one dimension The To decide whether or not to add this type of physical machine to the cluster; The action set is the set of actions for all types of physical machines.

[0143] (3) Obtain the reward function related to the state set and action set.

[0144] First, calculate the amount of idle resources generated by each physical machine that has joined the cluster, as follows:

[0145] ,

[0146] in, The type is The number of idle CPUs on the physical machine. The type is The amount of free memory on the physical machine;

[0147] Then, calculate the resource fragmentation rate of the physical machine at a certain moment. The resource fragmentation rate includes CPU fragmentation rate and memory fragmentation rate, which are recorded separately:

[0148] , superscript Indicates a certain moment ;

[0149] The goal of DQN model optimization is to reduce the total number of resource fragments. To reduce the computational complexity of the algorithm, these fragments are normalized.

[0150]

[0151] in For resource fragmentation rate, Parameters used to adjust the unit value between CPU and memory.

[0152] Type is The reward value R for a physics machine is set as follows: the physics machine that produces less fragment resources will receive a higher reward:

[0153]

[0154] in, The type is The physical mechanism in The reward value at any given moment;

[0155] The number of actions in each state will be summed. Value magnitude and sampling time The degree of correlation is relatively small. In order to save memory space, a neural network is used to represent the Q-value function, and the weights of each layer of the network are the corresponding Q-value functions.

[0156] Example: Hypothesis If the number of reading times is set to 10, then 2000 Q-values ​​will be generated for each state. A neural network is used to decide the action with the highest Q-value, and simple squared difference is used as the loss function to optimize the neural network.

[0157]

[0158] in express The next state after the current state;

[0159] express The action to be performed in the current state;

[0160] The following update rules apply to the Q-value function:

[0161] S2-2, the problem of selecting the physical machine can be viewed as a Markov decision process, using... This process is represented by the following. For a given Markov decision process, the update rule for the Q-value table in the physical machine selection step based on the DQN model is as follows:

[0162] S2-2-1, Current State By performing a single feedforward operation, the Q-values ​​for all predicted actions can be obtained:

[0163] ,

[0164] Indicate the next state ;

[0165] Indicates the next action ;

[0166] S2-2-2, for the next state Perform one feedforward operation and calculate the maximum output value of the entire network:

[0167]

[0168] in The type is The physical mechanism in The reward value at any given moment;

[0169] S2-2-3 sets the Q value for the action target;

[0170] S2-2-4, using a deep convolutional neural network to approximate the value function;

[0171] S2-2-5, using experience playback to train and reinforce the learning process;

[0172] The specific implementation process is as follows:

[0173] 1. Initialize the experience pool The capacity is ;

[0174] 2. Initialize the valuation Q-network: ,in These are the parameters of the neural network;

[0175] 3. Initialize the target Q-network: ,in These are the parameters of the target network;

[0176] 4. Initialize the initial state ;

[0177] 5. In status Using probability Randomly select actions If the low-probability event does not occur, greedily choose the action that maximizes the value function in the current state.

[0178] 6. Obtain the reward r and the new state. ;

[0179] 7. [The following is a list of items / items] Add to experience pool middle, It will continuously expand as the program runs;

[0180] 8. From Mid-sampling ;

[0181] 9. Calculate the reward value of the sampling action in the target Q-network as follows;

[0182] ;

[0183] Here Whether it is a terminated state is the maximum number of loops allowed during the learning process.

[0184] 10. With Used as a loss function to train the valuation Q network;

[0185] 11. State Updated to

[0186] 12. Every C steps, the value of the Q network is... The parameter values ​​are assigned to the parameters in the target Q-network.

[0187] 13. Repeat steps 5-12 until... The state is terminated (i.e., the number of resource fragments is at its lowest).

[0188] 14. Repeat steps 4-13 until the estimated Q network converges.

[0189] 15. Output the estimated value of the Q-network.

[0190] 16. Greedily select the physical machine with the largest Q value based on the output results.

[0191] S3 performs virtual machine consolidation to optimize idle resources and reduce energy consumption in cloud data centers.

[0192] This step primarily involves consolidating virtual machines based on the remaining resources of physical machines in the cloud data center. It searches for an approximate optimal solution within the target solution space to obtain the virtual machine deployment method that minimizes idle resources, thereby reducing the energy consumption of the cloud data center. The load status of physical machines affects their power consumption; under no-load conditions, cloud providers typically switch physical machines to standby or shutdown states to save energy. A Boolean variable is used here. ={0,1} indicates the physical machine The power on / off status. When calculating the energy cost of the entire data center, the energy consumption of physical machines in the off state can be ignored. The total energy cost of the data center over a period of time is then considered. The calculation method is as follows:

[0193] ,

[0194] Indicates the first Daily energy consumption of the physical machine.

[0195] in Indicates continuity Total energy cost of the data center within a day.

[0196] In real-world scenarios, to reduce system energy consumption costs, virtual machines within a cluster are typically consolidated. However, this consolidation incurs time costs, meaning the maximum number of virtual machines that can be migrated per day is fixed. Therefore, the daily upper limit for the number of virtual machines that can be migrated from a data center is:

[0197]

[0198] in, This is the number of virtual machines that can be migrated per day;

[0199] ={0,1} represents the user request. and physical machine The mapping relationship;

[0200] ={0,1} indicates that after the virtual machine migration is complete, the user request... The mapping between the new physical machine and the new physical machine.

[0201] This represents the number of virtual machines in the entire data center.

[0202] Therefore, the overall optimization objective of the problem is:

[0203]

[0204] st:

[0205]

[0206]

[0207]

[0208] in, This represents the total energy consumption cost of a data center over a continuous period of time.

[0209] When a virtual machine is initially deployed, a first-fit greedy algorithm is used to deploy the virtual machine to the data center cluster in order to respond to user needs as quickly as possible and ensure service quality. This algorithm inevitably results in idle resources in the cloud data center.

[0210] Virtual machine consolidation can significantly reduce energy consumption from idle resources. Its goal is to lower energy costs. The main idea is to migrate the load from physical machines with low resource utilization or severely unbalanced resource utilization to other physical machines, thereby shutting down low-load physical machines and achieving load balancing to save energy. A key step in a virtual machine consolidation strategy is determining which physical machines are the source hosts for the virtual machines to be migrated and which are the target hosts for receiving the virtual machines. Since the types of physical machines that make up a cloud data center are not uniform, the specific migration strategy will be affected by indicators such as the resource usage of each physical machine and the total resource volume. Therefore, the reference indicators for determining the source and target hosts should also change dynamically. The specific steps are as follows:

[0211] S3-1, Determine the list of source hosts for the virtual machines to be migrated out;

[0212] S3-1-1, Establish the migration operator pool ,in These represent different migration operators, each representing a different physical machine migration priority determination strategy.

[0213] To facilitate understanding, here are some examples of operators:

[0214] Operator The migration priority is determined according to the load of physical machines in the cluster, with physical machines with low load being migrated first.

[0215] Operator The migration priority is determined by the CPU resource utilization of physical machines in the cluster, with physical machines with higher resource utilization being migrated first.

[0216] Operator The migration priority is determined based on the memory resource utilization of physical machines in the cluster, with physical machines with low memory utilization being migrated first.

[0217] Operator The migration priority is determined by the difference between the CPU utilization and memory utilization of physical machines in the cluster, with physical machines with larger utilization differences being migrated first.

[0218] S3-1-2, assign weights to each operator, denoted as follows: ,in Correspondence operator The weights;

[0219] S3-1-3 determines the number of virtual machines that can be migrated for each operator based on the daily maximum number of virtual machines to be migrated and the weight of each operator. (Initially, the weight values ​​of each operator are the same.)

[0220] S3-1-4, Update the weight values ​​of each operator according to the following formula;

[0221] (1) Assign the number of migrated virtual machines to each operator, perform virtual machine pre-migration, and add the virtual machines that have completed pre-migration to the migration list. Calculate the total energy cost saved after the pre-relocation is completed;

[0222] (2) The operator weight consists of two parts: the basic weight and the temporary weight. The temporary weight of the operator will be updated after each pre-migration.

[0223] (3) Calculate the energy cost saved by each operator. Select the operator that saves the most cost and denote it as Update its temporary weights according to the following formula:

[0224]

[0225] in, Operator Temporary weights;

[0226] Operator The initial weight;

[0227] This operator Reduced energy consumption after pre-migration;

[0228] finger operator Reduced energy consumption after pre-migration;

[0229] This represents the total number of operators removed from the operator pool.

[0230] (4) Update the temporary weights of other operators according to the following formula:

[0231]

[0232] in, This operator The initial weight;

[0233] , where is the temporary weight of the operator;

[0234] This operator Reduced energy consumption after pre-migration;

[0235] This represents the total number of operators removed from the operator pool.

[0236] (5) Update the operator weights according to the following formula:

[0237]

[0238] in, These are the updated weight values ​​after the operator is called;

[0239] It is an operator Base weights before updates;

[0240] , where is the temporary weight of the operator;

[0241] For a parameter, the binary search method is used to adjust the weight ratio of the weighted sum of the base weight and the temporary weight when it is not updated to the optimal weight.

[0242] S3-1-5, Calculate each operator with the new weights. The new total energy cost of the system after allocating migration times and Size, This represents the total energy cost after the pre-relocation is completed; if Then output the migration sequence. ;if If the result is not found, return to step S3-1-4 and perform the weight update again.

[0243] S3-2, Determine the list of target hosts for the virtual machines to be migrated;

[0244] S3-2-1, Obtain the list of migrated virtual machines output in step S3-1-5. As input for this step;

[0245] S3-2-2, Establish the migration operator pool ,in These represent different migration operators, each of which represents a different virtual machine migration priority determination strategy;

[0246] To facilitate understanding, some examples of operators are listed below:

[0247] Operator The target physical machines are prioritized based on CPU resources, and virtual machines are migrated to physical machines with high CPU idle rates first.

[0248] Operator The target physical machines are prioritized based on memory resources, and virtual machines are moved to physical machines with high memory availability first.

[0249] Operator The target physical machines are prioritized based on their total resource availability, and virtual machines are migrated to physical machines with higher total resource idle rates.

[0250] S3-2-3, save the current state of the cluster, perform pre-migration using each migration operator, and calculate the increased energy cost;

[0251] S3-2-4: Select the operator with the lowest energy consumption cost and complete the migration operation.

[0252] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation, characterized in that, Includes the following steps: S1, establishing a cloud data center resource model; S1 includes: S1-1, Setting up the cloud provider Different types of virtual machines are rented to users; S1-2, totaling Physical machines with different amounts of resources can be used to build cloud data centers. Each type of physical machine has a different number of CPU cores, memory resources, and maximum daily energy consumption. S1-3 establishes a cloud data center resource model through constraints, specifies the threshold for each resource of a single physical machine through constraints, and limits the resources of a single physical machine in the constraint model to ensure that the amount of resources owned by the target physical machine is greater than the amount of resources requested by the virtual machine. S2, if data center resources are insufficient, use the DQN model to select physical machines to expand the data center; if data center resources are sufficient, proceed to the next step; S2 includes: (1) Obtain the physical machines in the cloud data center The system state at any given time, the state set ,in, Represents the type in the cluster The average CPU utilization of the physical machine, Represents the type in the cluster The average memory utilization of the physical machine; (2) Set the action set to cover all A variety of physical machines to be selected, actions ,in Includes two states in one dimension The To decide whether or not to add this type of physical machine to the cluster; The set of actions for all types of physical machines; (3) Obtain the reward function related to the state set and action set; (4) Optimization is performed using the DQN model, with the goal of reducing the total amount of resource fragments; S3 performs virtual machine consolidation to optimize idle resources and reduce energy consumption in cloud data centers.

2. The cloud data center energy-saving method based on cloud data center construction and virtual machine integration according to claim 1, characterized in that, S1-1 includes: The user's resource request sequence is defined as follows: ,in Indicates the first in the request sequence One resource request; each user request corresponds to one virtual machine. Virtual machines The amount of resources is , Indicates a request The requested number of CPUs, Indicates a request The amount of memory requested; S1-3 includes: Constructing the sequence of physical machines that make up a cloud data center: ,in Representative type is The Each physical machine contains three attributes. ,in This indicates the number of CPUs in the physical machine. This indicates the amount of memory in the physical machine. This indicates the daily energy consumption of the physical machine; All user requests are deployed on corresponding physical machines via virtual machines. Therefore, the resources available to the physical machines used to build the cloud data center must always meet the following constraints: ; ; in Represents the total number of physical machines; Indicates the number of requests made by the user; Indicates that it is located in the physical machine virtual machine The number of CPU cores; Indicates that it is located in the physical machine virtual machine Memory size; Each physical machine and its load virtual machine It is a one-to-many relationship, for a given first... Taiwan Physical Machine The load conditions should all meet the following requirements: , , in, Indicates the first in the request sequence One user request; Representative type is The Taiwan physical machine.

3. The cloud data center energy-saving method based on cloud data center construction and virtual machine integration according to claim 1, characterized in that, The reward function associated with the state set and action set includes: The amount of idle resources generated by each physical machine that has joined the cluster is calculated as follows: , , in, The type is The number of idle CPUs on the physical machine; The type is The amount of free memory on the physical machine; Indicates that it is located in the physical machine virtual machine The number of CPU cores; Indicates that it is located in the physical machine virtual machine Memory size; The type is A collection of physical machines; Then, calculate the resource fragmentation rate of the physical machine at a certain moment. The resource fragmentation rate includes CPU fragmentation rate and memory fragmentation rate, which are recorded separately: , superscript Indicates a certain moment ; Optimization using the DQN model includes: , in Resource fragmentation rate; Parameters used to adjust the unit value between CPU and memory; Type is The reward value R for a physics machine is set as follows: the physics machine that produces less fragment resources will receive a higher reward: , in, The type is The physical mechanism in The reward value at any given moment.

4. The cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation according to claim 3, characterized in that, The update rules for the Q-value table during the selection process are as follows: S2-2-1, Current State By performing a single feedforward operation, the Q-values ​​for all predicted actions can be obtained: , Indicate the next state ; Indicates the next action ; S2-2-2, for the next state Perform one feedforward operation and calculate the maximum output value of the entire network: , in The type is The physical mechanism in The reward value at any given moment; S2-2-3 sets the Q value for the action target; S2-2-4, using a deep convolutional neural network to approximate the value function; S2-2-5, utilizes experience playback to train and reinforce the learning process.

5. The cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation according to claim 3, characterized in that, S3 includes the following steps: S3-1, Determine the list of source hosts for the virtual machines to be migrated out; S3-1-1, Establish the migration operator pool ,in These represent different migration operators, each representing a different physical machine migration priority determination strategy; S3-1-2, assign weights to each operator, denoted as follows: ,in Correspondence operator The weights; S3-1-3, determine the number of virtual machines that can be migrated for each operator based on the daily upper limit of virtual machine migration and the weight of each operator; S3-1-4, update the weight values ​​of each operator; S3-1-5, Calculate each operator with the new weights. The new total energy cost of the system after allocating migration times and Size, This represents the total energy cost after the pre-relocation is completed; if Then output the migration sequence. ;if If so, return to step S3-1-4 and perform the weight update again; S3-2, Determine the list of target hosts for the virtual machines to be migrated; S3-2-1, Obtain the list of migrated virtual machines output in step S3-1-5. As input for this step; S3-2-2, Establish the migration operator pool ,in These represent different migration operators, each of which represents a different virtual machine migration priority determination strategy; S3-2-3, save the current state of the cluster, perform pre-migration using each migration operator, and calculate the increased energy cost; S3-2-4: Select the operator with the lowest energy consumption cost and complete the migration operation.

6. The cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation according to claim 5, characterized in that, The daily limit for the number of virtual machines to be migrated is: , in, This is the number of virtual machines that can be migrated per day; Represents the total number of physical machines; Indicates the number of requests made by the user; ={0,1} represents the user request. and physical machine The mapping relationship; ={0,1} indicates that after the virtual machine migration is complete, the user request... The mapping between the new physical machine and the new physical machine; This represents the number of virtual machines in the entire data center.

7. The cloud data center energy-saving method based on cloud data center construction and virtual machine consolidation according to claim 5, characterized in that, The weight value update for each operator includes the following steps: (1) Assign the number of migrated virtual machines to each type of operator, perform virtual machine pre-migration, and add the virtual machines that have completed pre-migration to the migration list. Calculate the total energy cost saved after the pre-relocation is completed; (2) The operator weight consists of two parts: the basic weight and the temporary weight. The temporary weight of the operator will be updated after each pre-migration. (3) Calculate the energy cost saved by each operator. Select the operator that saves the most cost and denote it as Update its temporary weights according to the following formula: , in, Operator Temporary weights; Operator The initial weight; This operator Reduced energy consumption after pre-migration; finger operator Reduced energy consumption after pre-migration; This represents the total number of operators removed from the operator pool; (4) Update the temporary weights of other operators according to the following formula: , in, This operator The initial weight; , where is the temporary weight of the operator; This operator Reduced energy consumption after pre-migration; This represents the total number of operators removed from the operator pool; (5) Update the operator weights according to the following formula: , in, These are the updated weight values ​​after the operator is called; It is an operator Base weights before updates; These are the temporary weights of the operator; For a parameter, the binary search method is used to adjust the weight ratio of the weighted sum of the base weight and the temporary weight when it is not updated to the optimal weight.