Container expansion strategy generation method and device, equipment and medium

Generating load predictions through data acquisition and prediction models has solved the problem that existing container automatic scaling strategies cannot effectively deal with complex load characteristics, and achieved the flexibility and stability of the container cloud platform, reducing operation and maintenance costs.

CN119201339APending Publication Date: 2024-12-27JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411232746.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing container automatic scaling strategy relies on preset rules and thresholds, and cannot effectively deal with complex application load characteristics, resulting in untimely or inaccurate monitoring delays and scaling responses, affecting application performance.

Method used

Through data acquisition, cleaning and conversion, time series analysis and periodic pattern detection, a prediction model is created, load prediction is generated, and resource limitation thresholds and scaling strategy trigger conditions are set based on the prediction results to generate container scaling strategies.

Benefits of technology

It significantly improves the flexibility and stability of the cloud platform, reduces operation and maintenance costs, improves the market competitiveness of container cloud products, ensures that applications maintain stable performance under any load situation, and reduces human errors and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201339A_ABST
    Figure CN119201339A_ABST
Patent Text Reader

Abstract

The invention discloses a container scaling strategy generation method and device, equipment and a medium, and belongs to the technical field of cloud platforms, and the method comprises the steps: obtaining monitoring index data; performing data cleaning and conversion merging on the monitoring index data; performing trend analysis on the cleaned, converted and merged monitoring index data through time sequence analysis and periodic mode detection; creating a prediction model according to the monitoring index data trend analysis result; training and evaluating the prediction model according to the monitoring index data type; sending the latest collected monitoring index data to the prediction model, and generating load prediction; setting a resource limit threshold value and a scaling strategy triggering condition according to the load prediction result; and generating a container scaling strategy according to the resource limit threshold and the scaling strategy triggering condition. The flexibility and stability of the cloud platform can be remarkably improved, and the operation and maintenance cost is reduced, so that the market competitiveness of container cloud products is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud platform technology, and in particular to a method, device, equipment and medium for generating a container scaling strategy. Background Art

[0002] At present, K8s, as a container orchestration and management platform, can effectively deploy, manage and expand containerized applications. The popularity of container technology (such as Docker) makes the deployment and management of applications more flexible and efficient. The rise of containerization and microservice architecture provides a more flexible deployment method, but also increases the complexity of management. Simple deployment and management cannot meet the needs of modern applications, especially in the face of complex application loads and changing workloads. The load demand encountered by applications in different periods and scenarios may fluctuate violently. The traditional static deployment method cannot effectively cope with this dynamicity and may lead to performance bottlenecks or waste of resources. With the increasing security and compliance requirements of business applications, traditional deployment and management methods can hardly provide comprehensive security protection and monitoring capabilities, and traditional manual management methods can no longer adapt to the fast-paced modern development and deployment needs. Automated operation and maintenance has become an essential element of modern application management.

[0003] Therefore, the demand for elastic scaling of applications comes into being; applications need to have the ability to elastically scale, automatically adjust resources according to load demand, and ensure high availability. Currently, most mainstream container cloud vendors provide automatic scaling functions for containers, including horizontal scaling (HorizontalScaling) and vertical scaling (VerticalScaling) capabilities. For example, you can create an automatic scaling group and set rules that trigger automatic horizontal scaling (such as CPU utilization, memory usage, etc.) to automatically increase or decrease the number of container instances; or you can set resource (CPU, memory) requests and restrictions in the container manifest file, and the container runtime will automatically adjust the resource size of the container instance according to these configurations to achieve vertical scaling.

[0004] However, configuring automatic scaling rules and policies in these environments generally requires more management and maintenance work, and requires a deep understanding of the load characteristics of the application. Currently, most automatic scaling policies are based on preset rules and thresholds, such as CPU utilization, memory usage, etc. However, these simple rules are not enough to cope with the increasingly complex load characteristics of applications. The effectiveness of the automatic scaling functions provided by these vendors is highly dependent on the accuracy and real-time nature of the monitoring indicators, which may lead to certain delays in the monitoring system and untimely or inaccurate scaling responses. When the application needs to respond quickly to changing load conditions, the delays in monitoring, judgment, and execution actions involved in the automatic scaling policy may affect the performance of the application. Summary of the invention

[0005] In order to overcome the above technical defects, the purpose of this application is to provide a container scaling strategy generation method, device, equipment and medium, the method includes: obtaining monitoring indicator data through a data acquisition tool; cleaning and converting and merging the monitoring indicator data; performing trend analysis on the cleaned, converted and merged monitoring indicator data through time series analysis and periodic pattern detection; creating a prediction model based on the trend analysis results of the monitoring indicator data; training and evaluating the prediction model according to the monitoring indicator data type; deploying the trained and evaluated prediction model in a container; sending the latest collected monitoring indicator data to the prediction model in real-time batch processing to generate load predictions; setting resource limit thresholds and scaling strategy trigger conditions according to the load prediction results; generating container scaling strategies according to the resource limit thresholds and scaling strategy trigger conditions. This application can significantly improve the flexibility and stability of the cloud platform, while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0006] The specific technical solutions provided by the embodiments of this application are as follows:

[0007] In a first aspect, the present application provides a method for generating a container scaling policy, the method comprising:

[0008] Obtain monitoring indicator data through data collection tools;

[0009] Cleaning, converting and merging the monitoring indicator data;

[0010] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0011] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0012] Training and evaluating the prediction model according to the monitoring indicator data type;

[0013] Deploy the trained and evaluated prediction model in a container;

[0014] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0015] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0016] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0017] In one embodiment, the data cleaning and conversion and merging of the monitoring indicator data includes:

[0018] Cleaning the monitoring indicator data using a data cleaning tool;

[0019] Performing data conversion and merging on the monitoring indicator data through a data preprocessing tool;

[0020] The data cleaning of the monitoring indicator data by using a data cleaning tool includes:

[0021] Performing data cleaning on the monitoring indicator data through a data analysis module, wherein the data cleaning includes cleaning missing values, abnormal values ​​and duplicate values;

[0022] The data preprocessing tool is used to convert and merge the monitoring indicator data, including:

[0023] Performing data conversion on the monitoring indicator data through a data type conversion function;

[0024] The monitoring indicator data is merged through a model merging tool.

[0025] In one embodiment, the trend analysis of the monitoring indicator data after the cleaning conversion and merging is performed through time series analysis and periodic pattern detection, includes:

[0026] Identify the changing trends in the monitoring indicator data after the cleaning conversion and merging by using the moving average method and / or the linear regression model and / or the exponential smoothing method;

[0027] The periodic pattern calculation is performed on the monitoring indicator data after cleaning, transformation and merging through the autocorrelation function and / or the Fourier transform function and / or the seasonal decomposition function and / or the periodic indicator calculation function to identify the periodic or seasonal change pattern in the monitoring indicator data.

[0028] In one embodiment, the creating a prediction model according to the trend analysis result of the monitoring indicator data includes:

[0029] Creating a prediction model based on the trend analysis results of the monitoring indicator data and the learning model, wherein the learning model includes a time series model and a machine learning model; the machine learning model includes a neural network model, a linear regression model, a support vector regression model, and a decision tree regression model;

[0030] The neural network model includes a multi-layer perceptron model, a recurrent neural network model, a convolutional neural network model, and a long short-term memory network model;

