Business memory-based multifunctional cycle prediction type dynamic container scaling scheduling method and system

Load prediction and automated scaling are performed through DearAR deep learning algorithm, which solves the problems of response lag and inaccurate prediction in dynamic container scaling technology, and realizes intelligent scaling decisions for different business types, improving resource utilization and application stability.

CN118963918APending Publication Date: 2024-11-15SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411056194.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Dynamic container scaling technology has problems such as lag in response and inaccurate predictions, and fails to make full use of historical data and business characteristics, resulting in a lack of targeted and intelligent scaling decisions.

Method used

Using a multi-functional periodic prediction dynamic container scaling scheduling method based on business memory, load prediction is performed through the DearAR deep learning algorithm, combined with data acquisition, cleaning, storage and analysis, a scaling strategy for the number of container copies is formulated according to the business type to achieve automated scaling.

Benefits of technology

It improves the accuracy and response speed of container load prediction, reduces operation and maintenance costs, ensures the stability and efficient scalability of the application, and reduces the complexity of system operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963918A_ABST
    Figure CN118963918A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of dynamic container scaling scheduling, in particular to a multifunctional periodic prediction type dynamic container scaling scheduling method and system based on business memory, and the method comprises the steps: setting an HPA automatic scaling rule, and formulating a corresponding index rule according to a prediction type scaling data analysis result and an analysis result to control the number of container copies; predictive telescoping, including data acquisition, data cleaning, data storage, data analysis and load prediction; the method has the beneficial effects that the container is subjected to manual expansion and contraction, automatic expansion and contraction and predictive expansion and contraction, and different service types can be divided into calculation-intensive applications, data-intensive applications, network communication-intensive applications, burst high-access applications and the like. According to different business types, different performance indexes are collected, so that formulation and implementation of a container load prediction strategy are realized, and application stability and efficient expandability are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dynamic container scaling scheduling, and in particular to a multifunctional periodic prediction-type dynamic container scaling scheduling method and system based on business memory. Background Art

[0002] With the rapid development of cloud computing and containerization technology, especially the widespread application of container orchestration tools such as Kubernetes, containerized deployment has become the standard way to deploy applications under the microservice architecture. However, how to efficiently and flexibly manage container resources to cope with ever-changing workloads has become an urgent problem to be solved.

[0003] Traditional static resource allocation methods cannot dynamically adjust resources according to real-time load conditions, which can easily lead to resource waste or insufficient resources. Therefore, dynamic container scaling technology has emerged, which aims to automatically adjust the number of containers according to the actual load conditions of the application to achieve optimal resource utilization.

[0004] Although dynamic container scaling technology has made some progress, it still has the following shortcomings:

[0005] Response lag: Some dynamic scaling strategies rely on real-time feedback of the current load, but they often have response lags and cannot respond to sudden changes in load in a timely manner.

[0006] Inaccurate prediction: Although some strategies have introduced prediction mechanisms, the accuracy and robustness of the prediction models need to be improved, and it is difficult to accurately predict future load changes.

[0007] Lack of business memory: Most dynamic scaling strategies fail to make full use of historical data and business characteristics, resulting in scaling decisions that lack pertinence and intelligence. Summary of the invention

[0008] The purpose of the present invention is to provide a multifunctional periodic prediction-based dynamic container scaling scheduling method and system based on business memory to solve the problems raised in the above-mentioned background technology.

[0009] To achieve the above object, the present invention provides the following technical solution: a multifunctional periodic predictive dynamic container scaling scheduling method based on business memory, the method comprising the following steps:

[0010] Set the HPA automatic scaling rules, and formulate corresponding indicator rules to control the number of container replicas based on the data analysis results of predictive scaling;

[0011] Predictive scaling, including data collection, data cleaning, data storage, data analysis, and load prediction;

[0012] In predictive scaling, analytical data is classified according to business type;

[0013] In the load prediction stage of predictive scaling, the workload of the next stage and the number of container replicas are predicted based on the DearAR deep learning algorithm prediction model, and the container replicas are automatically scaled.

[0014] Preferably, data collection includes three types of data: the first is through the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods; the second is to collect business-related data on the number of requests per second (RPS) of the business API; the third is to collect the HPA automatic scaling history records and manual scaling history records.

[0015] Preferably, data cleaning includes checking the integrity and accuracy of the data, normalizing the data format, removing duplicate data, converting data types, and processing missing values.

[0016] Preferably, after data storage, data cleaning and organization are completed, the data is stored in a database.

