A cloud resource prediction method based on LSTM-RBF

Through the combination of LSTM-RBF hybrid model and BP neural network, the problem of under- and over-supply in container cloud platform resource management and scheduling is solved, the accuracy and efficiency of resource prediction are improved, and more efficient resource utilization is achieved.

CN113886454BActive Publication Date: 2024-10-15ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110930841.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2024-10-15
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

Container cloud platforms have problems of under- and over-provisioning in resource management and scheduling, leading to low resource utilization, long deployment time, SLA violations, reduced QoS, and energy waste.

Method used

A cloud resource prediction method based on LSTM-RBF is adopted. By reading the resource load data of the cloud computing platform, LSTM and RBF neural networks are used for resource prediction, and the prediction results are weighted and fused through the BP neural network to dynamically schedule and allocate resources.

Benefits of technology

It improves the accuracy and efficiency of resource prediction, avoids the training time problem of a single model under large data sets, saves prediction time, and improves the accuracy of the final prediction result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886454B_ABST
    Figure CN113886454B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud resource prediction method based on LSTM-RBF, which belongs to the field of cloud resource prediction. S10, read in the resource load data of the cloud computing platform, normalize the data, and convert it into a supervised learning problem. S20, use an LSTM neural network to predict resources. S30, use an RBF neural network to predict resources. S40, use a BP neural network to perform a hybrid prediction on the prediction values ​​of LSTM and RBF. S50, output the hybrid prediction result. The present invention adopts a hybrid model based on LSTM-RBF to predict cloud computing resources, which makes up for the shortcomings of the RBF model that is not fast and accurate enough, avoids the problem of exponentially increasing training time of the LSTM model, and adopts a BP neural network to train the prediction results in the hybrid method. Different from the traditional weight search method, the method adopted by the present invention effectively improves the accuracy of the prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud resource prediction, and in particular to a cloud resource prediction method based on LSTM-RBF. Background Art

[0002] Cloud computing is a computing method. It refers to a new computing model based on the Internet and other networks, sharing IT resources through virtualization. Users do not need to understand the technical infrastructure of cloud resources at all. The core idea of ​​cloud computing is to manage and schedule computing, storage, network and other system resources through the network, to achieve the integration and optimization of resource allocation, and to meet customers' various needs such as obtaining scalable resources anytime and anywhere and minimizing costs in the form of services. Traditional cloud computing uses virtual machines as the basic unit for resource allocation and scheduling, which has problems such as low resource utilization and long deployment and restart time of software applications. In recent years, many public cloud service providers, such as Amazon and Alibaba Cloud, have used container technology to solve the problem of resource utilization, making containerized cloud computing platforms develop rapidly.

[0003] Compared with traditional cloud computing, although container cloud has advantages such as less additional resource overhead and short startup time, the development time of container cloud is relatively short, and there is still room for optimization and improvement in resource management and scheduling. At present, there are mainly problems such as undersupply and oversupply. If there is insufficient resource supply, it may lead to SLA breach, reduced QoS, and eventually even cause strong dissatisfaction among users, resulting in user loss and economic losses. When there is excessive resource supply, although user use will not be affected, it will lead to energy waste and increase maintenance costs due to excessive resources. Therefore, resource allocation and recycling are very important issues. Summary of the invention

[0004] In order to enable the container cloud platform to effectively predict future resource usage, the present invention proposes a cloud resource prediction method based on long short-term memory neural network and radial basis function neural network (LSTM-RBF), and uses back propagation (BP) neural network to train parameters to find the optimal parameter combination. The historical resource usage data is processed through the prediction model to provide the container cloud platform with a prediction value, and then the resources are scheduled and allocated dynamically, timely and accurately according to the prediction value.

[0005] The technical solution adopted by the present invention is:

[0006] A. Read the resource load data of each host in the cloud computing platform cluster, normalize the data, convert it into a supervised learning problem, and obtain a time series sample training set;

[0007] B. Use LSTM neural network to predict resources for each time series sample and train the LSTM neural network;

[0008] C. Use RBF neural network to predict resources for each time series sample and train the RBF neural network;