[0031] The step of creating a prediction model based on the trend analysis results of the monitoring indicator data further includes:

[0032] A prediction model is created by combining multiple machine learning models and the time series model with predictive analysis.

[0033] In one embodiment, the training and evaluating the prediction model according to the monitoring indicator data type includes:

[0034] When the monitoring indicator data is non-time series data, the monitoring indicator data is divided into a first training data set and a first validation data set by a linear regression algorithm and / or a decision tree algorithm;

[0035] Training the prediction model using the first training data set;

[0036] Evaluating the generalization ability of the prediction model by using a cross-validation function and a first validation data set;

[0037] When the monitoring indicator data is time series data, the monitoring indicator data is divided into a second training data set and a second verification data set in chronological order by using an ARMA algorithm and / or an ARIMA algorithm;

[0038] Training the prediction model using the second training data set;

[0039] The error between the prediction results of the prediction model and the actual observed value is evaluated by means of a root mean square error function, a mean absolute error function, a mean absolute percentage error function and a second validation data set.

[0040] In one embodiment, deploying the trained and evaluated prediction model in a container includes:

[0041] Packaging the trained and evaluated prediction model into a container image, and deploying the container image in a container cloud environment, wherein the trained and evaluated prediction model includes model dependencies, prediction code, and configuration files;

[0042] The method of sending the latest collected monitoring indicator data to the prediction model in real-time batch processing to generate load prediction includes:

[0043] The latest collected monitoring indicator data is sent to the prediction model in real-time batch processing to generate a load forecast, wherein the load forecast includes the load forecast value at each time point and the overall load forecast within a preset time period;

[0044] The generating a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition includes:

[0045] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy types include container horizontal scaling policy and container vertical scaling policy.

[0046] In one of the embodiments, after generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method includes:

[0047] Apply the container scaling policy to any container or all containers of any resource group;

[0048] Performing container scaling policy configuration on any one container or all containers of any one resource group, wherein the container scaling policy configuration includes manual scaling policy configuration and automatic scaling policy configuration, and the manual scaling policy configuration includes modifying or extending the container scaling policy;

[0049] After generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method further includes:

[0050] Re-collect monitoring indicator data, analyze the trend of monitoring indicator data, create a prediction model, train and evaluate the prediction model, deploy the trained and evaluated prediction model in a container, generate a container scaling policy according to resource limit thresholds and scaling policy trigger conditions, optimize the generated container scaling policy, and adjust the application policy of container scaling.

[0051] In a second aspect, the present application further provides a container scaling policy generation device, the device comprising:

[0052] An acquisition module is used to obtain monitoring indicator data through a data collection tool;

[0053] A cleaning module, used for cleaning, converting and merging the monitoring indicator data;

[0054] An analysis module for trend analysis of the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0055] A creation module is used to create a prediction model based on the trend analysis results of the monitoring indicator data;

[0056] A processing module, used for training and evaluating the prediction model according to the monitoring indicator data type;

[0057] The deployment module is used to deploy the trained and evaluated prediction model in a container;

[0058] The first generation module is used to send the latest collected monitoring indicator data to the prediction model in a real-time batch processing manner to generate a load prediction;

[0059] The setting module is used to set resource limit thresholds and scaling policy trigger conditions based on load prediction results;

[0060] The second generating module is configured to generate a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0061] In a third aspect, a container scaling policy generation device is also provided, including:

[0062] one or more processors;

[0063] A storage device for storing one or more programs;

[0064] When the one or more programs are executed by the one or more processors, the one or more processors implement the container scaling policy generating method as described in any one of the first aspects.

[0065] In a fourth aspect, the present application further provides a computer device, the device comprising:

[0066] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method for generating a container scaling policy as described in any one of the first aspects.

[0067] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the container scaling policy generation method described in any one of the first aspects.

[0068] In a sixth aspect, the present application further provides a computer storage medium, the medium comprising:

[0069] A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method for generating a container scaling strategy described in any one of the first aspects are implemented.

[0070] Compared with the prior art, the method described in the technical solution provided in the embodiment of the present application includes: obtaining monitoring indicator data through a data collection tool; cleaning, converting and merging the monitoring indicator data; performing trend analysis on the cleaned, converted and merged monitoring indicator data through time series analysis and periodic pattern detection; creating a prediction model based on the trend analysis results of the monitoring indicator data; training and evaluating the prediction model according to the monitoring indicator data type; deploying the trained and evaluated prediction model in a container; sending the latest collected monitoring indicator data to the prediction model in real-time batch processing to generate a load forecast; setting resource limit thresholds and scaling policy trigger conditions according to the load forecast results; generating a container scaling policy based on the resource limit thresholds and scaling policy trigger conditions. This application can significantly improve the flexibility and stability of the cloud platform, while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0071] The technical solution provided in the embodiments of the present application can not only improve system efficiency and performance, but also reduce the operation and maintenance burden and ensure the stability and reliability of the system; at the same time, it can improve user experience while ensuring the stability and response speed of the application; when the load forecast is accurate and the system can respond to changes quickly, users can access and use the application more reliably, and the automated elastic scaling strategy can reduce the intervention of operation and maintenance personnel. The system can automatically adjust the number of container instances according to the prediction model and strategy, reducing the risk of human error and saving management and maintenance costs.

[0072] The technical solution provided in the embodiment of the present application predicts future loads, and the system can dynamically adjust container resources according to the predicted demand, avoiding resource bottlenecks and over-configuration, thereby optimizing resource utilization; greatly improving resource utilization and reducing operating costs; at the same time, it can ensure that the application can maintain a stable performance level under any load conditions. When the load is predicted to increase, the cluster resources are adjusted in advance according to the predicted load trend, thereby avoiding performance degradation or service unavailability. At the same time, through an automated predictive scaling mechanism, automated management and optimization of the application can be achieved, thereby improving the stability and performance of the system.

[0073] The technical solution provided in the embodiment of the present application is based on trend analysis and periodic pattern detection of historical data, combined with real-time prediction and feedback mechanism, and continuously optimizes the prediction model and elastic scaling strategy by predicting future load trends and periodic changes, so as to make precise resource adjustments. This continuous improvement enables the system to maintain high efficiency and reliability in the face of changing load conditions; at the same time, the automatic elastic scaling strategy can quickly respond to sudden load increases or decreases, ensuring the stability and availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0075] Figure 1 A first flow chart of the method for generating a container scaling policy provided in Embodiment 1 of the present application;

[0076] Figure 2 A second flow chart of the method for generating a container scaling policy provided in Embodiment 2 of the present application;

[0077] Figure 3 A specific flow chart of the method for generating a container scaling strategy provided in Embodiment 2 of the present application;

[0078] Figure 4 A structural diagram of a container scaling strategy generating device provided in Embodiment 3 of the present application;

[0079] Figure 5 The exemplary system provided for Embodiment 7 of the present application can be used to implement the various embodiments described in the present application. DETAILED DESCRIPTION

[0080] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0081] It should be noted that, unless the context clearly requires otherwise, words such as “include”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “including but not limited to”.

[0082] Furthermore, in the description of the present application, unless otherwise specified, “plurality” means two or more.