[0017] Preferably, data analysis, introduces the DeepAR deep learning algorithm model training data for predicting time series distribution, and performs data analysis on the collected data;

[0018] Load prediction: Through data analysis, the DearAR deep learning algorithm prediction model is used to predict the workload and number of container replicas in the next stage, and the container replicas are automatically scaled.

[0019] A multifunctional periodic prediction dynamic container scaling scheduling system based on business memory, the system consists of a rule setting module, a pre-test scaling module, a data classification module and a container replica scaling module;

[0020] The rule setting module sets the rules for HPA automatic scaling. Based on the data analysis results of predictive scaling, the corresponding indicator rules are formulated to control the number of container replicas.

[0021] Pre-testing scaling module, including data collection, data cleaning, data storage, data analysis and load prediction;

[0022] Data classification module, which classifies analytical data according to business type in predictive scaling;

[0023] The container replica scaling module predicts the workload and number of container replicas in the next stage based on the DearAR deep learning algorithm prediction model during the load prediction stage of predictive scaling, and automatically scales the container replicas.

[0024] Preferably, in the pre-test scaling module, data collection includes three types of data: the first is the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods; the second is to collect business-related data on the number of requests per second (RPS) of the business API; the third is to collect the HPA automatic scaling history records and manual scaling history records.

[0025] Preferably, in the pre-test scaling module, data cleaning includes checking the integrity and accuracy of the data, normalizing the data format, deduplicating data, converting data types, and processing missing values.

[0026] Preferably, in the pre-test scaling module, data is stored, and after data cleaning and sorting are completed, the data is stored in a database.

[0027] Preferably, in the pre-test scaling module, data analysis introduces the DeepAR deep learning algorithm model training data for predicting time series distribution, and performs data analysis on the collected data;

[0028] Load prediction: Through data analysis, the DearAR deep learning algorithm prediction model is used to predict the workload and number of container replicas in the next stage, and the container replicas are automatically scaled.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The multifunctional periodic predictive dynamic container scaling scheduling method and system based on business memory proposed in the present invention can be divided into computing-intensive applications, data-intensive applications, network communication-intensive applications, and sudden high-access applications according to different business types by manually scaling + automatically scaling + predictive scaling of containers. According to different business types, different performance indicators are collected to achieve the formulation and implementation of container load prediction strategies to ensure the stability and efficient scalability of applications. The manpower cost of operating and maintaining applications is reduced, resource utilization is improved, the complexity of system operation and maintenance is reduced, and the service quality of applications is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of the method of the present invention;

[0032] Figure 2 This is a system architecture diagram of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose and technical solution of the present invention clearly and completely described, and the advantages more clearly understood, the embodiments of the present invention are further described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, rather than all of the embodiments, and are only used to explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] Embodiment 1

[0035] See also Figure 1 The present invention provides a technical solution: a multifunctional periodic predictive dynamic container scaling scheduling method based on business memory, the method comprising the following steps:

[0036] Set the HPA automatic scaling rules, and formulate corresponding indicator rules to control the number of container replicas based on the data analysis results of predictive scaling;

[0037] Predictive scaling includes data collection, data cleaning, data storage, data analysis and load prediction. Data collection includes three types of data: the first is the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods. The second is to collect business-related data such as the number of requests per second (RPS) of the business API. The third is to collect the HPA automatic scaling history and manual scaling history. Data cleaning includes checking the integrity and accuracy of the data, normalizing the data format, deduplicating data, converting data types, and processing missing values. Data storage: After data cleaning and organization, the data is stored in the database. Data analysis: introduce the DeepAR deep learning algorithm model training data for predicting time series distribution, and perform data analysis on the collected data. Load prediction: through data analysis, the next stage of workload and the number of container replicas are predicted based on the DearAR deep learning algorithm prediction model, and the container replicas are automatically scaled.

[0038] In predictive scaling, analytical data is classified according to business type;

[0039] In the load prediction stage of predictive scaling, the workload of the next stage and the number of container replicas are predicted based on the DearAR deep learning algorithm prediction model, and the container replicas are automatically scaled.

[0040] The main features of the DeepAR algorithm are to predict the distribution of future time series and process the impact of the amplitude between multiple sequences on the model, thereby improving accuracy. Compared with traditional models, the benefits of the DeepAR algorithm are:

[0041] 1. Learn seasonal behavior and time series dependence on covariates. Reduce manual feature engineering to mine responsible inter-group dependencies.

