Container elasticity expansion method based on online learning

By adopting an online learning-based container elastic scaling method in the container cloud environment, using ETG model and multi-step fusion prediction algorithm, the response latency and accuracy problems of resource management and load prediction in the container cloud environment are solved, and more efficient resource management and rapid response are achieved.

CN119883502APending Publication Date: 2025-04-25SHENYANG INST OF AUTOMATION - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411907422.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art has problems of response delay, resource jitter and low prediction accuracy in resource management and load prediction in container cloud environments, especially in dynamic load environments, which are difficult to adapt to load changes in real time.

Method used

Using the container elastic scaling method based on online learning, the historical load data is trend-decomposed and smoothed by constructing an ETG model (data smoothing GRU model based on trend decomposition) and a multi-step fusion prediction algorithm, the model parameters are updated in real time, and the fusion prediction value is calculated through weighted average to optimize resource configuration.

Benefits of technology

It improves the accuracy and response speed of load prediction, enhances the system's adaptability and resource management efficiency, can better adapt to rapidly changing workloads, reduce resource waste and service quality decline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883502A_ABST
    Figure CN119883502A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of resource management and load prediction, and particularly relates to a container elastic expansion method based on online learning, which comprises the following steps: 1) constructing an ETG model, dividing historical load data into a plurality of input sequences, and extracting detrended data and a corresponding trend equation; the detrending data and the processed original data are spliced, training and prediction are carried out, and a final load prediction array is output; 2) integrating the ETG model into an online learning framework, and updating model parameters in real time; and 3) introducing a multi-step fusion prediction algorithm, carrying out weighted summation on prediction results from different time steps, generating a fusion prediction value, and optimizing resource configuration by taking the fusion prediction value as a basis for resource adjustment. According to the method, the ETG model and the multi-step fusion prediction algorithm are fused into an online learning framework, the online learning enables the system to quickly adapt to the change of data distribution by updating model parameters in real time, and the response capability to load change is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of resource management and load prediction, and specifically is a container elastic expansion method based on online learning. Background Art

[0002] In the context of the development of container cloud technology, traditional resource management and load prediction methods have shown obvious limitations. Existing resource management usually relies on static rules and periodic monitoring. This passive adjustment method responds slowly in a dynamic load environment and is difficult to adapt to load changes in a timely manner, which easily leads to resource waste and reduced service quality.

[0003] In addition, many existing load forecasting methods are based on traditional statistical models (such as the autoregressive integrated moving average model ARIMA), which often assume that the data is stationary. However, in practical applications, load data exhibits significant dynamic and nonlinear characteristics, resulting in low forecasting accuracy. Although deep learning models (such as LSTM and RNN) have made progress in capturing complex time series trends, they have long training times, high data volume requirements, and are prone to error accumulation when processing multi-step forecasts.

[0004] Finally, existing technologies often lack real-time adaptability and cannot update models based on real-time data, resulting in untimely scheduling of container resources when load changes suddenly. This deficiency is particularly evident in the increasingly dynamic cloud environment, and an innovative solution is urgently needed to improve resource management efficiency and responsiveness to meet the ever-changing workload requirements. Summary of the invention

[0005] The purpose of the present invention is to provide a container cloud elastic scaling method based on online learning to overcome the response delay and resource jitter problems caused by the traditional passive resource adjustment method of periodic monitoring, thereby improving the service quality and system responsiveness.

[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: a container elastic expansion method based on online learning, comprising the following steps:

[0007] 1) Build an ETG model, divide the historical load data into multiple input sequences, extract the detrended data and the corresponding trend equation; concatenate the detrended data with the processed original data, perform training and prediction, and output the final load prediction array;

[0008] 2) Integrate the ETG model into the online learning framework by updating the model parameters in real time;

[0009] 3) Introduce a multi-step fusion prediction algorithm to perform weighted summation on the prediction results from different time steps to generate a fused prediction value. The fused prediction value is used as the basis for resource adjustment, thereby optimizing resource allocation and improving system response speed.