[0083] The cloud computing platform based on container technology provides the ability to run, manage and expand containerized applications in a cloud environment; the container cloud platform provides a modern, flexible and efficient application deployment and management solution for enterprises and development teams by providing automated management, elastic scaling and cross-platform support for containerized applications.

[0084] The automatic scaling function of containers plays a key role in the deployment and management of modern cloud-native applications. To better deal with these problems, the container cluster environment needs to provide a more intelligent, efficient and stable elastic scaling function to help users achieve a more efficient and stable application running environment.

[0085] Embodiment 1

[0086] The present application embodiment provides a method for generating a container scaling strategy, such as Figure 1 As shown, the method includes:

[0087] Obtain monitoring indicator data through data collection tools;

[0088] Cleaning, converting and merging the monitoring indicator data;

[0089] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0090] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0091] Training and evaluating the prediction model according to the monitoring indicator data type;

[0092] Deploy the trained and evaluated prediction model in a container;

[0093] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0094] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0095] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0096] Specifically, this application proposes a prediction-based automatic elastic scaling configuration method for containers. This method predicts load demand based on monitoring data and prediction models, generates and applies automatic elastic scaling rules to containers, and the prediction model automatically collects the operating indicator data of the business after the elastic strategy is applied, automatically participates in the prediction model training and evaluation, and adjusts the prediction results. The final prediction generation and feedback loop of this method is a continuous optimization process. This process is analogous to the PDCA cycle, that is, the Plan-Do-Check-Act cycle, which can continuously optimize and improve the prediction model and container scaling rules, thereby gradually improving the system's prediction capabilities and automated response capabilities.

[0097] First, the data indicators of load resources are collected and stored through monitoring collection tools and storage tools. The collected monitoring data is cleaned and preprocessed to ensure data quality and consistency. Then, trend analysis and periodic pattern detection are used to predict future loads, and a prediction model is established based on trend analysis results.

[0098] After training and evaluation, the prediction model is deployed in the Kubernetes container cluster environment. Finally, based on the prediction model, real-time prediction is generated to generate elastic scaling strategies and application strategies, adjust and feedback the prediction model, and form a set of continuously optimized and improved elastic scaling application strategies. This involves the combination of multiple technologies and tools, and ultimately forms a set of methods that can automatically and intelligently adjust the number of container instances or the resource configuration of a single container according to load changes.

[0099] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0100] This application can significantly improve the flexibility and stability of the cloud platform while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0101] The technical solution provided in the embodiments of the present application can not only improve system efficiency and performance, but also reduce the operation and maintenance burden and ensure the stability and reliability of the system; at the same time, it can improve user experience while ensuring the stability and response speed of the application; when the load forecast is accurate and the system can respond to changes quickly, users can access and use the application more reliably, and the automated elastic scaling strategy can reduce the intervention of operation and maintenance personnel. The system can automatically adjust the number of container instances according to the prediction model and strategy, reducing the risk of human error and saving management and maintenance costs.

[0102] Embodiment 2

[0103] The present application embodiment provides a method for generating a container scaling strategy, such as Figure 2 As shown, the method includes:

[0104] Step S01, obtaining monitoring indicator data through a data collection tool.

[0105] Specifically, data collection includes monitoring data collection tools, data storage tool configuration, and collection monitoring indicator configuration.

[0106] Monitoring collection and storage tool configuration:

[0107] Configure monitoring data collection tools to provide support for monitoring data collection tools such as Prometheus, Telegraf, Grafana, Datadog, ELKStack, NewRelic, etc. These tools can be directly integrated with the K8s environment, or support monitoring data collection for containerized applications through plug-ins; these tools are selected based on factors such as their integration, performance loss, ease of use, and scalability.

[0108] Configure monitoring data storage tools: Configure the data collected by monitoring to be stored in an appropriate database, providing support for time series databases (such as InfluxDB, PrometheusTSDB), document storage databases (such as Elasticsearch), NoSQL databases (such as Cassandra), distributed storage systems (such as Ceph), etc. When selecting, comprehensively consider factors such as data writing speed, reading efficiency, storage cost, scalability, and integration with existing architecture. At the same time, select appropriate data storage tools based on specific usage scenarios and needs. For example, choose a time series database for high-frequency monitoring data storage and analysis scenarios, and choose a NoSQL database for large-scale data storage and fast access scenarios.

[0109] Monitoring indicator configuration: configure the monitoring indicators that need to be collected, and provide definitions of CPU utilization, memory usage, network traffic, disk I / O, request processing speed, queue length, custom business applications, and user experience indicators. Custom business applications and user experience indicators are used to set indicators in specific business logic and user experience indicators, such as order processing speed, specific task completion rate, user visits, transaction volume, conversion rate, loading time, transaction success rate, etc., and support classification and grouping of indicators by application type and business type.

[0110] All these indicator data are collected and stored for subsequent load analysis and prediction.

[0111] Step S02, cleaning, converting and merging the monitoring indicator data.

[0112] Step S02 also includes:

[0113] Step S021, cleaning the monitoring indicator data using a data cleaning tool;

[0114] Performing data conversion and merging on the monitoring indicator data through a data preprocessing tool;

[0115] The data cleaning of the monitoring indicator data by using a data cleaning tool includes:

[0116] Performing data cleaning on the monitoring indicator data through a data analysis module, wherein the data cleaning includes cleaning missing values, abnormal values ​​and duplicate values;

[0117] The data preprocessing tool is used to convert and merge the monitoring indicator data, including:

[0118] Performing data conversion on the monitoring indicator data through a data type conversion function;

[0119] The monitoring indicator data is merged through a model merging tool.

[0120] Specifically, data cleaning tools (Python Pandas library, DataCleaner) and data conversion and preprocessing tools (Scikit-learn, Apache Spark, TensorFlow Data Validation) are used to clean and preprocess (data conversion, data merging) the collected monitoring data; data cleaning includes processing missing values, outliers, and duplicate values, etc.; data conversion and data merging are to normalize or standardize the data to ensure the stability and accuracy of model training.

[0121] Taking the Python Pandas library as an example, for example, use functions such as read_csv or read_json to load monitoring data, use the duplicated and drop_duplicates functions to handle duplicate values, use the astype function to convert data, and use the merge function to merge data.

[0122] This step is used to ensure data quality and consistency.

[0123] Step S03, performing trend analysis on the monitoring indicator data after cleaning, conversion and merging through time series analysis and periodic pattern detection.

[0124] The purpose of predicting future loads through trend identification and periodic pattern detection is to establish a forecasting model based on which future load demands can be predicted and adjusted in real time in order to cope with load fluctuations more effectively.

[0125] Step S03 also includes:

[0126] Step S031, identifying the change trend in the monitoring indicator data after cleaning conversion and merging by using a moving average method and / or a linear regression model and / or an exponential smoothing method;

[0127] The periodic pattern calculation is performed on the monitoring indicator data after cleaning, transformation and merging through the autocorrelation function and / or the Fourier transform function and / or the seasonal decomposition function and / or the periodic indicator calculation function to identify the periodic or seasonal change pattern in the monitoring indicator data.

[0128] Specifically, to identify the long-term change direction or trend in the data, that is, time series analysis, moving average, linear regression, exponential smoothing, etc. can be used to identify the long-term trend of the load; the moving average method can calculate the moving average of different time windows, fit the linear regression model to estimate the trend of the data, and the exponential smoothing method uses single / double or triple exponential smoothing methods to estimate the trend of the data;