[0009] D. Perform weighted fusion on the final output vectors of the LSTM neural network and the RBF neural network according to the proportional parameters, and use the BP neural network to perform hybrid prediction on the weighted results;

[0010] E. Using the labels in the sample training set to train the BP neural network, obtaining the BP neural network parameters and the weighted fusion ratio;

[0011] F. Obtain the resource usage rate sequence of the host to be predicted at historical moments as the input of the trained LSTM neural network and RBF neural network. The hidden layer output results of the two networks are fused according to the weighted fusion ratio obtained in step E, and then used as the input of the trained BP neural network to predict the resource usage rate at the current moment.

[0012] Furthermore, the transformation described in step A is transformed into a supervised learning problem, specifically, labeling the normalized time series samples, where the time series is the resource utilization rate of each host at each moment, the resource utilization rate at the historical moment is used as input, and the resource utilization rate at the next moment is used as the label.

[0013] The cloud resource prediction method of the present invention produces the following good effects:

[0014] Effect 1: The present invention adopts the LSTM-RBF hybrid model to predict cloud computing resources, which can well make up for the shortcomings of the RBF single model in processing linear relationships, which is not fast and accurate enough and difficult to mine all the relationships existing in real time series data, thereby improving the accuracy of prediction.

[0015] Effect 2: The present invention adopts the LSTM-RBF hybrid model for cloud computing resource prediction, which can effectively avoid the problem that the training time of the LSTM single model increases exponentially as the size of the data set increases. The LSTM and RBF single models can be trained at the same time, and hybrid prediction can be performed after training, which effectively saves prediction time.

[0016] Effect 3: The present invention adopts a LSTM-RBF hybrid model to predict cloud computing resources. In the hybrid method, a BP neural network is used to train the prediction results of the LSTM and RBF single models in different network structures to obtain the final BP neural network structure and weight values. Different from the traditional weight search method in the past, the method adopted by the present invention effectively improves the accuracy of the final prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a step diagram of the LSTM-RBF cloud resource prediction method;

[0018] Figure 2 It is a line chart of the prediction results of the LSTM-RBF hybrid prediction model. DETAILED DESCRIPTION

[0019] The present invention is described in detail below with reference to the accompanying drawings and specific implementations, but is not intended to limit the invention.

[0020] like Figure 1 , this method is implemented by the following steps:

[0021] A reads in the resource load data of the cloud computing platform, normalizes the data, and converts it into a supervised learning problem.

[0022] In this embodiment, a public data set is obtained from the Internet. The data set is the resource usage of each host in a certain production cluster collected at intervals of 10 seconds. The preprocessing of the experimental data includes normalizing the data features and converting the data set into a supervised learning problem, so that it can predict the resource usage at the current moment by the resource usage at the previous moment. The present invention uses the MinMaxScaler preprocessing class in the scikit-learn library in Python to normalize the data set, and defines related functions to construct the data set as a supervised learning data set using a univariate or multivariate time series. The data is divided into a training set and a test set, and the ratio of the training set to the test set is 3:1.

[0023] B uses LSTM neural network for resource prediction.

[0024] The preprocessed training set is used as the input of the LSTM neural network and processed by the hidden layer to obtain the final output.

[0025] Each node of the LSTM hidden layer needs to be processed through an input gate, a forget gate, and an output gate to form a complete process. The present invention adopts the existing LSTM network structure to realize resource prediction.

[0026] Specifically, unnecessary information is removed through a forget gate consisting of a sigmoid activation function and a bitwise multiplication operation. The calculation formula is as follows:

[0027] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0028] Among them, x t represents the time series sample at time t, h t-1 Represents the previous output signal of LSTM at time t-1, W f represents the weight matrix of the forget gate, b f represents the bias term of the forget gate, σ represents the sigmoid activation function, and f t Represents the output signal of the forget gate at time t;

[0029] The necessary information is retained through a memory gate consisting of a tanh activation function and a bitwise multiplication operation. The calculation formula is as follows:

[0030] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0031]

[0032]