[0010] The ETG model is a data smoothing GRU model based on trend decomposition, which is used for elastic scaling of container clouds and realizes prediction through an architecture combining exponential moving smoothing, trend decomposition and GRU.

[0011] The step 1) comprises the following steps:

[0012] 1-1) The trend decomposition module divides the input historical load data into a trend part and a detrended part by the trend decomposition method, and smoothes the historical load data by the exponential moving average method;

[0013] 1-2) Combined with the prediction module of the GRU model, it receives the data after detrending and EMA smoothing, captures the pattern in the time series, predicts future trend changes by extrapolating the trend, and obtains the predicted trend part;

[0014] 1-3) Add the predicted trend part to the detrended prediction output by GRU to generate the final predicted load prediction array.

[0015] The step 1-1) is specifically:

[0016] 1-1-1) Input sequence X t ={x t-S+1 ,x t-S+2 ,…,x t-1 ,x t}, and obtain the corresponding time step index P = {1, 2, ..., S-1, S}; x t-S+1 is the workload or resource utilization value at that moment, or other resource indicators, and S is the length of the input sequence;

[0017] 1-1-2) The slope k and intercept b are calculated by the least squares method, namely:

[0018]

[0019] Then the fitting curve x=kt+b is obtained;

[0020] 1-1-3) Index the time step S i Enter the equation to get the trend component R of the input data t = {r t-S+1 ,r t-S+2 ,…,r t-1 ,r t}; Original data X tSubtract the trend component R t Get the detrended component D t ={d t-S+1 ,d t-S+2 ,…,d t-1 ,d t}; where d t-s+i =x t-S+i -r t-s+i ;

[0021] 1-1-4) Calculate the smoothed value of the exponential moving average of the input sequence at the current moment, that is:

[0022] e t =αx t +(1-α)e t-1

[0023] Among them, e t is the smoothed value at the current moment, x t is the current actual value, e t-1 is the smoothing value of the previous moment, α is the weight coefficient;

[0024] 1-1-5) According to the above steps, the entire array is obtained, namely:

[0025] E t ={e t-S+1 ,e t-S+2 ,…,e t-1 ,e t}.

[0026] The steps 1-2) are specifically:

[0027] The detrended component D t and the result of exponential moving average E t The stack is transferred to the GRU model, and then the predicted detrended output is obtained through the feedforward neural network:

[0028] G t = {g t+1 ,g t+2 ,…,g t+H-1 ,g t+H};

[0029] The time index Q={S+1, S+2,…, S+H-1, S+H} of the prediction array is sent to the fitting equation, and the trend component of the prediction array is obtained as follows:

[0030] T t ={h t+1 ,h t+2 ,…,h t+H-1 ,h t+H}

[0031] Among them, h t+i =kQ i +b.

[0032] The steps 1-3) are specifically:

[0033] The detrended output G t and trend output H t Add together to get the final load prediction array F t ={f t+1 ,f t+2 ,…,f t+H-1 ,f t+H}; where f t+i =g t+i +h t+i .

[0034] The step 2) is specifically:

[0035] 2-1) At time t, the actual array of resource usage X t Record the resource utilization value from t-S+1 to this moment, that is:

[0036] X t ={x t-S+1 ,…,x t-1 ,x t}

[0037] Among them, x t Represents the resource utilization value at time t, the historical array X t It records the resource usage value from the current moment to the moment S, that is, the actual array length is S;

[0038] 2-2) Through the prediction function of the previous moment, i.e., time t Based on the real array X t , get the prediction array Right now:

[0039]

[0040] in, Indicates the resource utilization value at time t+1 predicted based on the current time. The prediction array records the resource utilization value from the next predicted time to the backward predicted time H, that is, the length of the prediction array is H; action u t It is an array that records the actions from the current time to the previous time, indicating the scaling changes made by the system based on the predicted value;

[0041] 2-3) In order to learn the parameters θ of the prediction model t , construct the loss function by comparing the predicted value and the true value Represents the parameter change obtained by loss calculation, and finally according to the parameters and The weighted summation gives the parameters at time t:

[0042]

[0043] Among them, the optimization goal of online learning is to make the predicted value closer to the true value, and the loss function Represents the target direction of online learning, γ t-1 is the corresponding array of real values, which is part of the next input array, namely γ t-1 =X t [t-H+1:t], the loss function is:

[0044]

[0045] The step 3) comprises the following steps:

[0046] 3-1) Record the predicted values ​​of the previous H moments

[0047] 3-2) At time t, the fusion prediction value is the weighted average of the predicted values ​​for t+m in the previous H moments, that is:

[0048]

[0049] Among them, β is the weight coefficient, and β is greater than 1 / n;

[0050] 3-3) At time t, the fusion prediction value of a future period based on weighted average Calculate the weighted average value during this period as a comprehensive indicator of resource utilization Right now:

[0051]

[0052] Among them, ω is the weight coefficient;

[0053] 3-4) Comprehensive indicators based on resource utilization Calculate resource usage to determine whether the cluster should be scaled up or down;

[0054] 3-5) Calculate the number of Pod replicas h and predict the length of the array, that is, the number of values ​​in the predicted array.

[0055] The steps 3-4) are specifically:

[0056] a. Based on the scaling threshold method, the resource usage rate is calculated to determine whether the cluster should be scaled. The specific method is as follows:

[0057]

[0058] b. Determine whether to perform a scaling action at this moment based on the redundant scaling threshold algorithm.

[0059] The steps 3-5) are specifically:

[0060] Calculate the number of Pod replicas h:

[0061]

[0062] When the number of Pod replicas h exceeds the upper limit of the number of application Pod replicas, it is the upper limit;

[0063] If the number of Pod replicas h is less than the lower limit of the number of application Pod replicas, it is the lower limit; in other cases, scaling is performed relative to the number of Pod replicas h at the previous moment.

[0064] The present invention has the following beneficial effects and advantages:

[0065] 1. The present invention improves prediction accuracy: The ETG model effectively enhances the ability to capture and analyze complex time series data features by combining trend decomposition, exponential moving average (EMA) and gated recurrent unit (GRU), and can handle periodicity, trend and irregular fluctuations in load data, thereby providing more accurate short-term prediction results.

[0066] 2. The present invention meets the needs of long-term resource planning: In view of the limitations of single-step prediction in traditional horizontal autoscaling (HPA) methods, the multi-step fusion prediction algorithm proposed in the present invention records the prediction values ​​of the previous few moments, uses the weighted average method to calculate the fusion prediction value, and further generates a comprehensive resource utilization index for a period of time in the future. This method not only provides resource demand prediction for a longer time span, but also improves the reliability and adaptability of the prediction through weight adjustment, providing more comprehensive and reliable information support for elastic scaling decisions.

[0067] 3. The present invention adapts to rapidly changing workloads: The present invention integrates the ETG model and the multi-step fusion prediction algorithm into the online learning framework to achieve real-time parameter updates. Whenever new data is received, the model can be quickly fine-tuned to ensure that the system maintains efficient performance and accuracy in a dynamic environment.

[0068] 4. The present invention enhances the adaptability of the system: the online learning mechanism significantly enhances the adaptability of the prediction model to the dynamic environment, enabling the system to respond quickly to load changes and improve the flexibility and efficiency of resource management. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 Framework diagram of the container cloud elastic scaling system of the present invention;

[0070] Figure 2 Schematic diagram of the online learning framework of the present invention;

[0071] Figure 3 Schematic diagram of the data smoothing GRU model based on trend decomposition of the present invention;

[0072] Figure 4 Schematic diagram of the multi-step fusion prediction algorithm of the present invention. DETAILED DESCRIPTION