[0129] To identify periodic changes or seasonal patterns in data, periodic pattern calculations can be performed through methods such as autocorrelation analysis, Fourier transform, seasonal decomposition, and periodic indicator calculations. Among them, the autocorrelation function (ACF) can help identify periodic patterns in time series data. By calculating the autocorrelation coefficients at different lag stages, it can be determined whether the data has significant periodicity. Fourier transform can convert time domain data into frequency domain data to help analyze the periodic components in the data. The main periodic patterns can be determined through Fourier transform and spectral analysis. The seasonal decomposition method can decompose time series data into three parts: trend, seasonality, and residual, thereby identifying periodic patterns in the data. Calculating periodic indicators of data (such as seasonal index, periodic fluctuations, etc.) can help evaluate the periodic intensity and change patterns in the data.

[0130] Use the above mentioned periodicity analysis tools or algorithms to detect daily, weekly, etc. periodic load patterns.

[0131] Step S04: creating a prediction model based on the trend analysis results of the monitoring indicator data.

[0132] Specifically, based on the results of trend analysis, a time series model, a machine learning model, or a deep learning model is selected to establish a forecasting model to predict future load demand.

[0133] Step S04 also includes:

[0134] Step S041, creating a prediction model based on the monitoring indicator data trend analysis results and the learning model, wherein the learning model includes a time series model and a machine learning model; the machine learning model includes a neural network model, a linear regression model, a support vector regression model, and a decision tree regression model;

[0135] The neural network model includes a multi-layer perceptron model, a recurrent neural network model, a convolutional neural network model, and a long short-term memory network model;

[0136] The step of creating a prediction model based on the trend analysis results of the monitoring indicator data further includes:

[0137] A prediction model is created by combining multiple machine learning models and the time series model with predictive analysis.

[0138] Specifically, time series models: select autoregressive integrated moving average (ARIMA), Prophet, etc. For example, if the data shows obvious trends and seasonality, the ARIMA model can be used for prediction;

[0139] Machine learning models: For complex and nonlinear load scenarios, machine learning models such as neural network models, regression models (linear regression, polynomial regression), support vector regression (SVR), and decision tree regression are used;

[0140] The neural network model can be selected from multi-layer perceptron (MLP), recurrent neural network (RNN), convolutional neural network (CNN), long short-term memory network (LSTM) and other types. The selection is based on the characteristics of the data, the complexity of the task, the availability of computing resources, and the difficulty of training and adjusting the model. For example, the recurrent neural network has cyclic connections inside, which can capture the time dependency in the sequence data and is suitable for processing short-term dependent time series data, such as short-term stock prediction.

[0141] The LSTM network solves the long-term dependency problem by introducing a gating mechanism (forget gate, input gate, output gate), which can more effectively learn and memorize long-term patterns. Compared with the recurrent neural network structure, the LSTM network can better capture and utilize long-term time dependencies, and is suitable for processing time series data that require long-term memory, such as long-term stock forecasts, weather forecasts, etc.

[0142] Convolutional neural networks can effectively identify and extract important features from time series data, such as signal processing, sensor data, etc. through convolution and pooling operations.

[0143] At the same time, multiple deep learning models can be combined together or combined with traditional time series methods to obtain better prediction performance. The hybrid model can make full use of the advantages of each model and improve the overall prediction accuracy.

[0144] Step S05: training and evaluating the prediction model according to the monitoring indicator data type.

[0145] Specifically, the goal is to effectively evaluate the accuracy and stability of the model in order to adjust and improve the model.

[0146] Here, historical data is used to train the prediction model, and a suitable prediction algorithm (such as ARIMA, ARIMA, linear regression, decision tree, neural network, etc.) is selected to divide the collected monitoring indicator data into a training set and a validation set.

[0147] Step S05 also includes:

[0148] Step S051, when the monitoring indicator data is non-time series data, the monitoring indicator data is divided into a first training data set and a first verification data set by a linear regression algorithm and / or a decision tree algorithm;

[0149] Training the prediction model using the first training data set;

[0150] Evaluating the generalization ability of the prediction model by using a cross-validation function and a first validation data set;

[0151] When the monitoring indicator data is time series data, the monitoring indicator data is divided into a second training data set and a second verification data set in chronological order by using an ARMA algorithm and / or an ARIMA algorithm;

[0152] Training the prediction model using the second training data set;

[0153] The error between the prediction results of the prediction model and the actual observed value is evaluated by means of a root mean square error function, a mean absolute error function, a mean absolute percentage error function and a second validation data set.

[0154] Specifically, for non-time series data (there is no time dependency between data points, such as system event logs, pod configurations, service configurations, resource limits, etc., linear regression, decision tree, and other algorithms are used to randomly divide the data into training and validation sets), cross-validation techniques (such as K-fold cross-validation) are used to evaluate the generalization ability of the model;

[0155] For time series data (data sets arranged in chronological order, such as CPU, memory, and disk utilization trend data, where there is time dependence between data points and future data values ​​are affected by historical data), algorithms such as ARMA and ARIMA are used to divide the monitoring data into training sets and validation sets in chronological order to ensure the generalization effect of the model on future data; in the evaluation phase, the model performance is evaluated through the validation set, and multiple indicators such as root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), etc. are used to measure the error between the model prediction results and the actual observations.

[0156] Step S06: deploy the trained and evaluated prediction model in a container.

[0157] Step S06 also includes:

[0158] Step S061, packaging the trained and evaluated prediction model into a container image, and deploying the container image in a container cloud environment, wherein the trained and evaluated prediction model includes model dependencies, prediction code, and configuration files.

[0159] Specifically, the final trained and verified prediction model is deployed to the container cloud environment. First, the trained model, including the dependencies required by the model, prediction code, configuration files, etc., is packaged into a container image, and finally the container image is deployed and managed in the container cloud environment.

[0160] Step S07, sending the latest collected monitoring indicator data to the prediction model through real-time batch processing to generate a load prediction.

[0161] Step S07 also includes:

[0162] Step S071, sending the latest collected monitoring indicator data to the prediction model through real-time batch processing to generate a load forecast, wherein the load forecast includes the load forecast value at each time point and the overall load forecast within a preset time period.

[0163] Specifically, after the model is deployed, the latest monitoring data is automatically injected into the prediction model in real time or batch processing to generate a load forecast for a period of time in the future. This can be the predicted value for each time point in the future or the overall forecast for a certain period of time. For example, the trained prediction model is used to generate CPU usage forecasts for the next few days or weeks, and integrated into the Kubernetes scaling controller so that it can receive real-time CPU usage data and make predictions, thereby achieving automated resource adjustment.

[0164] Step S08, setting resource limit thresholds and scaling policy triggering conditions according to the load prediction results;

[0165] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0166] Step S08 also includes:

[0167] Step S081: Generate a container scaling policy according to the resource limit threshold and the scaling policy triggering condition, wherein the container scaling policy types include container horizontal scaling policy and container vertical scaling policy.

[0168] Specifically, elastic scaling strategy generation includes threshold setting, trigger condition setting, and scaling strategy setting. Threshold setting is to set resource limit thresholds based on prediction results, such as maximum and minimum resource usage or request volume.

