Micro-service cluster load prediction method based on hybrid prediction model

By preprocessing and parameter optimization of microservice cluster load historical data, and using a hybrid prediction model for load prediction, the response problem of Kubernetes in the face of complex traffic changes is solved, and the load balancing and responsiveness of the cluster are improved.

CN118643272APending Publication Date: 2024-09-13NANJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202410807194.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Kubernetes may not be able to achieve optimal response under complex traffic changes, resulting in longer user request response times, reduced cluster load balancing, and poor service quality.

Method used

A microservice cluster load prediction method based on a hybrid prediction model is adopted. By preprocessing the load history data of the microservice cluster, the INFO algorithm is used to optimize the VMD algorithm and the SABO algorithm to optimize the BiLSTM neural network, perform load prediction, and sense traffic changes in advance and perform Scaling operation.

Benefits of technology

It improves the responsiveness and load balancing of the cluster, significantly improves the ability to proactively respond to burst traffic, and improves the prediction accuracy compared to mainstream algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643272A
    Figure CN118643272A
Patent Text Reader

Abstract

The invention discloses a micro-service cluster load prediction method based on a hybrid prediction model, and the method comprises the steps: carrying out the data preprocessing of a load historical data sequence of a micro-service cluster, obtaining the processed load data, carrying out the optimization of the number K of IMF components and a penalty factor alpha of a VMD decomposition algorithm through employing an INFO algorithm, and obtaining an optimal parameter combination, inputting the preprocessed load data sequence into a VMD algorithm to obtain K components; and then, optimizing three parameters of the hidden layer node number, the initial learning rate and the L2 regularization coefficient of the BiLSTM by using an SABO algorithm, finally, inputting the K IMF components into the BiLSTM network, and accumulating the obtained K outputs to obtain a final prediction result. Through verification, the prediction precision of the method provided by the invention is improved to a certain extent compared with the prediction precision of a mainstream algorithm, and the method plays a significant role in mastering the operation rule of a micro-service cluster and improving the active response capability to burst traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a microservice cluster load prediction method based on a hybrid prediction model, and belongs to the technical field of time series prediction. Background Art

[0002] Microservice architecture has the advantages of independent deployment, easy maintenance, and easy expansion. As the scale of applications continues to expand, the use of microservice architecture has become more and more widespread. Therefore, how to better grasp the operating characteristics and laws of microservice clusters has become a key issue. Kubernetes is now the mainstream microservice architecture platform, with powerful functions such as elastic scaling, self-healing, load balancing, service discovery, storage orchestration, etc., which greatly liberates the productivity of operation and maintenance personnel and allows developers to focus on the realization of business functions. However, the scaling and scheduling functions provided by Kubernetes may not be able to achieve the best response in situations with complex traffic changes, which will lead to longer user request response time and lower cluster load balancing, thus affecting the service quality of the cluster.

[0003] To address this problem, using time series prediction technology to predict cluster load can help us perceive traffic changes in advance and proactively perform scaling operations during traffic peaks, thereby improving the cluster's responsiveness and load balancing. Summary of the invention

[0004] In view of the above problems, the present invention provides a microservice cluster load prediction method based on a hybrid prediction model.

[0005] Technical Solution

[0006] A microservice cluster load prediction method based on a hybrid prediction model includes the following steps:

[0007] S1. Preprocess the load history data sequence of the microservice cluster to obtain processed load data;

[0008] S2. Use the INFO algorithm to optimize the two key parameters of the VMD algorithm, the number of IMF components K and the penalty factor α, determine the optimal parameters [K, α], and obtain the optimized VMD algorithm;

[0009] S3, inputting the load data processed in step S1 into the optimized VMD algorithm, and obtaining K IMF components through decomposition;

[0010] S4. Use SABO algorithm to optimize the three parameters of BiLSTM: the number of hidden layer nodes, initial learning rate and L2 regularization coefficient, and obtain the optimized BiLSTM neural network;

[0011] S5. Input the K IMF components obtained in step S3 into the optimized BiLSTM neural network. After training, output K groups of prediction values. The K groups of prediction values ​​are superimposed to obtain the final prediction result.

[0012] Further, in step S1, the preprocessing includes processing missing values, outliers, erroneous data cleaning and data conversion;

[0013] The load history data sequence is not necessarily arranged strictly in timestamp order, and needs to be adjusted in order; when processing missing values, the average value of the load values ​​at the upper and lower moments is used to fill in; the reasonable value range of load data is [0,1], and outliers are removed and filled in with the average value.