[0073] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0074] The overall process of the present invention is as follows Figure 1 As shown in the figure, the ETG model divides historical data into multiple input sequences and feeds them into the model. Inside the model, the data is trend-decomposed to obtain detrended data and the corresponding trend equation. The detrended data and the original data after exponential smoothing are concatenated and fed into a deep neural network composed of components such as GRU. The trend data of the prediction array is obtained through the trend equation. Finally, the detrended prediction data and the trend data output by the deep neural network are added to obtain the final prediction array. The ETG model is integrated into the online learning framework. In actual situations, there is a certain time interval between each resource adjustment. The last few values ​​of the new input data are the true values ​​corresponding to the prediction values ​​at the previous moment. The length of the prediction array is the above time interval. After that, the loss function can be constructed, and the back propagation continuously updates the parameters to adapt to the dynamic changes of the load in real time. The multi-step fusion prediction algorithm is explained below. After obtaining the prediction arrays of different input sequences, the values ​​of each prediction array at the same time point are weighted and summed to obtain the fused prediction value of each time step. These fused prediction values ​​are weighted and summed again to obtain the final comprehensive index. The resources at the current moment are adjusted according to this comprehensive index.

[0075] like Figure 2 As shown, the model of the present invention is called the data smoothing GRU model (ETG) based on trend decomposition. The model is used for elastic scaling of container clouds, and efficient prediction is achieved through an architecture that combines exponential moving smoothing, trend decomposition and GRU. First, the trend decomposition module divides the input data into a trend part and a detrended part, and applies an exponential moving average (EMA) to smooth the data. Then, the prediction module combined with GRU receives the detrended and EMA data to capture the patterns in the time series. Finally, the predicted trend part is obtained by extrapolating the trend to predict future trend changes, and then added to the detrended prediction output by GRU to generate the final prediction result. This model aims to improve the accuracy of resource demand prediction, thereby optimizing resource allocation and utilization efficiency in cloud environments. The model is introduced in detail below:

[0076] Input sequence X t ={x t-S+1 ,x t-S+2 ,…,x t-1 ,x t}, and obtain the corresponding time step index P = {1, 2, ..., S-1, S}, and then calculate the slope k and intercept b by the least squares method.

[0077]

[0078] Get the fitting curve x = kt + b, then index the time step S i Enter the equation to get the trend component R of the input data t = {r t-S+1 ,r t-S+2 ,…,r t-1 ,r t}, then the original data X t Subtract the trend component R t Get the detrended component D t ={d t-S+1 ,d t-S+2 ,…,d t-1 ,d t};

[0079] d t-S+i =x t-S+i -r t-S+i

[0080] The calculation process of the exponential moving average of the input sequence is as follows,

[0081] e t =αx t +(1-α)e t-1

[0082] e t is the smoothed value at the current moment, which is determined by the current actual value x t and the smoothed value e at the previous moment t-1 The α obtained by weighted combination is the weight coefficient, which determines the influence of new data and old smoothed values. A larger α will make the new data have a greater impact on the smoothed value. EMA gives higher weights to the most recent data points to better reflect the latest trends or changes. Finally, the entire array E is obtained. t ={e t-S+1 ,e t-S+2 ,…,e t-1 ,e t}.

[0083] Then the detrended component d t and the result of exponential moving average E tThe stack is fed into the GRU model and then passes through the feedforward neural network to obtain the predicted detrended output G t = {g t+1 ,g t+2 ,…,g t+H-1 ,g t+H}; Send the time index Q = {S+1, S+2, ..., S+H-1, S+h} of the forecast array into the fitting equation to obtain the trend component of the forecast array:

[0084] T t ={h t+1 ,h t+2 ,…,h t+H-1 ,h t+H}

[0085] h t+i =kQ i +b

[0086] Finally, the detrended output G t and trend output H t Add together to get the final prediction array F t ={f t+1 ,f t+2 ,…,f t+H-1 ,f t+H}

[0087] f t+i =g t+i +h t+i

[0088] In summary, the prediction model achieves efficient prediction of dynamic workloads by combining the advantages of trend decomposition, exponential moving average (EMA), and gated recurrent unit (GRU). The trend decomposition module effectively splits and identifies the trend part in the data, EMA enhances the model's ability to capture long-term trends, and GRU captures complex patterns in time series by processing detrended data. Finally, by integrating the extrapolated trend and prediction results, the model can accurately predict future resource requirements. Such prediction capabilities are crucial for optimizing resource scheduling and cost control in container cloud environments, and can ensure the stability and efficiency of the system. The application of this model will help improve the elastic scaling performance of cloud computing and meet the ever-changing user needs.