[0169] Defining trigger conditions is to generate conditions that trigger predictive scaling, such as predicting that the load will exceed a certain threshold of the current resource capacity within the next hour;

[0170] The formulation of scaling strategies mainly generates strategy types and strategy rules based on threshold settings and trigger conditions. Strategy types include horizontal scaling strategies and vertical scaling strategies, while strategy rules mainly generate elastic scaling rules for how to increase or decrease system resources (at a certain point in time or within a certain time period).

[0171] The maximum resource utilization rate may be 80%-90%, and the minimum resource utilization rate may be 10%-20%.

[0172] It can be understood that container elastic scaling refers to the ability of the container cloud platform to automatically adjust the number of container instances according to the load of the application to ensure that the application can always effectively utilize computing resources and dynamically expand or reduce the number of containers when needed; container elastic scaling is an important feature of modern containerized application deployment and management, which improves the scalability and stability of applications through automation and intelligence.

[0173] Container horizontal scaling: adjusts the overall load capacity of the system by increasing or decreasing the number of container instances; this means adding more container instances in the horizontal direction to balance or handle higher loads. When the application load increases, horizontal scaling will automatically increase the number of containers, such as deploying more identical container instances to the cluster to share the load; this method can be implemented through the automation mechanism in container orchestration tools (such as Kubernetes, Docker Swarm), increasing the number of container instances through horizontal replication to cope with the increase in traffic; horizontal scaling can improve the overall performance and availability of the system, and disperse the load by adding instances, which is suitable for scenarios that need to handle a large number of concurrent requests or large load fluctuations; adding instances requires certain automated management and monitoring mechanisms, and requires more infrastructure resources.

[0174] Container vertical scaling: It adjusts the processing power of the container by increasing or decreasing the resources (such as CPU, memory) of a single container instance. This means increasing or decreasing the resource limits of the container instance, rather than the quantity. When the load of the application increases, vertical scaling adjusts the resource configuration of a single container instance, such as increasing its CPU core count or memory size, to improve the processing power of a single instance. Vertical scaling can be adjusted within a single instance, which is suitable for certain application scenarios that require higher computing power or memory, and the operation is relatively simple. The adjustment of container instance resources requires restarting the application or temporarily interrupting the service, and the resource limits of a single instance may become a bottleneck.

[0175] Step S09, applying the container scaling policy to any container or all containers of any resource group;

[0176] Performing container scaling policy configuration on any one container or all containers of any one resource group, wherein the container scaling policy configuration includes manual scaling policy configuration and automatic scaling policy configuration, and the manual scaling policy configuration includes modifying or extending the container scaling policy;

[0177] After generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method further includes:

[0178] Re-collect monitoring indicator data, analyze the trend of monitoring indicator data, create a prediction model, train and evaluate the prediction model, deploy the trained and evaluated prediction model in a container, generate a container scaling policy according to resource limit thresholds and scaling policy trigger conditions, optimize the generated container scaling policy, and adjust the application policy of container scaling.

[0179] Specifically, prediction strategy application: mainly includes associated resources / resource groups, workload strategy configuration and application.

[0180] Select a resource or a specified resource group to which the elastic scaling policy will be applied. If a resource group is selected, the configured elastic scaling policy will be applied to all containers in the resource group.

[0181] The container scaling policy configuration includes manual policy configuration and automatic policy configuration, wherein the automatic policy configuration automatically applies the elastic scaling policy generated based on the prediction model to the selected resource or resource group; the manual policy configuration manually specifies the scaling policy for the selected resource or resource group; at the same time, the manual policy configuration supports modifying or extending the automatic elastic policy; the policy content includes but is not limited to CPU usage, memory usage, network traffic, disk I / O, request processing speed, queue length, GPU video memory usage, GPU usage (GPT) and thresholds of custom indicators, whether to scale regularly and the timing strategy, whether to cool down and the cooling time (the time interval to wait between two shrinking or expanding actions), etc.

[0182] The prediction model automatically collects business operation indicator data, and automatically participates in the training, evaluation and adjustment of the prediction results of the prediction model. According to the impact of business growth or special events, the system can choose whether to update and apply the elastic scaling strategy of the workload of resources or resource groups as needed. Through the continuous data indicator collection, trend analysis, prediction, feedback model training, application, adjustment of prediction and feedback cycle process, a set of continuously optimized and improved container scaling rules and application strategies are finally formed.

[0183] like Figure 3 As shown, the present application obtains monitoring indicator data through a data collection tool; performs data cleaning, conversion and merging on the monitoring indicator data; performs trend analysis on the monitoring indicator data after cleaning, conversion and merging through time series analysis and periodic pattern detection; creates a prediction model according to the trend analysis results of the monitoring indicator data; trains and evaluates the prediction model according to the monitoring indicator data type; deploys the trained and evaluated prediction model in a container; sends the latest collected monitoring indicator data to the prediction model in a real-time batch processing manner to generate a load forecast; sets a resource limit threshold and a scaling policy trigger condition according to the load forecast result; generates a container scaling policy according to the resource limit threshold and the scaling policy trigger condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule; applies the container scaling policy to any container or all containers of any resource group; re-collects monitoring indicator data, analyzes the trend of monitoring indicator data, creates a prediction model, trains and evaluates the prediction model, deploys the trained and evaluated prediction model in a container, generates a container scaling policy according to the resource limit threshold and the scaling policy trigger condition, optimizes the generated container scaling policy, and adjusts the application policy of container scaling.

[0184] This application can significantly improve the flexibility and stability of the cloud platform while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0185] In addition, the container elastic scaling rules and application strategies are optimized, including:

[0186] Select appropriate performance indicators as the basis for scaling, and determine scaling targets based on specific business needs;

[0187] Set reasonable trigger thresholds for scaling actions and set the increase or decrease in the number of instances for each scaling action;

[0188] Add custom monitoring indicators to reflect the actual load of the application and use data analysis tools to predict future load trends;

[0189] Set different scaling strategies based on the service characteristics of different levels, and adjust the scaling strategy based on geographical location;

[0190] Conduct simulated stress tests regularly to verify the effectiveness of scaling strategies, and compare different scaling strategies through A / B testing.

[0191] Build predictive models based on historical data to predict future loads and make scaling decisions in advance;

[0192] Use machine learning algorithms to automatically adjust scaling parameters and perform sophisticated resource management;

[0193] Practice scaling strategies from a smaller scale and gradually expand to a larger scale;

[0194] Record the results of each scaling operation and analyze them to continuously optimize scaling rules.

[0195] Here, by adding resources in time to handle higher loads, the response time and waiting time are reduced. The optimized scaling strategy can better cope with traffic peaks and improve the overall processing capacity of the system. Reasonable configuration of scaling rules can avoid resource waste, especially reducing unnecessary resource consumption during off-peak hours. Even during traffic peaks, it can maintain a stable service level and improve user satisfaction. When a failure occurs, the service can be quickly restored to reduce the impact on users. By optimizing container elastic scaling rules and application strategies, not only can the performance and reliability of the system be improved, but also costs can be effectively reduced, user experience can be improved, and ultimately support the long-term development and competitiveness of the enterprise.

[0196] The method for generating a container scaling policy provided in the embodiment of the present application may be improved and optimized without departing from the technical solution of the present application, and these improvements and optimizations should also be regarded as within the scope of protection of the present application.

