Storage capacity prediction method and device, electronic equipment and readable storage medium
By setting up multiple prediction models and using model selection to determine the target prediction model, accurate predictions of different capacity change trends were achieved, improving the accuracy and reliability of storage capacity prediction.
Patent Information
- Application Number
- CN202110825048.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-21
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-07-21
AI Technical Summary
In existing technologies, storage capacity prediction methods based on a single model cannot accurately predict multiple types of capacity change trends, resulting in low prediction accuracy and reliability.
Multiple prediction models are set up to suit different categories of capacity change trends. The target prediction model is determined by selecting a model, and capacity prediction is performed based on the selection results.
It improves the accuracy and reliability of storage capacity prediction and solves the problem of low accuracy and reliability caused by single-model prediction.
Smart Images

Figure CN115686340B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a storage capacity prediction method, storage capacity prediction device, electronic device, and computer-readable storage medium. Background Technology
[0002] In recent years, global spending on cloud computing and demand for cloud services have exploded. Cloud service providers need to predict future storage capacity based on historical data on storage capacity changes when planning their server equipment purchases. Related technologies typically employ models based on linear regression, classic time series models, or neural network models to predict future storage capacity. However, in reality, capacity change trends fall into multiple categories, and a single model cannot accurately predict all categories. Therefore, these technologies suffer from low prediction accuracy and reliability. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a storage capacity prediction method, storage capacity prediction device, electronic device and computer-readable storage medium, which sets up multiple prediction models applicable to different categories of capacity change trends, uses the selected model to analyze the capacity change trend of the data to be predicted, determines the matching selection result, and then selects a suitable target prediction model according to the selection result, thereby obtaining accurate and reliable capacity prediction data.
[0004] To address the aforementioned technical problems, this application provides a storage capacity prediction method, specifically including:
[0005] Obtain the data to be predicted;
[0006] The data to be predicted is input into the selection model to obtain the selection result;
[0007] Based on the selection results, a target prediction model is determined from multiple prediction models, and the data to be predicted is input into the target prediction model to obtain capacity prediction data.
[0008] In one feasible implementation, the training process of the selected model includes:
[0009] Acquire the first training data, and input each of the first training data into multiple prediction models to obtain the corresponding multiple prediction results;
[0010] Multiple prediction errors are calculated using the predicted value labels corresponding to the first training data and each of the prediction results;
[0011] Generate training features corresponding to the first training data, and use the training features and the model label corresponding to the minimum prediction error to generate the second training data;
[0012] The initial selection model is trained using the second training data to obtain the selection model.
[0013] This implementation method has the following beneficial effects: By calculating the prediction error between the result predicted by each prediction model using each first training data and the predicted value label (i.e., the correct result), it is possible to accurately determine which prediction model the first training data is suitable for. The model label corresponding to the minimum prediction error is used as a new label to generate high-quality second training data. This second training data is then used to train a selection model with better accuracy. This solves the problem of low accuracy in the selection model due to poor training data quality, which in turn leads to low reliability of capacity prediction data, thus improving the reliability of capacity prediction data.
[0014] In one feasible implementation, generating the training features corresponding to the first training data includes:
[0015] The first training data is subjected to feature data extraction to obtain training feature data; the feature data extraction includes at least two of the following: statistical data extraction, frequency domain data extraction, and model parameter extraction.
[0016] The training feature data is used to form training features.
[0017] This implementation method has the following beneficial effects: by extracting feature data from multiple angles from the first training data, more effective training feature data can be obtained, so that the training features can better represent the characteristics of the first training data. This solves the problem of poor training effect and low classification accuracy of the selection model caused by low quality of training features, improves the accuracy of the selection model, and thus improves the reliability of the capacity prediction data.
[0018] In one feasible implementation, the step of extracting feature data from the first training data to obtain training feature data includes:
[0019] The first training data is subjected to feature data extraction based on target data items to obtain the training feature data;
[0020] The process of determining the target data item includes:
[0021] Full feature data extraction is performed on the initial data to obtain the initial feature data;
[0022] The initial feature data is filtered based on hypothesis testing to obtain target feature data, and the data item corresponding to the target feature data is determined as the target data item.
[0023] This implementation method has the following beneficial effects: by performing full data feature analysis and hypothesis testing-based filtering, the parts that cannot well represent the initial data can be filtered out from the full initial feature data, while retaining the valuable parts. This reduces the number of target data items and the number of training feature data, ultimately improving the generation speed and quality of training features. It solves the problem of slow model training speed caused by slow training feature generation speed, as well as the problem of poor model training effect caused by a large amount of invalid data in the training features, thereby improving the training speed and classification accuracy of the selected model.
[0024] In one feasible implementation, the process of determining the prediction model includes:
[0025] Get the model selection command;
[0026] The prediction model is selected from multiple candidate models according to the model selection instruction.
[0027] This implementation method has the following beneficial effects: by obtaining the model selection instruction, the corresponding prediction model can be selected as needed, achieving the effect of flexible selection of prediction models. At the same time, it realizes the high scalability of prediction models and solves the problem of weak scalability and limited model selection caused by fixed prediction models.
[0028] In one feasible implementation, training the initial selection model using the second training data to obtain the selection model includes:
[0029] The initial selection model is trained using the second training data to obtain a classifier;
[0030] An encoder is constructed based on the generation method of the training features, and the selection model is formed by using the encoder and the classifier.
[0031] This implementation method has the following beneficial effects: By constructing an encoder according to the generation method of training features, and using the encoder and classifier together to form a selection model, a selection model capable of performing feature extraction independently can be obtained, ensuring a fixed feature extraction method for any content to be predicted data. This solves the problem of poor classification accuracy caused by differences in the feature encoding methods of the input data to the selection model, improves the accuracy of the selection model, and thus improves the reliability of the capacity prediction data.
[0032] In one feasible implementation, it further includes:
[0033] A capacity trend chart is plotted using the data to be predicted and the capacity prediction data, and the capacity trend chart is output.
[0034] This implementation method has the following beneficial effects: by drawing a capacity trend chart, users can intuitively understand the changing trend of storage capacity, which solves the problem of inconvenient access to capacity prediction data.
[0035] This application also provides a storage capacity prediction device, comprising:
[0036] The acquisition module is used to acquire the data to be predicted;
[0037] The algorithm selection module is used to input the data to be predicted into the selection model to obtain the selection result;
[0038] The prediction module is used to determine a target prediction model from multiple prediction models based on the selection result, and input the data to be predicted into the target prediction model to obtain capacity prediction data.
[0039] This application also provides an electronic device, including a memory and a processor, wherein:
[0040] The memory is used to store computer programs;
[0041] The processor is used to execute the computer program to implement the storage capacity prediction method described above.
[0042] This application also provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the above-described storage capacity prediction method.
[0043] The storage capacity prediction method provided in this application involves: acquiring data to be predicted; inputting the data to be predicted into a selection model to obtain a selection result; determining a target prediction model from multiple prediction models based on the selection result, and inputting the data to be predicted into the target prediction model to obtain capacity prediction data.
[0044] As can be seen, this method employs multiple prediction models. During capacity prediction, it first acquires the data to be predicted—known capacity change data—and processes it using a selection model to obtain the corresponding selection result. The selection model can determine the trend category to which the data belongs based on its specific characteristics, and then determine the prediction model that can accurately predict it based on the trend category. The selection result is used to characterize the prediction model. The prediction model corresponding to the selection result is the target prediction model. The target prediction model can accurately predict data belonging to the trend category to which the data belongs. Therefore, inputting the data to be predicted into the target prediction model yields accurate capacity prediction data. By setting multiple prediction models applicable to different trend categories and using the selection model to analyze the capacity change trend of the data to be predicted and determine the matching selection result, a suitable target prediction model can be selected based on the selection result, thus obtaining accurate and reliable capacity prediction data. This solves the problem of low accuracy and reliability caused by using a single model to predict future storage capacity in related technologies.
[0045] In addition, this application also provides a storage capacity prediction device, an electronic device, and a computer-readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0047] Figure 1 A flowchart of a storage capacity prediction method provided in this application embodiment;
[0048] Figure 2 A specific storage capacity change trend chart is provided for the embodiments of this application;
[0049] Figure 3 A flowchart illustrating a specific model selection training process provided in this application embodiment;
[0050] Figure 4 This application provides a specific timing data schematic diagram.
[0051] Figure 5 A schematic diagram illustrating a specific frequency domain data extraction process provided in this application embodiment;
[0052] Figure 6This is a schematic diagram illustrating a specific model parameter extraction process provided in an embodiment of this application;
[0053] Figure 7 A schematic diagram of the UML class structure of a specific set of basic algorithms provided in this application embodiment;
[0054] Figure 8 A structural diagram of a storage capacity prediction device provided in an embodiment of this application;
[0055] Figure 9 This is a schematic diagram of a hardware framework applicable to a storage capacity prediction method provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0057] In related technologies, a model is typically trained using various training data, and this model is then used to predict storage capacity. The algorithms and architectures employed in this model vary. For example, it can be built based on linear regression; it can be a classic time series model, such as the Auto-Regressive and Moving Average (ARMA) or ARIMA (Autoregressive Integrated Moving Average) model; or it can be a neural network model. However, due to the limitations of the model itself, regardless of the algorithm or architecture used, it cannot accurately predict all types of data with changing trends. For instance, a model based on linear regression can accurately predict data with a stable linear trend, but its prediction performance will be poor for non-stable linear trends, and its prediction performance for periodic and irregular data will be extremely poor. While classic time series models and neural network models have a wider range of applications than models built on the idea of linear regression, they require a long training time. In order to make predictions on irregular data, the model needs to be trained using such data, which makes the model prone to overfitting, resulting in poor prediction performance and low accuracy.
[0058] To address the aforementioned technical problems, this application provides a storage capacity prediction method. For details, please refer to... Figure 1 , Figure 1 A flowchart illustrating a storage capacity prediction method provided in this application embodiment. The method includes:
[0059] S101: Obtain the data to be predicted.
[0060] The data to be predicted can represent time-series data, that is, data stored at multiple points in time, and its specific content is not limited. The number of data to be predicted can be one or more, meaning multiple data sets can be predicted simultaneously. This embodiment does not limit the specific method of acquiring the data to be predicted. For example, it can acquire data input by the user; or it can acquire data sent by other electronic devices; or it can generate data to be predicted using specified data or files, such as acquiring the working logs of the storage cluster and using those logs to generate data to be predicted. In one specific implementation, the data to be predicted can be the time-series data itself, i.e., its data format is time-series data; in another specific implementation, the data to be predicted can be time-series features extracted from the time-series data, i.e., its data format is a feature format (e.g., vector format). Depending on the data format of the data to be predicted, the process of acquiring the data to be predicted can also be different. For example, when it is a feature format, the process of acquiring the data to be predicted includes the process of feature encoding the time-series data to obtain the data to be predicted.
[0061] It should be noted that this embodiment does not limit the type of trend of the data to be predicted. Please refer to... Figure 2 , Figure 2 The specific storage capacity change trend chart provided in this application embodiment records four main change trend types. Type a is a stable linear trend, type b is a non-stable linear trend, type c is a periodic trend, and type d is an irregular trend with jump points. The data to be predicted can be any one of the above four types, or it can be other types, such as a composite type.
[0062] S102: Input the data to be predicted into the selection model to obtain the selection result.
[0063] The prediction model is used to provide capacity prediction data based on the input data. It should be noted that this embodiment uses multiple prediction models, each capable of accurately predicting at least one type of trend. The model selection process selects a target prediction model that can accurately predict the data to be predicted, based on the specific circumstances of the data, and uses the selection result to characterize the target preset model. This embodiment does not limit the specific architecture and category of the selected model; it can be selected according to actual needs. The selected model can be a simple classifier, or it can include an encoder to perform fixed-method feature extraction on the data to be predicted, obtaining accurate selection results. This embodiment does not limit the specific generation process of the selection results; the generation process can differ depending on the type of selected model. The specific format of the selection results is not limited; for example, it can be a model number, model name, etc.
[0064] S103: Based on the selection results, determine the target prediction model from multiple prediction models, and input the data to be predicted into the target prediction model to obtain capacity prediction data.
[0065] After obtaining the selection results, a target prediction model can be determined from multiple prediction models based on these results. The target prediction model is the one that can accurately predict the changing trend of the data to be predicted. By inputting the data to be predicted into the target prediction model, accurate capacity prediction data can be obtained. Since the selection results matching the data to be predicted were obtained in advance using the selection model, a target prediction model that can accurately predict the data to be predicted can be selected for prediction, thus naturally yielding accurate capacity prediction data. Accurate prediction can be performed regardless of the type of changing trend of the capacity prediction data.
[0066] The storage capacity prediction method provided in this application involves setting up multiple prediction models. During capacity prediction, the data to be predicted (i.e., known capacity change data) is first acquired, and then processed using a selection model to obtain the corresponding selection result. The selection model can determine the change trend category of the data to be predicted based on its specific characteristics, and then determine the prediction model that can accurately predict it based on the change trend category. The selection result is used to characterize the prediction model. The prediction model corresponding to the selection result is the target prediction model. The target prediction model can accurately predict data of the change trend category to which the data to be predicted belongs. Therefore, after inputting the data to be predicted into the target prediction model, accurate capacity prediction data can be obtained. By setting up multiple prediction models applicable to different change trend categories and using the selection model to analyze the capacity change trend of the data to be predicted and determine the matching selection result, a suitable target prediction model can be selected based on the selection result, thereby obtaining accurate and reliable capacity prediction data. This solves the problem of low accuracy and reliability caused by using a single model to predict future storage capacity in related technologies.
[0067] Based on the above embodiments, in one implementation, in order to improve the accuracy of the selection results and thus improve the accuracy of the preset data, the training process of the selection model may include the following steps:
[0068] Step 11: Obtain the first training data and input each first training data into multiple prediction models to obtain the corresponding multiple prediction results.
[0069] Understandably, the quality of training data also affects model performance. Therefore, to ensure the selected model has optimal performance, the labels of the training data can be determined by calculating the prediction error, thereby improving the labeling accuracy and reliability of the training data. Specifically, there are multiple initial training data sets, each labeled with a predicted value label, which represents the correct predicted data corresponding to the initial training data. There are multiple prediction models; by inputting each initial training data set into a different prediction model and using it for prediction, multiple prediction results can be obtained for each initial training data set. Since different prediction models can accurately predict data with different trends but cannot accurately predict other types of data, the multiple prediction results corresponding to the same initial training data set will inevitably be different.
[0070] Step 12: Calculate multiple prediction errors using the predicted value labels corresponding to the first training data and each prediction result.
[0071] After obtaining the prediction results, the prediction error is calculated using the predicted value labels and each prediction result. The specific calculation method for the prediction error is not limited; for example, the absolute value of the difference between the predicted value label and the prediction result can be used as the prediction error. Alternatively, the absolute value of the difference can be input into a preset function, and the output value is the preset error. The specific content of the preset function is not limited. A large prediction error indicates a large gap between the predicted value label and the prediction result, meaning the prediction result is far from the correct value; conversely, a small error indicates a small gap between the predicted value label and the prediction result, meaning the prediction result is close to the correct value.
[0072] Step 13: Generate training features corresponding to the first training data, and use the training features and the model label corresponding to the minimum prediction error to generate the second training data.
[0073] In this embodiment, the first training data is time-series data. By extracting features from the time-series data, corresponding training features can be generated. The specific method for generating the training features is not limited; for example, it can be time-domain feature extraction or frequency-domain feature extraction. The minimum prediction error is the minimum value among multiple prediction errors corresponding to the first training data, and its corresponding prediction result is closest to the predicted value label. Therefore, its corresponding model label is used as the new label and generated together with the training features to generate the second training data.
[0074] Step 14: Train the initial selection model using the second training data to obtain the selection model.
[0075] After obtaining the second training data, the initial selection model is trained using it to obtain the final selection model. The initial selection model is the model that has not been trained.
[0076] By applying the model training method provided in this embodiment, and calculating the prediction error between the prediction result obtained from each first training data using each prediction model and the predicted value label (i.e., the correct result), it is possible to accurately determine which prediction model the first training data is suitable for. The model label corresponding to the minimum prediction error is used as a new label to generate higher-quality second training data. This second training data is then used to train a selection model with better accuracy. This solves the problem of low accuracy in the selection model due to poor training data quality, which in turn leads to low reliability of capacity prediction data, thus improving the reliability of capacity prediction data.
[0077] In one specific implementation, please refer to Figure 3 , Figure 3This document provides a flowchart of a specific selection model training process according to an embodiment of this application. In this implementation, multiple time-series data can be input during training, and these data can be split into training and validation sets. The training set is used to train the prediction model, while the validation set is used to train the algorithm selector. Figure 3 The samples in the validation set are the first training data in this application. After the splitting, on the one hand, temporal features are extracted from the samples in the validation set, i.e., corresponding training features are generated. On the other hand, an initial selection model is selected from the basic algorithm set; the initial selection model is the selection model that has not been trained. This embodiment does not limit the specific method of selecting the initial selection model. For example, a model selection instruction can be obtained, and an initial selection model can be selected according to the model selection instruction; or an initial selection model can be selected according to preset model selection information. After obtaining the initial selection model, it is trained using the training set to obtain multiple selection models. The prediction error corresponding to each sample in the validation set is obtained using the trained selection models. After obtaining the prediction error, the temporal features are used as features, and the model with the least error is taken as the target, i.e., the model corresponding to the smallest preset error is labeled as the new label to generate the second training data, and the algorithm classifier is trained using it. It should be noted that... Figure 3 The algorithm classifier can be used directly as the selection model, or as the classification part of the selection model. The selection model can also include a feature extraction part, or an encoding part.
[0078] Based on the above embodiments, in order to improve the quality of training features and enable them to represent the features of the first training data as much as possible, the process of generating training features corresponding to the first training data may specifically include the following steps:
[0079] Step 21: Extract feature data from the first training data to obtain training feature data.
[0080] It should be noted that feature data extraction includes at least two of the following: statistical data extraction, frequency domain data extraction, and model parameter extraction. Statistical data extraction, also known as time-domain feature extraction, is based on statistical methods to obtain training feature data. These statistical methods specifically refer to the calculation and / or combination of various statistical measures (including but not limited to maximum, minimum, mean, median, standard deviation, skewness coefficient, kurtosis coefficient, etc.) of the original time-series data to form statistical features. Please refer to [reference needed]. Figure 4 , Figure 4 This is a specific time series data illustration provided in an embodiment of this application, where observation represents the observed value, and the horizontal axis timestamp represents the timestamp. The maximum, minimum, and average values can be selected as training feature data extracted from statistical feature data, or they can be combined into a vector and used as training feature data.
[0081] Frequency domain data extraction refers to converting time-domain data to the frequency domain and extracting data as training feature data based on its performance in the frequency domain. This embodiment does not limit the specific method and process of frequency domain data extraction. In one feasible implementation, please refer to... Figure 5 , Figure 5 This diagram illustrates a specific frequency domain data extraction process provided in an embodiment of this application. The data can be converted to the frequency domain using Fourier transform or similar methods, and coefficients at different frequencies can be integrated. The integrated result is then used as training feature data. Figure 5 In this context, DFT stands for Discrete Fourier Transform.
[0082] Model parameter extraction specifically involves training various prediction models using the first training data, and then using the parameters of each trained prediction model as the feature extraction method for the training feature data. It is understood that, since there are multiple prediction models in this embodiment, model parameter extraction requires training each initial prediction model using the first training data, and then extracting the parameters of each trained model as training feature data. For details, please refer to... Figure 6 , Figure 6 This is a schematic diagram illustrating a specific model parameter extraction process provided in an embodiment of this application. Figure 6 The initial prediction model is an ARIMA model. First, the first training data is differencing, followed by a stationarity test to determine if the differencing sequence is stationary. If the stationarity test fails, the differencing process is repeated. The stationarity test can be the Augmented Dickey-Fuller test (ADF test), which is used to test for non-stationarity of variables. If the stationarity test passes, the differencing order is d. Next, parameter estimation is performed. Parameter estimation can be done using the Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC) verification, or by analyzing autocorrelation and partial autocorrelation plots. Specific estimation processes can be found in relevant technical documentation and will not be elaborated here. After parameter estimation, white noise testing is performed. If the white noise test passes, the model parameters are determined, and the model orders are p and q. Training then ends. After training, the parameters d, p, and q can be used as training feature data, or their combined vector can be used as training feature data.
[0083] Step 22: Use the training feature data to form training features.
[0084] After obtaining the training feature data, it is used to compose training features. Since the training feature data is extracted from at least two perspectives, the first training data can be represented from multiple angles, improving the quality of the training features and consequently improving the quality of the second training data. It can be understood that the above process is the feature generation process during training, and it can also be used in the processing of data to be predicted.
[0085] By applying the training feature generation method provided in this embodiment, more effective training feature data can be obtained by extracting feature data from multiple perspectives from the first training data. This allows the training features to better represent the characteristics of the first training data, solving the problem of poor training effect and low classification accuracy of the selection model caused by low training feature quality. This improves the accuracy of the selection model and thus improves the reliability of the capacity prediction data.
[0086] Based on the above embodiments, it is understood that not all extracted feature data can effectively represent the training data; some invalid feature data may exist. Extracting invalid feature data not only prolongs the feature extraction time but also reduces feature quality, affecting prediction accuracy. To address this issue, the process of extracting feature data from the first training data to obtain training feature data may specifically include the following steps:
[0087] Step 31: Extract feature data from the first training data based on the target data items to obtain training feature data.
[0088] The target data item represents the valid feature data, and it can vary depending on the specific feature extraction method. When extracting training feature data, extraction can be based on the target data item. By using the target data item to restrict the content of the training feature data, the extraction of invalid feature data can be reduced, retaining only the valid feature data.
[0089] The process of determining the target data item includes:
[0090] Step 32: Extract all feature data from the initial data to obtain the initial feature data.
[0091] Step 33: Perform hypothesis testing-based filtering on the initial feature data to obtain the target feature data, and determine the data items corresponding to the target feature data as the target data items.
[0092] In this embodiment, the initial data is training data used to determine the target data item, and its specific content is not limited. Since the target data item needs to be determined first in order to generate training feature data later, in one implementation, the initial data can be the first training data. Full feature data extraction involves extracting all feature data corresponding to the initial data. The result of the extraction is the initial feature data, which includes valid and invalid feature data. After obtaining the initial feature data, a hypothesis-based filtering process is performed. The hypothesis test can determine whether each initial feature data is invalid, and then filter out invalid feature data based on the test results. The specific process of hypothesis testing can be found in related technologies, and will not be elaborated here. The remaining valid feature data after filtering is the target feature data. By determining the data item corresponding to the target feature data as the target data item, the determination of the target data item is completed.
[0093] By applying the training feature data extraction method provided in this embodiment, through full data feature processing and hypothesis testing-based filtering, the parts that cannot well represent the initial data can be filtered out from the full initial feature data, while retaining the valuable parts. This reduces the number of target data items and the number of training feature data, ultimately improving the generation speed and quality of training features. It solves the problem of slow model training speed caused by slow training feature generation speed, as well as the problem of poor model training effect caused by a large amount of invalid data in the training features, thereby improving the training speed and classification accuracy of the selected model.
[0094] Based on the above embodiments, in one specific implementation, a prediction model can be specified as needed to achieve high scalability. Specifically, the process of determining the prediction model may include the following steps:
[0095] Step 41: Obtain the model selection instruction.
[0096] Step 42: Select a prediction model from multiple candidate models according to the model selection instructions.
[0097] The model selection command is used to specify the prediction model. In this embodiment, multiple candidate models can exist, and the specific number and type of candidate models are not limited; their number and type are scalable. The model selection command can select any candidate model as the prediction model, and high scalability of the prediction model can be achieved by adding new candidate models and selecting the newly added candidate models as the prediction models.
[0098] Specifically, since multiple prediction models exist, and the number and type of these models are not limited, new prediction models can be added as needed, achieving high scalability. In one implementation method, please refer to... Figure 3 , Figure 3 The basic algorithm set in the library stores initial prediction models. By adding new initial prediction models to this library, the prediction models can be expanded. Please refer to [link / reference]. Figure 7 , Figure 7 This is a UML class structure diagram of a specific basic algorithm set provided in an embodiment of this application. In this application, the basic algorithm set (i.e., BasePredictor) also provides the necessary algorithm interfaces for its operation, such as fit(X,y), which trains the model using features X and target y; predict(X), which predicts features X and obtains the prediction result; and fit_predice(X,y), which trains the model using features X and target y and simultaneously obtains the prediction result corresponding to X. Specifically... Figure 7 The document describes a basic algorithm set that includes three initial prediction models: ArimaPredictor (ARIMA prediction model), ChpLinear Predictor (Chp linear regression model), and BstsPredictor (Bayesian Structural Time Series model). Each model can call the aforementioned algorithm interfaces to perform basic functions such as training and prediction. Therefore, if a new initial prediction model is needed, it can be added to the basic algorithm set by implementing the aforementioned algorithm interfaces, thus enabling it to be selected as a prediction model in the future.
[0099] Based on the above embodiments, in a specific implementation, to address the problem of poor classification accuracy caused by differences in feature encoding methods of the data input to the selection model, this application can construct an encoder, enabling the selection model itself to have encoding capabilities. The process of training an initial selection model using second training data to obtain the selection model may specifically include the following steps:
[0100] Step 51: Train the initial selection model using the second training data to obtain the classifier.
[0101] In this embodiment, the initial selection model is trained using the second training data, and the resulting part is the classification part of the selection model, i.e., the classifier.
[0102] Step 52: Construct an encoder based on the generation method of training features, and use the encoder and classifier to form a selection model.
[0103] The specific details of how the training features are generated are not limited in this embodiment, as they have already been described in steps 21-22 and 31-33 above, and will not be repeated here. After determining the generation method of the training features, a corresponding encoder is constructed using it, and the encoder and classifier together constitute the selection model.
[0104] By applying the selection model construction method provided in this embodiment, an encoder is constructed according to the generation method of training features. The encoder and classifier together constitute the selection model, resulting in a selection model capable of self-extraction of features. This ensures a fixed feature extraction method for any content to be predicted. This solves the problem of poor classification accuracy caused by differences in the feature encoding methods of the input data to the selection model, improving the accuracy of the selection model and thus enhancing the reliability of the capacity prediction data.
[0105] Based on the above embodiments, in one specific implementation, after obtaining the capacity prediction data, the following steps may also be included:
[0106] Step 61: Use the data to be predicted and the capacity prediction data to draw a capacity trend chart and output the capacity trend chart.
[0107] By drawing capacity trend charts, users can intuitively understand the changing trend of storage capacity, solving the problem of inconvenient access to capacity prediction data.
[0108] The storage capacity prediction device provided in the embodiments of this application is described below. The storage capacity prediction device described below can be referred to in correspondence with the storage capacity prediction method described above.
[0109] Please refer to Figure 8 , Figure 8 A schematic diagram of a storage capacity prediction device provided in this application embodiment includes:
[0110] Module 110 is used to acquire the data to be predicted;
[0111] The algorithm selection module 120 is used to input the data to be predicted into the selection model and obtain the selection result;
[0112] The prediction module 130 is used to determine the target prediction model from multiple prediction models based on the selection results, and input the data to be predicted into the target prediction model to obtain capacity prediction data.
[0113] In one feasible implementation, the storage capacity prediction device includes:
[0114] The training prediction module is used to acquire the first training data and input each of the first training data into multiple prediction models to obtain the corresponding multiple prediction results.
[0115] The error calculation module is used to calculate multiple prediction errors by using the predicted value labels corresponding to the first training data and each prediction result;
[0116] The training data generation module is used to generate training features corresponding to the first training data, and to generate the second training data using the training features and the model label corresponding to the minimum prediction error.
[0117] The model selection training module is used to train the initial selection model using the second training data to obtain the selection model.
[0118] In one feasible implementation, the training data generation module includes:
[0119] The feature data extraction unit is used to extract feature data from the first training data to obtain training feature data; the feature data extraction includes at least two of the following: statistical data extraction, frequency domain data extraction, and model parameter extraction.
[0120] Training feature component units are used to compose training features using training feature data.
[0121] In one feasible implementation, the feature data extraction unit includes:
[0122] The extraction sub-unit is used to extract feature data based on target data items from the first training data to obtain training feature data.
[0123] The storage capacity prediction device includes:
[0124] The full extraction module is used to extract all feature data from the initial data to obtain the initial feature data.
[0125] The filtering module is used to perform hypothesis testing-based filtering on the initial feature data to obtain the target feature data, and to determine the data items corresponding to the target feature data as the target data items.
[0126] In one feasible implementation, the storage capacity prediction device includes:
[0127] The instruction acquisition module is used to acquire model selection instructions;
[0128] The prediction model selection module is used to select a prediction model from multiple candidate models according to the model selection instructions.
[0129] In one feasible implementation, selecting the model training module includes:
[0130] The classifier training unit is used to train the initial selection model using the second training data to obtain the classifier.
[0131] The encoder building unit is used to build an encoder based on the generation method of training features, and to use the encoder and classifier to form a selection model.
[0132] In one feasible implementation, the storage capacity prediction device further includes:
[0133] The trend chart generation module is used to draw a capacity trend chart using the data to be predicted and the capacity prediction data, and output the capacity trend chart.
[0134] The electronic device provided in the embodiments of this application is described below. The electronic device described below and the storage capacity prediction method described above can be referred to each other.
[0135] Please refer to Figure 9 , Figure 9 This is a schematic diagram of a hardware framework applicable to a storage capacity prediction method provided in this application embodiment. The electronic device 100 may include a processor 101 and a memory 102, and may further include one or more of a multimedia component 103, an information input / output (I / O) interface 104, and a communication component 105.
[0136] The processor 101 controls the overall operation of the electronic device 100 to complete all or part of the steps in the aforementioned storage capacity prediction method. The memory 102 stores various types of data to support the operation of the electronic device 100. This data may include, for example, instructions for any application or method operating on the electronic device 100, and application-related data. The memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as one or more of Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. In this embodiment, the memory 102 stores at least programs and / or data for implementing the following functions:
[0137] Obtain the data to be predicted;
[0138] The data to be predicted is input into the selection model to obtain the selection result;
[0139] Based on the selection results, a target prediction model is determined from multiple prediction models, and the data to be predicted is input into the target prediction model to obtain capacity prediction data.
[0140] Multimedia component 103 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 102 or transmitted via communication component 105. The audio component also includes at least one speaker for outputting audio signals. I / O interface 104 provides an interface between processor 101 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 105 is used for wired or wireless communication between electronic device 100 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of these. Therefore, the corresponding communication component 105 may include a Wi-Fi component, a Bluetooth component, or an NFC component.
[0141] The electronic device 100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the storage capacity prediction method given in the above embodiments.
[0142] certainly, Figure 9 The structure of the electronic device 100 shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device 100 may include more than Figure 9 More or fewer components as shown, or combinations of certain components.
[0143] The following describes the computer-readable storage medium provided in the embodiments of this application. The computer-readable storage medium described below can be referred to in correspondence with the storage capacity prediction method described above.
[0144] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the storage capacity prediction method described above.
[0145] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0146] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0147] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0148] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0149] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "include," "contain," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0150] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A storage capacity prediction method characterized by, The method comprises the following steps: obtaining to-be-predicted data; inputting the to-be-predicted data into a selection model to obtain a selection result; the selection result is a model selection result corresponding to a change trend category of the to-be-predicted data; determining a target prediction model from a plurality of prediction models according to the selection result, and inputting the to-be-predicted data into the target prediction model to obtain capacity prediction data; the prediction models each correspond to at least one change trend category; wherein the training process of the selection model comprises: obtaining first training data, and inputting each of the first training data into a plurality of prediction models to obtain a plurality of corresponding prediction results; calculating a plurality of prediction errors by using prediction value labels corresponding to the first training data and each of the prediction results; generating training features corresponding to the first training data, and generating second training data by using the training features and model labels corresponding to the minimum prediction error; the training features are features obtained through time domain feature extraction or frequency domain feature extraction; training an initial selection model by using the second training data to obtain the selection model; wherein the training of the initial selection model by using the second training data to obtain the selection model comprises: training an initial selection model by using the second training data to obtain a classifier; constructing an encoder based on the generation mode of the training features, and using the encoder and the classifier to constitute the selection model.
2. The storage capacity prediction method according to claim 1, characterized by, The generation of the training features corresponding to the first training data comprises: performing feature data extraction on the first training data to obtain training feature data; the feature data extraction comprises at least two of statistical data extraction, frequency domain data extraction and model parameter extraction; using the training feature data to form training features.
3. The storage capacity prediction method according to claim 2, characterized by, The feature data extraction on the first training data to obtain training feature data comprises: performing feature data extraction based on target data items on the first training data to obtain the training feature data; the determination process of the target data items comprises: performing full-amount feature data extraction on initial data to obtain initial feature data; performing filtering processing based on hypothesis testing on the initial feature data to obtain target feature data, and determining data items corresponding to the target feature data as target data items.
4. The storage capacity prediction method according to claim 1, characterized by, The determination process of the prediction model comprises: obtaining a model selection instruction; selecting the prediction model from a plurality of candidate models according to the model selection instruction.
5. The storage capacity prediction method according to claim 1, characterized by, Further comprising: using the to-be-predicted data and the capacity prediction data to draw a capacity trend chart, and outputting the capacity trend chart.
6. A storage capacity prediction apparatus characterized by comprising: The method comprises the following steps: an acquisition module is configured to obtain to-be-predicted data; an algorithm selection module is configured to input the to-be-predicted data into a selection model to obtain a selection result; the selection result is a model selection result corresponding to a change trend category of the to-be-predicted data; a prediction module is configured to determine a target prediction model from a plurality of prediction models according to the selection result, and input the to-be-predicted data into the target prediction model to obtain capacity prediction data; the prediction models each correspond to at least one change trend category; wherein the storage capacity prediction device comprises: The training prediction module is configured to obtain first training data and input each of the first training data into a plurality of prediction models to obtain a plurality of corresponding prediction results; The error calculation module is configured to calculate a plurality of prediction errors respectively by using a predicted value label corresponding to each of the first training data and each of the prediction results; The training data generation module is configured to generate training features corresponding to the first training data and generate second training data by using the training features and a model label corresponding to a minimum prediction error; the training features are features obtained by time domain feature extraction or frequency domain feature extraction; The selection model training module is configured to train an initial selection model by using the second training data to obtain the selection model; The selection model training module comprises: The classifier training unit is configured to train an initial selection model by using the second training data to obtain a classifier; The encoder construction unit is configured to construct an encoder based on a generation mode of the training features and constitute the selection model by using the encoder and the classifier.
7. An electronic device, comprising: The memory is configured to save a computer program; The processor is configured to execute the computer program to implement the storage capacity prediction method according to any one of claims 1 to 5. The memory is configured to save a computer program; and the computer program is configured to be executed by a processor to implement the storage capacity prediction method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
A disk storage capacity prediction method based on a time sequence model
CN109766234A
Capacity prediction device based on ARIMA model and control method thereof
CN111427753A