[0014] Furthermore, in step S2, when optimizing the number of IMF components K and the penalty factor α of the VMD algorithm, the minimum envelope entropy is used as the fitness function to evaluate the rationality of the selection of [K, α].

[0015] The weighted mean of vectors algorithm (INFO) used in step S2 is a new meta-heuristic optimization algorithm that uses three core steps to update the position of the vector: update rules, vector merging, and local search. According to research, in 48 mathematical test functions and 5 engineering test cases, the performance of the INFO algorithm is better than that of optimization algorithms such as GWO, PSO, GSA, and SCA; in engineering problems, the algorithm can converge to 0.99% of the global optimal solution.

[0016] Furthermore, in step S3, the VMD decomposition algorithm is used to decompose the load sequence, which can effectively remove the noise components in the original sequence and obtain a cleaner load sequence. At the same time, the characteristic information of the load sequence can be extracted by analyzing the frequency and amplitude characteristics of each IMF component. VMD adopts a non-recursive solution, and can also independently set the number of IMFs K and adaptively update the optimal center frequency and bandwidth of each IMF.

[0017] In principle, VMD actually transforms the decomposition process into an optimization process, which can be regarded as the construction and solution of the variational problem.

[0018] The variational problem is formulated as follows:

[0019]

[0020] In the formula, {u k}={u1,...,u k} represents the K sub-modes obtained by decomposition; {ω k}={ω1,...,ω k} represents the center frequency of each component; δ(t) is the Dirac function; * is the convolution symbol.

[0021] The solution to the variational problem is as follows:

[0022]

[0023] Where α is the quadratic penalty factor and λ(t) is the Lagrange multiplication operator, which transforms the constrained variational problem into an unconstrained variational problem.

[0024] Furthermore, in step S4, the SABO algorithm (Subtraction-Average-Based Optimizer) is an intelligent optimization algorithm based on mathematical behavior, which has the characteristics of strong optimization ability and fast convergence speed.

[0025] When using the SABO algorithm, first randomly initialize the population in the optimization space:

[0026] X i,j =lb j +rand(ub j -*lb j )

[0027] In the formula, X i,j is the generated individual, ub j and lb j are the upper and lower boundaries of the population range, respectively, and rand is a random number between 0 and 1;

[0028] Define a special operation -v, called v-subtraction which subtracts search agent B from search agent A as follows:

[0029]

[0030] Where v is a vector from the set {1,2}, F(A) and F(B) are the fitness values ​​of the corresponding individual A;

[0031] Then update the search agent X as follows:

[0032]

[0033] In the formula, is the new position of the ith search agent X, N is the total number of individuals, is a vector of dimension m, where the values ​​of each component are normally distributed in the interval [0,1];

[0034] If the new position has an improved fitness value, then the new position is accepted, otherwise it remains unchanged.

[0035] Furthermore, in step S5, the K IMF components obtained in step S3 are input into the BiLSTM neural network optimized by the SABO algorithm, K groups of prediction values ​​are output, and the K groups of prediction values ​​are accumulated to obtain the final prediction result.

[0036] The basis of BiLSTM neural network is LSTM neural network. LSTM is decoupled from RNN operation process. Each gate has an independent set of (U, W, b), which can well control the inflow and outflow of information. BiLSTM consists of two independent LSTMs, which are responsible for processing the input sequence from two directions (forward and reverse), and has better performance when processing long sequences and long-term dependencies.

[0037] Beneficial effects of the present invention:

[0038] The present invention provides a microservice cluster load prediction method based on a hybrid prediction model. First, the load history data sequence of the microservice cluster is preprocessed, including processing missing values, outliers, wrong data cleaning and data conversion, mainly removing the data that does not match the timestamp order in the original sequence, and filling it with the average value of the data at the upper and lower moments; then the INFO algorithm is used to optimize the two key parameter component number K and penalty factor α of the VMD decomposition algorithm to obtain the best parameter combination; then the load data sequence after data preprocessing is input into the VMD decomposition algorithm to obtain K components, and the noise component in the original sequence can be effectively removed by VMD decomposition to obtain a cleaner load sequence, and the characteristic information of the load sequence can also be extracted by analyzing the frequency and amplitude characteristics of each IMF component; then the SABO algorithm is used to optimize the three parameters of the number of hidden layer nodes, the initial learning rate and the L2 regularization coefficient of BiLSTM to improve the prediction accuracy of the BiLSTM neural network; finally, the K IMF components are input into the BiLSTM network, and the obtained K outputs are accumulated to obtain the final prediction result. By using Alibaba's open source cluster-trace-v2018 data set for verification, the prediction accuracy of the algorithm proposed in the present invention is improved to a certain extent compared with the prediction accuracy of the mainstream algorithm, which plays a more significant role in understanding the operation rules of the microservice cluster and improving the ability to actively respond to sudden traffic. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of a microservice cluster load prediction method based on a hybrid prediction model of Example 1;

