Training method of data resource prediction model of cloud server and resource prediction method
By performing wavelet decomposition and BiLSTM model training on cloud server resource sequences, the problem of insufficient prediction accuracy of cloud server resource in the existing technology is solved, and higher prediction accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411706703.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In the existing cloud server resource prediction methods, the accuracy and stability of the prediction results are insufficient.
By obtaining the resource sequence of the cloud server, decomposing it into multiple wavelet sequences to extract sequence features, and then training a bidirectional long and short-term memory recurrent neural network (BiLSTM) model is used to predict the resource load of the cloud server.
It improves the accuracy and stability of prediction, enhances the timing modeling capabilities of BiLSTM, and solves the problem of insufficient prediction accuracy of cloud server data resources.
Smart Images

Figure CN119814588A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data resource prediction, and specifically relates to a training method for a data resource prediction model of a cloud server and a resource prediction method, storage medium, device and computer program product. Background Art
[0002] With the rapid development of cloud computing technology, more and more enterprises and organizations are migrating their computing, storage and network resources to cloud platforms. As the core component of cloud computing, cloud servers carry a large number of user requests and data processing tasks, and the reasonable allocation and management of their resources have become particularly important. In order to ensure that cloud servers can provide stable and high-performance services while efficiently utilizing resources, accurately predicting future resource requirements has become a key technology.
[0003] Among the existing cloud server resource prediction methods, a multi-layer bidirectional long short-term memory network (Bidirectional Long Short-Term Memory, BiLSTM) combined with an improved particle swarm optimization algorithm (PSO) is a more common method. This method predicts application load by constructing a multi-layer BiLSTM neural network and uses the PSO algorithm to optimize the hyperparameters of the neural network to improve the prediction accuracy of the model. In addition, the multi-index fusion method of the benchmark model is used to evaluate the prediction model to ensure the stability and reliability of the model.
[0004] However, the above methods have the problem of insufficient accuracy and stability of prediction results. Summary of the invention
[0005] The present application aims to provide a training method for a data resource prediction model of a cloud server and a resource prediction method, storage medium, device and computer program product, which at least solves the problem of insufficient accuracy in predicting data resources for a cloud server.
[0006] In a first aspect, an embodiment of the present application discloses a method for training a data resource prediction model of a cloud server, comprising:
[0007] Obtaining a resource sequence of a cloud server; the resource sequence is used to characterize changes in the resource load of the cloud server over time;
[0008] The resource sequence is decomposed into a plurality of wavelet sequences to obtain a sequence feature of each resource sequence; the sequence feature comprises a plurality of feature components, each of which corresponds to a different frequency interval; the feature component is used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature component;
[0009] According to the sequence characteristics of the resource sequence, the bidirectional long short-term memory recurrent neural network is trained to obtain a data resource prediction model; the resource prediction model is used to predict the resource load of the cloud server according to the resource sequence to obtain the sequence prediction characteristics of the cloud server.
[0010] In a second aspect, the embodiment of the present application further discloses a data resource prediction method for a cloud server, comprising:
[0011] Obtain resource sequences of multiple cloud servers according to the preset predicted sampling times;
[0012] Inputting the resource sequences into a data resource prediction model respectively to obtain a plurality of sequence prediction features of the cloud server; the data resource prediction model is trained according to the method described in the first aspect;
[0013] Based on the obtained plurality of sequence prediction features, a predicted value of resource demand for the cloud server is determined.
[0014] In a third aspect, the present application also discloses a training device for a data resource prediction model of a cloud server, including:
[0015] A sequence module, used to obtain a resource sequence of a cloud server; the resource sequence is used to characterize the change of the resource load of the cloud server over time;
[0016] A decomposition module, used for decomposing the resource sequence into multiple wavelet sequences to obtain sequence features of each resource sequence; the sequence features include multiple feature components, each of which corresponds to a different frequency interval; the feature components are used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature component;
[0017] A training module is used to train the bidirectional long short-term memory recurrent neural network according to the sequence characteristics of the resource sequence to obtain a data resource prediction model; the resource prediction model is used to predict the resource load of the cloud server according to the resource sequence to obtain the sequence prediction characteristics of the cloud server.
[0018] In a fourth aspect, the embodiment of the present application further discloses a data resource prediction device for a cloud server, comprising:
[0019] A sampling module, used to obtain resource sequences of multiple cloud servers according to a preset predicted sampling number;
[0020] A prediction module, used to input the resource sequences into a data resource prediction model respectively to obtain a plurality of sequence prediction features of the cloud server; the data resource prediction model is trained according to the method described in the first aspect;
[0021] The estimation module is used to determine the predicted value of the resource demand for the cloud server based on the obtained multiple sequence prediction features.
[0022] In a fifth aspect, an embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps described in the first aspect or the second aspect are implemented.
[0023] In a sixth aspect, an embodiment of the present application further discloses an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps described in the first aspect or the second aspect are implemented.
[0024] In a seventh aspect, an embodiment of the present application further discloses a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the steps described in the first aspect or the second aspect are implemented.
[0025] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0027] Figure 1It is a flowchart of the steps of a method for training a data resource prediction model of a cloud server provided in an embodiment of the present application;
[0028] Figure 2 is a schematic diagram showing a resource sequence in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of a wavelet function decomposition process in an embodiment of the present application;
[0030] Figure 4 It is a flowchart of the steps of another method for training a data resource prediction model of a cloud server provided in an embodiment of the present application;
[0031] Figure 5 It is a flowchart of the steps of a data resource prediction method for a cloud server provided in an embodiment of the present application;
[0032] Figure 6 It is a flowchart of the steps of another method for predicting data resources of a cloud server provided in an embodiment of the present application;
[0033] Figure 7 is a comparison chart of experimental results obtained according to the method of the embodiment of the present application;
[0034] Figure 8 is a flow chart of a resource estimation process obtained according to the method of the embodiment of the present application;
[0035] Fig. 9 It is a flowchart of a program running process obtained according to the method of the embodiment of the present application;
[0036] Fig.10 It is a structural schematic diagram of a training device for a data resource prediction model of a cloud server provided in an embodiment of the present application;
[0037] Fig.11 It is a structural diagram of a data resource prediction device for a cloud server provided in an embodiment of the present application;
[0038] Fig.12 is a block diagram of an electronic device provided in an embodiment of the present application;
[0039] Fig.13 It is a block diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0041] In order to solve the problems existing in the existing technology, this solution takes into account that low-frequency components usually contain the overall trend and long-term changes in the data, while high-frequency components mainly contain details and short-term fluctuations in the data. This separation enables the model to more clearly understand and process different features in the data, improving the accuracy and stability of the prediction.
[0042] Furthermore, because the wavelet transform can analyze both time and frequency domains simultaneously, the wavelet method is used to extract the two components. This method decomposes the signal into components of different scales, generating detail signals (high-frequency components) and approximate signals (low-frequency components), thereby fully capturing the overall trend and local details of the signal. The characteristics of multi-resolution analysis and simultaneous provision of time and frequency information enable the wavelet transform to accurately extract and process multi-level features in the signal, improving the accuracy and stability of the prediction model.
[0043] Based on this, Figure 1 This embodiment provides a method for training a data resource prediction model of a cloud server, and the method may include the following steps:
[0044] Step 101, obtaining the resource sequence of the cloud server.
[0045] The resource sequence is used to represent the change of the resource load of the cloud server over time.
[0046] In some embodiments of the present application, the resource sequence of the cloud server is obtained in order to comprehensively capture the changes in the resource load of the cloud server over time. The specific process includes extracting resource data from the cloud server to characterize the changes in the resource load of the cloud server over time. The resource sequence is used to characterize the changes in the resource load of the cloud server over time. This process can provide basic data for the subsequent resource prediction model, thereby effectively improving the accuracy of the prediction.
[0047] like Figure 2As shown in the figure, in a specific example, the experimenters collected the CPU utilization data from the cloud server deployed on the OpenStack platform and recorded the resource sequence data at a certain interval. By continuously collecting these resource data, the experimenters can accurately depict the changes in the cloud server resource load and provide reliable basic data for the subsequent wavelet decomposition and bidirectional long short-term memory recurrent neural network training. According to this process, the experimenters finally obtained a complete set of resource sequences, which can provide necessary support for subsequent model training and resource prediction.
[0048] Step 102: Decompose the resource sequence into multiple wavelet sequences to obtain the sequence characteristics of each resource sequence.
[0049] The sequence feature includes multiple feature components, each of which corresponds to a different frequency interval; the feature component is used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature component.
[0050] In some embodiments of the present application, the resource sequence is decomposed into multiple wavelet sequences in order to extract the multi-level change characteristics of the cloud server resource load. This process involves wavelet transforming the original resource sequence to generate multiple wavelet sequences. Wavelet Transform (WT) is a signal processing method that can provide time and frequency information at the same time and decompose the signal into a combination of approximate signals and detail signals. Through wavelet decomposition, the change trend and detail characteristics of the resource load can be effectively separated to obtain multiple characteristic components of the sequence characteristics, each of which corresponds to a different frequency interval. Through this step, the model can better understand and capture the changes in resource load, thereby providing more comprehensive and detailed data support for subsequent model training.
[0051] like Figure 3 As shown in the figure, in a specific example, the experimenters used the Daubechies wavelet function to perform a three-layer wavelet decomposition on the CPU utilization sequence of the cloud server. This process generated three detail components and one approximate component, where the approximate component retains the low-frequency information and overall trend of the resource load, while the detail component captures the high-frequency detail changes. With this method, the experimenters were able to effectively extract the multi-level features of the resource sequence and provide rich feature data for the subsequent training of the BiLSTM model. In the end, the experimenters obtained a set of detailed sequence features that can provide important support for model training and resource prediction.
[0052] Step 103: training a bidirectional long short-term memory recurrent neural network according to the sequence characteristics of the resource sequence to obtain a data resource prediction model.
[0053] Among them, the resource prediction model is used to predict the resource load of the cloud server according to the resource sequence to obtain the sequence prediction characteristics of the cloud server.
[0054] In some embodiments of the present application, BiLSTM is trained according to the sequence characteristics of the resource sequence in order to capture the time series characteristics in the cloud server resource load, thereby improving the accuracy and stability of the prediction. The specific process includes inputting the extracted sequence characteristics into the BiLSTM model and performing model training to obtain a data resource prediction model. BiLSTM is a neural network that combines LSTM and bidirectional properties, and can capture long-term dependencies in data from both forward and reverse dimensions. This process fully exploits the time dependencies in the data to enable the model to have higher prediction capabilities to obtain the sequence prediction characteristics of the cloud server.
[0055] In a specific example, the experimenters input the multi-level feature components of the cloud server CPU utilization extracted by wavelet transform into the BiLSTM model for training. During the training process, the model continuously adjusts its own parameters to minimize the prediction error and gradually optimizes its prediction ability. Through this training method, the experimenters finally obtained a BiLSTM data resource prediction model that can accurately predict the cloud server resource load. The model can not only capture the overall change trend of resource load, but also identify detailed fluctuations in the short term, thereby providing accurate prediction results in practical applications.
[0056] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies.
[0057] Figure 4Another method for training a data resource prediction model of a cloud server provided in this embodiment may include the following steps:
[0058] Step 201, obtain the resource sequence of the cloud server.
[0059] The resource sequence is used to represent the change of the resource load of the cloud server over time.
[0060] The method shown in this step has been explained in step 101 and will not be repeated here.
[0061] Step 202: Decompose the resource sequence into multiple wavelet sequences to obtain the sequence characteristics of each resource sequence.
[0062] The sequence feature includes multiple feature components, each of which corresponds to a different frequency interval; the feature component is used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature component.
[0063] The method shown in this step has been explained in step 102 and will not be repeated here.
[0064] Optionally, step 202 includes the following sub-steps:
[0065] Sub-step 2021, decomposing the resource sequence into a first resource sub-sequence and a second resource sub-sequence.
[0066] The frequency value in the frequency range corresponding to the first resource subsequence is higher than the frequency value in the frequency range corresponding to the second resource subsequence.
[0067] In some embodiments of the present application, the resource sequence is decomposed into a first resource subsequence and a second resource subsequence in order to separate the high-frequency and low-frequency information of the resource load. The specific process includes using a wavelet transform to decompose the resource sequence according to the frequency range to obtain a first resource subsequence and a second resource subsequence. The first resource subsequence contains higher frequency components, while the second resource subsequence contains lower frequency components. Through this decomposition, different frequency features in the resource sequence can be better extracted, providing more accurate data for subsequent model training.
[0068] In a specific example, the experimenters performed wavelet transform decomposition on the CPU utilization time series data obtained from the cloud server. The experimenters selected the Daubechies wavelet function and performed wavelet decomposition on the data to generate a detail component (first resource subsequence) and an approximate component (second resource subsequence). The detail component contains high-frequency information, and the approximate component contains low-frequency information. Through this decomposition method, the experimenters successfully decomposed the original resource sequence into subsequences containing different frequency characteristics, providing a basis for subsequent analysis and processing. In the end, the experimenters obtained a set of detailed first resource subsequences and second resource subsequences, laying the foundation for the subsequent resource prediction model training.
[0069] Sub-step 2022, when the number of executions of decomposing the resource sequence into the first resource sub-sequence and the second resource sub-sequence does not reach a preset decomposition iteration threshold, the first resource sub-sequence obtained by decomposition is recorded as a detail sequence, and the resource sequence is updated with the second resource sub-sequence, and the process returns to sub-step 2021.
[0070] In some embodiments of the present application, when the number of executions of decomposing a resource sequence into a first resource subsequence and a second resource subsequence does not reach a preset decomposition iteration threshold, the first resource subsequence obtained by decomposition is recorded as a detail sequence, and the resource sequence is updated with the second resource subsequence, in order to gradually decompose the high-frequency and low-frequency information in the resource load. The specific process includes recording the first resource subsequence as a detail sequence after each decomposition, updating the current resource sequence with the second resource subsequence, and then decomposing again until the preset decomposition iteration threshold is reached. The detail sequence contains higher frequency components, while the updated resource sequence contains lower frequency components. Through this step-by-step decomposition method, the multi-level characteristics of the resource load can be fully extracted and the prediction ability of the model can be improved.
[0071] In a specific example, the experimenters performed wavelet decomposition on the time series data of the CPU utilization of the cloud server. Assuming that the preset decomposition iteration threshold is three times, the experimenters obtained the first resource subsequence (containing high-frequency information) and the second resource subsequence (containing low-frequency information) in the first decomposition. The experimenters recorded the first resource subsequence as a detail sequence and updated the current resource sequence with the second resource subsequence. Then, the experimenters continued to decompose the updated resource sequence for the second and third time, repeating the process of recording the detail sequence and updating the resource sequence. Finally, after three iterations, the experimenters obtained a complete detail sequence and an approximate sequence, which provided sufficient data support for subsequent analysis and processing.
[0072] Sub-step 2023, when the number of executions reaches the decomposition iteration threshold, the second resource sub-sequence obtained by decomposition is recorded as an approximate sequence, and the sequence characteristics of the resource sequence data are determined according to all the detail sequences and the approximate sequence.
[0073] In some embodiments of the present application, when the number of executions reaches the decomposition iteration threshold, the second resource subsequence obtained by decomposition is recorded as an approximate sequence in order to obtain the low-frequency characteristics of the resource sequence. The specific process includes recording the obtained second resource subsequence as an approximate sequence after each decomposition. The detail sequence represents high-frequency information, while the approximate sequence represents low-frequency information. Through this method, the complete sequence characteristics of the resource sequence data can be ultimately determined based on all the detail sequences and approximate sequences, thereby providing the model with rich time series information and improving the accuracy of the prediction.
[0074] In a specific example, the experimenters performed wavelet decomposition on the time series data of the cloud server CPU utilization, and set the decomposition iteration threshold to three times. After three decompositions, the experimenters recorded the detail sequence obtained from each decomposition, and recorded the second resource subsequence obtained from the last decomposition as an approximate sequence. Finally, the experimenters comprehensively determined the multi-level sequence characteristics of the resource sequence data based on all the recorded detail sequences and approximate sequences. With this method, the experimenters were able to effectively extract the overall picture of the cloud server resource load, providing sufficient data support for subsequent model training and prediction. Finally, the experimenters obtained detailed sequence characteristics, laying the foundation for high-precision resource demand prediction.
[0075] Optionally, in order to determine the sequence characteristics of the resource sequence data according to all the detail sequences and the approximate sequences, sub-step 2023 includes the following sub-steps:
[0076] Sub-step 20231, all detail sequences and approximate sequences are respectively determined as a resource subsequence of the resource sequence, and each resource subsequence is normalized to obtain a resource normalized subsequence corresponding to the cloud server and each frequency interval.
[0077] In some embodiments of the present application, all detail sequences and approximate sequences are respectively determined as a resource subsequence of the resource sequence, and each resource subsequence is normalized in order to eliminate the magnitude difference between different feature data and ensure the stability of the model. The specific process includes treating the decomposed detail sequence and approximate sequence as independent resource subsequences, and normalizing each resource subsequence. The normalization process maps the data to a standard range, such as the [0,1] interval. Through this process, the weight difference between data features can be reduced, and the stability and robustness of the prediction model can be improved.
[0078] In a specific example, the experimenters used the detail sequence and approximate sequence obtained by wavelet decomposition of the cloud server CPU utilization sequence as independent resource subsequences. The experimenters calculated the maximum and minimum values of each subsequence and used these values to normalize the data. Specifically, the numerical value of each subsequence was subtracted from the minimum value, and then divided by the difference between the maximum and minimum values, so that the processed data were all in the interval [0,1]. Through this normalization method, the experimenters ensured that the characteristics of each resource subsequence were compared and analyzed on a unified scale. Finally, the experimenters obtained the normalized resource subsequence, which provided a standardized data basis for the subsequent determination of sequence characteristics.
[0079] Sub-step 20232, according to the preset interval order, the resource normalization sub-sequence is used as the feature component of the sequence feature to obtain the sequence feature.
[0080] In some embodiments of the present application, the resource normalization subsequence is used as the characteristic component of the sequence feature according to the preset interval order, so that the model can make full use of the information of different frequency intervals for prediction. The specific process includes arranging and integrating the normalized resource subsequences as different characteristic components of the sequence feature according to the preset interval order. By orderly integrating these characteristic components, a comprehensive sequence feature can be formed to reflect the changes in resource load in different frequency intervals. This method can ensure that the prediction model fully captures the multi-level information of resource load, thereby improving the accuracy and stability of the prediction.
[0081] In a specific example, the experimenters performed wavelet decomposition and normalization on the CPU utilization data of the cloud server and obtained multiple resource normalized subsequences. The experimenters arranged these normalized subsequences as feature components according to the preset interval order. For example, assuming that the interval order preset by the experimenters is from low frequency to high frequency, the approximate sequence is placed in front first, followed by the first-level detail sequence, and then arranged to the third-level detail sequence. In this way, the experimenters successfully obtained a complete sequence feature, covering information in different frequency intervals, providing a sufficient data basis for subsequent model training and prediction. Finally, based on these sequence features, the experimenters were able to more accurately predict the resource requirements of the cloud server, improving system performance and resource management efficiency.
[0082] Step 203: Sampling the sequence features to obtain a plurality of sampled features of the cloud server.
[0083] In some embodiments of the present application, the sequence features are sampled in order to further extract effective features from the cloud server resource load. This process includes randomly extracting a number of samples from the decomposed sequence features to form a plurality of representative sampling features. In this way, more diverse and meaningful features can be extracted from the original data to improve the generalization ability and prediction accuracy of the subsequent model. The sampling process can ensure that each feature component is fully represented in the data set, thereby effectively reducing the variance of the model and improving the stability and accuracy of the model.
[0084] In a specific example, the experimenters sampled from the cloud server CPU utilization sequence features obtained after wavelet decomposition. The experimenters set a time window and randomly sampled the features within each time window to generate multiple training sample sets. These sample sets retain important information in the original data while increasing the diversity of the data set through sampling. Through this sampling method, the experimenters were able to obtain a set of highly representative and diverse feature data, thus providing a solid foundation for subsequent model training.
[0085] Optionally, step 203 includes the following sub-steps:
[0086] Sub-step 2031, according to a preset sampling window threshold, data slicing is performed on each feature component in the sequence feature to obtain multiple candidate features of the cloud server.
[0087] The candidate feature components of the candidate features are used to characterize the change of the resource load of the cloud server over time in a preset time window and in a frequency interval corresponding to the feature components of the candidate feature components.
[0088] In some embodiments of the present application, data slicing is performed on each feature component in the sequence feature according to a preset sampling window threshold in order to extract more detailed features from the resource load data. The specific process includes slicing each feature component in the sequence feature according to a preset sampling window threshold to generate multiple candidate features. The feature component of each candidate feature characterizes the changes in the resource load of the cloud server within the preset time window and the corresponding frequency interval. Through this data slicing method, the dynamic changes of the resource load can be captured in a more refined manner, and the prediction accuracy and reliability of the subsequent model can be improved.
[0089] In a specific example, the experimenter set a 5-second sampling window threshold and sliced the data of the sequence features of the cloud server CPU utilization. The experimenter sliced each feature component according to the preset 5-second time window to generate multiple candidate features. For example, a feature component was cut into multiple small segments within a 5-second time window, and each segment described in detail the changes in resource load during the time period. In this way, the experimenter was able to obtain a more detailed set of candidate features, providing more accurate data support for subsequent model training. In the end, the experimenter successfully generated multiple candidate features for cloud servers, laying the foundation for improving the accuracy of the prediction model.
[0090] In sub-step 2032, all the candidate features obtained are used as the sample space for selecting samples, randomly extracted from the sample space, and the multiple candidate features obtained by extraction are used as multiple sampling features of the cloud server.
[0091] In some embodiments of the present application, all the candidate features obtained are used as the sample space for selecting samples, and random sampling is performed from the sample space in order to generate representative sampling features from a large amount of data. The specific process includes taking all the candidate features as the sample space, and then randomly extracting a number of features from it as the final sampling features. This random extraction method ensures that each candidate feature has a chance to be selected, thereby increasing the diversity and representativeness of the data set, and effectively improving the generalization ability and prediction accuracy of the model.
[0092] In a specific example, the experimenters used all the candidate features obtained through data slicing as the sample space for selecting samples. Assuming that the sample space contains 1,000 candidate features, the experimenters can randomly select 100 of them with replacement as the sampling features of the cloud server. Through this random sampling method, the experimenters can ensure that the final selected sampling features are widely representative, covering different aspects and changes in resource load data. In the end, the experimenters obtained a set of high-quality sampling features, which provided a solid data foundation for subsequent model training and resource prediction. In this way, the experimenters can generate diverse sampling features and improve the accuracy and robustness of the prediction model.
[0093] Step 204 , training a bidirectional long short-term memory recurrent neural network by obtaining a plurality of sampling features to obtain a trained data resource prediction model.
[0094] In some embodiments of the present application, BiLSTM is trained by obtaining multiple sampling features in order to further improve the prediction accuracy and stability of the model. The specific process includes inputting multiple feature samples obtained by previous sampling into the BiLSTM model for training. The BiLSTM model combines the traditional Long Short-Term Memory (LSTM) structure and bidirectional characteristics, and can capture long-term dependencies in time series data from both forward and reverse dimensions. Through this training process, the model can show higher prediction capabilities when processing time series data, so as to obtain a more accurate data resource prediction model.
[0095] In a specific example, the experimenters used multiple sampling features extracted from the CPU utilization sequence of the cloud server to train the BiLSTM model. During the training process, the experimenters input multiple representative sampling features into the BiLSTM model. Through multiple iterations and parameter optimization, the model gradually learned the change pattern of resource load. In this way, the experimenters finally obtained a trained data resource prediction model that can accurately predict the load of cloud server resources, providing strong support for resource management and scheduling in practical applications.
[0096] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies.
[0097] In some embodiments of the present application,
[0098] Figure 5 This embodiment provides a data resource prediction method for a cloud server, and the training method includes:
[0099] Step 301: Obtain resource sequences of multiple cloud servers according to a preset number of predicted sampling times.
[0100] In some embodiments of the present application, the resource sequences of multiple cloud servers are obtained according to the preset prediction sampling times to ensure that the prediction model can learn from enough data samples, thereby improving the accuracy and stability of the prediction. The specific process includes collecting sequence data of resource load changes over time from multiple cloud servers according to the set prediction sampling times. This process can ensure that the model has rich and diverse data samples during training and prediction, so as to better capture the changing patterns of cloud server resource loads.
[0101] In a specific example, the experimenters obtained the time series data of CPU utilization from multiple cloud servers deployed on the OpenStack platform according to the set prediction sampling times. The experimenters set each sampling interval to five minutes and continuously collected resource data on multiple cloud servers. In this way, the experimenters were able to obtain multiple sets of time series data reflecting the changes in cloud server resource loads, providing sufficient data support for the subsequent data resource prediction model training. In the end, the experimenters collected a series of rich resource sequence data, which laid the foundation for the high-precision prediction of the model.
[0102] Step 302 , respectively input the resource sequences into the data resource prediction model to obtain multiple sequence prediction features of the cloud server.
[0103] The data resource prediction model is obtained by training according to the training method of the data resource prediction model of the cloud server in the above disclosed embodiment.
[0104] In some embodiments of the present application, the resource sequences are input into the data resource prediction model respectively in order to predict the resource load changes of the cloud server based on the previously trained model. The specific process includes inputting the resource sequences of multiple cloud servers into the trained data resource prediction model one by one to obtain multiple sequence prediction features of the cloud server. The data resource prediction model is a model trained according to the previous steps, which is used to predict the input resource sequence, thereby obtaining the sequence prediction features of each cloud server. Through this process, the future resource requirements of the cloud server can be effectively predicted to ensure the efficient allocation and utilization of resources.
[0105] In a specific example, the experimenters input the cloud server CPU utilization sequence data obtained from the OpenStack platform into the previously trained BiLSTM model. After each resource sequence is processed in the model, the corresponding sequence prediction features are generated. These prediction features reflect the changes in the CPU utilization of the cloud server in the future. In this way, the experimenters can obtain a set of detailed sequence prediction features for further analysis and optimization of the resource management of the cloud server. Ultimately, the experimenters can formulate a more reasonable resource allocation strategy based on these sequence prediction features to improve the overall performance and stability of the system.
[0106] Step 303: Determine a predicted value of resource demand for the cloud server based on the obtained multiple sequence prediction features.
[0107] In some embodiments of the present application, the predicted value of the resource demand of the cloud server is determined based on the obtained multiple sequence prediction features in order to further quantify the resource usage of the cloud server in the future period. The specific process includes using the multiple sequence prediction features obtained in the previous steps, and finally determining the resource demand of the cloud server in the future period through weighted processing and integrated analysis. In this process, the weighted processing can assign weights based on the accuracy of each prediction model, thereby improving the accuracy of the final prediction result. Through this step, the resource demand of the cloud server can be effectively predicted, thereby achieving the optimal allocation of resources and preventing the problem of insufficient resources in advance.
[0108] In a specific example, the experimenters first obtained the sequence prediction features of the CPU utilization of multiple cloud servers predicted by the BiLSTM model. Next, the experimenters calculated the weighting coefficients according to the inverse of the error of each prediction feature, and weighted and integrated the multiple prediction results to obtain the final resource demand prediction value. For example, assuming that the sequence prediction features of a cloud server are Y1, Y2, and Y3, and the corresponding weighting coefficients are W1, W2, and W3, respectively, the final resource demand prediction value Y can be calculated by the formula Y = W1*Y1+W2*Y2+W3*Y3. In this way, the experimenters can accurately determine the resource requirements of the cloud server in the future, providing a reliable basis for resource management and scheduling. In the end, the experimenters obtained a series of accurate resource demand prediction values, which can effectively guide the dynamic adjustment and optimal configuration of cloud server resources.
[0109] Furthermore, in some embodiments of the present application, the weighted formula may be:
[0110] Y=W 1 Y 1 +W 2 Y 2 +…+W n Yn ;
[0111] Among them, W n By formula:
[0112] get,
[0113] In the formula of Wn, the i-th intermediate parameter p i By formula:
[0114] get;
[0115] In the above formula, X represents the actual data of the cloud server resource subsequence, Y represents the predicted value of the cloud server resource subsequence, and Y n represents the predicted value of the nth BiLSTM model, W n Represents the weight coefficient of the nth BiLSTM model, p n Represents the inverse of the error of the nth model.
[0116] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies.
[0117] Figure 6 This is another data resource prediction method for a cloud server provided by this embodiment.
[0118] Step 401, obtaining resource sequences of multiple cloud servers according to a preset prediction sampling number.
[0119] The method shown in this step has been explained in step 301 and will not be repeated here.
[0120] Step 402 , respectively input the resource sequences into the data resource prediction model to obtain multiple sequence prediction features of the cloud server.
[0121] The data resource prediction model is obtained by training according to the training method of the data resource prediction model of the cloud server in the above disclosed embodiment.
[0122] The method shown in this step has been explained in step 302 and will not be repeated here.
[0123] Step 403: Use the obtained multiple sequence prediction features as estimation samples to estimate the resource demand of the cloud server to determine the resource estimation sequence of the cloud server.
[0124] In some embodiments of the present application, the resource requirements of the cloud server are estimated by using multiple sequence prediction features obtained as estimation samples in order to further accurately calculate the resource usage of the cloud server in the future. The specific process includes taking multiple previously obtained sequence prediction features as input, and comprehensively evaluating the resource requirements of the cloud server through the estimation model to determine the resource estimation sequence. The estimation samples represent multi-dimensional information of the resource load of the cloud server. By analyzing these samples, it is possible to better predict future resource requirements and ensure the effective allocation and use of resources.
[0125] In a specific example, the experimenters used the multiple CPU utilization sequence prediction features predicted by the BiLSTM model as estimation samples. The experimenters used these samples to estimate the future resource requirements of each cloud server through a comprehensive evaluation model. Specifically, assuming that the sample prediction features are S1, S2, and S3, the experimenters input these samples into the estimation model, and the model analyzes each sample and generates resource requirement estimation results. Finally, the experimenters integrated these estimation results to obtain a complete resource estimation sequence that can reflect the resource requirements of the cloud server in the future time period. This resource estimation sequence provides an important basis for the resource management and optimization of the cloud server, and helps to ensure the stability and efficiency of system performance.
[0126] Optionally, step 403 includes the following sub-steps:
[0127] Sub-step 4031, performing weighted summation on the obtained multiple sequence prediction features to obtain the resource estimation normalized features of the cloud server.
[0128] In some embodiments of the present application, the weighted summation of the obtained multiple sequence prediction features is to synthesize the prediction results of different models to obtain more accurate resource estimation normalized features. The specific process includes weighting each sequence prediction feature, the weight is usually assigned based on the accuracy of the model, and then summing these weighted prediction features to obtain the final resource estimation normalized features. This method can make full use of the advantages of each prediction model, and through weighted summation, it can improve the accuracy and stability of resource estimation.
[0129] In a specific example, the experimenters used multiple BiLSTM models to predict the CPU utilization sequence of the cloud server, and each model generated a prediction feature. The experimenters calculated the weights based on the inverse of the prediction error of each model, and then weighted summed these prediction features. For example, suppose there are three prediction features Y 1 , Y 2 , Y 3 , and their corresponding weights are W 1 , W 2 , W 3 , then the final resource estimation normalized feature Y can be obtained by the formula Y = W 1 *Y 1 +W 2 *Y 2 +W 3 *Y 3 By using this weighted summation method, the experimenters were able to combine the prediction results of different models and improve the accuracy and reliability of the final prediction. Finally, the experimenters obtained accurate normalized characteristics of resource estimation, which provided a reliable data basis for subsequent inverse normalization processing and resource estimation.
[0130] Sub-step 4032, according to the preset normalized features, the resource estimation normalized features are inversely normalized to obtain the resource estimation features of the cloud server.
[0131] Each resource estimation feature component of the resource estimation feature corresponds to a frequency interval one by one.
[0132] In some embodiments of the present application, the resource estimation normalization feature is subjected to inverse normalization processing according to the preset normalization feature in order to restore the standardized data to its original magnitude for practical application. The specific process includes inverse normalization processing of the resource estimation normalization feature according to the maximum and minimum values recorded during the previous normalization processing. The components of each resource estimation feature correspond one-to-one to different frequency intervals. Through the inverse normalization processing, the prediction results can be converted into actual resource estimation values, making the output results of the model more operational and practical.
[0133] In a specific example, the experimenter used the normalized cloud server CPU utilization sequence for resource estimation. In order to perform the denormalization, the experimenter first obtained the maximum and minimum values during the normalization. Then, these values were used to denormalize the resource estimation normalized features. Specifically, assuming that a resource estimation normalized feature value is Y normalized , the corresponding maximum and minimum values are X max and X min, then the inverse normalized resource estimation characteristic value Y can be obtained by the formula Y = Y normalized *(X max -X min )+X min By using this method, the experimenters were able to obtain resource estimation feature values that reflect the actual CPU utilization and use these feature values for further analysis and application. In the end, the experimenters successfully obtained accurate resource estimation features, providing reliable data support for the resource management of cloud servers.
[0134] Optionally, sub-step 4032 includes the following sub-steps:
[0135] Sub-step 40321, in the process of obtaining multiple sequence prediction features of the cloud server through the training method of the data resource prediction model of the cloud server, the range values of the multiple sequence prediction features are determined as the target range values.
[0136] In some embodiments of the present application, the data resource prediction model obtained by the training method of the data resource prediction model of the cloud server is used to determine the range of multiple sequence prediction features in order to quantify the fluctuation range of these prediction features. The specific process includes using the trained data resource prediction model to generate multiple sequence prediction features of the cloud server and calculating the range of these features. The range value represents the difference between the maximum and minimum values of the feature data. By determining these range values, clear target parameters can be provided for subsequent gain processing. The determination of the range value helps to understand the degree of discreteness of the feature data, thereby providing a basis for model adjustment.
[0137] In a specific example, the experimenters used the previously trained BiLSTM model to generate sequence prediction features for the CPU utilization of multiple cloud servers. The experimenters calculated the range value of each prediction feature, that is, the difference between the maximum and minimum values of these feature data. For example, if the maximum value of a prediction feature is 95 and the minimum value is 45, then its range value is 50. In this way, the experimenters successfully determined the range values of each prediction feature, providing important parameters for subsequent gain processing and prediction model optimization. In the end, the experimenters obtained a set of detailed target range values, laying the foundation for accurate resource estimation.
[0138] Sub-step 40322, amplifying the normalized features according to the target extreme value, and inversely shifting the amplified normalized features according to the minimum sequence prediction feature among the multiple sequence prediction features to obtain resource estimation features.
[0139] In some embodiments of the present application, the normalized features are gained according to the target extreme value in order to amplify the range of variation of the predicted features so that the model can better reflect the fluctuations in the resource load. The specific process includes using the target extreme value determined previously to perform gain processing on the normalized features. The gain processing can amplify the normalized features to the actual magnitude of the variation range to ensure that the predicted features can reflect the actual resource load changes. Next, the gained normalized features are inversely shifted according to the minimum sequence prediction features among multiple sequence prediction features to obtain resource estimation features. The inverse translation process can adjust the gained feature values back to the original reference level, thereby accurately restoring the actual resource load situation.
[0140] In a specific example, the experimenter used the target range value calculated previously to perform gain processing on the CPU utilization sequence prediction feature of the cloud server. Assuming the target range value is 50 and the normalized eigenvalue is 0.6, through gain processing, the experimenter enlarges the eigenvalue to the actual magnitude range, that is, the eigenvalue after gain is 0.6*50=30. Then, the experimenter inversely shifted the eigenvalue after gain according to the minimum sequence prediction feature. Assuming that the minimum sequence prediction feature is 20, the eigenvalue after inverse shift is 30+20=50. Through this processing method, the experimenter can accurately obtain resource estimation features to reflect the actual changes in CPU utilization. In the end, the experimenter obtained accurate resource estimation features, providing a reliable data basis for resource management of cloud servers.
[0141] Sub-step 4033, taking the resource estimation feature components corresponding to each frequency interval in the resource estimation feature as reconstruction items, and performing wavelet reconstruction on the resource estimation feature to obtain a resource estimation sequence of the cloud server.
[0142] In some embodiments of the present application, the resource estimation feature components corresponding to each frequency interval in the resource estimation feature are used as reconstruction items in order to recombine the information of different frequency intervals to generate a complete resource estimation sequence. The specific process includes using the resource estimation feature components corresponding to each frequency interval as reconstruction items, and merging these components into a whole through wavelet reconstruction. Wavelet reconstruction can restore the overall shape of the signal, so that the resource estimation feature can reflect the full picture of the resource load after reconstruction. In this way, an accurate cloud server resource estimation sequence can be obtained, providing reliable data for resource management and optimization in practical applications.
[0143] In a specific example, the experimenter reconstructs the cloud server CPU utilization resource estimation features obtained by inverse normalization according to the frequency interval. Assume that the components include approximate component A 1 and detail component D 1 , D 2, D 3 , the experimenters used these components as reconstruction items and combined them into a resource estimation sequence through wavelet reconstruction. Specifically, the resource estimation sequence Y is calculated by the formula Y = A 1 +D 1 +D 2 +D 3 By using this wavelet reconstruction method, the experimenters were able to effectively restore the resource load changes of the cloud server and generate an accurate resource estimation sequence. In the end, the experimenters obtained a complete resource estimation sequence, which provided a solid data foundation for subsequent resource management and optimization.
[0144] Step 404: Use the resource estimation sequence as a predicted value of the resource sequence of the cloud server.
[0145] In some embodiments of the present application, the resource estimation sequence is used as the predicted value of the resource sequence of the cloud server in order to finally determine the resource load of the cloud server in the future. The specific process includes taking the resource estimation sequence generated in the previous step as input as the predicted value of the resource sequence of the cloud server. This process uses the estimated sequence to replace the actual resource sequence, so that the model can schedule and manage resources based on these predicted values, thereby optimizing the resource configuration of the cloud server. This method can effectively improve the accuracy of the prediction and the rationality of resource allocation, and ensure the stable operation of the system.
[0146] In a specific example, the experimenters used the resource estimation sequence generated by the BiLSTM model and the comprehensive evaluation model as the resource sequence prediction value of the cloud server. This prediction value will be used to guide the future resource scheduling and allocation of the cloud server. For example, assuming that the resource estimation sequence is E 1 、E 2 and E 3 , the experimenters input these estimation sequences into the system, which will treat them as future resource load data and perform resource allocation and optimization accordingly. In this way, the experimenters can accurately predict the future resource requirements of cloud servers, ensure that resources can be allocated in time when needed, avoid insufficient or over-allocation of resources, and ultimately improve the overall efficiency and performance of the system.
[0147] Based on the above process, the prediction performance of the embodiment of the present application can be compared with that of different models. The prediction models used for comparison are support vector machine (SVM) and directly using the BiLSTM model under the traditional method, and the mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are used as evaluation indicators.
[0148] Among them, the calculation formulas of MAE, RMSE and MAPE are:
[0149]
[0150] In the formula, y predictive Represents the prediction result of resource load, y true It represents the measurement result of resource load, n represents the sampling number, and i represents the number of the sampling sample.
[0151] Table 1 shows the prediction performance comparison obtained according to the above comparison.
[0152]
[0153] It can be seen that the method of the embodiment of the present application can significantly reduce the prediction error and improve the prediction performance.
[0154] Based on the above experiments, Figure 7 A comparison chart comparing the prediction results of using BiLSTM to predict the resources of the cloud server under this method with the actual data is given. From the figure, it can be seen that the prediction results obtained by the method of the embodiment of the present application are highly consistent with the original data.
[0155] like Figure 8 As shown, it is a complete process of obtaining resource estimation under the method disclosed in the embodiment of the present application:
[0156] S1: Obtain cloud server resource data: The system obtains cloud server resource data, which may include CPU utilization, memory usage, network traffic, etc. By collecting this data, basic information can be provided for subsequent analysis and prediction.
[0157] S2: Wavelet decomposition: Use wavelet transform (WT) to decompose resource data. Wavelet decomposition can decompose the signal into components of different frequencies, thereby extracting the low-frequency and high-frequency features of the data and providing multi-resolution analysis.
[0158] S3: Data Normalization: Perform data normalization (DN) on the decomposed data to map the data to a uniform range (e.g., [0,1] interval). Normalization can eliminate the magnitude differences between different features and improve the stability of the model.
[0159] S4: Sample sampling: Sample the normalized data to generate multiple features for training. This step usually involves the use of techniques such as bootstrap aggregation (bagging), which is random sampling with replacement from the original data set, increasing the diversity and representativeness of the data by randomly selecting subsamples from a large sample space.
[0160] S5: Train a multi-layer bidirectional long short-term memory network model: Use the previously prepared data to train a multi-layer bidirectional long short-term memory recurrent neural network (Bidirectional Long Short-Term Memory, BiLSTM) model. This model can capture long-term dependencies and short-term fluctuations in time series data and improve the accuracy of predictions.
[0161] S6: Integrated prediction results: Integrate the results of multiple prediction models, possibly using stacking technology to combine the advantages of different models. Through Ensemble Learning (EL), the overall prediction performance can be improved.
[0162] S7: Denormalization: Denormalize the prediction results according to the previous normalization parameters to restore the normalized data to the original magnitude. This can obtain the actual resource estimation characteristics, which is convenient for practical application.
[0163] S8: Wavelet reconstruction: Wavelet reconstruction is used to merge resource estimation features of different frequency components into a complete resource estimation sequence. Through reconstruction, a sequence that reflects the full picture of cloud server resource load can be obtained, providing reliable data for resource management and optimization.
[0164] Fig. 9 This is the program running process under the method disclosed in the embodiment of this application:
[0165] R1: Prepare a training sample set as the basic data for model training.
[0166] R2: Sample from the training sample set to generate multiple training sets.
[0167] R3: Divide the sampled samples into multiple training sets, each of which will be used for independent model training.
[0168] R4: Use each training set to train the model and generate multiple training models.
[0169] R5: Integrate the prediction results of multiple training models to obtain the final prediction results.
[0170] R6: Output the integrated prediction results to complete the entire program running process.
[0171] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies.
[0172] like Fig.10 As shown, the embodiment of the present application also discloses a training device 50 for a data resource prediction model of a cloud server, comprising:
[0173] Sequence module 501, used to obtain the resource sequence of the cloud server; the resource sequence is used to represent the change of the resource load of the cloud server over time;
[0174] The decomposition module 502 is used to decompose the resource sequence into multiple wavelet sequences to obtain the sequence characteristics of each resource sequence; the sequence characteristics include multiple characteristic components, each characteristic component corresponds to a different frequency interval; the characteristic component is used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the characteristic component;
[0175] The training module 503 is used to train the bidirectional long short-term memory recurrent neural network according to the sequence characteristics of the resource sequence to obtain a data resource prediction model; the resource prediction model is used to predict the resource load of the cloud server according to the resource sequence to obtain the sequence prediction characteristics of the cloud server.
[0176] Optionally, the decomposition module 502 includes:
[0177] A decomposition submodule, configured to decompose the resource sequence into a first resource subsequence and a second resource subsequence; a frequency value in a frequency range corresponding to the first resource subsequence is higher than a frequency value in a frequency range corresponding to the second resource subsequence;
[0178] an iteration submodule, configured to record the first resource subsequence obtained by decomposition as a detail sequence, update the resource sequence with the second resource subsequence, and return to the step of decomposing the resource sequence into the first resource subsequence and the second resource subsequence when the number of executions of decomposing the resource sequence into the first resource subsequence and the second resource subsequence does not reach a preset decomposition iteration threshold;
[0179] The determination submodule is used to record the second resource subsequence obtained by decomposition as an approximate sequence when the execution times reach the decomposition iteration threshold, and determine the sequence characteristics of the resource sequence data according to all the detail sequences and the approximate sequence.
[0180] Optionally, determine that the submodules include:
[0181] A normalization unit, used to determine all detail sequences and approximate sequences as a resource subsequence of the resource sequence, and perform normalization processing on each resource subsequence to obtain a resource normalization subsequence corresponding to the cloud server and each frequency interval;
[0182] The feature generating unit is used to use the resource normalized subsequence as the feature component of the sequence feature according to the preset interval order to obtain the sequence feature.
[0183] Optionally, the training module 503 includes:
[0184] A sampling submodule, used for sampling sequence features to obtain multiple sampling features of the cloud server;
[0185] The training submodule is used to train the bidirectional long short-term memory recurrent neural network by obtaining multiple sampling features to obtain a trained data resource prediction model.
[0186] Optionally, the sampling submodule includes:
[0187] A slicing unit is used to slice data for each feature component in the sequence feature according to a preset sampling window threshold value to obtain multiple candidate features of the cloud server; the candidate feature components of the candidate features are used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature components of the candidate feature components in the preset time window;
[0188] The sampling unit is used to use all the obtained candidate features as the sample space of the selected samples, randomly extract from the sample space, and use the multiple candidate features obtained by extraction as multiple sampling features of the cloud server.
[0189] like Fig.11 As shown, the embodiment of the present application also discloses a data resource prediction device 60 of a cloud server, comprising:
[0190] The sampling module 601 is used to obtain resource sequences of multiple cloud servers according to a preset predicted sampling number;
[0191] Prediction module 602, used to input resource sequences into a data resource prediction model respectively to obtain multiple sequence prediction features of the cloud server; the data resource prediction model is trained according to the training method of the data resource prediction model of the cloud server disclosed in the above embodiment;
[0192] The estimation module 603 is used to determine the predicted value of the resource demand for the cloud server according to the obtained multiple sequence prediction features.
[0193] Optionally, the estimation module 603 includes:
[0194] An estimation submodule, used to estimate the resource demand of the cloud server by using the obtained multiple sequence prediction features as estimation samples, so as to determine the resource estimation sequence of the cloud server;
[0195] The prediction submodule is used to use the resource estimation sequence as a prediction value of the resource sequence of the cloud server.
[0196] Optionally, the estimation submodule includes:
[0197] A normalized estimation unit, used for performing weighted summation on the obtained multiple sequence prediction features to obtain a resource estimation normalized feature of the cloud server;
[0198] An inverse normalization unit, used for performing inverse normalization processing on the resource estimation normalization feature according to a preset normalization feature to obtain a resource estimation feature of the cloud server; each resource estimation feature component of the resource estimation feature corresponds to a frequency interval one by one;
[0199] The wavelet reconstruction unit is used to use the resource estimation feature components corresponding to each frequency interval in the resource estimation feature as reconstruction items, and perform wavelet reconstruction on the resource estimation feature to obtain a resource estimation sequence of the cloud server.
[0200] Optionally, the inverse normalization unit includes:
[0201] A range subunit is used to determine the range values of the multiple sequence prediction features as the target range values in the process of obtaining multiple sequence prediction features of the cloud server by using the data resource prediction model trained by the training method of the cloud server data resource prediction model;
[0202] The inverse normalization subunit is used to gain the normalized feature according to the target extreme difference value, and inversely translate the gained normalized feature according to the minimum sequence prediction feature among multiple sequence prediction features to obtain the resource estimation feature.
[0203] In summary, in the embodiment of the present application, by obtaining the resource sequence of the cloud server, the changes in the resource load of the cloud server over time are fully captured, and then the resource sequence is decomposed into multiple wavelet sequences to extract the sequence features of different frequency intervals, so that the model can fully capture the changes in the resource load in different frequency intervals, thereby improving the accuracy and stability of the prediction, and then the BiLSTM is trained by the decomposed sequence features, so that the model can better capture the time series characteristics of the data resource load, thereby improving the prediction accuracy. Therefore, based on the method of the embodiment of the present application, the wavelet decomposition method is adopted to decompose the resource sequence into multiple characteristic components with different frequency intervals, thereby capturing the multi-level information of the resource load change, improving the representativeness of the training data and the generalization ability of the model, and improving the time series modeling ability of BiLSTM, and solving the problem of insufficient prediction accuracy of data resources of cloud servers in related technologies.
[0204] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the training method of the data resource prediction model of the cloud server or each process of the data resource prediction method embodiment of the cloud server is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0205] Fig.12 700 is a block diagram of an electronic device 700 provided in an embodiment of the present application. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0206] Reference Fig.12 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0207] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the training method of the data resource prediction model of the cloud server or the data resource prediction method of the cloud server described above. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0208] The memory 704 is used to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, multimedia, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as 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 memory, flash memory, magnetic disk or optical disk.
[0209] The power supply component 706 provides power to the various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0210] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0211] The audio component 710 is used to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0212] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0213] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0214] The communication component 716 is used to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 7G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0215] In an exemplary embodiment, the electronic device 700 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 implement the training method of the data resource prediction model of the cloud server or the data resource prediction method of the cloud server provided in the embodiments of the present application.
[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the above instructions can be executed by the processor 720 of the electronic device 700 to complete the above-mentioned cloud server data resource prediction model training method or cloud server data resource prediction method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0217] Fig.13 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be provided as a server. Fig.13 , the electronic device 800 includes a processing component 822, which further includes one or more processors, and a memory resource represented by a memory 832, for storing instructions that can be executed by the processing component 822, such as an application. The application stored in the memory 832 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 822 is configured to execute instructions to execute the training method of the data resource prediction model of the cloud server or the data resource prediction method of the cloud server provided in the embodiment of the present application.
[0218] The electronic device 800 may also include a power supply component 826 configured to perform power management of the electronic device 800, a wired or wireless network interface 850 configured to connect the electronic device 800 to a network, and an input / output (I / O) interface 858. The electronic device 800 may operate based on an operating system stored in the memory 832, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0219] An embodiment of the present application also provides a computer program product, including a computer program, which implements a training method for a data resource prediction model of a cloud server or a data resource prediction method for a cloud server when the computer program is executed by a processor.
[0220] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0221] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0222] 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.
[0223] It is easy for a person skilled in the art to think that any combination of the above embodiments is feasible, so any combination of the above embodiments is an implementation scheme of the present application. However, due to space limitations, this specification will not describe them in detail here.
[0224] The training method of the data resource prediction model of the cloud server provided here or the data resource prediction method of the cloud server is not inherently related to any specific computer, virtual system or other device. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required by the system with the solution of the present application. In addition, the present application is not directed to any specific programming language. It should be understood that the content of the present application described here can be implemented using various programming languages, and the description of the specific language above is to disclose the best mode of implementation of the present application.
[0225] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0226] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various application aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims, the application aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.
[0227] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0228] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
[0229] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the training method of the data resource prediction model of the cloud server according to the embodiment of the present application or the data resource prediction method of the cloud server. The present application can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0230] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
Claims
1. A method for training a data resource prediction model for a cloud server, characterized in that: include: Obtaining a resource sequence of a cloud server; the resource sequence is used to characterize changes in the resource load of the cloud server over time; Decomposing the resource sequence into multiple wavelet sequences to obtain a sequence feature of each resource sequence; The sequence feature includes multiple feature components, each of which corresponds to a different frequency interval; the feature component is used to characterize the change of the resource load of the cloud server over time in the frequency interval corresponding to the feature component; According to the sequence characteristics of the resource sequence, the bidirectional long short-term memory recurrent neural network is trained to obtain a data resource prediction model; the resource prediction model is used to predict the resource load of the cloud server according to the resource sequence to obtain the sequence prediction characteristics of the cloud server.
2. The method according to claim 1, characterized in that Decomposing the resource sequence into a plurality of wavelet sequences to obtain a sequence feature of each resource sequence comprises: Decomposing the resource sequence into a first resource subsequence and a second resource subsequence; a frequency value in a frequency range corresponding to the first resource subsequence is higher than a frequency value in a frequency range corresponding to the second resource subsequence; If the number of executions of decomposing the resource sequence into the first resource subsequence and the second resource subsequence does not reach a preset decomposition iteration threshold, recording the first resource subsequence obtained by decomposition as a detail sequence, updating the resource sequence with the second resource subsequence, and returning to the step of decomposing the resource sequence into the first resource subsequence and the second resource subsequence; When the execution times reaches the decomposition iteration threshold, the second resource subsequence obtained by decomposition is recorded as an approximate sequence, and the sequence characteristics of the resource sequence data are determined according to all the detail sequences and the approximate sequence.
3. The method according to claim 2, characterized in that The determining the sequence characteristics of the resource sequence data according to all the detail sequences and the approximate sequences comprises: Determine all of the detail sequences and the approximate sequences as a resource subsequence of the resource sequence, and perform normalization processing on each of the resource subsequences to obtain a resource normalized subsequence corresponding to the cloud server and each of the frequency intervals; According to a preset interval order, the resource normalization subsequence is used as a feature component of the sequence feature to obtain the sequence feature.
4. The method according to claim 1, characterized in that The step of training the bidirectional long short-term memory recurrent neural network according to the sequence characteristics of the resource sequence to obtain a data resource prediction model includes: Sampling the sequence features to obtain a plurality of sampling features of the cloud server; A bidirectional long short-term memory recurrent neural network is trained by obtaining multiple sampling features to obtain a trained data resource prediction model.
5. The method according to claim 4, characterized in that The sampling of the sequence features to obtain a plurality of sampling features of the cloud server includes: According to a preset sampling window threshold, data slicing is performed on each feature component in the sequence feature to obtain a plurality of candidate features of the cloud server; the candidate feature components of the candidate features are used to characterize the change of the resource load of the cloud server over time in a preset time window in a frequency interval corresponding to the feature components of the candidate feature components; All the candidate features obtained are used as a sample space for selecting samples, randomly extracted from the sample space, and the multiple candidate features obtained by extraction are used as multiple sampling features of the cloud server.
6. A data resource prediction method for a cloud server, characterized in that: include: Obtain resource sequences of multiple cloud servers according to the preset predicted sampling times; Inputting the resource sequences into a data resource prediction model respectively to obtain a plurality of sequence prediction features of the cloud server; The data resource prediction model is obtained by training according to any one of the methods of claims 1 to 5; Based on the obtained plurality of sequence prediction features, a predicted value of resource demand for the cloud server is determined.
7. The method according to claim 6, characterized in that Determining the predicted value of the resource demand of the cloud server according to the obtained plurality of sequence prediction features includes: Using the obtained plurality of sequence prediction features as estimation samples, estimating the resource demand of the cloud server to determine a resource estimation sequence of the cloud server; The resource estimation sequence is used as a predicted value of the resource sequence of the cloud server.
8. The method according to claim 7, characterized in that The method of using the obtained plurality of sequence prediction features as estimation samples to estimate the resource demand of the cloud server to determine the resource estimation sequence of the cloud server includes: Performing weighted summation on the obtained multiple sequence prediction features to obtain a normalized feature of resource estimation of the cloud server; According to the preset normalized feature, the resource estimation normalized feature is subjected to inverse normalization processing to obtain the resource estimation feature of the cloud server; each resource estimation feature component of the resource estimation feature corresponds to the frequency interval one by one; The resource estimation feature component corresponding to each of the frequency intervals in the resource estimation feature is used as a reconstruction item, and wavelet reconstruction is performed on the resource estimation feature to obtain a resource estimation sequence of the cloud server.
9. An electronic device, characterized in that: include: A processor, a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Model training method and device, resource data prediction method and device and computing equipment
CN112749845A
Natural gas consumption prediction model training method and natural gas consumption prediction method
CN117633452A
Lightweight cloud server load prediction method based on wavelet decomposition and multi-head external attention mechanism
CN118364286A
Cloud server performance prediction method and device, equipment, medium and product
CN118820037A