[0042] 2. Monte Carlo sampling can be used to estimate the quantiles of future probability distributions.

[0043] 3. By learning similar items, even if the current item has little or no history, it can still be predicted.

[0044] 4. Allows selection of different likelihood functions based on the statistical properties of the data.

[0045] Algorithm model:

[0046]

[0047] i is the time series id, t is the time point, and t0 is the cutoff point of the training set and the test set.

[0048] is the target value of the prediction range (future t_0 to T period)

[0049] is the target value of the condition range (history 1 to t_0-1).

[0050] Time series covariates.

[0051] The DeepAR model is an autoregressive recurrent network structure.

[0052] Likelihood function model

[0053] DeepAR predicts all parameters θ (e.g., mean and variance) of the probability distribution at the next time point.

[0054] Because we want to predict the fraud count statistics, negative binomial distribution is used.

[0055]

[0056] DeepAR principle and implementation process

[0057] DeepAR automatically creates feature time series based on the frequency of the target time series. For example, two feature time series (hour of the week and day of the month) are used in combination with the custom feature time series provided during training and inference based on these derived feature time series. Take the following figure as an example: ui,1,t represents the hour of the day and ui,2,t represents the day of the week.

[0058] DeepAR principle and implementation process

[0059] DeepAR automatically creates feature time series based on the frequency of the target time series. For example, two feature time series (hour of the week and day of the month) are used in combination with the custom feature time series provided during training and inference based on these derived feature time series. Take the following figure as an example: ui,1,t represents the hour of the day and ui,2,t represents the day of the week.

[0060] The model is trained by randomly sampling multiple training examples from each time series in the training dataset, each training example consists of a pair of adjacent context and prediction windows with a fixed predefined length. The hyperparameter controls how far ahead the network can look, and the context_length hyperparameter controls how far back it can predict.

[0061] prediction_lengthDuring training, the algorithm ignores training set elements that contain time series shorter than the specified prediction length. The following figure represents five samples extracted from element i with a context length of 12 hours and a prediction length of 6 hours. The feature time series xi,1,t and ui,2,t are omitted for brevity.

[0062] Model Input

[0063] The start time and length of the time series can be different. For example, during the operation of the business, the number of container copies will change on different dates, and its start date will be different. At the same time, all series must have the same frequency, number of categorical features, and number of dynamic features.

[0064] start - A string in the format of YYYY-MM-DD HH:MM:SS. The start timestamp cannot contain time zone information.

[0065] target - an array of floating point values ​​or integers representing the time series. Missing values ​​can be encoded as null literals, "NaN" strings in JSON format, or nan floating point values ​​in Parquet format.

[0066] dynamic_feat (optional) - one or more arrays of floating point values ​​or integers representing vectors of custom feature time series (dynamic features). If this field is set, all records must have the same number of internal arrays (same number of feature time series).

[0067] cat (optional) – An array of categorical features that can be used to encode the group the record belongs to. Categorical features must be encoded as a sequence of positive integers starting with 0.

[0068] The input is in Json line format.

[0069] train:

[0070] The model parameters are learned by maximizing the log-likelihood, using stochastic gradient descent: Since hi,t is a deterministic function of the input, all quantities required for the following computation are observed

[0071]

[0072] During training, the values ​​of zi,t are known and a teacher forcing strategy is used; during prediction, for t≥t0, zi,t is unknown and the prediction samples follow the distribution z i ,t ~l(,|θi,t), calculate hi,t according to (3), and recursively obtain the predicted output in the decoder stage.

[0073] Embodiment 2

[0074] Based on the first embodiment, a multifunctional periodic prediction-based dynamic container scaling scheduling system based on business memory is proposed, and the system consists of a rule setting module, a pre-test scaling module, a data classification module, and a container replica scaling module;

[0075] The rule setting module sets the rules for HPA automatic scaling. Based on the data analysis results of predictive scaling, the corresponding indicator rules are formulated to control the number of container replicas.

[0076] The pre-test scaling module includes data collection, data cleaning, data storage, data analysis and load prediction; data collection includes three types of data: the first is the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods; the second is to collect business-related data such as the number of requests per second (RPS) of the business API; the third is to collect the HPA automatic scaling history and manual scaling history. Data cleaning includes checking the integrity and accuracy of the data, normalizing the data format, deduplicating data, converting data types, and processing missing values. Data storage: After data cleaning and organization, the data is stored in the database. Data analysis: introduce the DeepAR deep learning algorithm model training data for predicting time series distribution, and perform data analysis on the collected data; load prediction: through data analysis, the next stage of workload and the number of container copies are predicted based on the DearAR deep learning algorithm prediction model, and the container copies are automatically scaled.