[0040] Figure 2 is the original load data sequence used in Example 1;

[0041] Figure 3 The fitness curve diagram of the VMD optimized by the INFO algorithm in Example 1;

[0042] Figure 4 The result obtained after the pre-processed load data in Example 1 is decomposed by INFO-VMD;

[0043] Figure 5 This is a schematic diagram of the BiLSTM neural network structure used in Example 1;

[0044] Figure 6 The fitness curve diagram of SABO optimizing BiLSTM in Example 1;

[0045] Figure 7 This is the test set prediction result diagram in Example 1. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0047] Example 1

[0048] like Figure 1 , a microservice cluster load prediction method based on a hybrid prediction model, comprising the following steps:

[0049] S1. Preprocess the load sequence of the microservice cluster to obtain processed load data;

[0050] The preprocessing includes processing missing values, outliers, wrong data cleaning and data conversion. The sequences obtained when collecting historical data of the microservice cluster need to be arranged in timestamp order, the sampling intervals must be roughly consistent, and the points with large deviations need to be removed and filled with the average of the upper and lower moments or nearby moments.

[0051] In the overall model of this embodiment, the data source data is the Alibaba cluster-trace-v2018 public data set, and the original load data is as follows Figure 2 As shown, after step S1, there are 3212 data in total, which are divided into training set and test set in a ratio of 7:3. The training set and test set are re-divided during comparison.

[0052] S2. Use the INFO algorithm to optimize the two key parameters of the VMD algorithm, the number of IMF components K and the penalty factor α, to obtain the optimal parameter combination [K, α];

[0053] When optimizing the number of IMF components K and penalty factor α of the VMD algorithm, the minimum envelope entropy is used as the fitness function to evaluate the rationality of the selection of [K, α];

[0054] The fitness curve of INFO optimized VMD obtained in this embodiment is as follows: Figure 3 shown.

[0055] S3, input the cleaned load sequence into the optimized VMD algorithm, and obtain K IMF components through decomposition;

[0056] When the processed load data is decomposed using the parameter-optimized VMD, VMD uses a non-recursive solution, which effectively overcomes modal aliasing. In addition, the number of IMFs K can be set independently, and the optimal center frequency and bandwidth of each IMF can be adaptively updated. In principle, VMD actually transforms the decomposition process into an optimization process, which can be regarded as the construction and solution of the variational problem.

[0057] The variational problem is formulated as follows:

[0058]

[0059] In the formula, {u k}={u1,...,u k} represents the K sub-modes obtained by decomposition; {ω k}={ω1,...,ω k} represents the center frequency of each component.

[0060] The solution to the variational problem is as follows:

[0061]

[0062] Where α is the quadratic penalty factor, λ(t) is the Lagrange multiplication operator, δ(t) is the Dirac function, and * is the convolution symbol. The constrained variational problem is transformed into an unconstrained variational problem.

[0063] In this embodiment, the two parameter values ​​of VMD optimized by the INFO algorithm are K=3, α=124, Figure 4 It is the result obtained after the preprocessed load data is decomposed by INFO-VMD.

[0064] S4. Use SABO algorithm to optimize the three parameters of BiLSTM: the number of hidden layer nodes, initial learning rate and L2 regularization coefficient, and obtain the optimized BiLSTM neural network;

[0065] The SABO algorithm is an intelligent optimization algorithm based on mathematical behavior. It has the characteristics of strong optimization ability and fast convergence speed. When using the SABO algorithm, first randomly initialize the population in the optimization space:

[0066] X i,j =lbj +rand(ub j -*lb j )

[0067] Where, X i,j is the generated individual, ub j and lb j are the upper and lower boundaries of the population range, respectively, and rand is a random number between 0 and 1;

[0068] Define a special operation -v, called v-subtraction which subtracts search agent B from search agent A as follows:

[0069]

[0070] Where v is a vector from the set {1,2}, F(A) and F(B) are the fitness values ​​of the corresponding individual A;

[0071] Then update the search agent X as follows:

[0072]

[0073] In the formula, is the new position of the ith search agent X, N is the total number of individuals, is a vector of dimension m, where the values ​​of each component are normally distributed in the interval [0,1];

