Container cloud elastic scaling method and system based on improved Informer
By improving the Informer model, introducing a multivariate interaction layer and a time decay factor, and combining quantile regression and a multi-objective optimization function, the problem of inaccurate load prediction in container cloud environments is solved, achieving efficient elastic scaling and improving resource utilization and service quality.
Patent Information
- Application Number
- CN202511582287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies suffer from insufficient load prediction accuracy, delayed response, and inaccurate resource allocation in container cloud environments. They are particularly difficult to achieve fine-grained elastic scaling during sudden load changes, leading to resource waste or performance degradation.
An improved Informer model is adopted, introducing a multivariate interaction layer and a time decay factor. Combined with quantile regression and a multi-objective optimization function, it predicts future resource demand through multivariate time series, generates high-confidence prediction results, and drives the scaling decisions of container cloud environments.
It significantly improves the accuracy and responsiveness of load forecasting, enables proactive and smooth resource adjustments, avoids resource shortages or waste, and ensures service quality and resource utilization efficiency.
Smart Images

Figure CN121541971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a container cloud elastic scaling method and system based on an improved Informer. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] With the in-depth development of cloud computing technology, cloud-native architecture has been widely adopted by enterprises due to its advantages in flexibly handling dynamic expansion of business scale and adapting to complex and ever-changing application scenarios. Containerized deployment, with its excellent portability and high resource utilization, has become the core mode of modern application deployment. However, the dynamic and high-density characteristics of container clusters bring severe challenges to resource scheduling and management, especially under frequent load changes. How to achieve fine-grained elastic scaling has become a key issue that urgently needs to be solved in the industry.
[0004] Container cloud elastic scaling refers to dynamically adjusting the allocation of container resources based on the load of the container cluster, including increasing or decreasing the number of container instances, to cope with load changes, ensuring service quality while achieving efficient resource utilization. Load time-series characteristics refer to the patterns and characteristics exhibited by load data over time; accurately understanding and proactively judging these characteristics is a crucial prerequisite for achieving effective elastic scaling.
[0005] Existing elastic scaling technologies mainly fall into two categories. One is the traditional elastic scaling mechanism, which is mostly based on thresholds and makes decisions based on the current or recent load status. It lacks forward-looking judgment of load timing characteristics and is prone to resource redundancy or performance degradation due to response delays or judgment errors. When the load reaches a preset threshold, scaling up or down is triggered. Especially in scenarios where burst traffic and periodic tasks coexist, traditional methods often perform poorly, not only increasing operating costs but also making it difficult to guarantee service quality.
[0006] Another approach combines load forecasting with elasticity strategies. By using time series forecasting models to predict future resource demands, scaling up or down can be performed in advance to smooth resource curves and optimize the overall efficiency and stability of the container cloud environment.
[0007] Compared to traditional elastic scaling mechanisms, existing methods for inferring future resource demands through time series prediction models still have problems. For example, most current mainstream methods are based on traditional time series prediction models (such as CNN and RNN). When dealing with complex and ever-changing workloads, especially sudden resource requests, these methods often exhibit problems such as limited prediction accuracy, high computational overhead, and delayed response. Summary of the Invention
[0008] This invention proposes a container cloud elastic scaling method and system based on an improved Informer. This invention aims to solve the problems of insufficient accuracy in predicting dynamic and burst loads, delayed response, and inaccurate resource allocation in the prior art.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a container cloud elastic scaling method based on an improved Informer, including: Continuous historical resource utilization data are obtained, multivariate time series are constructed, and preprocessing is performed. The preprocessed multivariate time series is input into the pre-trained improved Informer model. First, the multivariate feature sequence is obtained through the multivariate interaction layer. Then, it is fed into the decoder after passing through the encoder with the time decay factor. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result. Based on the resource utilization prediction results and combined with real-time resource utilization data, the number of target containers required in the future is calculated through a multi-objective optimization function to generate expansion and contraction decisions. Execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
[0010] A further technical solution is that the historical resource utilization data includes CPU utilization, memory utilization, and disk I / O rate; the preprocessing is performed using Min-Max normalization, expressed as: ;in, For historical resource utilization rate data, This is the minimum value among historical resource utilization data. This is the maximum value in historical resource utilization data.
[0011] A further technical solution is that, in the improved Informer model, the multivariate interaction layer is implemented based on the Variable-wise Attention mechanism, specifically as follows: First, global temporal feature aggregation is performed independently on the features of each variable channel to obtain variable-level representations; then, the attention weight matrix between variables is calculated, as follows: ; in, The first element in the attention weight matrix line, number Column elements, , These are the query vector and key vector, representing the variables, respectively. For hidden layer dimensions; Finally, the attention weight matrix is used to obtain the multivariate feature sequence.
[0012] A further technical solution involves incorporating a time decay factor into the encoder: a time-distance-based exponential decay term is superimposed on the similarity score calculated between the query vector and the key vector, expressed as: ; in, The attention score is the result of adding the time decay term. For standard query-key similarity scores, This is the gain coefficient. For decay rate, For time step and The time distance between them.
[0013] A further technical solution is that the decoder performs feature decoding through quantile regression by setting three parallel output heads at the end of the decoder to predict the resource utilization values of the 10th, 50th, and 90th quantiles, respectively.
[0014] A further technical solution is that the resource utilization rate prediction result includes a point prediction value and the corresponding prediction interval; based on the resource utilization rate prediction result and combined with real-time resource utilization rate data, it is determined whether a resource bottleneck will exist in the future, specifically as follows: like If it is determined to be high-risk, expansion is required; if If this continues for multiple cycles, it indicates idle resources and a need for scaling down; among them, , These are the upper and lower limits of the prediction interval, respectively. , These are the preset upper and lower threshold values, respectively.
[0015] A further technical solution is that the multi-objective optimization function is defined as: ; in, For the target number of containers, , , For configurable weight parameters, To predict the probability of overload risk, To reduce resource waste and costs, This is a penalty term for scaling up or down the frequency.
[0016] Secondly, this invention provides a container cloud elastic scaling system based on an improved Informer, comprising the following modules: The data acquisition module is configured to: acquire continuous historical resource utilization data, construct a multivariate time series, and perform preprocessing; The load prediction module is configured to: input the preprocessed multivariate time series into the pre-trained improved Informer model, first obtain the multivariate feature sequence through the multivariate interaction layer; then pass it through the encoder with the introduction of the time decay factor and pass it into the decoder. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result. The scheduling decision module is configured to: calculate the number of target containers required in the future based on the resource utilization prediction results and real-time resource utilization data, and generate scaling decisions by using a multi-objective optimization function; The scaling control module is configured to: execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
[0017] Compared with the prior art, the present invention has the following advantages and beneficial effects: This invention designs an improved Informer model by introducing a Multi-Variable Interaction Layer. Based on the Variable-wise Attention mechanism, it explicitly models the mutual influence between different resource dimensions, enabling the model to adaptively capture the nonlinear dependencies between multiple variables, thereby significantly improving the accuracy of long-sequence multivariate load prediction.
[0018] This invention introduces a temporal decay factor into the encoder, which assigns higher attention weights to time steps closer to the current time through an exponential decay function. This significantly enhances the model's sensitivity to sudden load changes while maintaining its ability to model long-range dependencies, making it more in line with the actual needs of dynamic changes in container cloud environments.
[0019] This invention improves the decoder structure by using quantile regression to output multi-quantile predicted values and constructing a high-confidence prediction interval to provide system operators with a confidence range for the prediction results. This design allows scaling decisions to be based not only on the "predicted value" but also on the "prediction fluctuation risk," effectively avoiding resource shortages or waste caused by prediction bias.
[0020] This invention integrates the load prediction results output by the improved Informer model with real-time resource utilization data, and combines a multi-objective optimization function to comprehensively consider performance assurance, resource utilization and cost overhead, generating an optimal container replica number adjustment strategy. Finally, the scheduling decision module drives container orchestration platforms such as Kubernetes to perform scaling operations, realizing a paradigm shift from "passive response" to "proactive prediction" in elastic scaling. Attached Figure Description
[0021] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.
[0022] Figure 1 This is a schematic diagram of the overall system architecture for implementing the container cloud elastic scaling method based on the improved Informer in this invention; Figure 2 This is a structural block diagram of the improved Informer model in this invention; Figure 3 This is the flowchart of the flexible scaling decision-making process in this invention. Detailed Implementation Example 1 This embodiment is implemented in a general container cloud platform environment and is applicable to any application system based on microservice architecture or containerized deployment, with good versatility and portability.
[0023] This embodiment provides a container cloud elastic scaling method based on an improved Informer model. This embodiment creatively improves upon the existing Informer model by introducing a multivariate interaction layer to effectively capture the dynamic dependencies between system monitoring metrics, and by introducing a time decay factor to enhance the model's sensitivity to recent data. Simultaneously, the method provided in this embodiment implements uncertainty prediction and quantile loss, providing confidence intervals for operational decisions. An anomaly-aware training strategy is designed to improve the model's robustness under abnormal and sudden scenarios. It achieves accurate multi-step prediction of container cluster resource requirements and, based on this, constructs an intelligent elastic scaling strategy to support proactive, smooth, and resource-efficient automatic scaling operations.
[0024] To achieve the above objectives, such as Figure 1 As shown, the container cloud elastic scaling method based on the improved Informer provided in this embodiment includes the following steps: S1: Obtain continuous historical resource utilization data, construct a multivariate time series, and perform preprocessing.
[0025] In step S1, historical resource utilization data includes, but is not limited to, CPU utilization, memory utilization, and disk I / O rate, forming a multivariate time series. Where T=120 is the length of the input sequence (corresponding to 60 minutes of historical data), and D=3 is the resource dimension (CPU utilization, memory utilization, and disk I / O rate in this embodiment).
[0026] In step S1, the preprocessing method is to use Min-Max normalization, which is expressed as: ;in, For historical resource utilization rate data, This is the minimum value among historical resource utilization data. This is the maximum value in historical resource utilization data.
[0027] S2: The preprocessed multivariate time series is input into the pre-trained improved Informer model. First, the multivariate feature sequence is obtained through the multivariate interaction layer. Then, it is fed into the decoder after passing through the encoder with the time decay factor. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result.
[0028] In step S2, this embodiment improves and trains the existing Informer model, specifically as follows: 1. In order to enable the model to automatically capture the complex dynamic dependencies between multi-dimensional resource indicators such as CPU utilization, memory utilization, and disk I / O rate in the container cloud environment, this embodiment introduces a multi-variable interaction layer before the self-attention module of the existing Informer model encoder.
[0029] The multivariate interaction layer is implemented based on the Variable-wise Attention mechanism. First, it extracts the overall representation of each variable through global temporal feature aggregation. Then, it calculates the attention weight matrix between variables, explicitly modeling the mutual influence of different resource dimensions. Finally, this layer achieves information interaction between variables through weighted fusion, and the enhanced feature sequence is input into the subsequent ProbSparse Self-Attention module. This improvement enables the model to not only focus on temporal dependencies when handling long-sequence multivariate prediction tasks, but also adaptively learn the dynamic relationships between variables, thereby improving prediction accuracy and interpretability.
[0030] 2. To enhance the model's sensitivity to recent historical information, this embodiment introduces a temporal decay factor in the encoder's self-attention mechanism calculation process, explicitly assigning higher attention weights to time steps closer to the current moment. Specifically, after calculating the similarity score between the query vector and the key vector, a decay term based on time distance is superimposed, which decreases exponentially with increasing time step intervals. In this way, the model can adaptively enhance its attention to recent key patterns while capturing long-range dependencies, thereby better adapting to the dynamic changes in resource utilization in container cloud environments.
[0031] 3. To enhance the reliability and practicality of the prediction results, this embodiment improves the decoder structure, enabling it to not only output point predictions of resource utilization but also generate statistically significant prediction intervals (PI), thereby providing a quantitative estimate of prediction uncertainty. Specifically, the model predicts multiple quantiles (e.g., 10%, 50%, 90%) in parallel at the decoder end, using quantile regression loss for end-to-end training. By constructing high-confidence upper and lower bounds (e.g., 90% PI), system operators can identify potential resource overload risks or abnormal fluctuations, enabling more robust and risk-aware decision-making in tasks such as elastic scaling, capacity planning, and fault warning.
[0032] 4. To mitigate the negative impact of sudden outliers (such as instantaneous peaks, noise interference, or acquisition errors) in resource utilization data within container cloud environments on model training, this embodiment introduces an Adaptive Outlier Weighting mechanism into the loss function. This mechanism dynamically reduces the loss weight of extreme outlier samples by detecting the degree of statistical anomalies in the target sequence, thereby suppressing their excessive influence on gradient updates. Specifically, potential outliers are identified based on the mean and standard deviation within a sliding window, and assigned lower weights, enabling the model to maintain high sensitivity to normal patterns while enhancing its robustness to noise and anomalies.
[0033] The improvement to the Informer model in application involves: firstly, introducing a multivariate interaction layer after the embedding layer of the Informer encoder; the multivariate interaction layer independently performing global temporal feature aggregation on the features of each variable channel to obtain variable-level representations. ( H (where the hidden layer dimension is used), then the attention weight matrix between variables is calculated, expressed as: ; in, The first element in the attention weight matrix line, number Column elements, , These are the query vector and key vector, representing the variables, respectively. The hidden layer dimension is used; the multivariate feature sequence is obtained using the attention weight matrix. X ′, and then fed into the subsequent ProbSparse Self-Attention module.
[0034] Then, a time decay factor is introduced, and an exponential decay term based on time distance is superimposed on the similarity score between the query vector and the key vector calculated by the encoder, expressed as: ; in, The attention score is the result of adding the time decay term. This is the standard query-key similarity score (i.e., normalized dot product). This is the gain coefficient, used to control the strength of the time decay term, and , The decay rate is used to determine the rate of influence over time, and , For time step and The time distance between them reflects the interval between them on the timeline.
[0035] The decoder then performs feature decoding through quantile regression. Specifically, the decoder has three parallel output heads that predict resource utilization values at the 10th, 50th (median), and 90th quantiles, respectively. The model is trained end-to-end using a quantile loss function. ; in The overall loss function is the objective of model optimization; the smaller the better. This represents the total number of time steps (i.e., the number of samples) used to calculate the loss in the time series. The predicted quantile levels are: 10%, 50%, and 90%. These are quantile weighting coefficients, used to control the importance of different quantiles. The quantile loss function, Let i be the actual resource utilization rate at the i-th time step. Let q be the quantile value predicted by the model for the i-th time step.
[0036] In this embodiment, an adaptive anomaly weight mechanism is also introduced. During training, the mean value of the target value in each batch is calculated within a sliding window (window size 20). μ and standard deviation σ If the absolute error of a certain sample >3 σ Then multiply its loss weight by a decay factor. γ ∈(0,1) (default) γ =0.3), suppressing the impact of outliers on gradient updates. After model training is complete, incremental training or periodic retraining is performed periodically to adapt to the evolution of load patterns.
[0037] S3: Based on the resource utilization prediction results and combined with real-time resource utilization data, calculate the number of target containers required in the future through a multi-objective optimization function, and generate scaling decisions.
[0038] In step S3, the latest historical resource utilization data is continuously input using a sliding window, and the resource utilization prediction results for the next 15 minutes are output in 5-minute intervals, including point prediction values. and the corresponding prediction interval To obtain real-time resource utilization and, in conjunction with the forecast interval, determine whether resource bottlenecks will exist in the future: like If so, it is determined that there is a high risk and capacity expansion is required in advance; like If this continues for multiple cycles, it indicates that there is idle resource and scaling down can be considered. in, , These are the upper and lower limits of the prediction interval, respectively. , These are the preset upper and lower threshold values, respectively.
[0039] By capturing the probability distribution characteristics of resource demand through quantile prediction, the system can proactively expand its capacity before overload occurs, ensuring Service Level Agreement (SLA). Simultaneously, it can identify long-term low-load trends and promptly scale down to reduce resource overhead, significantly improving resource utilization efficiency. More importantly, the prediction results and risk assessment signals output from this step can serve as key input parameters for subsequent multi-objective optimization functions. For example, when constructing a resource scheduling optimization model, the prediction results and risk assessment signals can be used as key input parameters for these functions. As a service quality constraint, it is used to minimize the risk of service interruption; It serves as a measure of resource idleness and is used to optimize cost objectives.
[0040] The required number of target containers in the future is calculated using a multi-objective optimization function, defined as follows: ; in, For the target number of containers, , , For configurable weight parameters, To predict the probability of overload risk, it is defined as: ; in: This is the 90th quantile resource utilization forecast from the quantile prediction model, reflecting the maximum possible utilization rate under future high-load scenarios. : This is a preset high-load safety threshold, representing the maximum resource consumption level the system can tolerate. When This indicates an overload risk, requiring priority for capacity expansion; otherwise, the value is 0.
[0041] The cost of resource waste is defined as:
[0042] in: The 10th percentile resource utilization forecast from the quantile forecasting model reflects the minimum possible utilization rate under future low-load scenarios. The preset low load threshold represents the critical point where resource utilization efficiency is low. Cost per unit of container (e.g., hourly rate). When This indicates that there are idle resources, and scaling down can be considered to reduce costs.
[0043] This is a penalty term for the frequency of scaling up and down. It is defined as:
[0044] in: The target number of containers obtained from this optimization; The number of containers actually executed in the last execution; The magnitude of change between the two.
[0045] S4: Execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
[0046] In step S4, the scaling strategy is executed. The scaling control module calls the container orchestration platform's API to adjust the number of pod replicas. The system supports a pre-expansion strategy (expanding capacity 5 minutes in advance) and a delayed shrinkage strategy (waiting for a cooldown period before shrinking capacity) to improve stability.
[0047] This embodiment fully implements the container cloud elastic scaling method based on the improved Informer described in this invention. All modules work collaboratively to form a closed-loop control process of "perception—prediction—decision—execution." This solution is not dependent on specific business scenarios and can be widely applied to various containerized deployment environments, possessing good versatility, scalability, and engineering implementation value.
[0048] Example 2 This embodiment provides a container cloud elastic scaling system based on an improved Informer, which specifically includes the following modules: The data acquisition module is configured to: acquire continuous historical resource utilization data, construct a multivariate time series, and perform preprocessing; The load prediction module is configured to: input the preprocessed multivariate time series into the pre-trained improved Informer model, first obtain the multivariate feature sequence through the multivariate interaction layer; then pass it through the encoder with the introduction of the time decay factor and pass it into the decoder. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result. The scheduling decision module is configured to: calculate the number of target containers required in the future based on the resource utilization prediction results and real-time resource utilization data, and generate scaling decisions by using a multi-objective optimization function; The scaling control module is configured to: execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
[0049] The implementation of specific modules in this embodiment refers to the steps of the container cloud elastic scaling method based on the improved Informer described in Embodiment 1, and will not be described in detail here.
[0050] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A container cloud elastic scaling method based on an improved Informer, characterized in that, include: Continuous historical resource utilization data are obtained, multivariate time series are constructed, and preprocessing is performed. The preprocessed multivariate time series is input into the pre-trained improved Informer model. First, the multivariate feature sequence is obtained through the multivariate interaction layer. Then, it is fed into the decoder after passing through the encoder with the time decay factor. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result. Based on the resource utilization prediction results and combined with real-time resource utilization data, the number of target containers required in the future is calculated through a multi-objective optimization function to generate expansion and contraction decisions. Execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
2. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, The historical resource utilization data includes CPU utilization, memory utilization, and disk I / O speed; the preprocessing uses Min-Max normalization, expressed as follows: ;in, For historical resource utilization rate data, This is the minimum value among historical resource utilization data. This is the maximum value in the historical resource utilization data.
3. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, In the improved Informer model, the multivariate interaction layer is implemented based on the Variable-wise Attention mechanism, specifically as follows: First, global temporal feature aggregation is performed independently on the features of each variable channel to obtain variable-level representations; then, the attention weight matrix between variables is calculated, as follows: ; in, The first element in the attention weight matrix line, number Column elements, , These are the query vector and key vector, representing the variables, respectively. For hidden layer dimensions; Finally, the attention weight matrix is used to obtain the multivariate feature sequence.
4. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, The encoder that introduces a time decay factor is as follows: an exponential decay term based on time distance is superimposed on the similarity score between the query vector and the key vector calculated by the encoder, expressed as: ; in, The attention score is the result of adding the time decay term. For standard query-key similarity scores, This is the gain coefficient. For decay rate, For time steps and The time distance between them.
5. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, The specific method for feature decoding by the decoder through quantile regression is as follows: three parallel output heads are set at the end of the decoder to predict the resource utilization values of the 10th, 50th, and 90th quantiles, respectively.
6. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, The resource utilization rate prediction results include point prediction values and corresponding prediction intervals; based on the resource utilization rate prediction results and real-time resource utilization rate data, it is determined whether there will be resource bottlenecks in the future, specifically: like If it is determined to be high-risk, expansion is required; if If this continues for multiple cycles, it indicates idle resources and a need for scaling down; among them, , These are the upper and lower limits of the prediction interval, respectively. , These are the preset upper and lower threshold values, respectively.
7. The container cloud elastic scaling method based on the improved Informer as described in claim 1, characterized in that, The multi-objective optimization function is defined as follows: ; in, For the target number of containers, , , For configurable weight parameters, To predict the probability of overload risk, To reduce resource waste and costs, This is a penalty term for scaling up or down the frequency.
8. A container cloud elastic scaling system based on an improved Informer, characterized in that, include: The data acquisition module is configured to: acquire continuous historical resource utilization data, construct a multivariate time series, and perform preprocessing; The load prediction module is configured to: input the preprocessed multivariate time series into the pre-trained improved Informer model, first obtain the multivariate feature sequence through the multivariate interaction layer; then pass it through the encoder with the introduction of the time decay factor and pass it into the decoder. The decoder performs feature decoding through quantile regression and outputs the resource utilization prediction result. The scheduling decision module is configured to: calculate the number of target containers required in the future based on the resource utilization prediction results and real-time resource utilization data, and generate scaling decisions by using a multi-objective optimization function; The scaling control module is configured to: execute scaling decisions and adjust the number of pod replicas corresponding to the target number of containers.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the container cloud elastic scaling method based on the improved Informer as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the container cloud elastic scaling method based on the improved Informer as described in any one of claims 1-7.