[0197] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0198] This application can significantly improve the flexibility and stability of the cloud platform while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0199] The technical solution provided in the embodiment of the present application predicts future loads, and the system can dynamically adjust container resources according to the predicted demand, avoiding resource bottlenecks and over-configuration, thereby optimizing resource utilization; greatly improving resource utilization and reducing operating costs; at the same time, it can ensure that the application can maintain a stable performance level under any load conditions. When the load is predicted to increase, the cluster resources are adjusted in advance according to the predicted load trend, thereby avoiding performance degradation or service unavailability. At the same time, through an automated predictive scaling mechanism, automated management and optimization of the application can be achieved, thereby improving the stability and performance of the system.

[0200] The technical solution provided in the embodiment of the present application is based on trend analysis and periodic pattern detection of historical data, combined with real-time prediction and feedback mechanism, and continuously optimizes the prediction model and elastic scaling strategy by predicting future load trends and periodic changes, so as to make precise resource adjustments. This continuous improvement enables the system to maintain high efficiency and reliability in the face of changing load conditions; at the same time, the automatic elastic scaling strategy can quickly respond to sudden load increases or decreases, ensuring the stability and availability of the system.

[0201] Embodiment 3

[0202] The present application provides a container scaling strategy generation device, such as Figure 4 As shown, the device includes an acquisition module, a cleaning module, an analysis module, a creation module, a processing module, a deployment module, a first generation module, a setting module, a second generation module, and an application optimization module.

[0203] In this embodiment, the acquisition module is used to acquire monitoring indicator data through a data acquisition tool;

[0204] A cleaning module, used for cleaning, converting and merging the monitoring indicator data;

[0205] An analysis module for trend analysis of the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0206] A creation module is used to create a prediction model based on the trend analysis results of the monitoring indicator data;

[0207] A processing module, used for training and evaluating the prediction model according to the monitoring indicator data type;

[0208] The deployment module is used to deploy the trained and evaluated prediction model in a container;

[0209] The first generation module is used to send the latest collected monitoring indicator data to the prediction model in a real-time batch processing manner to generate a load prediction;

[0210] The setting module is used to set resource limit thresholds and scaling policy trigger conditions based on load prediction results;

[0211] The second generating module is configured to generate a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0212] In one of the embodiments, a cleaning module is used to clean the monitoring indicator data using a data cleaning tool;

[0213] Performing data conversion and merging on the monitoring indicator data through a data preprocessing tool;

[0214] The data cleaning of the monitoring indicator data by using a data cleaning tool includes:

[0215] Performing data cleaning on the monitoring indicator data through a data analysis module, wherein the data cleaning includes cleaning missing values, abnormal values ​​and duplicate values;

[0216] The data preprocessing tool is used to convert and merge the monitoring indicator data, including:

[0217] Performing data conversion on the monitoring indicator data through a data type conversion function;

[0218] The monitoring indicator data is merged through a model merging tool.

[0219] In one of the embodiments, the analysis module is used to identify the change trend in the monitoring indicator data after the cleaning conversion merger by using a moving average method and / or a linear regression model and / or an exponential smoothing method;

[0220] The periodic pattern calculation is performed on the monitoring indicator data after cleaning, transformation and merging through the autocorrelation function and / or the Fourier transform function and / or the seasonal decomposition function and / or the periodic indicator calculation function to identify the periodic or seasonal change pattern in the monitoring indicator data.

[0221] In one embodiment, a creation module is used to create a prediction model based on the monitoring indicator data trend analysis results and the learning model, wherein the learning model includes a time series model and a machine learning model; the machine learning model includes a neural network model, a linear regression model, a support vector regression model, and a decision tree regression model;

[0222] The neural network model includes a multi-layer perceptron model, a recurrent neural network model, a convolutional neural network model, and a long short-term memory network model;

[0223] The step of creating a prediction model based on the trend analysis results of the monitoring indicator data further includes:

[0224] A prediction model is created by combining multiple machine learning models and the time series model with predictive analysis.

[0225] In one embodiment, the processing module is used to divide the monitoring indicator data into a first training data set and a first validation data set by a linear regression algorithm and / or a decision tree algorithm when the monitoring indicator data is non-time series data;

[0226] Training the prediction model using the first training data set;

[0227] Evaluating the generalization ability of the prediction model by using a cross-validation function and a first validation data set;

[0228] When the monitoring indicator data is time series data, the monitoring indicator data is divided into a second training data set and a second verification data set in chronological order by using an ARMA algorithm and / or an ARIMA algorithm;

[0229] Training the prediction model using the second training data set;

[0230] The error between the prediction results of the prediction model and the actual observed value is evaluated by means of a root mean square error function, a mean absolute error function, a mean absolute percentage error function and a second validation data set.

[0231] In one of the embodiments, a deployment module is used to package the trained and evaluated prediction model into a container image and deploy the container image in a container cloud environment, wherein the trained and evaluated prediction model includes model dependencies, prediction code, and configuration files.

[0232] In one of the embodiments, a first generation module is used to send the latest collected monitoring indicator data to the prediction model through real-time batch processing to generate a load forecast, wherein the load forecast includes the load forecast value at each time point and the overall load forecast within a preset time period.

[0233] In one of the embodiments, the second generating module is used to generate a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy types include container horizontal scaling policy and container vertical scaling policy.

[0234] In one of the embodiments, an application optimization module is used to apply the container scaling policy to any container or all containers of any resource group;

[0235] Performing container scaling policy configuration on any one container or all containers of any one resource group, wherein the container scaling policy configuration includes manual scaling policy configuration and automatic scaling policy configuration, and the manual scaling policy configuration includes modifying or extending the container scaling policy;

[0236] After generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method further includes:

[0237] Re-collect monitoring indicator data, analyze the trend of monitoring indicator data, create a prediction model, train and evaluate the prediction model, deploy the trained and evaluated prediction model in a container, generate a container scaling policy according to resource limit thresholds and scaling policy trigger conditions, optimize the generated container scaling policy, and adjust the application policy of container scaling.

[0238] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0239] The technical solution provided in the embodiments of the present application can not only improve system efficiency and performance, but also reduce the operation and maintenance burden and ensure the stability and reliability of the system; at the same time, it can improve user experience while ensuring the stability and response speed of the application; when the load forecast is accurate and the system can respond to changes quickly, users can access and use the application more reliably, and the automated elastic scaling strategy can reduce the intervention of operation and maintenance personnel. The system can automatically adjust the number of container instances according to the prediction model and strategy, reducing the risk of human error and saving management and maintenance costs.

[0240] The technical solution provided in the embodiment of the present application is based on trend analysis and periodic pattern detection of historical data, combined with real-time prediction and feedback mechanism, and continuously optimizes the prediction model and elastic scaling strategy by predicting future load trends and periodic changes, so as to make precise resource adjustments. This continuous improvement enables the system to maintain high efficiency and reliability in the face of changing load conditions; at the same time, the automatic elastic scaling strategy can quickly respond to sudden load increases or decreases, ensuring the stability and availability of the system.

[0241] Embodiment 4

[0242] The present invention also provides a container scaling strategy generation device, including:

[0243] one or more processors;

[0244] A storage device for storing one or more programs;

[0245] When the one or more programs are executed by the one or more processors, the one or more processors execute the following container scaling strategy generation method:

[0246] Obtain monitoring indicator data through data collection tools;

[0247] Cleaning, converting and merging the monitoring indicator data;

[0248] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0249] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0250] Training and evaluating the prediction model according to the monitoring indicator data type;

[0251] Deploy the trained and evaluated prediction model in a container;

[0252] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0253] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0254] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0255] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0256] The technical solution provided in the embodiment of the present application is based on trend analysis and periodic pattern detection of historical data, combined with real-time prediction and feedback mechanism, and continuously optimizes the prediction model and elastic scaling strategy by predicting future load trends and periodic changes, so as to make precise resource adjustments. This continuous improvement enables the system to maintain high efficiency and reliability in the face of changing load conditions; at the same time, the automatic elastic scaling strategy can quickly respond to sudden load increases or decreases, ensuring the stability and availability of the system.

[0257] Embodiment 5

[0258] The present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following method for generating a container scaling policy may be executed:

[0259] Obtain monitoring indicator data through data collection tools;

[0260] Cleaning, converting and merging the monitoring indicator data;

[0261] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0262] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0263] Training and evaluating the prediction model according to the monitoring indicator data type;

[0264] Deploy the trained and evaluated prediction model in a container;

[0265] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0266] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0267] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0268] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0269] This application can significantly improve the flexibility and stability of the cloud platform while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0270] The technical solution provided in the embodiments of the present application can not only improve system efficiency and performance, but also reduce the operation and maintenance burden and ensure the stability and reliability of the system; at the same time, it can improve user experience while ensuring the stability and response speed of the application; when the load forecast is accurate and the system can respond to changes quickly, users can access and use the application more reliably, and the automated elastic scaling strategy can reduce the intervention of operation and maintenance personnel. The system can automatically adjust the number of container instances according to the prediction model and strategy, reducing the risk of human error and saving management and maintenance costs.

[0271] Embodiment 6

[0272] The present application also provides a computer program product, including a computer program, which, when executed by a processor, can implement the following method for generating a container scaling policy:

[0273] Obtain monitoring indicator data through data collection tools;

[0274] Cleaning, converting and merging the monitoring indicator data;

[0275] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0276] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0277] Training and evaluating the prediction model according to the monitoring indicator data type;

[0278] Deploy the trained and evaluated prediction model in a container;

[0279] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0280] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0281] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0282] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0283] The technical solution provided in the embodiments of the present application can not only improve system efficiency and performance, but also reduce the operation and maintenance burden and ensure the stability and reliability of the system; at the same time, it can improve user experience while ensuring the stability and response speed of the application; when the load forecast is accurate and the system can respond to changes quickly, users can access and use the application more reliably, and the automated elastic scaling strategy can reduce the intervention of operation and maintenance personnel. The system can automatically adjust the number of container instances according to the prediction model and strategy, reducing the risk of human error and saving management and maintenance costs.

[0284] The technical solution provided in the embodiment of the present application predicts future loads, and the system can dynamically adjust container resources according to the predicted demand, avoiding resource bottlenecks and over-configuration, thereby optimizing resource utilization; greatly improving resource utilization and reducing operating costs; at the same time, it can ensure that the application can maintain a stable performance level under any load conditions. When the load is predicted to increase, the cluster resources are adjusted in advance according to the predicted load trend, thereby avoiding performance degradation or service unavailability. At the same time, through an automated predictive scaling mechanism, automated management and optimization of the application can be achieved, thereby improving the stability and performance of the system.

[0285] Embodiment 7

[0286] The present application provides a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0287] Obtain monitoring indicator data through data collection tools;

[0288] Cleaning, converting and merging the monitoring indicator data;

[0289] Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection;

[0290] Creating a prediction model based on the trend analysis results of the monitoring indicator data;

[0291] Training and evaluating the prediction model according to the monitoring indicator data type;

[0292] Deploy the trained and evaluated prediction model in a container;

[0293] The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction;

[0294] Set resource limit thresholds and scaling policy trigger conditions based on load forecast results;

[0295] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

[0296] In one embodiment, the data cleaning and conversion and merging of the monitoring indicator data includes:

[0297] Cleaning the monitoring indicator data using a data cleaning tool;

[0298] Performing data conversion and merging on the monitoring indicator data through a data preprocessing tool;

[0299] The data cleaning of the monitoring indicator data by using a data cleaning tool includes:

[0300] Performing data cleaning on the monitoring indicator data through a data analysis module, wherein the data cleaning includes cleaning missing values, abnormal values ​​and duplicate values;

[0301] The data preprocessing tool is used to convert and merge the monitoring indicator data, including:

[0302] Performing data conversion on the monitoring indicator data through a data type conversion function;

[0303] The monitoring indicator data is merged through a model merging tool.

[0304] In one embodiment, the trend analysis of the monitoring indicator data after the cleaning conversion and merging is performed through time series analysis and periodic pattern detection, includes:

[0305] Identify the changing trends in the monitoring indicator data after the cleaning conversion and merging by using the moving average method and / or the linear regression model and / or the exponential smoothing method;

[0306] The periodic pattern calculation is performed on the monitoring indicator data after cleaning, transformation and merging through the autocorrelation function and / or the Fourier transform function and / or the seasonal decomposition function and / or the periodic indicator calculation function to identify the periodic or seasonal change pattern in the monitoring indicator data.

[0307] In one embodiment, the creating a prediction model according to the trend analysis result of the monitoring indicator data includes:

[0308] Creating a prediction model based on the trend analysis results of the monitoring indicator data and the learning model, wherein the learning model includes a time series model and a machine learning model; the machine learning model includes a neural network model, a linear regression model, a support vector regression model, and a decision tree regression model;

[0309] The neural network model includes a multi-layer perceptron model, a recurrent neural network model, a convolutional neural network model, and a long short-term memory network model;

[0310] The step of creating a prediction model based on the trend analysis results of the monitoring indicator data further includes:

[0311] A prediction model is created by combining multiple machine learning models and the time series model with predictive analysis.

[0312] In one embodiment, the training and evaluating the prediction model according to the monitoring indicator data type includes:

[0313] When the monitoring indicator data is non-time series data, the monitoring indicator data is divided into a first training data set and a first validation data set by a linear regression algorithm and / or a decision tree algorithm;

[0314] Training the prediction model using the first training data set;

[0315] Evaluating the generalization ability of the prediction model by using a cross-validation function and a first validation data set;

[0316] When the monitoring indicator data is time series data, the monitoring indicator data is divided into a second training data set and a second verification data set in chronological order by using an ARMA algorithm and / or an ARIMA algorithm;

[0317] Training the prediction model using the second training data set;

[0318] The error between the prediction results of the prediction model and the actual observed value is evaluated by means of a root mean square error function, a mean absolute error function, a mean absolute percentage error function and a second validation data set.

[0319] In one embodiment, deploying the trained and evaluated prediction model in a container includes:

[0320] Packaging the trained and evaluated prediction model into a container image, and deploying the container image in a container cloud environment, wherein the trained and evaluated prediction model includes model dependencies, prediction code, and configuration files;

[0321] The method of sending the latest collected monitoring indicator data to the prediction model in real-time batch processing to generate load prediction includes:

[0322] The latest collected monitoring indicator data is sent to the prediction model in real-time batch processing to generate a load forecast, wherein the load forecast includes the load forecast value at each time point and the overall load forecast within a preset time period;

[0323] The generating a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition includes:

[0324] A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy types include container horizontal scaling policy and container vertical scaling policy.

[0325] In one of the embodiments, after generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method includes:

[0326] Apply the container scaling policy to any container or all containers of any resource group;

[0327] Performing container scaling policy configuration on any one container or all containers of any one resource group, wherein the container scaling policy configuration includes manual scaling policy configuration and automatic scaling policy configuration, and the manual scaling policy configuration includes modifying or extending the container scaling policy;

[0328] After generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method further includes:

[0329] Re-collect monitoring indicator data, analyze the trend of monitoring indicator data, create a prediction model, train and evaluate the prediction model, deploy the trained and evaluated prediction model in a container, generate a container scaling policy according to resource limit thresholds and scaling policy trigger conditions, optimize the generated container scaling policy, and adjust the application policy of container scaling.

[0330] This application can significantly improve the flexibility and stability of the cloud platform while reducing operation and maintenance costs, thereby greatly improving the market competitiveness of container cloud products.

[0331] Figure 5 An exemplary system provided for Embodiment 7 of the present application that can be used to implement various embodiments described in the present application;

[0332] like Figure 5 As shown, in some embodiments, the system can be used as any of the above-mentioned devices for generating container scaling policies in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in this application.

[0333] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0334] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0335] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for generating a container scaling strategy, characterized in that: The method comprises: Obtain monitoring indicator data through data collection tools; Cleaning, converting and merging the monitoring indicator data; Conduct trend analysis on the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection; Creating a prediction model based on the trend analysis results of the monitoring indicator data; Training and evaluating the prediction model according to the monitoring indicator data type; Deploy the trained and evaluated prediction model in a container; The latest collected monitoring indicator data is sent to the prediction model through real-time batch processing to generate load prediction; Set resource limit thresholds and scaling policy trigger conditions based on load forecast results; A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

2. The method for generating a container scaling strategy according to claim 1, characterized in that: The data cleaning, conversion and merging of the monitoring indicator data includes: Cleaning the monitoring indicator data using a data cleaning tool; Performing data conversion and merging on the monitoring indicator data through a data preprocessing tool; The data cleaning of the monitoring indicator data by using a data cleaning tool includes: Performing data cleaning on the monitoring indicator data through a data analysis module, wherein the data cleaning includes cleaning missing values, abnormal values ​​and duplicate values; The data preprocessing tool is used to convert and merge the monitoring indicator data, including: Performing data conversion on the monitoring indicator data through a data type conversion function; The monitoring indicator data is merged through a model merging tool.

3. The method for generating a container scaling strategy according to claim 2, characterized in that: The trend analysis of the monitoring indicator data after cleaning conversion and merging is performed through time series analysis and periodic pattern detection, including: Identify the changing trends in the monitoring indicator data after the cleaning conversion and merging by using the moving average method and / or the linear regression model and / or the exponential smoothing method; The periodic pattern calculation is performed on the monitoring indicator data after cleaning, transformation and merging through the autocorrelation function and / or the Fourier transform function and / or the seasonal decomposition function and / or the periodic indicator calculation function to identify the periodic or seasonal change pattern in the monitoring indicator data.

4. The method for generating a container scaling strategy according to claim 1, characterized in that: The creating a prediction model according to the trend analysis result of the monitoring indicator data includes: Creating a prediction model based on the trend analysis results of the monitoring indicator data and the learning model, wherein the learning model includes a time series model and a machine learning model; the machine learning model includes a neural network model, a linear regression model, a support vector regression model, and a decision tree regression model; The neural network model includes a multi-layer perceptron model, a recurrent neural network model, a convolutional neural network model, and a long short-term memory network model; The step of creating a prediction model based on the trend analysis results of the monitoring indicator data further includes: A prediction model is created by combining multiple machine learning models and the time series model with predictive analysis.

5. The method for generating a container scaling strategy according to claim 4, characterized in that: The training and evaluation of the prediction model according to the monitoring indicator data type includes: When the monitoring indicator data is non-time series data, the monitoring indicator data is divided into a first training data set and a first validation data set by a linear regression algorithm and / or a decision tree algorithm; Training the prediction model using the first training data set; Evaluating the generalization ability of the prediction model by using a cross-validation function and a first validation data set; When the monitoring indicator data is time series data, the monitoring indicator data is divided into a second training data set and a second verification data set in chronological order by using an ARMA algorithm and / or an ARIMA algorithm; Training the prediction model using the second training data set; The error between the prediction results of the prediction model and the actual observed value is evaluated by means of a root mean square error function, a mean absolute error function, a mean absolute percentage error function and a second validation data set.

6. The method for generating a container scaling strategy according to claim 1, characterized in that: The deployment of the trained and evaluated prediction model in a container includes: Packaging the trained and evaluated prediction model into a container image, and deploying the container image in a container cloud environment, wherein the trained and evaluated prediction model includes model dependencies, prediction code, and configuration files; The method of sending the latest collected monitoring indicator data to the prediction model in real-time batch processing to generate load prediction includes: The latest collected monitoring indicator data is sent to the prediction model in real-time batch processing to generate a load forecast, wherein the load forecast includes the load forecast value at each time point and the overall load forecast within a preset time period; The generating a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition includes: A container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy types include container horizontal scaling policy and container vertical scaling policy.

7. The method for generating a container scaling strategy according to claim 1, characterized in that: After the container scaling policy is generated according to the resource limiting threshold and the scaling policy triggering condition, the method includes: Apply the container scaling policy to any container or all containers of any resource group; Performing container scaling policy configuration on any one container or all containers of any one resource group, wherein the container scaling policy configuration includes manual scaling policy configuration and automatic scaling policy configuration, and the manual scaling policy configuration includes modifying or extending the container scaling policy; After generating the container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, the method further includes: Re-collect monitoring indicator data, analyze the trend of monitoring indicator data, create a prediction model, train and evaluate the prediction model, deploy the trained and evaluated prediction model in a container, generate a container scaling policy according to resource limit thresholds and scaling policy trigger conditions, optimize the generated container scaling policy, and adjust the application policy of container scaling.

8. A container scaling strategy generation device, characterized in that: The device comprises: An acquisition module is used to obtain monitoring indicator data through a data collection tool; A cleaning module, used for cleaning, converting and merging the monitoring indicator data; An analysis module for trend analysis of the monitoring indicator data after cleaning conversion and merging through time series analysis and periodic pattern detection; A creation module is used to create a prediction model based on the trend analysis results of the monitoring indicator data; A processing module, used for training and evaluating the prediction model according to the monitoring indicator data type; The deployment module is used to deploy the trained and evaluated prediction model in a container; The first generation module is used to send the latest collected monitoring indicator data to the prediction model in a real-time batch processing manner to generate a load prediction; The setting module is used to set resource limit thresholds and scaling policy trigger conditions based on load prediction results; The second generating module is configured to generate a container scaling policy according to the resource limiting threshold and the scaling policy triggering condition, wherein the container scaling policy includes a scaling policy type and a scaling policy rule.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for generating a container scaling policy according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating a container scaling policy according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Rapid containerization packaging method, system and device for generative AI application and medium

    CN121116500A