A method and system for managing virtual machines of a cloud server
By using the timing processing model and feature extraction model to predict the resource requirements of cloud server virtual machines, the problem that traditional static resource allocation strategies cannot meet the resource requirements during peak periods is solved, and the optimization of resource management and the improvement of business response speed is achieved.
Patent Information
- Application Number
- CN202510488696.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-04-18
AI Technical Summary
Traditional static resource allocation strategies cannot effectively meet the high resource requirements of cloud server virtual machines during peak business periods, resulting in slow business response or service interruption, and there are problems of wasted or insufficient resources.
By obtaining historical user behavior data, current business demand data and cloud server resource status data, using timing processing models, feature extraction models and prediction models, predict the amount of resources required by each virtual machine in the future period, and output the resource allocation plan through the resource allocation algorithm.
The optimization of resource management is achieved, avoiding excessive or insufficient allocation of resources, improving business response speed, reducing resource waste and energy consumption, and enhancing the stability and adaptability of the system.
Smart Images

Figure CN120011002B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric communication technologies, and more particularly, to a method and system for managing virtual machines of a cloud server. Background Art
[0002] With the development of cloud computing, virtual machines of cloud servers are widely used, but there are problems in current management:
[0003] Disadvantages of static resource allocation: Traditionally, a static allocation strategy is adopted, and fixed resources are pre-allocated to virtual machines according to experience or estimation. However, the business load and user behavior change dynamically. For example, during e-commerce promotions, the resource demand increases greatly, and static allocation cannot meet the demand, resulting in slow business response or even interruption. Moreover, different business types have large differences in resource demand characteristics, and static allocation is likely to cause resource waste or insufficiency.
[0004] Insufficient risk assessment and early warning: Existing management systems lack an effective prediction and response mechanism for business risks caused by resource allocation, such as system crashes and business inoperability caused by over-allocation or under-allocation of resources. They can only handle them passively, bringing losses to cloud service providers and users. Summary of the Invention
[0005] The present invention provides a method and system for managing virtual machines of a cloud server, which solves the problems that the resources allocated by the traditional static allocation in related technologies cannot meet such sudden high demands, resulting in slow business response, or even service interruption, resource waste or resource insufficiency.
[0006] The present invention provides a method for managing virtual machines of a cloud server, including:
[0007] Obtaining historical user behavior data, and using a time series processing model to extract user behavior pattern feature vectors;
[0008] Obtaining current business demand data, and using a feature extraction model to extract business demand feature vectors;
[0009] Obtaining cloud server resource status data, and performing standardization processing to obtain resource status vectors;
[0010] Inputting the user behavior pattern feature vectors, business demand feature vectors and resource status vectors into a prediction model to predict the resource amount required for each virtual machine in a future period of time;
[0011] According to the predicted resource amount and the actual allocable resources of the current cloud server, outputting a resource allocation plan through a resource allocation algorithm.
[0012] Further, the time series processing model is a long short-term memory network model; the feature extraction model is a convolutional neural network model; the resource status vector is obtained through a standardization function Obtained by processing the resource status data of the cloud server; the construction of the prediction model takes the user behavior pattern feature vector, business requirement feature vector, and resource status vector as inputs and inputs them into a multi-layer perceptron prediction model to predict the predicted resource amount required by each virtual machine within a future period of time.
[0013] Furthermore, a cloud server virtual machine management method further includes:
[0014] Obtain historical resource allocation failure case data and extract risk feature vectors using the decision tree algorithm;
[0015] Input the risk feature vector together with the user behavior pattern feature vector, business requirement feature vector, and resource status vector into an improved prediction model to predict the resource amount and risk assessment value based on historical resource allocation failure case data required by each virtual machine within a future period of time;
[0016] Set a risk threshold. When the risk assessment value is greater than the risk threshold, issue a risk warning and adjust the resource allocation plan that has not undergone risk assessment according to the risk type.
[0017] Furthermore, a cloud server virtual machine management method further includes:
[0018] Obtain the energy consumption data of each hardware component of the cloud server and predict the energy consumption values under different resource allocation plans using the energy consumption model ;
[0019] Taking the resource requirements to meet the business requirements and the minimum energy consumption as the goal, construct an optimization function and solve to obtain the optimal resource allocation amount based on the energy consumption model;
[0020] Substitute the optimal resource allocation amount based on the energy consumption model into the resource allocation algorithm and output the final resource allocation plan based on the energy consumption model.
[0021] Furthermore, a cloud server virtual machine management method further includes:
[0022] Obtain historical resource allocation plans and their business operation effect feedback data, and analyze the resource allocation strategy adjustment direction and amplitude information using the deep reinforcement learning algorithm;
[0023] Adjust the parameters of the improved prediction model according to the adjustment direction and amplitude information to obtain an adjusted prediction model ;
[0024] Input the relevant feature vectors into the adjusted prediction model to predict the amount of resources required by each virtual machine based on historical data for a period of time in the future, and substitute them into the resource allocation algorithm to output the final resource allocation plan based on historical data. Then, update the resource allocation plan based on historical data and the corresponding business operation effect feedback data into the feedback data set for iterative optimization.
[0025] Further, a cloud server virtual machine management method further includes:
[0026] Obtain the detailed information of the big data analysis task, and use a custom feature extraction algorithm to extract the big data task feature vector;
[0027] Fuse the big data task feature vector with the user behavior pattern feature vector, business requirement feature vector, and resource status vector to obtain a fused feature vector;
[0028] Input the fused feature vector into the adjusted prediction model adapted to the big data scenario , predict the amount of resources required by each virtual machine suitable for the big data analysis task based on the big data scenario, and substitute them into the resource allocation algorithm to output the final resource allocation plan based on the big data scenario.
[0029] Further, a cloud server virtual machine management method further includes:
[0030] Obtain the relevant information of the containerized application, and use a graph neural network to extract the container feature vector;
[0031] Take the container feature vector, user behavior pattern feature vector, business requirement feature vector, and resource status vector as inputs and input them into the adjusted prediction model combined with time series prediction to predict the amount of resources required by each container at different time points;
[0032] According to the predicted resource requirements of containers at different time points and the dependencies between containers, use an improved heuristic algorithm for resource allocation to output the resource allocation plan based on the containerized application.
[0033] Further, a cloud server virtual machine management method further includes:
[0034] Obtain multi-tenant information, and use a deep autoencoder to extract tenant feature vectors;
[0035] Take the tenant feature vector, user behavior pattern feature vector, business requirement feature vector, and resource status vector as inputs and input them into the personalized prediction model , predict the amount of resources required for the game that meets the personalized needs of each tenant;
[0036] Adopt a resource allocation coordination algorithm based on game theory to fairly allocate resources on the premise of ensuring the basic gaming experience of each tenant, and output a resource allocation scheme based on game theory.
[0037] The present invention provides a cloud server virtual machine management system, including:
[0038] A data acquisition module, used to acquire historical user behavior data, current business requirement data, and cloud server resource status data;
[0039] A feature extraction module, used to extract user behavior pattern feature vectors by using a time series processing model, and extract business requirement feature vectors by using a feature extraction model;
[0040] A data processing module, used to perform normalization processing on the cloud server resource status data to obtain a resource status vector;
[0041] A prediction module, used to input the user behavior pattern feature vector, business requirement feature vector, and resource status vector into an adjusted personalized prediction model to predict the amount of resources required by each virtual machine in a future period of time;
[0042] A resource allocation module, used to output a resource allocation scheme by using a resource allocation algorithm according to the predicted amount of resources and the actual allocable resources of the current cloud server.
[0043] Furthermore, a cloud server virtual machine management system further includes:
[0044] A risk assessment module, which is used to acquire historical resource allocation failure case data, extract risk feature vectors by using a decision tree algorithm, and input the risk feature vectors and other feature vectors into an improved prediction model to predict a risk assessment value. When the risk assessment value is greater than a set threshold, a risk warning is issued and the resource allocation scheme based on risk assessment is adjusted.
[0045] The beneficial effects of the present invention are as follows:
[0046] Resource management optimization: Adaptive learning and prediction based on user behavior and business requirements, accurately matching resources, avoiding over-allocation or under-allocation. Allocate resources in a timely and accurate manner, avoid slow business response due to insufficient resources, improve the user experience, and ensure the efficient operation of the business.
[0047] Enhanced risk prevention and control: Introduce a risk assessment and warning mechanism, extract risk feature vectors by analyzing historical failure cases, combine with a prediction model to evaluate risks, issue a warning when exceeding the threshold and adjust the scheme, enhancing business stability.
[0048] Green energy-saving implementation: Consider energy consumption factors in resource allocation, construct an energy consumption model combined with an optimization algorithm, allocate resources with the goal of minimizing energy consumption, and reduce the overall energy consumption of cloud servers.
[0049] System self-adaptive improvement: Use deep reinforcement learning to automatically optimize the resource allocation scheme, adapt automatically as the business and user behaviors evolve, and improve the system's adaptability and robustness.
[0050] Special scenario adaptation: For special scenarios such as big data analysis, containerized application deployment, and multi-tenant cloud games, propose targeted resource allocation optimization methods respectively to meet the needs of special scenarios and enhance service competitiveness. Brief Description of the Drawings
[0051] Figure 1 is a schematic flowchart of a method for managing virtual machines of a cloud server according to the present invention;
[0052] Figure 2 is an example diagram of user behavior data recording according to the present invention;
[0053] Figure 3 is the user behavior feature vector according to the present invention;
[0054] Figure 4 is the business requirement data diagram according to the present invention;
[0055] Figure 5 is the business requirement feature vector diagram according to the present invention;
[0056] Figure 6 is the resource status data diagram according to the present invention;
[0057] Figure 7 is the resource demand prediction result diagram according to the present invention;
[0058] Figure 8 is the resource allocation scheme diagram according to the present invention;
[0059] Figure 9 is the technical effect comparison diagram according to the present invention. Detailed Embodiments
[0060] Now, the subject matter described herein will be discussed with reference to example embodiments. It should be understood that discussing these embodiments is only to enable those skilled in the art to better understand and thus implement the subject matter described herein. Without departing from the scope of protection of the content of this specification, changes can be made to the functions and arrangements of the elements discussed. Each example can omit, substitute, or add various processes or components as needed. Additionally, the features described in some examples can also be combined in other examples.
[0061] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying 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.
[0062] A method for managing virtual machines of a cloud server, as Figure 1 shown, includes the following steps:
[0063] Step 101, behavior pattern extraction: Obtain historical user behavior data , and process it using a long short-term memory network (LSTM) model to output a user behavior pattern feature vector . Among them, LSTM is a recurrent neural network that can effectively process and predict time series data and is used to extract the time series features of user behavior in this embodiment.
[0064] In step 101, the specific structure of the LSTM model is as follows:
[0065] Input layer: Receive user behavior time series data, including features such as the number of logins, CPU usage rate, memory usage rate, storage read and write volume, etc.;
[0066] LSTM layer: Contains multiple LSTM units, each unit with a dimension of 128 and 2 layers;
[0067] Fully connected layer: Convert the output of the LSTM layer into a feature vector with a fixed dimension;
[0068] Output layer: Output a 3-dimensional user behavior feature vector;
[0069] Step 102, business requirement analysis: Obtain current business requirement data , and perform feature extraction on it using a convolutional neural network (CNN) model to output a business requirement feature vector . Among them, CNN can automatically extract the spatial features of data through convolution and pooling operations and is suitable for feature extraction of business requirement data (such as business type, business scale, etc.). The mathematical expression of CNN is:
[0070] ;
[0071] ;
[0072] Among them, , , are the number of layers, rows, and columns of the feature map, is the layer, the A feature map, is the layer's th feature map and the th feature map's convolution kernel, is the layer's th feature map's bias term, is the set of feature maps of the previous layer connected to the th feature map, represents the convolution operation, is the activation function (such as ReLU), is the receptive field of the pooling operation, is the layer's th feature map, is the layer's th feature map. Finally, the output layer result of the CNN is used as the business requirement feature vector .
[0073] In step 102, the specific structure of the CNN model is as follows:
[0074] Input layer: Receives business requirement data and organizes the data into a two-dimensional matrix form;
[0075] Convolution layer 1: Uses 32 3×3 convolution kernels, with a stride of 1 and a padding method of'same';
[0076] Pooling layer 1: Uses 2×2 max pooling, with a stride of 2;
[0077] Convolution layer 2: Uses 64 3×3 convolution kernels, with a stride of 1 and a padding method of'same';
[0078] Pooling layer 2: Uses 2×2 max pooling, with a stride of 2, and a fully connected layer: Flattens the feature maps and connects them to a fully connected layer with 512 neurons;
[0079] Output layer: Outputs a 3-dimensional business requirement feature vector;
[0080] Step 103, resource status evaluation: Obtains cloud server resource status data , and processes it using the normalization function to obtain the normalized resource status vector . The normalization function can map resource status data with different dimensions (such as CPU usage rate, memory occupancy, etc.) to the same scale, facilitating subsequent processing by the prediction model. Commonly used normalization functions include min-max normalization and Z-score normalization, and their mathematical expressions are respectively:
[0081] ;
[0082] ;
[0083] Among them, and are the minimum and maximum values of the data respectively, is the cloud server resource status data, and are the mean and standard deviation of the data respectively.
[0084] Step 104, prediction model construction: Take , and as inputs and input them into a multi-layer perceptron (MLP) prediction model to predict the amount of resources required by each virtual machine in a future period . MLP is a feedforward neural network composed of an input layer, a hidden layer, and an output layer, and can fit complex non-linear mapping relationships. The mathematical expression of MLP is:
[0085] ;
[0086] ;
[0087] ;
[0088] Among them, , , are input features, is the hidden state of the th layer, and are the weight matrix and bias vector of the th layer, is the activation function (such as ReLU) of the th layer, is the number of layers of the network. is the hidden state of the th layer. is the input layer, is the output layer. is the weight matrix from the input layer to the hidden layer, is the weight matrix from the hidden layer to the output layer, is the bias vector from the input layer to the hidden layer, is the bias vector from the hidden layer to the output layer.
[0089] In step 104, the MLP prediction model The specific structure is as follows:
[0090] Input layer: Receives 9-dimensional input features (3-dimensional user behavior features, 3-dimensional business requirement features, and 3-dimensional resource status features);
[0091] Hidden layer 1: 256 neurons, using the RelU activation function;
[0092] Hidden layer 2: 128 neurons, using the ReLU activation function;
[0093] Hidden layer 3: 64 neurons, using the ReLU activation function;
[0094] Output layer: 3 neurons, corresponding to the predicted resource amounts of CPU, memory, and storage respectively;
[0095] Step 105, resource allocation decision: According to the predicted resource amounts , combined with the actual allocable resources of the current cloud server , use the resource allocation algorithm to perform resource allocation and output the resource allocation plan . The basic idea of the resource allocation algorithm is to make the optimal decision in the current state at each step selection, so that the final result reaches the optimal or close to the optimal. In this embodiment, the resource allocation algorithm sorts according to the resource demand amounts of virtual machines, and preferentially satisfies the virtual machines with large demand amounts until the cloud server resources are completely allocated.
[0096] In an embodiment of the present invention, the resource allocation plan includes: CPU allocation, memory allocation, and storage allocation.
[0097] In step 105, the specific implementation steps of the resource allocation algorithm are as follows: Sort the virtual machines in descending order according to the resource demand amounts, and allocate resources to each virtual machine in turn. The allocation rule is: If the remaining resources are sufficient, fully meet the predicted resource demand. If the remaining resources are insufficient, calculate the actual allocation amount according to the following formula:
[0098] ;
[0099] where is the resource allocation coefficient, and its value range is [0, 1], which is used to control the conservativeness of resource allocation. The value of
[0100] is obtained through statistical analysis of historical resource allocation data. Update the remaining available resource amount, and repeat steps 102 to 103 until all virtual machines have completed resource allocation.The specific parameter settings of these models and algorithms can be adjusted according to the actual application scenario to obtain the best resource allocation effect. For example, parameters such as the number of layers of the neural network, the number of neurons, and the learning rate can be optimized through methods such as cross-validation, or the resource allocation coefficient in the resource allocation algorithm can be adjusted. .
[0101] Through the above steps, this embodiment provides an intelligent resource allocation method for cloud server virtual machines based on adaptive learning and prediction of user behavior and business requirements, which can dynamically adapt to complex and changing scenarios and improve resource utilization and user experience.
[0102] To more intuitively illustrate the specific implementation process of this embodiment, a practical application example is given below:
[0103] There are 3 virtual machine instances (VM1, VM2, VM3) on a certain cloud service platform, and resources need to be allocated to them.
[0104] Example of historical user behavior data ( ), as Figure 2 shown in the example diagram of user behavior data records;
[0105] After being processed by the LSTM model, a user behavior pattern feature vector is obtained , as Figure 3 shown in the user behavior feature vector;
[0106] Example of current business requirement data ( ), as Figure 4 shown in the business requirement data diagram;
[0107] After being processed by the CNN model, a business requirement feature vector is obtained , as Figure 5 shown in the business requirement feature vector diagram;
[0108] Example of cloud server resource status data ( ), as Figure 6 shown in the resource status data diagram; after being normalized, a resource status vector is obtained : [0.375, 0.375, 0.4];
[0109] The resource demand prediction result output by the prediction model, as Figure 7 shown in the resource demand prediction result diagram;
[0110] Finally, a resource allocation plan is obtained, as Figure 8 shown in the resource allocation plan diagram;
[0111] Technical effect verification: The resource allocation scheme of this embodiment is compared and tested with the traditional static allocation scheme. The test period is 7 days, and the results are as shown in Figure 9 the technical effect comparison diagram;
[0112] It can be obtained from Figures 2 to 9 that the resource allocation scheme of this embodiment has significant advantages compared with the traditional static allocation scheme: the resource utilization rate has increased by 72.1%, significantly improving the resource usage efficiency; the business response time has decreased by 27.8%, enhancing the user experience; the SLA achievement rate has increased by 6.7%, strengthening the service quality guarantee; through dynamic adjustment, it can more flexibly respond to business changes; the energy consumption has decreased by 24.1%, achieving the effect of energy conservation and emission reduction.
[0113] These data fully prove the effectiveness and advancement of the intelligent cloud server virtual machine resource allocation method based on adaptive learning and prediction of user behavior and business requirements proposed in this embodiment.
[0114] In an embodiment of the present invention, to introduce a risk assessment and early warning mechanism for resource allocation and improve business stability, a cloud server virtual machine management method further includes the following steps:
[0115] Steps 201 to 203 are the same as steps 101 to 103 in Embodiment 1.
[0116] Step 204, risk feature extraction: Obtain historical resource allocation failure case data , and use the decision tree algorithm to process it and extract the risk feature vector . The decision tree recursively selects the optimal partitioning feature to split the data set into different subsets until all subsets belong to the same category or reach a predetermined termination condition. The main decision tree generation algorithms include ID3, C4.5, and CART, etc. The Gini index calculation formula of the CART algorithm is:
[0117] ;
[0118] ;
[0119] where, is the Gini index of the data set , is the Gini index of the feature , is the data set, is the th category, is the total number of categories, is the partitioning feature, is the number of values of this feature, as a feature Take the th value of the sub - dataset. Select the feature with the smallest Gini index as the optimal partitioning feature, and recursively generate a decision tree until the termination condition is met. Finally, use the output result of the decision tree as the risk feature vector .
[0120] Step 205, prediction model extension: Take , , and as inputs and input them into an improved MLP prediction model to predict the amount of resources required by each virtual machine in a future period and the risk assessment value . The improved MLP model adds a risk assessment output on the original basis, and its mathematical expression is:
[0121] ;
[0122] ;
[0123] ;
[0124] ;
[0125] where , and , are the output layer parameters for resource amount prediction and risk assessment respectively, is the activation function for risk assessment (such as the sigmoid function, which maps the output to between 0 and 1, representing the risk probability), is the hidden state of the th layer, is the risk feature.
[0126] Step 206, risk warning and handling: Set the risk threshold , when , issue a risk warning and adjust the old resource allocation plan according to the risk type to obtain the adjusted resource amount .
[0127] Step 207, resource allocation plan output: Substitute into the resource allocation algorithm to output the final resource allocation plan that avoids risks .
[0128] Compare to obtain the resource allocation plan In this way, by introducing a risk assessment and early warning mechanism in this embodiment, business risks that may be caused by resource allocation can be discovered in advance, the old resource allocation plan can be adjusted in time, and CPU allocation, memory allocation, and storage allocation can be changed, effectively improving business stability.
[0129] In one embodiment of the present invention, considering the green energy-saving factors of resource allocation, the overall energy consumption of the cloud server is reduced; a cloud server virtual machine management method further includes the following steps:
[0130] Steps 301 to 303 are the same as steps 101 to 103 in Embodiment 1.
[0131] Step 304, energy consumption model construction: Obtain the energy consumption data of each hardware component (CPU, memory, storage, etc.) of the cloud server , and use the linear regression model to model it and predict the energy consumption values under different resource allocation schemes . The linear regression model fits the data by minimizing the sum of squared errors, and its mathematical expression is:
[0132] ;
[0133] ;
[0134] Among them, is the predicted value, is the input feature, is the feature weight, B is the bias term, and are respectively the true value and the predicted value of the th sample, is the total number of samples. The optimal weights and biases are solved through optimization algorithms such as gradient descent to obtain the energy consumption prediction model .
[0135] Step 305, comprehensive optimization model: Take , and as inputs and input them into an improved MLP prediction model to predict the amount of resources required by each virtual machine in the future for a period of time . At the same time, combined with the energy consumption prediction model , with the goal of meeting business needs with resource requirements and minimizing energy consumption, an optimization function is constructed, and the optimal resource allocation amount is obtained by solving. The mathematical expression of the optimization function is:
[0136] ;
[0137] ;
[0138] ;
[0139] ;
[0140] Among them, is the predicted resource amount of the th virtual machine, is the total number of virtual machines, is the total amount of allocable resources of the cloud server, is the th minimum resource requirement of the virtual machine. The goal of the optimization function is to minimize the predicted energy consumption value . A heuristic optimization algorithm (such as a genetic algorithm) can be used to solve this optimization problem to obtain the optimal resource allocation amount , and its calculation formula is:
[0141] ;
[0142] where is the energy consumption prediction model, is the feature weight, is the bias term.
[0143] Step 306, resource allocation plan output: Substitute into the resource allocation algorithm , and output the final resource allocation plan .
[0144] Compared with the way of obtaining the resource allocation plan , in this embodiment, by comprehensively considering the energy consumption factor during resource allocation, it is possible to change the CPU allocation, memory allocation, and storage allocation while meeting the business requirements, effectively reducing the overall energy consumption of the cloud server and achieving the goal of green energy conservation.
[0145] In an embodiment of the present invention, the resource allocation plan is automatically optimized and tuned to adapt to long-term business changes and user behavior evolution; A cloud server virtual machine management method further includes the following steps:
[0146] Steps 401 to 403 are the same as steps 101 to 103 in Embodiment 1.
[0147] Step 404, feedback analysis: Obtain the historical resource allocation plan and its business operation effect feedback data , and use a deep reinforcement learning algorithm (such as the deep Q-network DQN) to analyze it to obtain the resource allocation strategy adjustment direction and amplitude information . DQN fits the Q function (state-action value function) through a deep neural network and uses techniques such as experience replay and target network to improve training stability and convergence speed. The mathematical expression of DQN is:
[0148] ;
[0149] ;
[0150] ;
[0151] Among them, is the true Q function, is the Q function fitted by the neural network, is the network parameter, is the learning rate, is the TD target, is the immediate reward, is the discount factor, is the target network parameter (copied from the current network regularly). The current network parameter is updated by minimizing the TD error, continuously improving the estimation of the Q function. In this embodiment, the resource allocation scheme is used as the action of the agent, and the business operation effect is used as the reward feedback by the environment. The optimal resource allocation strategy is learned through the DQN algorithm, and the adjustment direction and amplitude information are given according to the strategy .
[0152] Step 405, prediction model adjustment: According to Adjust the parameters of the MLP prediction model to obtain the adjusted prediction model . Substitute , and into the adjusted prediction model to predict the resource amount required by each virtual machine in the future for a period of time .
[0153] Step 406, resource allocation scheme output: Substitute into the resource allocation algorithm , and output the final resource allocation scheme . Then, update the new resource allocation scheme and the corresponding business operation effect feedback data to the set for cyclic optimization.
[0154] Compared with the way of obtaining the resource allocation scheme , in this embodiment, by introducing deep reinforcement learning to automatically optimize and tune the resource allocation scheme, the resource allocation strategy can be continuously improved according to historical feedback, enabling the system to have an adaptive ability, so as to better adapt to long-term business changes and user behavior evolutions.
[0155] In an embodiment of the present invention, for the virtual machine resource allocation of cloud servers in the big data analysis scenario, the real-time performance and efficiency of data analysis are improved; a cloud server virtual machine management method further includes the following steps:
[0156] Step 501 is the same as step 101 in Embodiment 1.
[0157] Step 502, big data task feature extraction: Obtain the detailed information of the big data analysis task , and use a custom feature extraction algorithm to process it and extract the big data task feature vector . The custom feature extraction algorithm can design targeted feature engineering methods according to factors such as task type, data scale, and computational complexity, such as statistical features, text features, graph features, etc., to extract the key features that can characterize the resource requirements of big data tasks.
[0158] Step 503 is the same as step 103 in Embodiment 1.
[0159] Step 504 is the same as step 104 in Embodiment 1.
[0160] Step 505, joint feature fusion: Combine , , and for fusion to obtain the fused feature vector . The fusion method can adopt simple feature splicing or weighted fusion and other methods, and its calculation method is:
[0161] ;
[0162] where , , , are the weight coefficients of each feature, which can be optimized by methods such as cross-validation. is the big data task feature vector, .
[0163] Step 506, prediction model adaptation: Input the fused feature vector into an MLP prediction model adapted to the big data scenario to predict the amount of resources required for each virtual machine suitable for the big data analysis task . Compared with the general scenario, the prediction model in the big data scenario is improved and adapted in terms of network structure, loss function, optimization algorithm, etc. to better fit the resource demand pattern of big data tasks.
[0164] Step 507, which is the same as step 105 in Embodiment 1, outputs the final resource allocation plan. .
[0165] By comparing to obtain the resource allocation plan In the way, in this embodiment, by extracting big data task characteristics and integrating them into resource prediction, it is possible to optimize resource allocation according to the characteristics of big data analysis scenarios, change CPU allocation, memory allocation, and storage allocation, accelerate the data analysis process, improve the real-time performance of analysis results, and meet the special requirements in big data scenarios.
[0166] In an embodiment of the present invention, for the resource allocation of cloud server virtual machines in the containerized application deployment scenario, to improve the flexibility and efficiency of resource allocation; a cloud server virtual machine management method further includes the following steps:
[0167] Step 601, which is the same as step 101 in Embodiment 1.
[0168] Step 602, container feature extraction: Obtain relevant information of the containerized application , and use a graph neural network (GNN) to process it and extract the container feature vector . Through message passing and aggregation operations, GNN can effectively learn the feature representation of graph-structured data. In this embodiment, information such as the dependency relationship and resource requirements between containers is constructed into a graph, each node represents a container, the edge represents the relationship between containers, and then GNN is used to encode the graph to obtain the feature vector of each container. The forward propagation formula of GNN is:
[0169] ;
[0170] ;
[0171] where is the feature vector of the th node in the th layer, is the feature vector of the th node in the th layer, is the feature vector of the th node in the th layer. and are the node update and message passing functions (generally implemented by a multi-layer perceptron) respectively, is the set of neighbor nodes of node , is from node to node Edge features is the feature vector of the entire graph is a graph-level pooling function (such as sum, max pooling, etc.). Through multi-layer message passing and node update, GNN can capture the complex relationships and interaction patterns between containers.
[0172] Step 603 is the same as step 103 of Embodiment 1.
[0173] Step 604 is the same as step 104 of Embodiment 1.
[0174] Step 605, dynamic resource prediction: Take , , and as inputs and input them into an MLP prediction model combined with time series prediction to predict the resource amount required for each container at different time points considering the dynamic change law of container resource requirements . Time series prediction can be achieved by introducing modules such as recurrent neural network (RNN) into the MLP to capture the temporal dependence relationship of container resource requirements.
[0175] Step 606, resource allocation optimization: According to the predicted container resource demand amounts at different time points and the dependency relationship between containers, adopt an improved resource allocation algorithm to perform resource allocation and output a resource allocation plan . The improved resource allocation algorithm needs to give priority to meeting the resource requirements of critical containers on the premise of satisfying container dependency constraints, and at the same time improve resource utilization rate and allocation efficiency as much as possible.
[0176] Compared with the way of obtaining the resource allocation plan , in this embodiment, by extracting container features and considering the dynamic characteristics and dependency relationships of containerized applications, changing CPU allocation, memory allocation, and storage allocation, it can better adapt to the containerized deployment scenario, improve the flexibility and efficiency of resource allocation, and ensure the stable and efficient operation of containerized applications.
[0177] In an embodiment of the present invention, for the resource allocation of cloud server virtual machines in a multi-tenant cloud game scenario, to improve the personalization degree and fairness of resource allocation; a cloud server virtual machine management method further includes the following steps:
[0178] Step 701 is the same as step 101 of Embodiment 1.
[0179] Step 702, tenant feature extraction: Obtain multi-tenant information , and use a deep autoencoder (DAE) Process it to extract the tenant feature vector . The DAE learns the high-level feature representation of the data by reconstructing the input data, and its encoder and decoder are generally implemented by multi-layer neural networks. The mathematical expression of the DAE is:
[0180] ;
[0181] ;
[0182] ;
[0183] where is the input data, is the encoded feature vector, is the reconstructed data, and are the encoder and decoder respectively, is the th sample, is the reconstructed data of the th sample, and are activation functions, , , , are learnable parameters, is the reconstruction loss function (such as mean square error), is the total number of samples. The parameters of the DAE are optimized by minimizing the reconstruction error so that it can learn the essential features of the tenant data.
[0184] Step 703 is the same as step 103 in Embodiment 1.
[0185] Step 704 is the same as step 104 in Embodiment 1.
[0186] Step 705, personalized resource prediction: Take , , and as the input and input it into a personalized MLP prediction model to predict the amount of resources required for the games that meet the personalized needs of each tenant . The personalized prediction model introduces technologies such as attention mechanism and user portrait on the basis of the original MLP structure, and generates personalized resource prediction results according to the characteristics and preferences of different tenants.
[0187] Step 706, resource allocation coordination: Considering that multiple tenants share the cloud server resources, a resource allocation coordination algorithm based on game theory , while ensuring the basic gaming experience of each tenant, allocate resources as fairly as possible and output a resource allocation plan . The game theory-based resource allocation algorithm seeks fair resource allocation plans such as Nash equilibrium by modeling the strategic interactions and interest conflicts among multiple tenants, while taking into account the maximization of overall benefits.
[0188] Compare to obtain the resource allocation plan . Compared with the method of obtaining the resource allocation plan, this embodiment can better meet the differentiated needs of different tenants in the multi-tenant cloud gaming scenario by extracting the personalized characteristics of multiple tenants and coordinating personalized resource prediction and allocation, improve the personalization degree and fairness of resource allocation, and enhance the user experience and service competitiveness.
[0189] In at least one embodiment of the present invention, a cloud server virtual machine management system is provided, including:
[0190] A data acquisition module, configured to acquire historical user behavior data, current business requirement data, and cloud server resource status data;
[0191] A feature extraction module, configured to extract user behavior pattern feature vectors by using a time series processing model and extract business requirement feature vectors by using a feature extraction model;
[0192] A data processing module, configured to perform standardization processing on the cloud server resource status data to obtain a resource status vector;
[0193] A prediction module, configured to input the user behavior pattern feature vector, business requirement feature vector, and resource status vector into a prediction model to predict the resource amount required by each virtual machine within a future period of time;
[0194] A resource allocation module, configured to output a resource allocation plan by using a resource allocation algorithm according to the predicted resource amount and the actually allocable resources of the current cloud server.
[0195] It further includes a risk assessment module, which is configured to acquire historical resource allocation failure case data, extract risk feature vectors by using a decision tree algorithm, and input the risk feature vectors and other feature vectors into an improved prediction model to predict a risk assessment value. When the risk assessment value is greater than a set threshold, a risk warning is issued and the resource allocation plan is adjusted.
[0196] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A cloud server virtual machine management method, characterized in that: include: Obtain historical user behavior data and use the time series processing model to extract user behavior pattern feature vectors; Obtain current business demand data and use feature extraction models to extract business demand feature vectors; Obtain cloud server resource status data and perform standardization to obtain a resource status vector; Input the user behavior pattern feature vector, business demand feature vector and resource state vector into the prediction model to predict the amount of resources required by each virtual machine in the future period of time; According to the predicted resource quantity and the actual allocatable resources of the current cloud server, the resource allocation plan is output through the resource allocation algorithm; Obtain historical resource allocation failure case data and use decision tree algorithm to extract risk feature vectors; The risk feature vector is input into the improved prediction model together with the user behavior pattern feature vector, the business demand feature vector and the resource state vector. , predict the amount of resources and risk assessment value required by each virtual machine in the future based on historical resource allocation failure case data, where , , are input features, representing user behavior pattern features, business demand features, and resource status features, respectively. is the risk characteristic; Set a risk threshold. When the risk assessment value is greater than the risk threshold, a risk warning is issued and the resource allocation plan that has not undergone risk assessment is adjusted according to the risk type.
2. A cloud server virtual machine management method according to claim 1, characterized in that: The time series processing model is a long short-term memory network model; the feature extraction model is a convolutional neural network model; the resource state vector is obtained by a standardized function The prediction model is constructed by processing the cloud server resource status data; the prediction model is constructed by taking the user behavior pattern feature vector, the business demand feature vector and the resource status vector as input and inputting them into a multi-layer perceptron prediction model. In the prediction, the amount of resources required by each virtual machine in the future is predicted, where The cloud server resource status; , , are input features, representing user behavior pattern features, business demand features, and resource status features respectively.
3. A cloud server virtual machine management method according to claim 1, characterized in that: Also includes: Obtain energy consumption data of each hardware component of the cloud server and use the energy consumption model Predict the energy consumption values under different resource allocation schemes, where n represents the energy consumption data of each hardware component of the cloud server; With the goal of satisfying business needs with resource requirements and minimizing energy consumption, an optimization function is constructed to solve the optimal resource allocation based on the energy consumption model; Substitute the optimal resource allocation amount based on the energy consumption model into the resource allocation algorithm and output the final resource allocation plan based on the energy consumption model.
4. A cloud server virtual machine management method according to claim 1, characterized in that: Also includes: Obtain historical resource allocation plans and their business operation effect feedback data, and use deep reinforcement learning algorithm analysis to obtain the adjustment direction and amplitude information of resource allocation strategy; The parameters of the improved prediction model are adjusted according to the adjustment direction and amplitude information to obtain an adjusted prediction model. ,in , , are input features, representing user behavior pattern features, business demand features, and resource status features respectively; The relevant feature vectors are input into the adjusted prediction model to predict the amount of resources based on historical data required for each virtual machine in the future period, and are substituted into the resource allocation algorithm to output the final resource allocation plan based on historical data. The resource allocation plan based on historical data and the corresponding business operation effect feedback data are then updated to the feedback data set for cyclic optimization.
5. A cloud server virtual machine management method according to claim 1, characterized in that: Also includes: Obtain detailed information about big data analysis tasks and use custom feature extraction algorithms to extract feature vectors of big data tasks; The big data task feature vector is merged with the user behavior pattern feature vector, the business demand feature vector and the resource state vector to obtain a merged feature vector; The fused feature vector is input into the adjusted prediction model adapted to the big data scenario , predict the amount of resources required by each virtual machine suitable for big data analysis tasks based on big data scenarios, and substitute them into the resource allocation algorithm to output the final resource allocation plan based on big data scenarios, where, Represents user behavior pattern characteristics.
6. A cloud server virtual machine management method according to claim 1, characterized in that: Also includes: Obtain relevant information about containerized applications and use graph neural networks to extract container feature vectors; The container feature vector, the user behavior pattern feature vector, the business demand feature vector and the resource state vector are input into the adjusted prediction model combined with time series prediction to predict the amount of resources required for each container at different time points; According to the predicted container resource requirements at different time points and the dependencies between containers, an improved heuristic algorithm is used to allocate resources and output a resource allocation plan based on containerized applications.
7. A cloud server virtual machine management method according to claim 1, characterized in that: Also includes: Obtain multi-tenant information and use deep autoencoders to extract tenant feature vectors; The tenant feature vector, user behavior pattern feature vector, business demand feature vector and resource state vector are used as input to the personalized prediction model. , predicting the amount of resources required for games that meet the personalized needs of each tenant, where , , are input features, representing user behavior pattern features, business demand features, and resource status features, respectively. is the risk characteristic; A resource allocation coordination algorithm based on game theory is adopted to fairly allocate resources while ensuring the gaming experience of each tenant, and a resource allocation plan based on game theory is output.
8. A cloud server virtual machine management system, used to execute a cloud server virtual machine management method according to any one of claims 1 to 7, characterized in that: include: Data acquisition module, used to obtain historical user behavior data, current business demand data, and cloud server resource status data; A feature extraction module is used to extract a user behavior pattern feature vector using a time series processing model, and to extract a business demand feature vector using a feature extraction model; A data processing module is used to perform standardization processing on the cloud server resource status data to obtain a resource status vector; A prediction module, used to input the user behavior pattern feature vector, the business demand feature vector and the resource state vector into the adjusted personalized prediction model to predict the amount of resources required by each virtual machine in the future; The resource allocation module is used to output a resource allocation plan using a resource allocation algorithm based on the predicted resource quantity and the actual allocatable resources of the current cloud server.
9. A cloud server virtual machine management system according to claim 8, characterized in that: It also includes a risk assessment module, which is used to obtain historical resource allocation failure case data, extract risk feature vectors using a decision tree algorithm, and input the risk feature vectors together with other feature vectors into an improved prediction model to predict a risk assessment value. When the risk assessment value is greater than a set threshold, a risk warning is issued and a resource allocation plan based on the risk assessment is adjusted.
Citation Information
Patent Citations
Internet information service system and method based on cloud computing
CN119211294A