Trend prediction-based computing resource allocation method and device, and storage medium
By utilizing the long short-term memory module and multi-head attention module of the deep learning model, long-term trends and local fluctuations in computing resource data are captured, solving the problem of insufficient flexibility in traditional computing resource management and achieving efficient resource scheduling and utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional computing resource management methods are unable to effectively capture long-term trends and local fluctuations when dealing with dynamic and complex computing demands, resulting in insufficient flexibility in resource scheduling.
By using a deep learning-based long short-term memory module and a multi-head attention module, a comprehensive feature vector of computing resource data is extracted, and a predicted value of computing resource trend within a preset time window is output. Resource allocation is then dynamically adjusted based on the trend prediction value.
It improves the flexibility and prediction accuracy of computing resource scheduling, optimizes resource utilization efficiency, reduces operating costs, and ensures stable operation of the system under high load conditions.
Smart Images

Figure CN120523589B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a computing power resource allocation method based on trend prediction, equipment and a storage medium. BACKGROUND
[0002] Traditional computing power resource management methods usually allocate and schedule resources based on static or relatively fixed rules. When dealing with dynamic and complex computing power requirements, they cannot effectively capture long-term trends and local fluctuations, resulting in insufficient flexibility in resource scheduling.
[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0004] The main purpose of the present application is to provide a computing power resource allocation method based on trend prediction, equipment and a storage medium, aiming to solve the technical problem of how to improve the flexibility of computing power resource scheduling.
[0005] To achieve the above purpose, the present application provides a computing power resource allocation method based on trend prediction, which comprises:
[0006] The computing power data in the computing power network environment is time series aligned and processed by feature engineering, and converted into standardized time series data;
[0007] The time series data is input into a pre-trained computing power prediction model;
[0008] Through the long short-term memory module and the multi-head attention module of the computing power prediction model, the comprehensive feature vector of the time series data is extracted, and the computing power resource trend prediction value in the future preset time window is output;
[0009] The computing power resource trend prediction value is used as the basis for scheduling, and the allocation of computing power resources is dynamically adjusted.
[0010] In an embodiment, the step of time series alignment and feature engineering processing of the computing power data in the computing power network environment, and converting into standardized time series data comprises:
[0011] Check the continuity of the timestamp of the computing power data, and use the interpolation method to fill in the missing values, and convert the timestamp into a unified format;
[0012] Calculate the basic statistics of the computing power data, and extract the features in the preset time window;
[0013] The extracted features are combined into a feature vector to form standardized time series data.
[0014] In an embodiment, the step of extracting a comprehensive feature vector of the time series data and outputting a computing power resource trend prediction value in a future preset time window through the long short-term memory module and the multi-head attention module of the computing power prediction model comprises:
[0015] inputting a local trend sequence of the time series data into a long short-term memory module to extract trend features;
[0016] inputting computing power resource data corresponding to the time series data into a multi-head attention module to extract data features;
[0017] fusing the extracted trend features and data features to form a comprehensive feature vector;
[0018] generating the computing power resource trend prediction value through a prediction output layer of the computing power prediction model based on the comprehensive feature representation.
[0019] In an embodiment, before the step of inputting the time series data into the pre-trained computing power prediction model, the method comprises:
[0020] constructing the computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer, and a prediction output layer;
[0021] collecting historical computing power resource data to construct historical time series data;
[0022] dividing the historical time series data into a training set, a validation set, and a test set, and training the computing power prediction model through the training set.
[0023] In an embodiment, the step of collecting historical computing power resource data to construct historical time series data comprises:
[0024] constructing a historical time series according to the historical computing power resource data;
[0025] dividing the historical time series into at least two equal-length local ranges, and calculating a trend slope in each local range using a linear fitting method;
[0026] combining the slope of each local range into a trend evolution sequence to generate processed historical time series data.
[0027] In an embodiment, the step of constructing the computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer, and a prediction output layer comprises:
[0028] the input layer is used to receive preprocessed standardized time series data;
[0029] The feature extraction layer is composed of spatially parallel long short-term memory modules and multi-head attention modules arranged in space in parallel, the long short-term memory modules are used to extract time-dependent features of the computing resource data, and the multi-head attention modules are used to capture long-term change regularity features of the computing resource data.
[0030] The feature fusion layer fuses the output features of the long short-term memory modules and the output features of the multi-head attention modules by a weighted splicing manner to generate a comprehensive feature vector.
[0031] The prediction output layer includes a full connection network for mapping the comprehensive feature vector to a computing resource trend prediction value in a future preset time window.
[0032] In an embodiment, the step of dividing the historical time series data into a training set, a validation set and a test set, and training the computing power prediction model through the training set comprises:
[0033] Dividing the data in the training set into input features and prediction labels;
[0034] Inputting the input features of the training set into the computing power prediction model to generate a prediction value;
[0035] Calculating the error value of the prediction value and the corresponding prediction label through a loss function, and calculating the model gradient based on a back propagation algorithm, and updating the model parameters using an optimizer;
[0036] Evaluating the hyperparameters of the computing power prediction model through the validation set to prevent overfitting;
[0037] Performing prediction accuracy evaluation of the computing power prediction model through the test set to ensure that the preset convergence condition is met.
[0038] In an embodiment, the step of taking the computing resource trend prediction value as a scheduling basis and dynamically adjusting the allocation of computing resource comprises:
[0039] Analyzing the computing resource trend prediction value to determine the change trend of computing resource demand through a preset threshold;
[0040] If the change trend is an upward trend, then starting a computing node expansion process according to a demand gradient value, and dynamically adjusting a resource pre-allocation ratio based on a predicted time window;
[0041] If the change trend is a downward trend, then performing a resource recycling operation, and determining a recycling order according to a task priority strategy and a resource occupation mode to release idle computing resources.
[0042] In addition, to achieve the above object, the application further provides a computing resource allocation device based on trend prediction, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the computing resource allocation method based on trend prediction as described above.
[0043] In addition, to achieve the above object, the application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the computing resource allocation method based on trend prediction as described above.
[0044] The application provides a computing resource allocation method based on trend prediction. The application first converts computing power data in a computing power network environment into standardized time series data through time sequence alignment and feature engineering processing. The time series data is input into a pre-trained computing power prediction model. The long short-term memory module and the multi-head attention module of the computing power prediction model are used to extract the comprehensive feature vector of the time series data and output the computing power resource trend prediction value in a future preset time window. The computing power resource trend prediction value is used as a scheduling basis to dynamically adjust the allocation of computing power resources. The long short-term memory module and the multi-head attention module of the deep learning model effectively capture the long-term trend and local fluctuations in the computing power resource data, improving the prediction accuracy and the flexibility of resource scheduling. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the application and serve to explain the principles of the application together with the specification.
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0047] Figure 1 A flowchart is provided for the computing resource allocation method based on trend prediction of the application embodiment one;
[0048] Figure 2 A flowchart is provided for the computing resource allocation method based on trend prediction of the application embodiment two;
[0049] Figure 3 A computing power prediction model diagram is provided for the computing resource allocation method based on trend prediction of the application embodiment two;
[0050] Figure 4This is a schematic diagram illustrating the trend evolution of computing resource data provided in Embodiment 2 of the computing resource allocation method based on trend prediction in this application.
[0051] Figure 5 This is a flowchart illustrating Embodiment 3 of the computing power resource allocation method based on trend prediction in this application.
[0052] Figure 6 This is a flowchart illustrating Embodiment 4 of the computing power resource allocation method based on trend prediction in this application.
[0053] Figure 7 This is a schematic diagram of the computing power prediction model construction process involved in the computing power resource allocation method based on trend prediction in the embodiments of this application;
[0054] Figure 8 This is a schematic diagram of the hardware operating environment involved in the trend prediction-based computing resource allocation method in the embodiments of this application.
[0055] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0056] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0057] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0058] The main solution in this application embodiment is:
[0059] Currently, traditional computing resource management methods are usually based on static or relatively fixed rules for resource allocation and scheduling. When dealing with dynamic and complex computing demands, they cannot effectively capture long-term trends and local fluctuations, resulting in insufficient flexibility in resource scheduling.
[0060] This application effectively captures long-term trends and local fluctuations in computing resource data by utilizing the long short-term memory module and multi-head attention module of a deep learning model, thereby improving prediction accuracy and resource scheduling flexibility.
[0061] It should be noted that the execution subject of this embodiment can be a trend-predictive computing resource allocation system, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or a control device capable of implementing the above functions for a trend-predictive computing resource allocation system. This embodiment does not specifically limit it in this way. The following uses a trend-predictive computing resource allocation system as the execution subject as an example to describe this embodiment and the following embodiments.
[0062] Embodiment One
[0063] Based on this, the application proposes a first embodiment of a trend prediction-based computing power resource allocation method, please refer to Figure 1 The trend prediction-based computing power resource allocation method comprises:
[0064] Step S10, time series alignment and feature engineering processing of computing power data in a computing power network environment are performed to convert the computing power data into standardized time series data.
[0065] The dispersed and heterogeneous computing power data is converted into a unified and regular time series format, ensuring the consistency of the time dimension of the data and extracting useful features to provide high-quality input data for the computing power prediction model and improve the accuracy and stability of the prediction.
[0066] In this embodiment, the computing power data is the usage data of various resources in the computing power network environment, including CPU utilization, GPU memory occupancy, memory usage, disk IO throughput, network bandwidth, etc. Time series alignment is to correct the timestamps of multi-source data to a unified reference, eliminate the time deviation between devices, and ensure the continuity of the timestamps and the consistency of the sampling frequency. Feature engineering is to extract features that are helpful for model prediction from the original data through mathematical transformation.
[0067] As an optional implementation, according to business requirements and data characteristics, a unified time interval is determined, and for data with inconsistent time intervals, a resampling method is used to convert it to a unified time interval, and the timestamps of different data sources are aligned. Useful features for model training are extracted from the original computing power data. The features that have the greatest impact on model training are selected from the extracted features to reduce the feature dimension. The data after feature engineering processing is standardized to make the data have the same scale. The standardized data is converted into a standardized time series data format and stored.
[0068] As an optional implementation of feature extraction, for high-frequency data, average value, maximum value, minimum value, etc. are used for down-sampling; for low-frequency data, interpolation method is used for up-sampling.
[0069] As an optional implementation of resampling, for computing power data as CPU utilization data, statistical features such as average value, maximum value, minimum value, and standard deviation are extracted; for task execution time data, business features such as task type, task priority, and task dependency are extracted.
[0070] Optionally, step S10 comprises:
[0071] Step S11, check the continuity of the timestamp of the computing power data, and fill in the missing values using the interpolation method, and convert the timestamp into a unified format.
[0072] Ensure that the time dimension of the computing power data is consistent, there is no missing value, and the timestamp format is unified, so as to subsequent feature engineering and model training.
[0073] It should be noted that the timestamp is a mark indicating the data collection time, recorded in the form of date and time. Continuity refers to the fact that the timestamp has no interval in the time series, that is, the data is collected in turn according to fixed time intervals. The interpolation method is a method for filling in missing values, which infers the value of missing data points by the relationship between known data points, including linear interpolation, polynomial interpolation, spline interpolation, etc.
[0074] As an optional implementation, the timestamps of the computing power data are sorted, and the intervals between adjacent timestamps are checked for consistency. If the timestamps are not continuous or have missing values, the interpolation method is used to fill in the missing values. The linear interpolation method is used to calculate the missing values according to the known data points before and after the missing values. A unified timestamp format is determined, and the timestamp is converted to a unified format by a time processing function.
[0075] Step S12, calculate the basic statistics of the computing power data, and extract the features in the preset time window.
[0076] It should be noted that the basic statistics are statistical indicators that describe the trend, dispersion and distribution of the data set, including mean, median, standard deviation, maximum value, minimum value, etc. The preset time window is a fixed length time period divided on the time series, used to extract features.
[0077] For example, the mean, variance, maximum value, minimum value, etc. of the computing power data are calculated, the length of the preset time window is determined, the computing power data in each time window is statistically calculated, the relevant features are selected according to the prediction target, and the features are extracted.
[0078] Step S13, combine the extracted features into a feature vector to form a standardized time series data.
[0079] It should be noted that the feature vector is a vector formed by combining multiple features, representing a feature set at a time point. The standardized time series data refers to time series data with uniform time intervals, feature dimensions and data formats.
[0080] For example, the features extracted in each time window are combined into a feature vector in a certain order, and the feature vectors of all time windows are arranged in time order to form standardized time series data.
[0081] Step S20, input the time series data into the pre-trained computing power prediction model.
[0082] The standardized time series data processed by time alignment and feature engineering is input into the pre-trained computing power prediction model, so that the model can output the computing power resource trend prediction value in the future preset time window based on the features learned from the historical data.
[0083] In this embodiment, the pre-trained computing power prediction model is a deep learning model that has been trained using a large amount of historical computing power time series data. The computing power prediction model can capture the regularity of computing power demand changes over time by learning the features and patterns in historical data, thereby predicting future computing power demand.
[0084] For example, load the pre-trained computing power prediction model and input the prepared time series data into the model.
[0085] Step S30, extract the comprehensive feature vector of the time series data through the long short-term memory module and the multi-head attention module of the computing power prediction model, and output the computing power resource trend prediction value in the future preset time window.
[0086] Through the long short-term memory module and the multi-head attention module of the computing power prediction model, the comprehensive feature vector of the time series data is extracted, the long-term dependency and global features in the data are captured, and the computing power resource trend prediction value in the future preset time window is output. By using the powerful feature extraction capability of the model, a high-precision prediction result is generated, which provides a basis for the dynamic scheduling of computing power resources.
[0087] In this embodiment, the computing power prediction model is a deep learning model specifically used for predicting computing power resource usage trends. By learning the patterns and regularities in historical computing power resource usage data, it can predict future computing power resource demand. The long short-term memory module is a special recurrent neural network structure that effectively solves the gradient vanishing and gradient explosion problems of traditional recurrent neural networks when processing long sequence data by introducing gating mechanisms, input gate, forget gate and output gate, thereby better capturing long-term dependencies in time series data. The multi-head attention module is an extension of the attention mechanism, which divides the input data into multiple heads, i.e., multiple subspaces, calculates the attention weights on each head, and then concatenates and linearly transforms these attention weights to obtain the final attention output. The comprehensive feature vector is a vector representation obtained by fusing various feature information in the time series data.
[0088] As an optional implementation, the time series data is cleaned to remove noise and outliers. The data is normalized or standardized to unify the range of the data. The time series data is input into the trained computing power prediction model, and the comprehensive feature vector of the time series data is extracted through the long short-term memory layer and the multi-head attention module. The comprehensive feature vector is input into the output layer of the model, and the computing power resource trend prediction value in the future preset time window is output. The output layer usually uses a fully connected layer to map the comprehensive feature vector to the dimension of the prediction value.
[0089] In step S40, the computing power resource trend prediction value is used as a basis for scheduling to dynamically adjust the allocation of computing power resources.
[0090] By using the computing power resource trend prediction value, the allocation of computing power resources is dynamically adjusted to optimize resource utilization efficiency, reduce operating costs, and ensure stable operation of the system under high load conditions.
[0091] In this embodiment, the computing power resource trend prediction value is a quantitative result of the change trend of computing power resource demand in the future obtained by the computing power prediction model, reflecting the use of computing power resources in the future preset time window.
[0092] Optionally, upper and lower thresholds of the computing power resource trend prediction value are set. When the prediction value exceeds the upper threshold, it indicates that the future computing power demand will increase significantly, and the allocation of computing power resources is increased in advance. When the prediction value is lower than the lower threshold, it indicates that the future computing power demand will decrease, and the allocation of computing power resources is reduced.
[0093] As an optional implementation, the use data of computing power resources and the computing power resource trend prediction value are continuously collected, the change trend of computing power demand is analyzed, and the resource allocation is dynamically adjusted according to the prediction result. When the computing power demand is predicted to increase, more computing nodes are allocated in advance, and when the computing power demand is predicted to decrease, part of the resources are released to save costs.
[0094] Optionally, according to the importance of different tasks, applications or users, the priority is set, the computing power resource trend prediction value is combined, the execution order of the task is dynamically adjusted, and for the task with high priority and future computing power demand increase, the task execution is arranged in advance and more computing power resources are allocated.
[0095] Optionally, when the deviation between the predicted trend and the real-time monitoring value exceeds the threshold, a warning is triggered and root cause analysis is started.
[0096] The embodiment provides a computing power resource allocation method based on trend prediction. The embodiment firstly aligns computing power data time series, unifies various heterogeneous data to the same time reference, further mines potential information in the data through feature engineering processing, removes noise and redundant features, and improves data quality and availability. Through the synergistic effect of a long short-term memory module and a multi-head attention module, comprehensive feature vectors are extracted from time series data, including long-term trends, short-term fluctuations, key time points and features of computing power data, which can comprehensively reflect the use and change law of computing power resources. The computing power resource trend prediction value is used as a scheduling basis to dynamically adjust the allocation of computing power resources, so that the computing power resources can be highly matched with the actual demand, the problems of resource waste or shortage in the traditional static resource allocation mode are avoided, and the utilization efficiency of computing power resources is improved.
[0097] Based on embodiment one, embodiment two of the application provides a computing power resource allocation method based on trend prediction, referring to Figure 2 , before step S20, comprising:
[0098] Step S50, constructing the computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer and a prediction output layer.
[0099] Through the computing power prediction model, the demand for computing power resources in the future period of time can be understood in advance, so as to provide a scientific basis for resource planning, scheduling and management, avoid excessive allocation or insufficient allocation of computing power resources, and improve resource utilization.
[0100] For example, referring to Figure 3 , a deep learning model is designed, an attention module and a long short-term memory module are embedded in a parallel space, then a feature fusion layer is connected, and finally a prediction output layer is embedded at the end as a computing power prediction model.
[0101] Optionally, step S50 comprises:
[0102] Step S51, the input layer is used to receive preprocessed standardized time series data.
[0103] It should be noted that the input layer is the starting layer of the computing power prediction model, which is responsible for receiving original data for predicting computing power demand, including historical computing power usage data, business index data, system performance data and other factors that may affect computing power demand.
[0104] Step S52, the feature extraction layer is composed of a spatially parallel long short-term memory module and a multi-head attention module arranged in parallel in space, the long short-term memory module is used to extract time-dependent features of computing power resource data, and the multi-head attention module is used to capture long-term change regularity features of computing power resource data.
[0105] It should be noted that the feature extraction layer processes and converts the original data received by the input layer, extracts key features related to the computing power demand, and reflects the change law and influencing factors of the computing power demand.
[0106] Step S53, the feature fusion layer fuses the output features of the long short-term memory module and the output features of the multi-head attention module by a weighted splicing manner to generate a comprehensive feature vector.
[0107] Through feature fusion, the redundant information between features can be eliminated, and the prediction performance of the model can be improved.
[0108] It should be noted that the feature fusion layer fuses and integrates the multiple features extracted by the feature extraction layer to comprehensively reflect the complex relationship of the computing power demand.
[0109] Step S54, the prediction output layer includes a fully connected network for mapping the comprehensive feature vector to a computing power resource trend prediction value in a future preset time window.
[0110] It should be noted that the prediction output layer outputs the prediction result of the computing power demand according to the comprehensive features obtained by the feature fusion layer. The prediction result can be the amount of computing power demand in a future period of time, the growth trend of the computing power demand, etc.
[0111] Step S60, collecting historical computing power resource data to construct historical time series data.
[0112] For example, the computing power resource data is collected to construct a historical time series, and the local trend of the sequence is quantified by the slope of the unit time to obtain a corresponding trend evolution sequence. Please refer to Figure 4 , wherein the computing power data involved should be divided into a local range according to an equal-length time span, and the slope of the corresponding local trend is calculated by a linear fitting method. In addition, the collected data should be preprocessed and normalized, and the vector of the slope should retain positive and negative values.
[0113] For example, if the local trend corresponds to a computing power resource observation value variable , the time variable is , and the number of observation values involved is , this part of local data can be linearly fitted as , wherein is the slope representing the trend, and the corresponding calculation expression is as follows: .
[0114] Optionally, step S60 includes:
[0115] Step S61, constructing a historical time series according to the historical computing power resource data.
[0116] The discrete historical computing power resource data is arranged in chronological order to form a continuous time series, so as to analyze the change rule of the computing power resource over time and provide a basic data structure for trend prediction.
[0117] It should be noted that the historical computing power resource data is the data related to computing power recorded in the past period of time, reflecting the use of computing power resources of the system or device at different time points. The historical time series is a set of historical computing power resource data arranged in chronological order, and each data point in the time series corresponds to a specific time point. By analyzing the time series, the trend of the change of the computing power resource over time can be understood.
[0118] For example, historical computing power resource data is collected from various data sources, and the data is cleaned and arranged to remove noise data and outliers, ensuring the accuracy and integrity of the data. Each computing power resource data point is labeled with a corresponding timestamp, and the computing power resource data is sorted in chronological order of the timestamp to form a continuous historical time series.
[0119] Step S62, dividing the historical time series into at least two equal-length local ranges, and using a linear fitting method to calculate the trend slope in each local range.
[0120] By dividing the historical time series into multiple equal-length local ranges and using a linear fitting method to calculate the trend slope in each local range, the local change trend of the computing power resource in different time periods can be captured, and the increase or decrease of the computing power resource in the short term can be understood.
[0121] It should be noted that the local range is a subsequence with a certain length of time divided in the historical time series, used to analyze the local change characteristics of the computing power resource in that time period.
[0122] For example, according to the total length of the time series and the actual demand, the time length of the local range is determined, and the historical time series is divided into at least two equal-length local ranges. For each local range, a linear fitting method is used to calculate its trend slope.
[0123] Step S63, combining the slope of each local range into a trend evolution sequence to generate the processed historical time series data.
[0124] Combining the slope of each local range into a trend evolution sequence to generate the processed historical time series data, which more clearly shows the evolution process of the computing power resource trend, helps to improve the accuracy and stability of the prediction model.
[0125] It should be noted that the trend evolution sequence is a sequence obtained by combining the slope of each local range in time sequence, reflecting the change of the computing power resource trend in different time periods, and can more intuitively show the evolution process of the computing power resource trend.
[0126] For example, the slope of each local range is combined into a trend evolution sequence according to the order of the local range in the time sequence. The generated trend evolution sequence is stored as the processed historical time series data.
[0127] In step S70, the historical time series data is divided into a training set, a validation set and a test set, and the computing power prediction model is trained through the training set.
[0128] As an optional implementation, the local trend sequence is input into the long short-term memory module through the data sample driven prediction model, and the corresponding computing power resource data is input into the attention module. After extracting the corresponding data and trend features respectively, information fusion is performed, and then the output layer is used to obtain the prediction value of the computing power resource trend. The expression of the described prediction model is as follows:
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135] wherein, represents the trend sequence of the i-th sample, containing local trends, represents the local trend corresponding to the computing power resource original data, and the window size is , then the entire corresponding to the data number is ; is the calculation mode of the long short-term memory unit, is the output trend feature; is the calculation mode of the multi-head attention, which is a click scaling self-attention mechanism here, is the output data feature; is the fusion feature of the sample, and are the fusion weights of the trend and the value, bias; prediction target, and weights and biases of the output layer.
[0136] For example, the training set is divided into several mini-batches. Each mini-batch contains a fixed number of samples. Each time a mini-batch is selected from the training set to input the model, the model calculates based on the current weights and input data to generate the prediction result. The model calculates the loss, i.e. the error between the model prediction and the true value, according to the prediction result and the true label. The loss function is a standard for measuring the performance of the model, which is usually used to guide the training of the model. After the training of each mini-batch is completed, the parameters of the model are updated based on the data of the batch. The updated model is used to process the next mini-batch data. This process is repeated on the entire training set for multiple times until the predetermined number of training iterations is completed. After completing the training period, the model is evaluated using the validation set to check the performance of the model. The validation set does not participate in the update of the model's weight parameters, but is used to evaluate the generalization ability of the model. If the model's performance on the validation set decreases, the learning rate or other hyperparameters may need to be adjusted, or regularization methods may be used to reduce overfitting. When the model has achieved satisfactory results on both the training set and the validation set, the model is tested. The test set, as a completely unseen data set, is used to evaluate the generalization ability of the model, i.e. the model's ability to process new data.
[0137] Optionally, step S70 comprises:
[0138] Step S71, dividing the data in the training set into input features and prediction labels.
[0139] It should be noted that the training set is a collection of data used to train the model, containing a large number of labeled samples for the model to learn data patterns. Input features are various attributes or variables used to describe samples, which are input data received by the model and used for prediction. Prediction labels are the true output results corresponding to the samples, which are used to measure the accuracy of the model's prediction.
[0140] For example, load the training data and ensure that the data has been preprocessed and standardized, divide the data into input features and prediction labels.
[0141] Step S72, inputting the input features of the training set into the computing power prediction model to generate prediction values.
[0142] Using the trained computing power prediction model to process input data to generate prediction results, and preliminarily evaluating the fitting ability of the model to the training data.
[0143] For example, input the input features into the computing power prediction model to generate prediction values through the forward propagation of the model.
[0144] In step S73, an error value of the predicted value and the corresponding predicted label is calculated by a loss function, and a model gradient is calculated based on a back propagation algorithm, and a model parameter is updated by an optimizer.
[0145] Through error calculation and model parameter updating, the model continuously adjusts its parameters to better fit the training data and improve prediction accuracy.
[0146] It should be noted that the loss function is a function for measuring the difference between the model predicted value and the true label, including mean square error, cross-entropy loss, etc. The back propagation algorithm is an algorithm for calculating the gradient of each parameter in the neural network model, and the error is propagated from the output layer to the input layer according to the partial derivative of the loss function with respect to the parameter. The model gradient is the partial derivative of the loss function with respect to the model parameter, indicating the rate of change of the loss function with respect to the parameter, which is used to guide the parameter update direction.
[0147] In step S74, the hyperparameters of the computing power prediction model are evaluated by the validation set to prevent overfitting.
[0148] The performance of the model on unseen data is evaluated by the validation set, and appropriate hyperparameters are selected to prevent the model from overfitting on the training set and improve the generalization ability of the model.
[0149] For example, when training the computing power prediction model, the data set is divided into training set, validation set and test set. During training, the performance of the model is evaluated using the validation set every certain number of iterations, and the learning rate, regularization coefficient and other hyperparameters are adjusted, and the best combination of hyperparameters is selected on the validation set.
[0150] In step S75, the prediction accuracy of the computing power prediction model is evaluated by the test set to ensure that the preset convergence condition is met.
[0151] The performance of the model on completely unseen data is evaluated by the test set to ensure that the model has good generalization ability and meets the requirements of practical applications.
[0152] It should be noted that the convergence condition is a preset model performance index threshold. When the performance of the model on the test set reaches the threshold, it is considered that the model training is completed.
[0153] For example, after the training of the computing power prediction model is completed, the model is evaluated using the test set, and the mean square error between the predicted value and the true label is calculated. If the mean square error is less than the preset convergence condition, it is considered that the model meets the requirements and can be used for practical applications; otherwise, the model or data needs to be further adjusted and retrained and evaluated.
[0154] The embodiment provides a computing power resource allocation method based on trend prediction. The embodiment firstly constructs a computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer and a prediction output layer, so as to realize targeted feature processing and modular and expandable design. The historical time sequence data is constructed, so that the change characteristics of computing power over time can be better reflected, the model can learn the dynamic change mode of computing power in the time dimension, and the prediction ability of the model to future computing power change is improved. Through multiple training and verification processes, the performance of the model can be continuously improved, and the stability and reliability of the model are improved.
[0155] Based on embodiment one, embodiment three of the application provides a computing power resource allocation method based on trend prediction, which refers to Figure 5 , and step S30 comprises:
[0156] In step S31, the local trend sequence of the time sequence data is input into a long short-term memory module to extract trend features.
[0157] The trend features are extracted by the long short-term memory module, the dependence relationship and change rule of a long time span in the time sequence are captured, and the trend basis is provided for subsequent computing power resource trend prediction.
[0158] Exemplarily, the time sequence data is preprocessed to extract the local trend sequence. The sliding window method is used to divide the time sequence data into a plurality of subsequences, and each subsequence represents data of a local time period. The local trend sequence is input into the long short-term memory module, the hidden state of each time step is calculated through forward propagation, and finally the hidden state of the last time step is taken as the trend feature.
[0159] In step S32, the computing power resource data corresponding to the time sequence data is input into a multi-head attention module to extract data features.
[0160] The multi-head attention module adaptively focuses on information in different positions and different feature dimensions, extracts key features in the computing power resource data, highlights important information and ignores irrelevant or noise information, so that the actual situation of the computing power resource can be more accurately reflected.
[0161] Exemplarily, the computing power resource data is cleaned and arranged, and abnormal values and missing values are removed. The computing power resource data is converted into a sequence form. The computing power resource data is input into the multi-head attention module, the attention weight of each head is calculated, then the attention results of the heads are spliced and linearly transformed to obtain the data features.
[0162] In step S33, the extracted trend features and data features are informationally fused to form a comprehensive feature vector.
[0163] The trend features and the data features are informationally fused, the advantages of both are comprehensively utilized, a more comprehensive comprehensive feature vector is formed, the model can better understand the relationship between the time series data and the computing resource data, and the prediction accuracy is improved.
[0164] As an optional implementation, the trend features and the data features are spliced in the feature dimension to form a new feature vector, and the fused feature vector is further processed, including normalization, dimension reduction and the like, to obtain a comprehensive feature representation.
[0165] As another optional implementation of fusion, different weights are given according to the importance of the trend features and the data features, and weighted summation is performed.
[0166] In step S34, the computing resource trend prediction value is generated by the prediction output layer of the computing power prediction model based on the comprehensive feature representation.
[0167] Based on the comprehensive feature vector, the computing resource trend prediction value is generated by the prediction output layer, which provides a decision basis for subsequent computing resource scheduling and management, and realizes the reasonable allocation of computing resources.
[0168] Illustratively, the comprehensive feature vector is input into the prediction output layer, and the computing resource trend prediction value is calculated by forward propagation.
[0169] The embodiment provides a computing resource allocation method based on trend prediction. The embodiment first captures the long-term dependence relationship in the time series data through the long short-term memory module, and more accurately extracts the trend features. Through the parallel calculation of multiple heads of the multi-head attention module, different dimensions of data are focused on from different subspaces, the complex correlation between data is captured, and this relationship is reflected in the extracted data features. Through information fusion, the advantages of the trend features and the data features are combined, and the long-term trend information of the time series and the specific feature information of the computing resources are comprehensively utilized, so that the model can more comprehensively understand the data and improve the prediction ability of the computing resource trend. After linear transformation and nonlinear activation function processing of the prediction output layer, an accurate computing resource trend prediction value is generated.
[0170] Based on embodiment one, the fourth embodiment of the application proposes a computing resource allocation method based on trend prediction, which refers to Figure 6 , step S40 includes:
[0171] In step S41, the computing resource trend prediction value is analyzed, and the change trend of the computing resource demand is determined by a preset threshold.
[0172] The computing resource trend prediction value is analyzed in depth, the future change direction of the computing resource demand is determined, the preparation is made in advance, the stability of the business operation is ensured, and the efficient use of resources is ensured.
[0173] It should be noted that the preset threshold is a critical value set for judging the trend of computing power demand, when the predicted computing power demand growth rate exceeds the threshold, it is judged as an upward trend; below the threshold, it is judged as a downward trend.
[0174] Optionally, according to historical data and business demand, by analyzing the change of computing power demand growth rate in the past period of time, a suitable preset threshold is set.
[0175] For example, the usage of current computing power resources is collected, combined with the generated computing power resource trend prediction value, the change rate of computing power demand prediction value is calculated, and compared with the preset threshold, if the change rate is greater than the threshold, it is judged as an upward trend; if the change rate is less than the negative threshold, it is judged as a downward trend; if the change rate is within the threshold range, it is judged as a stable trend.
[0176] Step S42, if the change trend is an upward trend, start the computing node expansion process according to the demand gradient value, and dynamically adjust the resource pre-allocation ratio based on the predicted time window.
[0177] When it is judged that the computing power demand shows an upward trend, the computing node expansion process is started in time to ensure that there is enough computing resource to meet the demand of future business growth, and by dynamically adjusting the resource pre-allocation ratio, the resource allocation is more reasonable, and the resource utilization rate is improved.
[0178] It should be noted that the demand gradient value is an index reflecting the speed and amplitude of computing power demand change, which is obtained by calculating the change rate of computing power demand prediction value at different time points. The computing node expansion process is the process of increasing computing resources, which specifically includes the operation of adding new nodes to the existing computing cluster. The resource pre-allocation ratio is the proportion of computing resources allocated in advance for different businesses or tasks under the upward trend of computing power demand.
[0179] Optionally, according to the computing power demand prediction value, the demand gradient value at different time points is calculated, the difference between the computing power demand prediction value of each day and the prediction value of the previous day is calculated, and then divided by the time interval to obtain the demand gradient value of each day.
[0180] Optionally, according to the importance and demand of the business, the resource pre-allocation ratio is formulated.
[0181] For example, when the upward trend is determined, the scale of capacity expansion is determined according to the demand gradient value, the speed of the demand growth of computing power is determined according to the size of the demand gradient value, and then the number of computing nodes that need to be increased is determined. The newly added computing resources are allocated to each service according to the resource pre-allocation ratio, and the resource pre-allocation ratio is dynamically adjusted according to the predicted time window and the actual service change, if the demand growth speed of a certain service exceeds the expectation, the resource allocation ratio of the service is increased, and if the demand growth of a certain service slows down, the resource allocation ratio of the service is reduced.
[0182] In step S43, if the change trend is a downward trend, a resource recycling operation is performed, and a recycling order is determined according to a task priority strategy and a resource occupation mode to release idle computing resources.
[0183] If the demand for computing power shows a downward trend, a resource recycling operation is performed to release idle computing resources, avoid resource waste, and determine a recycling order according to a task priority strategy and a resource occupation mode to ensure that critical services are not affected.
[0184] It should be noted that the resource recycling operation is a process of releasing computing resources that are no longer used. The task priority strategy is to assign different priorities to different tasks according to the importance and urgency of the tasks. The resource occupation mode is the usage mode of the computing resources, including the occupation time, frequency, and amount of resources.
[0185] Optionally, the tasks are divided into different priorities according to the importance and urgency of the services, including high, medium, and low priorities, and the recycling order of the tasks is determined in the order of high to low priority. The occupation time of the tasks on the computing resources is analyzed, including the start time, running time, and end time of the tasks, and for the tasks that occupy resources for a long time but have low utilization, the resource recycling is preferentially performed.
[0186] For example, when the downward trend is determined, a resource recycling operation is performed, all tasks are comprehensively sorted according to the task priority and the resource occupation mode, a weighted scoring method is used, different indicators of the priority and the resource occupation mode are given corresponding weights, a comprehensive score of each task is calculated, and the recycling order is determined in the order of low to high score. According to the determined recycling order, non-critical tasks that need to be stopped are identified, and the computing resources occupied by the tasks are released.
[0187] The embodiment provides a computing power resource allocation method based on trend prediction. The embodiment first dynamically monitors the change trend of the demand for computing power, and performs a resource recycling operation according to the demand, thereby optimizing the resource utilization and improving the resource management efficiency.
[0188] For example, to help understand the implementation process of the trend prediction-based computing resource allocation method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 7 , Figure 7 A schematic diagram illustrating the construction process of a computing power prediction model for a trend-based computing power resource allocation method is provided, specifically:
[0189] First, historical time series data of computing resources are collected to quantify the local trends of the series using the slope per unit time, thus obtaining the corresponding trend evolution sequence. The computing resource data involved should be divided into local ranges of equal time spans, and the slope of the corresponding local trend is calculated using a least-squares fitting algorithm. Furthermore, the collected data should be preprocessed and normalized, and the slope vector retains both positive and negative values.
[0190] Furthermore, a deep learning trend prediction model, namely a computing power prediction model, is constructed. An attention module and a long short-term memory module are embedded in the parallel space, and then a feature fusion layer is connected to it. Finally, a prediction output layer is embedded at the end.
[0191] The prediction model is run using data and trend samples from computing resources. The local trend sequence is input into the long short-term memory module, and the corresponding computing resource data is input into the attention module to extract the relevant data and trend features. The execution expression is as follows:
[0192]
[0193]
[0194]
[0195]
[0196] in Representing the The trend sequence of each input sample, containing A local trend Represents local trends The corresponding raw data of computing resources, with a window size of [missing information]. Then the whole The corresponding number of data is ; This is a computational mode for Long Short-Term Memory (LSTM) units. To output trend characteristics; This is a multi-head attention computational model; here, it uses a self-attention mechanism for click-to-zoom. The output data features.
[0197] The extracted trend and numerical information are fused through a feature fusion layer, and then the output layer is used to obtain the predicted value of the computing resource trend. The described running expression is as follows:
[0198]
[0199]
[0200] wherein, is the fusion feature of the sample, and are the fusion weights of the trend and the numerical value, is the bias; is the prediction target, and are the weights and the bias of the output layer.
[0201] Further, the long short-term memory unit is supplemented, and the calculation process is as follows: first, the forgetting gate determines which information in the current cell state will be forgotten. It calculates a value through the hidden state of the previous local trend and the current input , the value range is between 0 and 1, indicating the degree of “retention” or “forgetting”. The output of the forgetting gate can be expressed as:
[0202]
[0203] Secondly, the input gate determines which information will be added to the cell state , which has two parts: one is the candidate cell state , and the other is the input gate , which determines the degree of information update. The corresponding expression is as follows:
[0204]
[0205]
[0206] Then, the neuron state is updated to , and the corresponding expression is as follows:
[0207]
[0208] Finally, the output gate determines the information output of the current unit state. The cell state is mapped to between -1 and 1 through the activation function, and then multiplied by the value of the output gate to generate the hidden state at the current time , the formula is:
[0209]
[0210]
[0211] The above process involves , , is the weight matrix of the three gates, , , is the corresponding bias, and is the weight matrix and bias of the candidate memory generation.
[0212] Here, the multi-head attention mode supplemented by dot product scaling The calculation formula is as follows:
[0213]
[0214]
[0215]
[0216] Among them, the attention mechanism adopts a multi-head form, involving , is the fusion weight of multi-head, and are the projection weight matrices of query, key and value respectively. It is worth noting that each attention path parameter of the embedding is not shared, independent and parallel. In this module, the computing resources in the input element are regarded as query one by one, which is a self-attention mechanism similar to .
[0217] The historical time series data set is used to train the deep learning model, which is divided into training set, validation set and test set, and the network model is learned and tested. In the model learning process, through small batch iterative learning algorithm (such as gradient descent) on the training set, the parameters of the model are gradually optimized, and at the same time the performance of the model is monitored and adjusted in real time using the validation set, to ensure that the model can generalize well on unseen data. After training, the final model is applied to the test set to verify its performance on new data and ensure that the model meets the expected requirements.
[0218] Deploy the final deep learning model to the actual application environment, and the model is online to predict the trend of computing resources.
[0219] It should be noted that the above examples are only used for understanding the present application and do not constitute a limitation on the power resource allocation method based on trend prediction of the present application. Further simple transformations in more forms based on this technical concept are within the protection scope of the present application.
[0220] The present application provides a power resource allocation device based on trend prediction, which comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the power resource allocation method based on trend prediction in the above-mentioned embodiment one.
[0221] Reference will now be made to the drawings and specific examples relating to Figure 8 which shows a structural schematic diagram of the power resource allocation device based on trend prediction suitable for being used to implement the embodiments of the present application. The power resource allocation device based on trend prediction in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, personal digital assistants (PDA), tablet computers (PAD), etc., and fixed terminals such as desktop computers, etc. Figure 8 The power resource allocation device based on trend prediction shown is only an example and should not bring any limitation on the functions and use range of the embodiments of the present application.
[0222] As Figure 8As shown, the trend prediction based computing resource allocation device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or loaded from a storage apparatus 1003 into a random access memory (RAM) 1004. In the random access memory 1004, various programs and data required for the operation of the trend prediction based computing resource allocation device are also stored. The processing apparatus 1001, the read only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the trend prediction based computing resource allocation device to communicate with other devices wirelessly or by wire to exchange data. Although the trend prediction based computing resource allocation device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0223] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carrying computer program code for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication apparatus, or installed from the storage apparatus 1003, or installed from the read only memory 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0224] The application provides a computing power resource allocation device based on trend prediction, adopts the computing power resource allocation method based on trend prediction in the above embodiment, and can solve the technical problem of how to improve the flexibility of computing power resource scheduling. Compared with the prior art, the computing power resource allocation device based on trend prediction provided by the application has the same beneficial effects as the computing power resource allocation method based on trend prediction provided by the above embodiment, and other technical features in the computing power resource allocation device based on trend prediction are the same as the features disclosed in the above embodiment method, and thus are not described here.
[0225] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0226] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0227] The application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the computing power resource allocation method based on trend prediction in the above embodiment.
[0228] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, radio frequency (RF), and the like, or any suitable combination of the above.
[0229] The above computer readable storage medium can be included in the computing power resource allocation device based on trend prediction; or can exist separately without being assembled into the computing power resource allocation device based on trend prediction.
[0230] The above computer readable storage medium carries one or more programs, which, when executed by the computing power resource allocation device based on trend prediction, enable the computing power resource allocation device based on trend prediction to write computer program code for performing the operations of the present application in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user computer, partially on the user computer, as an independent software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).
[0231] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0232] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0233] The computer readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the above-mentioned trend prediction based computing resource allocation method, and can solve the technical problem of how to improve the flexibility of computing resource scheduling. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the trend prediction based computing resource allocation method provided by the above-mentioned embodiments, and will not be described here.
[0234] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A method for allocating computing resource based on trend prediction, characterized in that, The computing power resource allocation method based on trend prediction comprises: The computing power data in the computing power network environment is time series aligned and feature engineered, and is converted into standardized time series data; The time series data is input into a pre-trained computing power prediction model; Through the long short-term memory module of the computing power prediction model, the trend features are extracted according to the local trend sequence of the time series data; Through the multi-head attention module of the computing power prediction model, data features are extracted according to the computing power resource data corresponding to the time series data; The trend features and the data features are informationally fused to form a comprehensive feature vector; Based on the comprehensive feature vector, the computing power prediction model generates a computing power resource trend prediction value through the prediction output layer; The computing power resource trend prediction value is used as a scheduling basis to dynamically adjust the allocation of computing power resources.
2. The method of claim 1, wherein, The step of time series alignment and feature engineering processing of the computing power data in the computing power network environment, and converting into standardized time series data comprises: Check the continuity of the timestamp of the computing power data, and fill in the missing values using the interpolation method to convert the timestamp into a unified format; Calculate the basic statistics of the computing power data and extract the features within the preset time window; The extracted features are combined into a feature vector to form standardized time series data. 3.The method of claim 1, wherein, Before the step of inputting the time series data into the pre-trained computing power prediction model, it comprises: Building the computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer and a prediction output layer; Collecting historical computing power resource data to build historical time series data; Divide the historical time series data into training set, validation set and test set, and train the computing power prediction model through the training set.
4. The method of claim 3, wherein, The step of collecting historical computing power resource data to build historical time series data comprises: Building a historical time series according to the historical computing power resource data; Divide the historical time series into at least two equal-length local ranges, and use linear fitting method to calculate the trend slope in each local range; Combine the slope of each local range into a trend evolution sequence to generate the processed historical time series data.
5. The method of claim 3, wherein, The step of building the computing power prediction model comprising an input layer, a feature extraction layer, a feature fusion layer and a prediction output layer comprises: The input layer is used to receive the preprocessed standardized time series data; The feature extraction layer is composed of spatially parallel long short-term memory modules and multi-head attention modules arranged in space in parallel, the long short-term memory modules are used to extract the time dependence features of the computing power resource data, and the multi-head attention modules are used to capture the long-term change regularity features of the computing power resource data; The feature fusion layer fuses the output features of the long short-term memory modules and the output features of the multi-head attention modules through weighted splicing to generate a comprehensive feature vector; The prediction output layer comprises a fully connected network for mapping the comprehensive feature vector to the computing power resource trend prediction value within a future preset time window.
6. The method of claim 3, wherein the trend prediction-based computing resource allocation method is characterized by, The step of dividing the historical time series data into a training set, a validation set and a test set, and training the computing power prediction model through the training set comprises: dividing the data in the training set into input features and prediction labels; inputting the input features of the training set into the computing power prediction model to generate prediction values; calculating the error value of the prediction value and the corresponding prediction label through a loss function, and calculating the model gradient based on a back propagation algorithm, and updating the model parameters using an optimizer; evaluating the hyperparameters of the computing power prediction model through the validation set to prevent overfitting; evaluating the prediction accuracy of the computing power prediction model through the test set to ensure that the preset convergence condition is met.
7. The method of claim 1, wherein, The step of using the computing power resource trend prediction value as a scheduling basis to dynamically adjust the allocation of computing power resources comprises: analyzing the computing power resource trend prediction value to determine the change trend of computing power demand through a preset threshold; if the change trend is an upward trend, starting a computing node expansion process according to the demand gradient value, and dynamically adjusting the resource pre-allocation ratio based on the predicted time window; if the change trend is a downward trend, performing a resource recovery operation, and determining the recovery sequence according to the task priority strategy and the resource occupation mode to release the idle computing resources.
8. A computing resource allocation device based on trend prediction, comprising: The device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the computing power resource allocation method based on trend prediction according to any one of claims 1 to 7.
9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the computing power resource allocation method based on trend prediction according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method, system and equipment for combined optimization prediction of photovoltaic power, and medium
CN117374926A
Serialized micro-service resource prediction method based on adversarial learning and heterogeneous graph learning
CN117648197A