Storage performance prediction method and device, equipment and medium
By inputting the index parameters of the storage system into the pre-trained random forest classifier model, and using multiple decision trees to predict the storage performance, the time-consuming and labor-consuming problem of traditional methods is solved, and fast and efficient storage performance prediction is achieved.
Patent Information
- Application Number
- CN202411045444.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Traditional storage performance prediction methods are time-consuming and labor-intensive, and cannot better predict storage performance parameters, resulting in difficulty in improving the accuracy of prediction results.
By obtaining the index parameters of the storage system and inputting them into the pre-trained random forest classifier model, multiple decision trees are used to predict storage performance, including data cleaning, mean variance normalization processing and model training, generating storage Performance prediction results.
It realizes rapid and efficient prediction of the input and output amount and response time of the storage system, and improves the accuracy of storage performance prediction.
Smart Images

Figure CN119152916A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage systems, and in particular to a storage performance prediction method, device, equipment and medium. Background Art
[0002] With the rapid development of the big data era, data storage has also received great attention. As business grows, the amount of data will continue to grow, and it is necessary to ensure that the storage capacity is sufficient to meet the needs of the enterprise. Monitoring the storage capacity of enterprise cloud disks can help enterprises plan expansion plans in a timely manner to avoid insufficient storage space. It is also possible to improve storage utilization and extend the service life of storage space by implementing measures such as data cleaning, compression and archiving. The performance indicators of centralized storage include read and write speed, throughput and latency. Regularly monitoring the performance of storage devices can help enterprises discover potential problems and optimize and adjust them in a timely manner. Enterprises can perform performance tests on storage devices to identify bottlenecks, optimize storage architecture, upgrade hardware or adjust storage strategies to improve performance and ensure user experience. Due to the large number of parameters that affect storage performance, traditional storage performance prediction methods are time-consuming and labor-intensive, and cannot better predict storage performance parameters, and thus it is difficult to improve the accuracy of storage performance prediction results. Summary of the invention
[0003] In view of this, embodiments of the present application provide a storage performance prediction method, device, and medium to overcome the above-mentioned problems or at least partially solve the above-mentioned problems.
[0004] A first aspect of an embodiment of the present application provides a storage performance prediction method, the method comprising:
[0005] Obtain the index parameters of the storage system to be tested;
[0006] The index parameters of the storage system to be tested are input into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees through a sample data set, and the sample data set includes real index parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
[0007] Optionally, the method further comprises:
[0008] Before training the random forest classifier to be trained, an original data set including a plurality of original samples is obtained, each original sample including input data and output data; the input data is the real indicator parameter, and the output data is the real input and output amount and the real response time;
[0009] Performing data cleaning on multiple original samples of the original data set, removing missing values and outliers in the multiple original samples, and performing mean-variance normalization processing on the multiple cleaned samples to obtain a sample data set, wherein the sample data set includes multiple samples;
[0010] Construct a random forest classifier to be trained containing multiple decision trees;
[0011] The sample data set is divided to obtain a plurality of sample data subsets, each of which includes a training sample set and a validation sample set.
[0012] Optionally, the dividing the sample data set to obtain a plurality of sample data subsets includes:
[0013] For each decision tree, extracting a plurality of samples from the sample data set with replacement as the training sample set;
[0014] taking a plurality of samples that are not extracted from the sample data set as a verification sample set;
[0015] Wherein, the multiple samples included in the training sample set are all randomly selected from the sample data set.
[0016] Optionally, the step of constructing a random forest classifier to be trained comprising a plurality of decision trees comprises:
[0017] For each decision tree in the random forest classifier to be trained, any first indicator parameter is selected from a plurality of samples in a training sample set corresponding to the decision tree as a first feature, and the first feature is used as a root node of the decision tree;
[0018] According to the first feature, multiple samples in the training sample set corresponding to the decision tree are divided to obtain multiple first subsets, where the first subsets include multiple samples with the same first characteristic value, the first feature corresponds to multiple first characteristic values, and each first subset corresponds to one first characteristic value;
[0019] For each child node in the decision tree, arbitrarily select a second indicator parameter other than the first indicator parameter;
[0020] generating a second feature based on the second indicator parameter, and using the second feature as a child node of the decision tree;
[0021] According to the second feature, each first subset in the plurality of first subsets is divided into a plurality of second subsets, wherein the second subset is smaller than the first subset;
[0022] When the number of samples corresponding to the child nodes of the decision tree is the minimum number of samples or the decision tree reaches the maximum depth, it is determined that the creation of the random forest classifier to be trained is completed.
[0023] Optionally, training the random forest classifier to be trained comprises the following steps:
[0024] For each decision tree, input data of the training sample set corresponding to the decision tree into the decision tree, so that the input data passes through the root node of the decision tree and reaches the leaf node of the decision tree, and the second prediction result corresponding to the leaf node reached by the input data is recorded;
[0025] Compare the second prediction result with the output data corresponding to the input data, and calculate a first absolute error value, where each sample corresponds to a first absolute error value;
[0026] Adjusting parameters of the random forest classifier to be trained based on the first absolute error value;
[0027] Testing the random forest classifier to be trained after the parameter adjustment by using the verification sample set, and obtaining a third prediction result corresponding to the leaf node reached by the input data of the sample in the verification sample set;
[0028] Compare the third prediction result with the output data corresponding to the input data of the sample in the verification sample set, and calculate a second absolute error value, where each sample corresponds to a second absolute error value;
[0029] For the multiple decision trees of the random forest classifier to be trained, the average absolute error value is calculated for the multiple second absolute error values. When the average absolute error value is less than a preset threshold, it is determined that the pre-trained storage performance prediction model has been trained.
[0030] Optionally, inputting the index parameter of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested includes:
[0031] Inputting the index parameters of the storage system to be tested into multiple decision trees of a pre-trained storage performance prediction model, and recording multiple third prediction results corresponding to multiple leaf nodes reached by the index parameters of the storage system to be tested, wherein each decision tree corresponds to one third prediction result;
[0032] An average result or a majority result of the plurality of third prediction results is used as a first prediction result of the storage performance of the storage system to be tested.
[0033] Optionally, the method further comprises:
[0034] Before training the random forest classifier to be trained, searching for a combination of the number of the decision trees and the number of leaf nodes of the decision trees;
[0035] In the process of training the random forest classifier to be trained, traversing multiple combinations in an increasing order of the number of decision trees, and determining the model performance of the random forest classifier to be trained corresponding to each combination;
[0036] Based on the model performance, the optimal number of decision trees and the number of leaf nodes of the decision trees are determined.
[0037] A second aspect of an embodiment of the present application provides a storage performance prediction device, the device comprising:
[0038] An acquisition module is used to obtain the index parameters of the storage system to be tested;
[0039] A prediction module is used to input the indicator parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees using a sample data set, and the sample data set includes real indicator parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
[0040] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the storage performance prediction method as described in the first aspect.
[0041] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the storage performance prediction method as described in the first aspect is implemented.
[0042] Beneficial effects of this application:
[0043] The embodiments of the present application provide a storage performance prediction method, apparatus, device and medium, comprising: obtaining indicator parameters of a storage system to be tested; inputting the indicator parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees using a sample data set, the sample data set includes real indicator parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
[0044] A pre-trained storage performance prediction model can be obtained by training a random forest classifier to be trained including multiple decision trees using a sample data set including real indicator parameters of multiple storage systems and corresponding real input / output volumes and real response times. The pre-trained storage performance prediction model is used to predict the storage performance of the storage system to be tested based on the performance data of the storage system to be tested, and a predicted value and a predicted category of the storage performance in a first prediction result of the storage performance of the storage system to be tested are obtained, thereby enabling the input / output volume and response time of the storage system to be predicted quickly and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.
[0046] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application 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 paying any creative labor.
[0047] Figure 1 It is a flowchart of a storage performance prediction method provided by an embodiment of the present application;
[0048] Figure 2 It is a schematic diagram of various nodes for training a random forest classifier in a storage performance prediction method provided in an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of predicting a first prediction result in a storage performance prediction method provided by an embodiment of the present application;
[0050] Figure 4 It is a structural diagram of a storage performance prediction device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] Figure 1 FIG. 1 is a flow chart of a storage performance prediction method provided by an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a storage performance prediction method, the method comprising:
[0054] Step S101, obtaining index parameters of the storage system to be tested;
[0055] Step S102: input the index parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees using a sample data set, and the sample data set includes real index parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
[0056] First, in step S101, the index parameters of the storage system to be tested are obtained. The index parameters are parameters that can affect the performance of the storage system, which are determined after pre-collecting and analyzing relevant data on storage performance of multiple different types of storage systems. The index parameters of the storage system may include but are not limited to: number of CPU cores, CPU main frequency, memory main frequency, memory size, RAID type, number of disks, disk read and write speeds, external card transmission speeds, cache partitions, and automatic tiering.
[0057] Further, in step S102, the acquired index parameters of the storage system are input into a pre-trained storage performance prediction model. Through the storage system prediction model, a first prediction result of the storage performance of the storage system to be tested can be obtained. The first prediction result can represent the storage performance of the storage system, such as the predicted value of the input and output volume and the predicted value of the response time, as well as the predicted category of the storage performance of the storage system, for example, excellent storage performance, good storage performance, average storage performance, poor storage performance, etc.
[0058] Among them, the pre-trained storage performance prediction model is pre-learned how to predict the storage performance of the storage system based on its index parameters. The training process of the storage performance prediction model is obtained by training a random forest classifier to be trained containing multiple decision trees through a sample data set, and the sample data set includes the real index parameters of multiple storage systems and the corresponding real input and output volumes (IOPS, Input / Output Operations Per Second) and real response time. The first prediction result includes the predicted category of storage performance and the predicted value of storage performance. The storage performance prediction model is obtained by training a random forest classifier to be trained containing multiple decision trees, and the sample data set used for training includes the real index parameters of multiple storage systems and the corresponding real input and output volumes and real response time.
[0059] Among them, the real input and output and the real response data can be obtained in the following ways:
[0060] 1. Collect data through actual testing: Specialized testing tools or equipment are needed to simulate the actual workload and record the corresponding input, output and response time.
[0061] 2. Simulation: In the absence of actual hardware, simulation can be used to create sample data sets. This usually involves simulating the performance model of the storage system to predict the input and output volume and response time under different workloads.
[0062] 3. Historical data analysis: Extract samples from the historical performance data contained in the existing storage system. In this process, the historical performance data needs to be analyzed and processed in detail to ensure the accuracy and representativeness of the data.
[0063] 4. Open source data sets: Open source data sets usually contain a large amount of real-time input, output and response time data, which can be used as reference data for training or testing models.
[0064] Through the above-mentioned embodiments, a random forest classifier to be trained including multiple decision trees can be trained by using the real indicator parameters of multiple storage systems and the corresponding real input and output volumes and real response times in a sample data set to obtain a pre-trained storage performance prediction model. The storage performance of the storage system to be tested is predicted based on the performance data of the storage system to be tested through the pre-trained storage performance prediction model, and the predicted value and the predicted category of the storage performance in the first prediction result of the storage performance of the storage system to be tested are obtained, so that the input and output volumes and response time of the storage system can be predicted quickly and efficiently.
[0065] Optionally, the method further comprises:
[0066] Before training the random forest classifier to be trained, an original data set including a plurality of original samples is obtained, each original sample including input data and output data; the input data is the real indicator parameter, and the output data is the real input and output amount and the real response time;
[0067] Performing data cleaning on multiple original samples of the original data set, removing missing values and outliers in the multiple original samples, and performing mean-variance normalization processing on the multiple cleaned samples to obtain a sample data set, wherein the sample data set includes multiple samples;
[0068] Construct a random forest classifier to be trained containing multiple decision trees;
[0069] The sample data set is divided to obtain a plurality of sample data subsets, each of which includes a training sample set and a validation sample set.
[0070] Figure 2 is a schematic diagram of various nodes for training a random forest classifier in a storage performance prediction method provided in an embodiment of the present application, such as Figure 2 shown.
[0071] The technical solution of this application uses an integrated learning method to predict storage performance data. The whole process is briefly described as follows:
[0072] 1. Data processing: making a sample data set from the original sample set and preprocessing the data;
[0073] 2. Data division: split the processed sample data set into a training sample set and a validation sample set;
[0074] 3. Model creation, create a random forest classifier, build multiple decision trees, and conduct modeling research on sample data sets;
[0075] 4. Model training: select appropriate hyperparameters to train the most appropriate random forest classifier model as the trained storage performance prediction model;
[0076] 5. Model evaluation: Use evaluation indicators to evaluate the prediction accuracy of the model.
[0077] Specifically, in one embodiment, before training the random forest classifier to be trained, it is necessary to first construct a sample data set for training. First, it is necessary to obtain an original data set containing multiple original samples, each original sample includes input data and output data, each original sample is obtained by testing the actual storage system using a special testing tool or equipment, and multiple original samples can be obtained from the same storage system. The input data is the real indicator parameter of the storage system, and the output data is the real input and output volume and the real response time.
[0078] Furthermore, after obtaining the original data set, data cleaning is required for multiple original samples. The purpose of data cleaning is to remove missing values and outliers in multiple original samples. Missing values refer to the lack of values in a field in the original sample, while outliers refer to values that are significantly different from other data in the original sample. Missing values and outliers can be identified by drawing box plots, scatter plots, or using statistical methods (such as IQR, Z-score, etc.). Once missing values and outliers are identified, they can be deleted, filled, or corrected according to the specific situation.
[0079] Furthermore, after data cleaning, the cleaned multiple samples are subjected to mean variance normalization processing to obtain a sample data set, wherein the sample data set includes multiple samples. The normalization processing can eliminate the differences between features of different scales, which helps to improve the convergence speed and generalization ability of the model.
[0080] Furthermore, a random forest classifier to be trained is constructed containing multiple decision trees. Random forest is an integrated learning method that improves the accuracy and stability of the model by constructing multiple decision trees and combining their prediction results. When constructing the random forest classifier, parameters such as the depth and splitting criteria of the decision tree can be initialized to control the complexity of the storage performance prediction model.
[0081] Finally, the sample data set is divided to obtain multiple sample data subsets, each of which contains a training sample set and a validation sample set. The number of sample data subsets can be set according to the parameters for constructing the random forest classifier, and the proportion of the training sample set and the validation sample set in each sample data subset can be set according to the actual situation. For example, 80% of the data in the sample data subset is used as a training sample set for model training, and 20% of the data is used as a validation sample set for model validation.
[0082] Through the above embodiment, before training the random forest classifier, a sample data set can be obtained through data processing, and a random forest classifier to be trained can be constructed. Finally, the sample data set is divided to obtain multiple sample data subsets, thereby completing the preparation process before training the model.
[0083] Optionally, the dividing the sample data set to obtain a plurality of sample data subsets includes:
[0084] For each decision tree, extracting a plurality of samples from the sample data set with replacement as the training sample set;
[0085] taking a plurality of samples that are not extracted from the sample data set as a verification sample set;
[0086] Wherein, the multiple samples included in the training sample set are all randomly selected from the sample data set.
[0087] Specifically, in one embodiment, the obtained sample data set can be divided according to the number of decision trees, each decision tree corresponds to a sample data subset, and the sample data subset construction process of each decision tree (for example, it can be extracted by Bootstrap sampling) is carried out by randomly extracting multiple samples from the sample data set with replacement each time and adding them to the training sample set, so that each decision tree is trained on the entire sample data set, which helps to improve the generalization ability of the storage performance prediction model. In addition, since multiple extractions are performed with replacement, the training sample sets are slightly different, and the training data of each decision tree will also be different. This increases the diversity of each decision tree, because different decision trees are trained based on different training sample sets, which helps to reduce overfitting and improve the generalization ability of the storage performance prediction model. In addition, after extracting multiple samples with replacement multiple times, the multiple samples that were not extracted in the sample training set can be used as the verification sample set of the decision tree, and the verification sample set can be used to evaluate the performance of the random forest classifier.
[0088] Through the above embodiment, it is possible to ensure that each decision tree is trained on the entire sample data set, and at the same time the performance of the storage performance prediction model is evaluated by the validation sample set. Such a design is helpful to improve the generalization ability and prediction accuracy of the storage performance prediction model.
[0089] Optionally, the step of constructing a random forest classifier to be trained comprising a plurality of decision trees comprises:
[0090] For each decision tree in the random forest classifier to be trained, any first indicator parameter is selected from a plurality of samples in a training sample set corresponding to the decision tree as a first feature, and the first feature is used as a root node of the decision tree;
[0091] According to the first feature, multiple samples in the training sample set corresponding to the decision tree are divided to obtain multiple first subsets, where the first subsets include multiple samples with the same first characteristic value, the first feature corresponds to multiple first characteristic values, and each first subset corresponds to one first characteristic value;
[0092] For each child node in the decision tree, arbitrarily select a second indicator parameter other than the first indicator parameter;
[0093] generating a second feature based on the second indicator parameter, and using the second feature as a child node of the decision tree;
[0094] According to the second feature, each first subset in the plurality of first subsets is divided into a plurality of second subsets, wherein the second subset is smaller than the first subset;
[0095] When the number of samples corresponding to the child nodes of the decision tree is the minimum number of samples or the decision tree reaches the maximum depth, it is determined that the creation of the random forest classifier to be trained is completed.
[0096] Specifically, in one embodiment, for each decision tree in the constructed random forest classifier, firstly, a first indicator parameter is randomly selected from the training sample set corresponding to the decision tree as the first feature, and the first feature is used as the root node of the decision tree. The first feature is used to divide the training sample set corresponding to the decision tree into multiple first subsets, and the samples contained in each first subset have the same first feature value. The first feature corresponds to multiple first feature values, and each first subset corresponds to one first feature value. The features of the root nodes of different decision trees are not necessarily the same.
[0097] For example, for one of the decision trees, the number of CPU cores in the indicator parameter is used as the first indicator parameter. At this time, the number of CPU cores is the first feature. Therefore, the training sample set is divided according to the number of CPU cores to obtain multiple first subsets. The number of CPU cores of the samples contained in different first subsets is different. The first feature corresponds to multiple first eigenvalues, that is, the number of CPU cores can be divided into single-core, dual-core, quad-core, eight-core, and sixteen-core. Therefore, single-core, dual-core, quad-core, eight-core, and sixteen-core are all first eigenvalues. The first subset with the first eigenvalue of dual-core indicates that the indicator parameters of multiple samples therein are all dual-core.
[0098] Furthermore, for each child node in the decision tree, a second indicator parameter other than the first indicator parameter is arbitrarily selected, a second feature is generated according to the second indicator parameter, and the second feature is used as the child node of the decision tree. For example, since the number of CPU cores has been used as the root node of this decision tree, when selecting the feature of the child node directly connected to the root node, it is selected from the indicator parameters other than the number of CPU cores, such as memory size. Therefore, the second feature is the memory size.
[0099] Furthermore, each of the multiple first subsets is further divided according to the second feature, and each first subset is divided into multiple second subsets, and the second subsets are smaller than the first subsets. For example, for a sub-node whose second feature is memory size, the samples in the first subset that have been classified by the number of CPU cores can be further classified according to the memory size, and the memory sizes of different second subsets are different. The features of other sub-nodes are selected and the subsets are divided in this way until the samples corresponding to the sub-nodes of the decision tree are the minimum number of samples or the decision tree reaches the maximum depth, for example, the number of samples in the subset is 1 and further division cannot be performed, or the sub-node of the decision tree with the latest assigned feature is a leaf node and further division cannot be performed. At this time, it is determined that the creation of the random forest classifier to be trained is completed.
[0100] Through the above embodiment, a random forest classifier including multiple decision trees can be constructed. Each decision tree selects a feature from the sample data set and divides the data set into smaller subsets based on this feature. Then, the next feature is selected and the process is repeated until a predetermined tree depth is reached or other stopping criteria are met.
[0101] Optionally, training the random forest classifier to be trained comprises the following steps:
[0102] For each decision tree, input data of the training sample set corresponding to the decision tree into the decision tree, so that the input data passes through the root node of the decision tree and reaches the leaf node of the decision tree, and the second prediction result corresponding to the leaf node reached by the input data is recorded;
[0103] Compare the second prediction result with the output data corresponding to the input data, and calculate a first absolute error value, where each sample corresponds to a first absolute error value;
[0104] Adjusting parameters of the random forest classifier to be trained based on the first absolute error value;
[0105] Testing the random forest classifier to be trained after the parameter adjustment by using the verification sample set, and obtaining a third prediction result corresponding to the leaf node reached by the input data of the sample in the verification sample set;
[0106] Compare the third prediction result with the output data corresponding to the input data of the sample in the verification sample set, and calculate a second absolute error value, where each sample corresponds to a second absolute error value;
[0107] For the multiple decision trees of the random forest classifier to be trained, the average absolute error value is calculated for the multiple second absolute error values. When the average absolute error value is less than a preset threshold, it is determined that the pre-trained storage performance prediction model has been trained.
[0108] Specifically, in one embodiment, for each decision tree in the random forest, the corresponding training sample set is first input into the decision tree. The input data (i.e., indicator parameters) of the input sample starts from the root node and propagates along the path of the decision tree until it reaches the leaf node. In this process, it will be propagated according to the different features set, and finally the second prediction result predicted by the leaf node corresponding to the input sample is recorded. The second prediction result of each leaf node includes the prediction category and prediction value of the sample in the training sample set (i.e., the predicted value of the input and output volume and the predicted value of the response time and the prediction category of the storage system performance corresponding to the sample).
[0109] Furthermore, the second prediction result is compared with the output data corresponding to the input data of the sample (ie, the actual input and output volume and the actual response time, as well as the actual storage performance category), and a first absolute error value is calculated, and each sample corresponds to a first absolute error value.
[0110] Further, based on the calculated first absolute error value, the parameters of the random forest classifier to be trained are adjusted, such as changing the structure of the tree, increasing or decreasing the number of trees, adjusting the depth of the tree, etc.
[0111] Furthermore, the random forest classifier to be trained after parameter adjustment is tested through the verification sample set to obtain a third prediction result corresponding to the leaf node at which the input data of the sample in the verification sample set arrives, and the third prediction result includes the prediction category and prediction value of the sample in the verification sample set (that is, the predicted value of the input and output volume and the predicted value of the response time and the prediction category of the storage system performance corresponding to the sample).
[0112] Furthermore, the third prediction result is compared with the output data corresponding to the input data of the sample in the verification sample set (the actual input and output volume, the actual response time of the sample in the verification sample set, and the actual category of the storage system corresponding to the sample), and the second absolute error value is calculated, and each sample corresponds to a second absolute error value.
[0113] Finally, for multiple decision trees of the random forest classifier to be trained, the average absolute error value is calculated through multiple second absolute error values. When the calculated average absolute error value is less than a preset threshold, it can be determined that the pre-trained storage performance prediction model has been trained.
[0114] The mean absolute error value can be selected as the mean absolute percentage error EMAPE and the root mean square error ERMSE. The mean absolute percentage error EMAPE represents the percentage of the average deviation between the predicted value and the actual value. The root mean square error is used to measure the deviation between the observed value and the true value. The two are calculated as follows, where N represents the number of samples and y represents the number of samples. n Represents the actual output data, represents the prediction result, and ∑ represents the summation operation.
[0115]
[0116] Since the mean absolute percentage error (EMAPE) and the root mean square error (ERMSE) measure the error in the form of percentage and square root respectively, the direct correlation between them is not obvious. However, from a broader perspective, they are both effective tools for measuring forecasting performance, but with different focuses and sensitivities.
[0117] Optionally, the step S102 includes:
[0118] Inputting the index parameters of the storage system to be tested into multiple decision trees of a pre-trained storage performance prediction model, and recording multiple third prediction results corresponding to multiple leaf nodes reached by the index parameters of the storage system to be tested, wherein each decision tree corresponds to one third prediction result;
[0119] An average result or a majority result of the plurality of third prediction results is used as a first prediction result of the storage performance of the storage system to be tested.
[0120] Figure 3 It is a schematic diagram of predicting a first prediction result in a storage performance prediction method provided in an embodiment of the present application.
[0121] Specifically, Figure 3As shown, when it is necessary to predict the storage performance of a storage system to be tested, the index parameters of the storage system to be tested are input into multiple decision trees of the pre-trained storage performance prediction model. Each decision tree will predict the storage performance based on the index parameters of the storage system to be tested, and output a third prediction result. The third prediction results output by different decision trees for predicting the storage performance of the same storage system to be tested using the index parameters are not exactly the same. Therefore, multiple third prediction results can be processed and integrated to obtain a first prediction result, such as using the average result or majority result of the calculated multiple third prediction results as the first prediction result of the storage performance of the storage system to be tested. In addition, other statistical methods, such as weighted average, median, etc., can be used to calculate the statistics of multiple third prediction results to obtain a first prediction result.
[0122] Through the above embodiments, the first prediction result of storage performance can be obtained by inputting the indicator parameters of the storage system into a pre-trained decision tree model and calculating the statistics of the prediction results of multiple decision trees, thereby improving the accuracy of the prediction results of the storage performance of the storage system.
[0123] Optionally, the method further comprises:
[0124] Before training the random forest classifier to be trained, searching for a combination of the number of the decision trees and the number of leaf nodes of the decision trees;
[0125] In the process of training the random forest classifier to be trained, traversing multiple combinations in an increasing order of the number of decision trees, and determining the model performance of the random forest classifier to be trained corresponding to each combination;
[0126] Based on the model performance, the optimal number of decision trees and the number of leaf nodes of the decision trees are determined.
[0127] Specifically, before training the random forest classifier, it is first necessary to search for multiple combinations of the number of decision trees and the number of leaf nodes. This can be achieved by traversing all possible combinations. For example, starting from the case of only 3 decision trees, the number of decision trees can be gradually increased until a certain upper limit is reached. During the training process, multiple combinations are traversed from the number of decision trees from small to large, and the model performance of the random forest classifier to be trained corresponding to each combination is determined. This can be achieved by calculating a loss function (such as cross entropy loss or mean square error loss) to evaluate the predictive performance of the classifier. Based on the model performance, the optimal number of decision trees and the number of leaf nodes are selected from all possible combinations. This can be achieved by comparing the model performance indicators (such as accuracy, recall rate, F1 score, etc.) under different combinations. Selecting the best performing parameter combination can make the random forest classifier have better predictive performance.
[0128] Through the above embodiments, it is possible to determine the optimal model parameter settings by searching for combinations of the number of decision trees and the number of leaf nodes and evaluating the model performance corresponding to each combination, which helps to improve the prediction performance of the random forest classifier and make it more suitable for practical application scenarios.
[0129] Optionally, in one embodiment, the algorithm of the random forest classifier can be optimized based on the Grey Wolf Optimization (GWO) algorithm. When the storage performance is predicted using the algorithm of the random forest classifier, the prediction result will be affected by the number of decision trees and the number of leaf nodes of the random forest. If the number of decision trees is too large, it may cause overfitting, and if the number of decision trees is too small, the performance of the storage performance prediction model may be unstable. The leaf nodes are the number of features randomly selected from all features and used as the number of segmentation variables. In order to improve the prediction performance of the algorithm of the random forest classifier, the Grey Wolf Optimization (GWO) algorithm can be used to search for the best number of trees and leaf nodes.
[0130] The GWO algorithm, or gray wolf optimization algorithm, is a swarm intelligence optimization algorithm that imitates the hunting behavior of gray wolves. It was proposed by Seyedali Mirjalili et al. in 2014. This algorithm mainly simulates the social hierarchy structure and hunting strategy of gray wolves and is used to solve various optimization problems. The GWO algorithm solves the problem by simulating the social hierarchy and hunting process of gray wolves, including tracking and approaching prey, harassing, chasing and surrounding prey, and attacking prey. In GWO, the optimal solution is defined as alpha (α), which is used to simulate the position of the leading wolf. The suboptimal solution and candidate solution are named beta (β) and delta (δ), respectively, which are used to simulate the positions of second-order wolves and third-order wolves. The remaining candidate solutions are assumed to be omega (ω), which is used to simulate the positions of subordinate wolves. The hunting process is guided by alpha, beta, and delta wolves, and the omega wolf follows these three wolves to search, with the aim of finding a better solution and then updating the optimal solution.
[0131] Specifically, the process of obtaining the optimal number of trees and leaf nodes by the gray wolf optimization algorithm includes the following steps:
[0132] First, the optimization problem is defined and the parameters of the random forest classifier (such as the number of decision trees and the number of leaf nodes) are used as optimization variables of the gray wolf optimization algorithm.
[0133] Furthermore, the optimization objectives are defined, such as the mean absolute percentage error EMAPE, the root mean square error ERMSE, etc.
[0134] Furthermore, the wolf population is initialized, and a certain number of individual gray wolves are randomly generated in the solution space. The position of each individual gray wolf represents a set of random forest parameters (i.e., a combination of the number of decision trees and the number of leaf nodes in the previous article). According to the social hierarchy of gray wolves, the three gray wolves with the best fitness are selected as α (the wolf king), β (the left and right guards of the wolf king) and δ wolves, and the rest of the gray wolves are ω wolves.
[0135] Furthermore, in each iteration, the position of each gray wolf is updated according to its social behavior. Specifically, the position updates of α, β, and δ wolves will guide other gray wolves to move to a better solution space. The position update strategy of the gray wolf includes searching for prey (global search) and surrounding prey (local search), which is controlled by parameters in the algorithm. The performance of the random forest classifier corresponding to each gray wolf is evaluated, and the social hierarchy of the gray wolf is updated.
[0136] Further, the iterative process is repeated until a preset number of iterations is reached or other convergence conditions are met (such as the fitness value no longer increases significantly), and the optimal number of decision trees and the number of leaf nodes of the decision trees are determined.
[0137] Finally, the position of the alpha wolf will represent the optimal random forest parameter combination, and the hyperparameter combination represented by Alpha (α) is considered to be the best hyperparameter combination. As an example, the best hyperparameter combination is found, and the model parameters are set to: the number of gray wolves in the GWO algorithm is 30, the number of variables to be optimized is 2 (that is, the number of decision trees and the number of leaf nodes), and the maximum number of iterations is 100.
[0138] Through the above embodiment, the Grey Wolf Optimization Algorithm is combined with the Random Forest Algorithm to find the optimal hyperparameters, which can further improve the accuracy of storage performance prediction.
[0139] Figure 4 is a schematic diagram of the structure of a storage performance prediction device provided by an embodiment of the present application, such as Figure 4 shown.
[0140] Based on the same inventive concept, another embodiment of the present application further provides a storage performance prediction device, the device comprising:
[0141] An acquisition module 11 is used to acquire index parameters of the storage system to be tested;
[0142] The prediction module 12 is used to input the indicator parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees using a sample data set, and the sample data set includes real indicator parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
[0143] Optionally, the device further comprises:
[0144] The original data set acquisition module is used to acquire an original data set containing multiple original samples before training the random forest classifier to be trained, each original sample includes input data and output data; the input data is the real indicator parameter, and the output data is the real input and output amount and the real response time;
[0145] A data cleaning module, used to perform data cleaning on multiple original samples of the original data set, remove missing values and outliers in the multiple original samples, and perform mean variance normalization processing on the cleaned multiple samples to obtain a sample data set, wherein the sample data set includes multiple samples;
[0146] A building module for building a random forest classifier to be trained containing multiple decision trees;
[0147] The sample data set division module is used to divide the sample data set to obtain multiple sample data subsets, each of which includes a training sample set and a verification sample set.
[0148] Optionally, the sample data set division module includes:
[0149] An extraction unit, configured to extract, for each decision tree, a plurality of samples from the sample data set with replacement as the training sample set;
[0150] A verification sample set acquisition unit, used to use a plurality of samples that have not been extracted from the sample data set as a verification sample set;
[0151] Wherein, the multiple samples included in the training sample set are all randomly selected from the sample data set.
[0152] Optionally, the building block includes:
[0153] A first indicator parameter selection unit is used to select, for each decision tree in the random forest classifier to be trained, any first indicator parameter from a plurality of samples in a training sample set corresponding to the decision tree as a first feature, and use the first feature as a root node of the decision tree;
[0154] a partitioning unit, configured to partition a plurality of samples in a training sample set corresponding to the decision tree according to the first feature to obtain a plurality of first subsets, wherein the first subsets include a plurality of samples having the same first characteristic value, the first feature corresponds to a plurality of first characteristic values, and each first subset corresponds to a first characteristic value;
[0155] A second indicator parameter selection unit, used for arbitrarily selecting a second indicator parameter other than the first indicator parameter for each subnode in the decision tree;
[0156] A second feature generating unit, configured to generate a second feature based on the second indicator parameter, and use the second feature as a child node of the decision tree;
[0157] According to the second feature, each first subset in the plurality of first subsets is divided into a plurality of second subsets, wherein the second subset is smaller than the first subset;
[0158] A determination unit is used to determine that the creation of the random forest classifier to be trained is completed when the samples corresponding to the child nodes of the decision tree are the minimum number of samples or the decision tree reaches the maximum depth.
[0159] Optionally, the device further comprises:
[0160] A training module, for inputting input data of a training sample set corresponding to each decision tree into the decision tree, so that the input data passes through a root node of the decision tree and reaches a leaf node of the decision tree, and recording a second prediction result corresponding to the leaf node reached by the input data;
[0161] A first comparison module, used for comparing the second prediction result with the output data corresponding to the input data, and calculating a first absolute error value, where each sample corresponds to a first absolute error value;
[0162] An adjustment module, configured to adjust parameters of the random forest classifier to be trained based on the first absolute error value;
[0163] A testing module, used to test the random forest classifier to be trained after the parameter adjustment through the verification sample set, and obtain a third prediction result corresponding to the leaf node reached by the input data of the sample in the verification sample set;
[0164] A second comparison module is used to compare the third prediction result with the output data corresponding to the input data of the sample in the verification sample set, and calculate a second absolute error value, where each sample corresponds to a second absolute error value;
[0165] A determination module is used to calculate an average absolute error value for multiple decision trees of the random forest classifier to be trained and multiple second absolute error values, and when the average absolute error value is less than a preset threshold, determine that the pre-trained storage performance prediction model has been trained.
[0166] Optionally, the prediction module 12 includes:
[0167] A prediction unit, used for inputting the index parameters of the storage system to be tested into multiple decision trees of a pre-trained storage performance prediction model, and recording multiple third prediction results corresponding to multiple leaf nodes reached by the index parameters of the storage system to be tested, wherein each decision tree corresponds to one third prediction result;
[0168] The processing unit is used to use an average result or a majority result of the plurality of the third prediction results as a first prediction result of the storage performance of the storage system to be tested.
[0169] Optionally, the device further comprises:
[0170] A search module, used for searching for a combination of the number of the decision trees and the number of leaf nodes of the decision trees before training the random forest classifier to be trained;
[0171] A traversal module, used for traversing a plurality of combinations in a manner in which the number of decision trees increases from small to large during the training of the random forest classifier to be trained, and determining the model performance of the random forest classifier to be trained corresponding to each combination;
[0172] The optimal combination module is used to determine the optimal number of decision trees and the number of leaf nodes of the decision trees based on the model performance.
[0173] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the storage performance prediction method as described in any of the above embodiments.
[0174] Based on the same inventive concept, another embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to perform the storage performance prediction method as described in any of the above embodiments.
[0175] Based on the same inventive concept, another embodiment of the present application further provides a computer-readable medium on which a computer program is stored, wherein when the program is executed by a processor, the storage performance prediction method as described in any of the above embodiments is implemented.
[0176] As for the device, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0177] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0178] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0179] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0182] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0183] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0184] The above is a detailed introduction to a storage performance prediction method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A storage performance prediction method, characterized in that: The method comprises: Obtain the index parameters of the storage system to be tested; The index parameters of the storage system to be tested are input into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees through a sample data set, and the sample data set includes real index parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
2. The storage performance prediction method according to claim 1, characterized in that: The method further comprises: Before training the random forest classifier to be trained, an original data set including a plurality of original samples is obtained, each original sample including input data and output data; the input data is the real indicator parameter, and the output data is the real input and output amount and the real response time; Performing data cleaning on multiple original samples of the original data set, removing missing values and outliers in the multiple original samples, and performing mean-variance normalization processing on the multiple cleaned samples to obtain a sample data set, wherein the sample data set includes multiple samples; Construct a random forest classifier to be trained containing multiple decision trees; The sample data set is divided to obtain a plurality of sample data subsets, each of which includes a training sample set and a validation sample set.
3. The storage performance prediction method according to claim 2, characterized in that: The sample data set is divided to obtain a plurality of sample data subsets, including: For each decision tree, extracting a plurality of samples from the sample data set with replacement as the training sample set; taking a plurality of samples that are not extracted from the sample data set as a validation sample set; Wherein, the multiple samples included in the training sample set are all randomly selected from the sample data set.
4. The storage performance prediction method according to claim 3, characterized in that: The construction of a random forest classifier to be trained comprising a plurality of decision trees comprises: For each decision tree in the random forest classifier to be trained, any first indicator parameter is selected from a plurality of samples in a training sample set corresponding to the decision tree as a first feature, and the first feature is used as a root node of the decision tree; According to the first feature, multiple samples in the training sample set corresponding to the decision tree are divided to obtain multiple first subsets, where the first subsets include multiple samples with the same first characteristic value, the first feature corresponds to multiple first characteristic values, and each first subset corresponds to one first characteristic value; For each child node in the decision tree, arbitrarily select a second indicator parameter other than the first indicator parameter; generating a second feature based on the second indicator parameter, and using the second feature as a child node of the decision tree; According to the second feature, each first subset in the plurality of first subsets is divided into a plurality of second subsets, wherein the second subset is smaller than the first subset; When the number of samples corresponding to the child nodes of the decision tree is the minimum number of samples or the decision tree reaches the maximum depth, it is determined that the creation of the random forest classifier to be trained is completed.
5. The storage performance prediction method according to claim 4, characterized in that: The training of the random forest classifier to be trained comprises the following steps: For each decision tree, input data of the training sample set corresponding to the decision tree into the decision tree, so that the input data passes through the root node of the decision tree and reaches the leaf node of the decision tree, and the second prediction result corresponding to the leaf node reached by the input data is recorded; Compare the second prediction result with the output data corresponding to the input data, and calculate a first absolute error value, where each sample corresponds to a first absolute error value; Adjusting parameters of the random forest classifier to be trained based on the first absolute error value; Testing the random forest classifier to be trained after the parameter adjustment by using the verification sample set, and obtaining a third prediction result corresponding to the leaf node reached by the input data of the sample in the verification sample set; Compare the third prediction result with the output data corresponding to the input data of the sample in the verification sample set, and calculate a second absolute error value, where each sample corresponds to a second absolute error value; For the multiple decision trees of the random forest classifier to be trained, the average absolute error value is calculated for the multiple second absolute error values. When the average absolute error value is less than a preset threshold, it is determined that the pre-trained storage performance prediction model has been trained.
6. The storage performance prediction method according to claim 4, characterized in that: The step of inputting the index parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested includes: Inputting the index parameters of the storage system to be tested into multiple decision trees of a pre-trained storage performance prediction model, and recording multiple third prediction results corresponding to multiple leaf nodes reached by the index parameters of the storage system to be tested, wherein each decision tree corresponds to one third prediction result; An average result or a majority result of the plurality of third prediction results is used as a first prediction result of the storage performance of the storage system to be tested.
7. The storage performance prediction method according to claim 1, characterized in that: The method further comprises: Before training the random forest classifier to be trained, searching for a combination of the number of the decision trees and the number of leaf nodes of the decision trees; In the process of training the random forest classifier to be trained, traversing multiple combinations in an increasing order of the number of decision trees, and determining the model performance of the random forest classifier to be trained corresponding to each combination; Based on the model performance, the optimal number of decision trees and the number of leaf nodes of the decision trees are determined.
8. A storage performance prediction device, characterized in that: The device comprises: An acquisition module is used to obtain the index parameters of the storage system to be tested; A prediction module is used to input the indicator parameters of the storage system to be tested into a pre-trained storage performance prediction model to obtain a first prediction result of the storage performance of the storage system to be tested, wherein the pre-trained storage performance prediction model is obtained by training a random forest classifier to be trained that includes multiple decision trees using a sample data set, and the sample data set includes real indicator parameters of multiple storage systems and corresponding real input and output quantities and real response times, and the first prediction result includes a predicted category of storage performance and a predicted value of storage performance.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the storage performance prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the storage performance prediction method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Data center hard disk fault prediction method based on hard disk adaptive report data
CN113986636A
Improved hard disk fault prediction method and device
CN114048796A
Equipment fault prediction method and device, readable storage medium and electronic equipment
CN117033912A
Intelligent testing and tuning method, system and device for performance of distributed storage system, medium and terminal
CN117579511A
Explainable response time prediction of storage arrays detection
US20230229945A1