[0074] If the new position has an improved fitness value, then the new position is accepted, otherwise it remains unchanged.

[0075] Figure 5 This is a schematic diagram of the BiLSTM neural network structure used in this embodiment. Figure 6 The fitness curve of BiLSTM optimized for SABO, in this embodiment, the optimal number of hidden layer nodes is 60, the optimal initial learning rate is 0.01, and the optimal L2 regularization coefficient is 1e-06.

[0076] S5. Input K IMF components into the optimized BiLSTM neural network. After training, output K groups of prediction values. The K groups of prediction values ​​are superimposed to obtain the final prediction result.

[0077] Figure 7 1 is a graph showing the prediction results of the test set in Example 1. Table 1 shows the comparison results of the hybrid prediction model of Example 1 with other algorithms in terms of MAE, RMSE, and MAPE:

[0078] Table 1

[0079]

[0080] It can be seen that compared with the current mainstream prediction algorithms ARIMA and LSTM, the prediction method of the present invention has higher prediction accuracy.

[0081] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.

Claims

1. A microservice cluster load prediction method based on a hybrid prediction model, characterized in that: The following steps are involved: S1. Preprocess the load history data sequence of the microservice cluster to obtain processed load data; S2. Use the INFO algorithm to optimize the two key parameters of the VMD algorithm, the number of IMF components K and the penalty factor α, determine the optimal parameters [K, α], and obtain the optimized VMD algorithm; S3, inputting the load data processed in step S1 into the optimized VMD algorithm, and obtaining K IMF components through decomposition; S4. Use SABO algorithm to optimize the three parameters of BiLSTM: the number of hidden layer nodes, initial learning rate and L2 regularization coefficient, and obtain the optimized BiLSTM neural network; S5. Input the K IMF components obtained in step S3 into the optimized BiLSTM neural network. After training, output K groups of prediction values. The K groups of prediction values ​​are superimposed to obtain the final prediction result.

2. The microservice cluster load prediction method based on the hybrid prediction model as claimed in claim 1, characterized in that: In step S1, the preprocessing includes processing missing values, outliers, erroneous data cleaning and data conversion; The load history data sequence is not necessarily arranged strictly in timestamp order, and needs to be adjusted in order; when processing missing values, the average value of the load values ​​at the upper and lower moments is used to fill in; the reasonable value range of load data is [0,1], and outliers are removed and filled in with the average value.

3. The microservice cluster load prediction method based on the hybrid prediction model as claimed in claim 1, characterized in that: In step S2, when optimizing the number of IMF components K and the penalty factor α of the VMD algorithm, the minimum envelope entropy is used as the fitness function to evaluate the rationality of the selection of [K, α].

4. The microservice cluster load prediction method based on the hybrid prediction model as claimed in claim 1, characterized in that: In step S3, VMD uses a non-recursive solution during decomposition, and can also set the number of IMFs K to adaptively update the optimal center frequency and bandwidth of each IMF; by analyzing the frequency and amplitude characteristics of each IMF component, the characteristic information of the load data sequence is extracted.

5. The microservice cluster load prediction method based on the hybrid prediction model as claimed in claim 1, characterized in that: In step S4, when using the SABO algorithm, first randomly initialize the population in the optimization space: X i,j =lb j +rand(ub j -*lb j ) In the formula, X i,j is the generated individual, ub j and lb j are the upper and lower boundaries of the population range, respectively, and rand is a random number between 0 and 1; Define a special operation -v, called v-subtraction which subtracts search agent B from search agent A as follows: Where v is a vector from the set {1,2}, F(A) and F(B) are the fitness values ​​of the corresponding individual A; Then update the search agent X as follows: In the formula, is the new position of the ith search agent X, N is the total number of individuals, is a vector of dimension m, where the values ​​of each component are normally distributed in the interval [0,1]; If the new position has an improved fitness value, then the new position is accepted, otherwise it remains unchanged.

Citation Information

Patent Citations

  • Bearing residual life prediction method based on INFO

    CN115659793A

  • Cloud server load prediction method based on signal decomposition and hybrid model

    CN117389824A

  • Heavy overload transformer oil temperature prediction method and system

    CN117688322A

  • Load data prediction method of IT equipment and computer equipment

    CN118051737A

  • Battery pole piece rolling device and running state prediction system

    CN118099347A

Cited By

  • CETDC submodule IGBT open-circuit fault-oriented online diagnosis method and system

    CN122085077A