Virtual machine construction method, device and system, and storage medium
By building a hybrid neural network model and predicting power consumption based on data from virtual machines and physical machines, the problem of difficult virtual machines' power consumption is solved, and more efficient cloud computing resource scheduling and cost optimization are achieved.
Patent Information
- Application Number
- CN202510471487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively predict the power consumption of virtual machines, which affects the efficiency and cost of cloud computing resource scheduling.
By obtaining the configuration data of the virtual machine and load dynamic data, combining the measurement power consumption data of the physical machine, a neural network model of a hybrid BP neural network and a selective nuclear convolutional neural network is built to predict power consumption, and the physical machine with the smallest measurement power consumption is selected as the construction body.
It improves the accuracy and real-time performance of virtual machine power consumption prediction, optimizes the scheduling of cloud computing resources, and reduces deployment and operation costs.
Smart Images

Figure CN120276806A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of virtual machines, and particularly relates to a virtual machine construction method, device, system, and storage medium. Background Art
[0002] In today's society with highly developed information technology, as various types of data, both offline and online, continue to grow, cloud computing has moved from concept to implementation, with related applications emerging in various industries and posing various requirements for underlying hardware devices. Currently, the power consumption of virtual machines at the bottom layer of cloud computing is an important factor affecting its deployment and operation costs as well as its operating power consumption, and the power consumption of virtual machines is related to their load. Therefore, predicting the power consumption of virtual machines based on their load is of great significance for resource scheduling in cloud computing. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a virtual machine construction method, device, system, and storage medium.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A virtual machine construction method includes:
[0006] Step S1: Obtain the configuration data and load dynamic data of each virtual machine as well as the measured power consumption data of the physical machine; wherein, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes: scheduling parameters and weight values;
[0007] Step S2: Obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine as well as the measured power consumption data of the physical machine;
[0008] Step S3: Receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the minimum measured power consumption as the construction main body;
[0009] Step S4: Construct a virtual machine on the construction main body according to the virtual machine construction request.
[0010] Preferably, in step S1, data cleaning is performed on the configuration data and load dynamic data of each virtual machine as well as the measured power consumption data of the physical machine, and in step S2, the power consumption prediction model corresponding to each virtual machine is obtained according to the configuration data and load dynamic data of each virtual machine after data cleaning as well as the measured power consumption data of the physical machine.
[0011] Preferably, in step S2, a power consumption prediction model corresponding to a neural network structure is constructed according to the load type of the virtual machine, and the configuration data and the load dynamic data are used as the input of the power consumption prediction model, and supervised training is performed based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine; wherein, the neural network structure is a neural network that combines a BP neural network and a selective kernel convolutional neural network, the selective kernel convolutional neural network includes a hidden layer and an output layer, the hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network.
[0012] The present invention also provides a virtual machine construction device, including:
[0013] A first processing module, configured to obtain the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine; wherein, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes: scheduling parameters and weight values;
[0014] A second processing module, configured to obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine;
[0015] A third processing module, configured to receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the smallest measured power consumption as the construction main body;
[0016] A fourth processing module, configured to construct a virtual machine on the construction main body according to the virtual machine construction request.
[0017] Preferably, the first processing module performs data cleaning on the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine.
[0018] Preferably, the second processing module constructs a power consumption prediction model corresponding to a neural network structure according to the load type of the virtual machine, and uses the configuration data and the load dynamic data as the input of the power consumption prediction model, and performs supervised training based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine; wherein, the neural network structure is a neural network that combines a BP neural network and a selective kernel convolutional neural network, the selective kernel convolutional neural network includes a hidden layer and an output layer, the hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network.
[0019] The present invention also provides a virtual machine construction system, including: a memory and a processor, where a computer program is stored on the memory and run by the processor, and the computer program executes the virtual machine construction method when run by the processor.
[0020] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes a virtual machine construction method when running.
[0021] The present invention obtains the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine; wherein, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes: scheduling parameters and weight values; according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine, a power consumption prediction model corresponding to each virtual machine is obtained; a virtual machine construction request is received, and the power consumption of each virtual machine is measured through the power consumption prediction model, and the physical machine with the smallest measured power consumption is determined as the construction main body; a virtual machine is constructed on the construction main body according to the virtual machine construction request. By adopting the technical solution of the present invention, the accuracy and real-time performance of virtual machine power consumption prediction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings according to the provided drawings without creative efforts.
[0023] Figure 1 It is a flowchart of the virtual machine construction method according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0025] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Embodiment 1:
[0026] As Figure 1 shown, the embodiment of the present invention provides a virtual machine construction method, including:
[0027] Step S1, obtaining the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine; wherein, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes: scheduling parameters and weight values;
[0028] Step S2: Obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data, load dynamic data of each virtual machine, and the measured power consumption data of the physical machine;
[0029] Step S3: Receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the minimum measured power consumption as the construction main body;
[0030] Step S4: Construct a virtual machine on the construction main body according to the virtual machine construction request.
[0031] As an implementation manner of an embodiment of the present invention, in step S1, perform data cleaning on the configuration data, load dynamic data of each virtual machine, and the measured power consumption data of the physical machine. In step S2, obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data, load dynamic data of each virtual machine, and the measured power consumption data of the physical machine after data cleaning.
[0032] Further, performing data cleaning on the configuration data, load dynamic data of each virtual machine, and the measured power consumption data of the physical machine includes:
[0033] Screen out the garbled data and out-of-range data from the data cleaning of the configuration data, load dynamic data of each virtual machine, and the measured power consumption data of the physical machine to obtain the screened index data;
[0034] Perform a vectorization operation on the screened index data to obtain a screened index vector set, and add a spatio-temporal vector to each screened index vector in the screened index vector set to obtain a spatio-temporal vector set;
[0035] Perform feature clustering on the spatio-temporal vector set to obtain a clustering center data set;
[0036] Fill each null value data in the screened index data according to the clustering center data set.
[0037] As an implementation manner of an embodiment of the present invention, in step S2, construct a power consumption prediction model with a corresponding neural network structure according to the load type of the virtual machine, use the configuration data and load dynamic data as the input of the power consumption prediction model, and perform supervised training based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine; wherein, the neural network structure is a neural network that mixes a BP neural network and a selective kernel convolutional neural network, the selective kernel convolutional neural network includes a hidden layer and an output layer, the hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network.
[0038] Further, determine the load type of the virtual machine according to the load dynamic data; construct a power consumption prediction model corresponding to the neural network structure according to the load type; input the configuration data and the load dynamic data into the power consumption prediction model, and obtain the predicted power consumption data output by the power consumption prediction model; perform supervised training on the power consumption prediction model according to the predicted power consumption data and the measured power consumption data.
[0039] Further, performing supervised training on the power consumption prediction model according to the predicted power consumption data and the measured power consumption data includes: determining the total predicted power consumption data of the physical machine according to the predicted power consumption data; in the case where the difference between the measured power consumption data and the total predicted power consumption data does not meet the convergence condition, adjusting the model parameters of the power consumption prediction model according to the difference; in the case where the difference meets the convergence condition, determining the model parameters of the power consumption prediction model.
[0040] Further, divide the configuration data and load dynamic data of each virtual machine after data cleaning and the measured power consumption data of the physical machine into a model training set and a model testing set according to a ratio of 8:2, and then train a neural network that combines a BP neural network and a selective kernel convolutional neural network with the training set; debug the relevant parameters of the combined neural network, and judge the advantages and disadvantages of the trained combined neural network according to the model evaluation index until the optimal power consumption prediction model is obtained.
[0041] The present invention can further adopt the coefficient of determination R 2 and the mean square error MSE (mean square error) to evaluate the training and test results of the model, and obtain the optimal power consumption prediction model.
[0042] The present invention can construct a power consumption prediction model corresponding to the neural network structure based on the load type for different virtual machines, so as to more specifically describe the power consumption change situation of the virtual machine under different loads, ensuring the accuracy and real-time performance of the power consumption change prediction; and performing supervised training using the total measured power consumption data of the physical machine, without independently counting the power consumption for each virtual machine, ensuring that the training process is based on real data, thereby more accurately describing the state of the virtual machine load and power consumption, and improving the accuracy and real-time performance of the power consumption prediction model. Embodiment 2:
[0043] The present invention also provides a virtual machine construction device, including:
[0044] A first processing module, configured to obtain the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine; wherein, the virtual machine is configured on the physical machine of the cloud platform, and the configuration data includes: scheduling parameters and weight values.
[0045] A second processing module, configured to obtain a power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine;
[0046] A third processing module, configured to receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the minimum measured power consumption as the construction main body;
[0047] A fourth processing module, configured to construct a virtual machine on the construction main body according to the virtual machine construction request.
[0048] As an implementation manner of an embodiment of the present invention, the first processing module performs data cleaning on the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine.
[0049] As an implementation manner of an embodiment of the present invention, the second processing module constructs a power consumption prediction model with a corresponding neural network structure according to the load type of the virtual machine, uses the configuration data and load dynamic data as the input of the power consumption prediction model, and performs supervised training based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine; wherein, the neural network structure is a neural network hybrid of a BP neural network and a selective kernel convolutional neural network, the selective kernel convolutional neural network includes a hidden layer and an output layer, the hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network. Embodiment 3:
[0050] The present invention further provides a virtual machine construction system, including: a memory and a processor, where a computer program is stored on the memory and run by the processor, and the computer program executes the virtual machine construction method when run by the processor. Embodiment 4:
[0051] The present invention further provides a storage medium, where a computer program is stored on the storage medium, and the computer program executes the virtual machine construction method when running.
[0052] The above embodiments are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solution of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for constructing a virtual mechanism, characterized in that, Including: Step S1: Obtain the configuration data and load dynamic data of each virtual machine, and the measured power consumption data of the physical machine. Among them, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes scheduling parameters and weight values. Step S2: Obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine. Step S3: Receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the smallest measured power consumption as the construction subject. Step S4: Construct a virtual machine on the construction subject according to the virtual machine construction request.
2. The virtual mechanism construction method according to claim 1, characterized in that In step S1, perform data cleaning on the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine. In step S2, obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine after data cleaning.
3. The virtual mechanism construction method according to claim 2, characterized in that In step S2, construct a power consumption prediction model with a corresponding neural network structure according to the load type of the virtual machine, use the configuration data and load dynamic data as the input of the power consumption prediction model, and perform supervised training based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine. Among them, the neural network structure is a neural network mixed with a BP neural network and a selective kernel convolutional neural network. The selective kernel convolutional neural network includes a hidden layer and an output layer. The hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network.
4. A virtual mechanism construction device, characterized in that, Including: The first processing module is used to obtain the configuration data and load dynamic data of each virtual machine, and the measured power consumption data of the physical machine. Among them, the virtual machines are configured on the physical machines of the cloud platform, and the configuration data includes scheduling parameters and weight values. The second processing module is used to obtain the power consumption prediction model corresponding to each virtual machine according to the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine. The third processing module is used to receive a virtual machine construction request, measure the power consumption of each virtual machine through the power consumption prediction model, and determine the physical machine with the smallest measured power consumption as the construction subject. The fourth processing module is used to construct a virtual machine on the construction subject according to the virtual machine construction request.
5. The virtual mechanism construction device according to claim 4, wherein, The first processing module performs data cleaning on the configuration data and load dynamic data of each virtual machine and the measured power consumption data of the physical machine.
6. The virtual mechanism construction device according to claim 5, characterized in that, The second processing module constructs a power consumption prediction model with a corresponding neural network structure according to the load type of the virtual machine, uses the configuration data and load dynamic data as the input of the power consumption prediction model, and performs supervised training based on the measured power consumption data to obtain the power consumption prediction model of the virtual machine. Among them, the neural network structure is a neural network mixed with a BP neural network and a selective kernel convolutional neural network. The selective kernel convolutional neural network includes a hidden layer and an output layer. The hidden layer includes a BP neural network, and the BP neural network is parallel to the selective kernel convolutional neural network.
7. A virtual mechanism construction system, characterized in that, Including: A memory and a processor, wherein a computer program is stored on the memory and is run by the processor, and the computer program, when run by the processor, executes the virtual machine construction method according to any one of claims 1-3.
8. A storage medium, characterized in that, A computer program is stored on the storage medium, and the computer program, when running, executes the virtual machine construction method according to any one of claims 1-3.