[0089] like Figure 3As shown in the figure, online learning is one of the commonly used methods in control theory. It constructs optimization objectives and constraints for time-varying systems to achieve continuous control optimization. In terms of resource scheduling in container clouds, for user requests for service applications, which is a time-varying process, resource usage requirements are predicted by building a prediction model, and the prediction model parameters are updated and learned in real time using an online learning strategy. The optimization goal is to make the predicted value closer to the actual resource usage value at the next moment.

[0090] At time t, the actual array of resource usage X t Record the resource utilization value from t-S+1 to this moment, that is,

[0091] X t ={x t-S+1 ,…,x t-1 ,x t}

[0092] where x t Represents the resource utilization value at time t, the historical array X t It records the resource usage value from the current moment to the moment S, that is, the actual array length is S. Through the prediction function of the previous moment, that is, the moment t Based on the real array X t , get the prediction array

[0093]

[0094] in Indicates the resource utilization value at time t+1 predicted based on the current time. The prediction array records the resource utilization value from the next predicted time to the backward predicted time H, that is, the length of the prediction array is H. Action u t It is an array that records the actions from the current time to the previous time, indicating the scaling changes made by the system based on the predicted value.

[0095] In order to learn the parameters θ of the prediction model t , construct the loss function by comparing the predicted value and the true value It represents the parameter change obtained by loss calculation. The final parameter at time t is the sum of the parameters at time t-1 and Obtained by weighted summation.

[0096]

[0097] The optimization goal of online learning is to make the predicted value closer to the true value, and the loss function Represents the target direction of online learning, γ t-1 is the corresponding array of real values, which is part of the next input array, namely γt-1 =X t [t-H+1:t], the loss function of this article is:

[0098]

[0099] It indicates the distance between the resource usage predicted by the prediction function and the actual value. The smaller the distance, the more accurate the prediction function is.

[0100] In summary, the online learning framework provides an effective method for optimizing resource scheduling in container cloud environments by updating model parameters in real time in a time-varying system. By building a prediction model based on the time-varying characteristics of service application requests, it can make more accurate predictions of resource usage requirements in a dynamic environment. The online learning strategy allows the prediction model parameters to be adjusted according to new data at each moment, aiming to make the prediction value closer to the actual resource utilization. This process not only improves the accuracy of the prediction, but also enhances the flexibility and adaptability of resource management.

[0101] like Figure 4 As shown in the figure, in general, after obtaining the predicted resource utilization value through the prediction model, according to the HPA threshold processing, it can only be judged whether there will be insufficient resource utilization or oversaturation of resources at the current moment and the next moment. There is not much analysis on the situation in the future, especially when the scaling jitter is caused by inaccurate prediction or drastic changes in indicators, the cluster will still have frequent additions and subtractions of Pods. Therefore, we propose a multi-step fusion prediction algorithm (MFP) here, which determines whether to perform scaling actions at the current moment based on the resource utilization value in the future. The specific algorithm process is as follows Figure 4 As shown, the specific process is:

[0102] S1: Record the predicted values ​​of the previous H moments

[0103] S2: At time t, the fusion prediction value is the weighted average of the predicted values ​​for t+m in the previous H moments, that is,

[0104]

[0105] Among them, β is the weight coefficient. The larger the value, the larger the proportion of the predicted value of the prediction model closer to t+m. Therefore, in general, β should be greater than 1 / n to ensure that the higher the confidence level of the prediction model, the higher the weight of the prediction value.

[0106] S3: At time t, the fusion prediction value of a future period based on weighted average Calculate the weighted average value during this period as a comprehensive indicator of resource utilization Right now

[0107]