[0033] Among them, i t Represents the output of the memory gate, with a value range between 0 and 1, which determines which information needs to be updated. Tan h represents the tanh activation function. W i represents the weight matrix of the memory gate, W c The weight matrix representing the unit state, b i represents the bias term of the memory gate, b c represents the bias term of the cell state, Represents a new state candidate vector with a value range between -1 and 1, f t Represents the output signal of the forget gate, C t-1 represents the cell state at time t-1, C t represents the cell state at time t.

[0034] The output gate works together with the tanh activation function and the bitwise multiplication operation to pass the cell state (equivalent to the path of information transmission, allowing information to be passed on in the sequence connection) and the input signal to the output end:

[0035] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0036] h t =o t *tan h(C t )

[0037] Among them, t Indicates the filtering degree of the control unit status, the value range is between 0 and 1, W o The weight matrix representing the unit state, b o The bias term representing the cell state, h t represents the output signal of LSTM at time t, · is the dot product of vectors, and * is the multiplication of numbers.

[0038] C uses RBF neural network for resource prediction

[0039] First, we need to determine the center vector of the RBF, and then determine the mapping relationship between the input vector and the latent space. Then, the vector is mapped from low dimension to high dimension through the hidden layer, so that the linearly inseparable situation in low dimension can become linearly separable in high dimension. Finally, the output of the RBF network can be obtained:

[0040]

[0041] Among them, y j represents the jth output, ω ij represents the weight of the i-th hidden layer node for the j-th output, h represents the number of hidden layer nodes, σ represents the sigmoid activation function, and x t represents the time series sample at time t, c i represents the i-th center vector, n represents the number of nodes in the output layer, ||.|| 2 Represents the square of the distance between vectors.

[0042] D uses BP neural network to make hybrid predictions of LSTM and RBF predictions

[0043] The number of nodes in the hidden layer of the network is determined to be in the range of [2,5]. The single prediction results of LSTM and RBF are used as the input of the BP neural network for mixed prediction; multiple groups of different numbers of nodes in the middle layer of the BP neural network are set; each group of networks trains the weighted results of the single prediction results of LSTM and RBF to obtain two weights and the final mixed prediction results; each group of mixed prediction results is analyzed, and the group with the best prediction effect is selected to obtain the number of nodes in the middle layer of the BP neural network as the final BP neural network structure. In this way, a total of 4 groups of data can be obtained for the mixed prediction model prediction values ​​with the number of hidden layer nodes being 2, 3, 4, and 5 respectively.

[0044] The predicted results are compared with the true values, and their error ratios are calculated. Finally, the average error ratio of the prediction model is obtained. The experimental data are shown in Table 1.

[0045] Table 1 Average error ratio of prediction models with different numbers of hidden layer nodes

[0046]

[0047] As can be seen from Table 1, when the number of hidden layer nodes of the BP network of the hybrid prediction model is 3, there is a minimum average error ratio. At this time, the prediction model has the best prediction performance, which can make the difference between the predicted value and the true value smaller. Therefore, the number of hidden layer nodes of the LSTM-RBF hybrid prediction model is finally set to 3.

[0048] The hybrid prediction model with the determined number of hidden layer nodes was experimentally compared with the single prediction model of LSTM and RBF. The experimental results were also converted into error ratio and average error ratio to obtain the data in Table 2. As can be seen from Table 2, the predicted value predicted by the hybrid prediction model proposed in the present invention has a lower error and a more accurate result. It can be seen that the prediction effect of the LSTM-RBF hybrid prediction model proposed in the present invention is significantly better than that of the single prediction model.

[0049] Table 2 Average error ratio between single prediction model and hybrid prediction model

[0050] Prediction Model Average error ratio LSTM single prediction model 16.38% RBF single prediction model 19.36% LSTM-RBF hybrid prediction model 4.51%

[0051] E outputs the mixed prediction result

[0052] The prediction results of the hybrid prediction model are plotted as a line graph, such as Figure 2 As shown in the figure, the horizontal axis is time, the vertical axis is CPU resource utilization, the solid line represents the true value, and the dotted line represents the prediction result when the number of hidden layer nodes of the BP network is 3. It can be seen from the figure that the prediction results of the hybrid prediction model are very accurate.