[0077] Data classification module, which classifies analytical data according to business type in predictive scaling;

[0078] The container replica scaling module predicts the workload and number of container replicas in the next stage based on the DearAR deep learning algorithm prediction model during the load prediction stage of predictive scaling, and automatically scales the container replicas.

[0079] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multifunctional periodic predictive dynamic container scaling scheduling method based on business memory, characterized by: The method comprises the following steps: Set the HPA automatic scaling rules, and formulate corresponding indicator rules to control the number of container replicas based on the data analysis results of predictive scaling; Predictive scaling, including data collection, data cleaning, data storage, data analysis, and load prediction; In predictive scaling, analytical data is classified according to business type; In the load prediction stage of predictive scaling, the workload of the next stage and the number of container replicas are predicted based on the DearAR deep learning algorithm prediction model, and the container replicas are automatically scaled.

2. According to claim 1, a multifunctional periodic predictive dynamic container scaling scheduling method based on business memory is characterized in that: Data collection includes three types of data: the first is through the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods; the second is to collect business-related data such as the number of requests per second (RPS) of the business API; the third is to collect the HPA automatic scaling history and manual scaling history.

3. According to claim 1, a multifunctional periodic predictive dynamic container scaling scheduling method based on business memory is characterized in that: Data cleaning includes checking the integrity and accuracy of data, normalizing data formats, removing duplicate data, converting data types, and processing missing values.

4. According to claim 1, a multifunctional periodic predictive dynamic container scaling scheduling method based on business memory is characterized in that: Data storage,After data cleaning and organization are completed, the data will be stored in the database.

5. According to claim 1, a multifunctional periodic prediction-based dynamic container scaling scheduling method based on business memory is characterized in that: Data analysis: introduce the DeepAR deep learning algorithm model for predicting time series distribution to train data and perform data analysis on the collected data; Load prediction: Through data analysis, the DearAR deep learning algorithm prediction model is used to predict the workload and number of container replicas in the next stage, and the container replicas are automatically scaled.

6. A multifunctional periodic prediction-based dynamic container scaling scheduling system based on business memory according to the multifunctional periodic prediction-based dynamic container scaling scheduling method based on business memory according to any one of claims 1 to 5, characterized in that: The system consists of a rule setting module, a pre-test scaling module, a data classification module, and a container replica scaling module; The rule setting module sets the rules for HPA automatic scaling. Based on the data analysis results of predictive scaling, the corresponding indicator rules are formulated to control the number of container replicas. Pre-testing scaling module, including data collection, data cleaning, data storage, data analysis and load prediction; Data classification module, which classifies analytical data according to business type in predictive scaling; The container replica scaling module predicts the workload and number of container replicas in the next stage based on the DearAR deep learning algorithm prediction model during the load prediction stage of predictive scaling, and automatically scales the container replicas.

7. The multifunctional periodic prediction dynamic container scaling scheduling system based on business memory according to claim 6 is characterized in that: In the pre-test scaling module, data collection includes three types of data: the first is the collection of load indicators. The monitoring of load indicators is to monitor the service resource usage indicator information of the deployed container, including the monitoring of CPU utilization, memory utilization, disk IO load indicators, and real-time data acquisition and monitoring of the current number of Pods; the second is to collect business-related data such as the number of requests per second (RPS) of the business API; the third is to collect the HPA automatic scaling history records and manual scaling history records.

8. The multifunctional periodic prediction dynamic container scaling scheduling system based on business memory according to claim 6 is characterized in that: In the pre-test scaling module, data cleaning includes checking the integrity and accuracy of the data, normalizing the data format, deduplicating data, converting data types, and processing missing values.

9. The multifunctional periodic prediction dynamic container scaling scheduling system based on business memory according to claim 6 is characterized in that: In the pre-test expansion module, after data is stored, cleaned and sorted, the data is stored in a database.

10. The multifunctional periodic prediction dynamic container scaling scheduling system based on business memory according to claim 6 is characterized in that: In the pre-test scaling module, data analysis is performed, and DeepAR deep learning algorithm model training data for predicting time series distribution is introduced to perform data analysis on the collected data; Load prediction: Through data analysis, the DearAR deep learning algorithm prediction model is used to predict the workload and number of container replicas in the next stage, and the container replicas are automatically scaled.