[0108] Among them, ω is the weight coefficient. The larger the value, the greater the impact of the predicted value closer to the current time t on the HPA threshold, and the farther the predicted value is, the smaller the impact is. From another perspective, the larger the ω, the more the regulation of resource utilization focuses on the recent resource utilization value, and the smaller the ω, the more attention is paid to the long-term resource utilization value.

[0109] S4: Based on the scaling threshold method, the resource usage rate is calculated to determine whether the cluster should be scaled. The specific method is as follows:

[0110]

[0111] The redundant scaling threshold algorithm is used to determine whether to perform scaling action at this moment.

[0112] S5: Calculate the number of Pod replicas h:

[0113]

[0114] S6: If h exceeds the upper limit of the number of application Pod copies, it is the upper limit; if h is less than the lower limit of the number of application Pod copies, it is the lower limit; in other cases, the capacity is expanded or reduced relative to the number of h at the previous moment.

[0115] In summary, the present invention significantly improves the accuracy and reliability of resource demand prediction and enhances the system's adaptability to complex dynamic environments by comprehensively applying the ETG model, multi-step fusion prediction algorithm and online learning framework, thereby optimizing resource allocation and utilization efficiency in the container cloud environment.

[0116] Those skilled in the art will appreciate that the above are only preferred embodiments of the present invention, and the various embodiments of the present disclosure and / or the features described in the claims may be combined or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. It is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art may still modify the technical solutions described in the aforementioned embodiments, or perform equivalent substitutions on some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

[0117] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A container elastic expansion method based on online learning, characterized in that: The following steps are involved: 1) Build an ETG model, divide the historical load data into multiple input sequences, extract the detrended data and the corresponding trend equation; concatenate the detrended data with the processed original data, perform training and prediction, and output the final load prediction array; 2) Integrate the ETG model into the online learning framework by updating the model parameters in real time; 3) Introduce a multi-step fusion prediction algorithm to perform weighted summation on the prediction results from different time steps to generate a fused prediction value. The fused prediction value is used as the basis for resource adjustment, thereby optimizing resource allocation and improving system response speed.

2. According to the method for elastic expansion of containers based on online learning according to claim 1, it is characterized in that: The ETG model is a data smoothing GRU model based on trend decomposition, which is used for elastic scaling of container clouds and realizes prediction through an architecture combining exponential moving smoothing, trend decomposition and GRU.

3. According to the container elastic expansion method based on online learning according to claim 1, it is characterized in that: The step 1) comprises the following steps: 1-1) The trend decomposition module divides the input historical load data into a trend part and a detrended part by the trend decomposition method, and smoothes the historical load data by the exponential moving average method; 1-2) Combined with the prediction module of the GRU model, it receives the data after detrending and EMA smoothing, captures the pattern in the time series, predicts future trend changes by extrapolating the trend, and obtains the predicted trend part; 1-3) Add the predicted trend part to the detrended prediction output by GRU to generate the final predicted load prediction array.

4. According to the method for elastic expansion of containers based on online learning according to claim 3, it is characterized in that: The step 1-1) is specifically: 1-1-1) Input sequence X t ={x t-S+1 ,x t-S+2 ,…,x t-1 ,x t }, and obtain the corresponding time step index P = {1, 2, ..., S-1, S}; where x t-S+1 is the workload or resource utilization value at that moment, or other resource indicators, and S is the length of the input sequence; 1-1-2) The slope k and intercept b are calculated by the least squares method, namely: Then the fitting curve x=kt+b is obtained; 1-1-3) Index the time step S i Enter the equation to get the trend component R of the input data t = {r t-S+1 ,r t-S+2 ,…,r t-1 ,r t }; Original data X t Subtract the trend component R t Get the detrended component D t ={d t-S+1 ,d t-S+2 ,…,d t-1 ,d t }; where d t-S+i =x t-S+i -r t-S+i ; 1-1-4) Calculate the smoothed value of the exponential moving average of the input sequence at the current moment, that is: e t =αx t +(1-a)e t-1 Among them, e t is the smoothed value at the current moment, x t is the current actual value, e t-1 is the smoothing value of the previous moment, α is the weight coefficient; 1-1-5) According to the above steps, the entire array is obtained, namely: AND t ={and t-S+1 ,And t-S+2 ,…,And t-1 ,And t }。 5. According to the method for elastic expansion of containers based on online learning according to claim 3, it is characterized in that: The steps 1-2) are specifically: The detrended component D t and the result of exponential moving average E t The stack is transferred to the GRU model, and then the predicted detrended output is obtained through the feedforward neural network: G t ={g t+1 ,g t+2 ,…,g t+H-1 ,g t+H }; The time index Q={S+1, S+2,…, S+H-1, S+H} of the prediction array is sent to the fitting equation, and the trend component of the prediction array is obtained as follows: T t ={h t+1 ,h t+2 ,…,h t+H-1 ,h t+H } Among them, h t+i =kQ i +b.