[0053] The above examples are only specific embodiments of the present invention. Obviously, the present invention is not limited to the above examples, and many variations are possible. All variations that can be directly derived or associated with the contents disclosed by a person skilled in the art should be considered as the protection scope of the present invention.

Claims

1. A cloud resource prediction method based on LSTM-RBF, characterized in that: The following steps are involved: A. Read the resource load data of each host in the cloud computing platform cluster, normalize the data, convert it into a supervised learning problem, and obtain a time series sample training set; B. Use LSTM neural network to predict resources for each time series sample and train the LSTM neural network; The step B comprises: B1. Use the forget gate composed of the sigmoid activation function and the bitwise multiplication operation to remove unnecessary information in the time series. The calculation formula is as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ) Among them, x t represents the time series sample at time t, h t-1 represents the previous output signal of LSTM at time t-1, W f represents the weight matrix of the forget gate, b f represents the bias term of the forget gate, σ represents the sigmoid activation function, and f t Represents the output signal of the forget gate at time t; B2. The necessary information in the time series is retained through a memory gate composed of a tanh activation function and a bitwise multiplication operation. The calculation formula is as follows: i t =σ(W i ·[h t-1 ,x t ]+b i ) Among them, i t Represents the output of the memory gate, with a value range between 0 and 1, which determines which information needs to be updated. Tanh represents the tanh activation function. W i represents the weight matrix of the memory gate, W c The weight matrix representing the unit state, b i represents the bias term of the memory gate, b c represents the bias term of the cell state, Represents a new state candidate vector with a value range between -1 and 1, f t Represents the output signal of the forget gate, C t-1 represents the cell state at time t-1, C t represents the cell state at time t; B3, the output gate calculates the final output result: the t =σ(W o ·[h t-1 ,x t ]+b o ) h t =o t *tanh(C t ) Among them, t Indicates the filtering degree of the control unit status, the value range is between 0 and 1, W o The weight matrix representing the unit state, b o The bias term representing the cell state, h t represents the output signal of LSTM at time t, · is the dot product of vectors, and * is the multiplication of values; C. Use RBF neural network to predict resources for each time series sample and train the RBF neural network; the step C includes: C1. Determine the central vector of RBF and obtain the mapping relationship between the input time series and the latent space; C2, map the vector from low dimension to high dimension through hidden layer; C3. Calculate the final output, the formula is: Among them, y j represents the jth output, ω ij represents the weight of the i-th hidden layer node for the j-th output, h represents the number of hidden layer nodes, σ represents the sigmoid activation function, and x t represents the time series sample at time t, c i represents the i-th center vector, n represents the number of nodes in the output layer, ‖.‖ 2 Represents the square of the distance between vectors; D. Perform weighted fusion on the final output vectors of the LSTM neural network and the RBF neural network according to the proportional parameters, and use the BP neural network to perform hybrid prediction on the weighted results; the step D includes: D1, use the single prediction results of LSTM and RBF as the input of BP neural network to perform hybrid prediction; D2, set multiple groups of different numbers of nodes in the middle layer of the BP neural network; D3, each group of networks trains the weighted results of the single prediction results of LSTM and RBF to obtain two weights and the final mixed prediction results; D4, analyzing the mixed prediction results obtained in each group, selecting the group with the best prediction effect, and obtaining the number of middle layer nodes of the BP neural network as the final BP neural network structure; E. Using the labels in the sample training set to train the BP neural network, obtaining the BP neural network parameters and the weighted fusion ratio; F. Obtain the resource usage rate sequence of the host to be predicted at historical moments as the input of the trained LSTM neural network and RBF neural network. The hidden layer output results of the two networks are fused according to the weighted fusion ratio obtained in step E, and then used as the input of the trained BP neural network to predict the resource usage rate at the current moment.

2. The cloud resource prediction method based on LSTM-RBF according to claim 1, characterized in that: The conversion described in step A is a supervised learning problem, specifically labeling the normalized time series samples, where the time series is the resource utilization rate of each host at each moment, the resource utilization rate at the historical moment is used as input, and the resource utilization rate at the next moment is used as the label.