6. According to the method for elastic expansion of containers based on online learning in claim 3, it is characterized in that: The steps 1-3) are specifically: The detrended output G t and trend output H t Add together to get the final load prediction array F t ={f t+1 ,f t+2 ,…,f t+H-1 ,f t+H }; where f t+i =g t+i +h t+i .

7. According to the method for elastic expansion of containers based on online learning in claim 1, it is characterized in that: The step 2) is specifically: 2-1) At time t, the actual array of resource usage X t Record the resource utilization value from t-S+1 to this moment, that is: X t ={x t-S+1 ,…,x t-1 ,x t } Among them, x t Represents the resource utilization value at time t, the historical array X t It records the resource usage value from the current moment to the moment S, that is, the actual array length is S; 2-2) Through the prediction function of the previous moment, i.e., time t Based on the real array X t , get the prediction array Right now: in, Indicates the resource utilization value at time t+1 predicted based on the current time. The prediction array records the resource utilization value from the next predicted time to the backward predicted time H, that is, the length of the prediction array is H; action u t It is an array that records the actions from the current time to the previous time, indicating the scaling changes made by the system based on the predicted value; 2-3) In order to learn the parameters θ of the prediction model t , construct the loss function by comparing the predicted value and the true value Represents the parameter change obtained by loss calculation, and finally according to the parameters and The weighted summation gives the parameters at time t: Among them, the optimization goal of online learning is to make the predicted value closer to the true value, and the loss function Represents the target direction of online learning, γ t-1 is the corresponding array of real values, which is part of the next input array, namely γ t-1 =X t [t-H+1:t], the loss function is:

8. According to the method for elastic expansion of containers based on online learning in claim 1, it is characterized in that: The step 3) comprises the following steps: 3-1) Record the predicted values ​​of the previous H moments 3-2) At time t, the fusion prediction value is the weighted average of the predicted values ​​for t+m in the previous H moments, that is: Among them, β is the weight coefficient, and β is greater than 1 / n; 3-3) At time t, the fusion prediction value of a future period based on weighted average Calculate the weighted average value during this period as a comprehensive indicator of resource utilization Right now: Among them, ω is the weight coefficient; 3-4) Comprehensive indicators based on resource utilization Calculate resource usage to determine whether the cluster should be scaled up or down; 3-5) Calculate the number of Pod replicas h and predict the length of the array, that is, the number of values ​​in the predicted array.

9. The container elastic expansion method based on online learning according to claim 8 is characterized in that: The steps 3-4) are specifically: a. Based on the scaling threshold method, the resource usage rate is calculated to determine whether the cluster should be scaled. The specific method is as follows: b. Determine whether to perform a scaling action at this moment based on the redundant scaling threshold algorithm.

10. The container elastic expansion method based on online learning according to claim 8 is characterized in that: The steps 3-5) are specifically: Calculate the number of Pod replicas h: When the number of Pod replicas h exceeds the upper limit of the number of application Pod replicas, it is the upper limit; If the number of Pod replicas h is less than the lower limit of the number of application Pod replicas, it is the lower limit; in other cases, scaling is performed relative to the number of Pod replicas h at the previous moment.