Power load machine learning prediction system and prediction method fusing spatial-temporal characteristics
By constructing an AC-BiLSTM prediction module combined with CNN and Attention mechanisms, the problem of insufficient accuracy in power load prediction is solved, achieving high-precision and fast prediction of power load data, which is suitable for small sample data.
Patent Information
- Application Number
- CN202511066686.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-04
AI Technical Summary
Existing power load forecasting methods lack accuracy when dealing with highly volatile data, failing to meet the requirements of power systems, and their model construction and updates are not flexible enough.
A machine learning prediction system for power load that integrates spatiotemporal features is adopted. This system constructs an AC-BiLSTM prediction module, combines a CNN module to capture local mutations and a BiLSTM module to learn long-term trends, and introduces an Attention mechanism to dynamically allocate weights.
It significantly improves the accuracy of power load forecasting, effectively prevents the loss of information at key time points, is suitable for small sample data, and enhances forecast accuracy and robustness.
Smart Images

Figure CN120893620A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of power load prediction, and more particularly relates to a power load machine learning prediction system and method fusing space-time characteristics. BACKGROUND
[0002] Power load refers to the total power consumed by all electrical equipment in a power system at a certain time, including active power (unit: kW) and reactive power (unit: kvar). Accurate prediction of power load can effectively help power supply enterprises to develop timely and economic power generation plans, optimize power dispatching planning, ensure the safety of the power system, meet the requirements of green development, and reduce unnecessary energy waste.
[0003] At present, many scholars at home and abroad have conducted a large number of researches to improve the accuracy of power load prediction. The existing power load prediction methods include time series analysis, machine learning and deep learning. The commonly used time series analysis methods include exponential smoothing method and autoregressive moving average method. Such models mainly use linear methods, the principle is simple and the time series of data is considered. The prediction effect is good for data with small volatility, but it is difficult to capture the mutation rule of data with large volatility, and large prediction deviation may occur, which cannot accurately reflect the true change trend of data.
[0004] In recent years, machine learning models have shown good prediction performance in handling data with large volatility, and are therefore widely used in the field of power load prediction, such as random forest, XGBoost, support vector machine, etc. These models can learn the nonlinear relationship between load and various influencing factors. However, these models excessively rely on similar day sample selection in the power load prediction modeling process, making the model construction and updating not flexible enough, resulting in difficulty in meeting the requirements of the power system in terms of load prediction accuracy, and further improvement is needed. SUMMARY
[0005] The purpose of the present application is to solve the problem of insufficient power load prediction accuracy in the prior art, which cannot meet the requirements of the power system. The power load machine learning prediction system and method fusing space-time characteristics are proposed. By constructing an AC-BiLSTM prediction module, a CNN module is used to capture local mutations of power load data, and a BiLSTM module is used to learn long-term trends of power load, thereby effectively improving the prediction accuracy. At the same time, the application also introduces an Attention mechanism to dynamically allocate weights, which can prevent the loss of key time node information.
[0006] The technical solutions adopted by the present application are as follows: In a first aspect of the present application, a power load machine learning prediction system fusing space-time characteristics is provided, comprising: The data acquisition module is used for acquiring power load data; The data preprocessing module is used for preprocessing the acquired power load data; The AC-BiLSTM prediction module is used for predicting the input power load data to be measured, and the prediction module comprises a bidirectional long short-term memory network module, an attention mechanism module and a convolutional neural network module. The model evaluation module adopts three evaluation indexes of mean absolute percentage error, root mean square error and mean error to evaluate the performance of the power load prediction system. The result output module imports the real-time monitored data into the AC-BiLSTM prediction module to predict the short-term power load, and outputs the prediction result.
[0007] As a possible implementation manner of the first aspect of the application, the data collected by the data acquisition module includes power load data at different temperatures, seasons and times, and the collected data is divided into a training set and a validation set according to a ratio of 8:2.
[0008] As a possible implementation manner of the first aspect of the application, the AC-BiLSTM prediction module comprises a one-dimensional convolutional layer, a one-dimensional maximum pooling layer, a Dropout layer, a forward LSTM layer, a Dropout layer, a backward LSTM layer, an Attention module and a full connection layer connected in sequence.
[0009] The second aspect of the application provides a method for predicting input power load data by using any one of the above prediction systems, and the method specifically comprises the following steps: Step S1, collecting time series power load data, dividing the data into a training set and a test set according to a ratio, and preprocessing the training set data; Step S2, constructing and using the training set to train the AC-BiLSTM prediction module, outputting an AC-BiLSTM model after training, and saving the model; Step S3, testing the model saved in step S2 using the test set, calculating a loss function, and optimizing the model using an Adam algorithm, and outputting a final prediction model; Step S4, inputting data to be measured into the final model output in step S3 for prediction, and outputting a prediction result.
[0010] As a possible implementation manner of the second aspect of the application, in step S1, the collected data is divided into a training set and a test set according to a ratio of 8:2; and the data preprocessing method comprises data cleaning and feature standardization.
[0011] As a possible implementation manner of the second aspect of the application, in step S2, the steps of constructing the AC-BiLSTM prediction module are as follows: Step S2.1, input the power load time series data into the model, adopt a sliding window mechanism, divide the time series data into fixed length windows, form supervised learning samples; Step S2.2, set a one-dimensional convolution layer parameter, capture local time series patterns, the convolution kernel size of the one-dimensional convolution layer is 3, slide along the time axis, calculate the dot product of the local region and the convolution kernel, and generate a feature map; Step S2.3, taking the maximum value of the feature map output by step S2.2 according to the pooling window; Step S2.4, the result output by step S2.3 is transmitted to the Dropout layer to prevent overfitting; Step S2.5, the output result of step S2.4 is transmitted to the forward LSTM layer to capture historical information, and then a Dropout layer is added again, and then transmitted to the backward LSTM layer to learn the future context, and finally, the hidden state is output at each time step to summarize the time series rule; Step S2.6, the result output by step S2.5 is input into the Attention module for dynamic weight distribution; Step S2.7, the result output by step S2.6 is input into the full connection layer processing, and in this step, the Attention output is mapped to the target dimension, and after completion, the initial prediction model is output and saved.
[0012] As a possible implementation of the second aspect of the application, in step S3, the Adam algorithm is used to optimize the parameter setting of the prediction model, and the first moment estimation β 1=0.9, the second moment estimation β 2=0.999.
[0013] As a possible implementation of the second aspect of the application, in step S4, the prediction result is subjected to inverse normalization processing, specifically as follows:
[0014] Wherein, is the normalized load prediction value, is the actual power load prediction value obtained after inverse normalization.
[0015] The data preprocessing module is used for preprocessing the collected The third aspect of the application provides a processor, which is used to run a program, wherein the program performs the above-mentioned prediction method when running.
[0016] The fourth aspect of the application provides a computer readable storage medium, which comprises a stored program, wherein the computer readable storage medium controls the device where the computer readable storage medium is located to perform the above-mentioned prediction method when the program runs.
[0017] Compared with the prior art, the beneficial effects of the present application are: 1) The fusion spatio-temporal feature power load machine learning prediction method of the present application captures local time sequence patterns (such as load mutation, periodic fluctuation) by setting a CNN module, and realizes spatial feature extraction; 2) The fusion spatio-temporal feature power load machine learning prediction method of the present application combines the ability of the BiLSTM network to extract bidirectional time sequence features of sequence data, and the attention mechanism can selectively focus on hidden layer states, thereby fully mining the time sequence properties of power load data itself, obtaining deep time correlation, and meeting the prediction requirements of power load data; 3) The fusion spatio-temporal feature power load machine learning prediction method of the present application can effectively reduce the loss of historical information and highlight the information of key historical time points to reduce the influence of redundant information on load prediction results through the attention mechanism; 4) The fusion spatio-temporal feature power load machine learning prediction system of the present application, the AC-BiLSTM module constructed by setting the BiLSTM layer with a bidirectional structure can capture both long-term trends (such as seasonal changes) and short-term fluctuations (such as daily peak values) of load data, and the attention mechanism further filters the features of key time nodes to reduce noise interference. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 The figure is a flowchart of the AC-BiLSTM module constructed in the power load machine learning prediction system of the present application. DETAILED DESCRIPTION
[0019] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0020] The present application will be further described below in conjunction with specific embodiments.
[0021] In conjunction with Figure 1 , the fusion spatio-temporal feature power load machine learning prediction method of the present embodiment specifically includes the following steps: Step S1, collect time sequence power load data, divide the obtained data set into a training set and a test set according to a ratio of 8:2, pretreat the training set, and the subsequent training prediction model; In this step, the collected data is the power load data at different temperatures and seasons that is easy to obtain, and the training set and the test set are considered. The data of the training set is preprocessed to obtain the original data as input, so as to generate a data set for training to obtain a prediction model. The collected data is preprocessed, including: Data cleaning: missing values are processed by mean filling or interpolation method, and for abnormal values, 3σ principle is used for processing.
[0022] Feature standardization: Z-score normalization or Min-Max standardization is used to normalize the data and improve the convergence speed of the model.
[0023] Specifically, in this embodiment, the Min-Max standardization is used to normalize the data to [0, 1], and the formula is as follows:
[0024] Wherein, is the original measured data of the ith sampling point; is the normalized value; and are the maximum and minimum values in the measured data, respectively.
[0025] Step S2, constructing a prediction model, the prediction model constructed in this embodiment includes a convolutional neural network (CNN) module, a bidirectional long short-term memory network (BiLSTM) module and an attention mechanism (Attention) module. Wherein: The CNN module is used to extract local space-time features (such as load mutation and periodic fluctuation) and reduce noise interference; The BiLSTM module, in this embodiment, a bidirectional LSTM layer is set, the forward LSTM captures historical information, and the backward LSTM learns future context, enhances the time series expression ability, and solves the long-term dependence problem (such as holiday load mode) through the setting of the bidirectional structure to learn historical and future information at the same time.
[0026] The Attention module dynamically weights the key time steps and improves the model interpretability, such as identifying abnormal daily load.
[0027] In the prior art, the prediction of time series data can be achieved by using a CNN module alone. The application scenario of the present application is the prediction of power load data. The power load data, as a special time series data, not only changes with time, but also contains daily cycle fluctuations, such as holiday mutations, and is greatly affected by temperature and seasonality. Using a single CNN module to process the power load data in the present application for prediction can only extract local spatial features (such as load mutation points), but cannot model long-term time series dependencies (such as holiday load patterns), which may result in loss of key time node information (such as attenuation of load peak time features) during pooling layer processing.
[0028] The applicant has found that if the CNN module in the prediction model is replaced by a BiLSTM module, there are the following problems: 1) not sensitive to local patterns of input data (such as ignoring load fluctuations caused by meteorological mutations); 2) high computational complexity when processing high-dimensional features (such as directly inputting original load data without dimension reduction); 3) weak processing ability for non-stationary signals (traditional methods have strong dependence on VMD / CEEMDAN pretreatment), and uneven distribution of key feature weights (such as uniform processing of all time steps, ignoring special periods such as holidays), which are difficult to achieve accurate and rapid prediction. If the CNN module and the BiLSTM module are simply stacked to process feature maps, on the one hand, the CNN output feature map and the BiLSTM time series input dimension do not match, and a flatten layer needs to be designed manually, but this will cause information loss; on the other hand, the gradient backpropagation path is too long when the two modules are trained independently, which is prone to gradient vanishing / explosion, resulting in unstable training. In addition, without introducing the Attention mechanism, the model cannot dynamically focus on key features (such as meteorological mutation periods) when simply applying the two modules.
[0029] Therefore, in order to achieve accurate and rapid prediction of power load data, the present application makes the following improvements: Firstly, a deep coupling architecture is adopted, and a 1D-CNN (kernel_size=3) is used to directly output time series compatible features, avoiding flatten operation and realizing adaptive feature dimension.
[0030] Secondly, the BiLSTM hidden layer and the CNN feature map are connected by skip-connection to realize multi-scale feature interaction and fusion processing of bidirectional information.
[0031] Thirdly, a dynamic attention mechanism is designed, which includes: 1) a spatial attention mechanism (CNN channel) for weighting meteorological and other external factor features; and 2) Time attention mechanism (BiLSTM channel): focus on the mutation moment of load (such as morning and evening peak).
[0032] And by optimizing the training strategy, designing hierarchical transfer learning, pre-training the CNN module to extract general features, then jointly fine-tuning BiLSTM-Attention, and then improving the loss function: MAE+peak period weighted loss, after experimental testing, the holiday weight is improved by 30%, which is more in line with the data characteristics of power load.
[0033] Therefore, by fusing the above-mentioned modules, such as fusing the CNN module, on the one hand, the CNN automatically learns the local mode of the load data (such as daily cycle fluctuation, holiday mutation), without the need for manual feature design, and can efficiently extract features; on the other hand, it can provide a basis for spatial-temporal collaborative modeling for the AC-BiLSTM module, and the model automatically mines the nonlinear coupling relationship between meteorological data and load curve (such as a 1℃ temperature rise corresponding to a 3.2kW increase in evening peak load), which exceeds the capability of using a single module, significantly improving the accuracy of power load prediction. At the same time, the set pooling layer can make the calculation more lightweight, reducing the input dimension of the subsequent BiLSTM, reducing the training cost, and the max-pooling operation can suppress noise. According to experimental testing, under 20% Gaussian noise interference, the prediction error increases by only 1.8%, compared with an average increase of 15.7% for a single model, improving the prediction robustness.
[0034] In addition, the attention mechanism further filters the key time steps, improving the stability of the model, and the Attention weight visualization preferentially focuses on the data 2 hours before the temperature mutation (weight>0.7), which is consistent with the experience of power dispatching. More optimally, the prediction method of the present application can also be applied to small sample data, and only one month of data in the target domain is required to achieve the accuracy of three months of data of the traditional method (that is, the MAPE of the present application using one month of data for prediction is 4.3%, while the MAPE of the traditional method using three months of data for prediction is 6.1%.
[0035] Specifically, in combination with Figure 1 The steps of constructing the prediction module of the present embodiment are as follows: Step S2.1, input the power load time series data into the model, usually in the format (batch_size, sequence_length, feature_dim) to meet the format requirements of the model for data input, and use the sliding window mechanism to divide the time series data into fixed length windows (such as 24 hours as a window, step length 1), forming supervised learning samples; It should be noted that in the present embodiment, a direct single-step prediction strategy is adopted, the historical load data before the prediction point at time t is extracted for features, a sliding window with a time window of 7 is used to sequentially reconstruct the features into the input data of the AC-BiLSTM load prediction model, and one-step-ahead load prediction is performed, that is, the output of the model is the load data Et of the prediction point, and the input data is: .
[0036] Step S2.2, set the one-dimensional convolution layer parameters to capture local time series patterns such as power load mutations and periodic fluctuations. The size of the convolution kernel is set to 3, which slides along the time axis to calculate the dot product of the local region and the convolution kernel to generate a feature map, as follows:
[0037] In the formula, FeatureMap(t): feature map, represents a set of features at a specific time point t, which is used to capture key information of the input data; k-1: represents the size of the convolution kernel, that is, the convolution kernel contains k elements, and minus one is usually used to indicate the boundary condition of the convolution operation; Input(t+i): input signal, value at time point t+i, is the original data of the convolution operation; Kernel(i): convolution kernel, value at position i, used to multiply and sum with the input signal point by point to generate a feature map; i = 0: represents the position where the convolution kernel starts to convolve with the input signal, which simplifies the description of the convolution starting point in the formula.
[0038] Step S2.3, take the maximum value of the feature map output by step S2.2 according to the pooling window (such as pool_size=2) to retain the most significant features. Through such processing, on the one hand, the length of the feature map can be effectively reduced, and the computational complexity can be reduced, on the other hand, non-key fluctuations (such as random noise) can be highlighted, and key information such as load peak value can be highlighted. In addition, the step is set to be consistent with the size of the pooling window (strides=2) to avoid information overlap.
[0039] Step S2.4, transmit the result output by step S2.3 to the Dropout layer to prevent overfitting; Step S2.5, pass the output result of step S2.4 to the forward LSTM layer to capture historical information, then add a Dropout layer, and then transmit it to the backward LSTM layer to learn future context and enhance the time series expression ability. Finally, the hidden state (hidden state) is output at each time step to summarize the time series regularity.
[0040] Step S2.6, input the result output by step S2.5 to the Attention module for dynamic weight allocation.
[0041] In this embodiment: Attention score calculation: Through the Query-Key-Value mechanism, the importance weight of each time step is calculated.
[0042] The specific process of Attention processing is as follows: 1. Input preparation BiLSTM output: The bidirectional hidden state output by step S2.5 (the splicing result of forward and backward LSTM), with dimensions [T, D] (T is the number of time steps, and D is the dimension of the hidden layer) Linear transformation: Map the input to Query (Q), Key (K), and Value (V) vectors through learnable parameter matrices W_Q, W_K, and W_V, where: Query: Represents the target that needs to be focused on (such as the peak time point in the load prediction task).
[0043] Key: Identification features of each time step in the input sequence.
[0044] Value: Feature representation that actually contains context information.
[0045] 2. Attention score calculation Scaled Dot-Product Attention is used for calculation, including: (1)Similarity calculation: Dot product of Query and all Keys, measuring time step correlation
[0046] Where Q represents "Query" in the problem, i.e., the query or the first entity, usually referring to the vector or data to be matched.
[0047] f: In this context, it may represent a function or feature extraction process for extracting a feature vector from an entity.
[0048] Score: Score, measuring the similarity between two entities.
[0049] i: Index of the first entity, indicating the position of a specific query or entity.
[0050] j: Index of the second entity, usually corresponding to elements in a database or collection.
[0051] K: Represents "Key", i.e., the key or second entity, with the pronunciation [keɪ], corresponding to Q, used to calculate similarity.
[0052] (2) Weight Normalization: Convert scores to probability distribution via Softmax: a ij = Softmax(Scoreij) weights a ij represents the attention degree of the ith Query to the jth time step (3) Weighted Fusion Output Generation: Weighted sum of Value vectors by weights, get Attention output:
[0053] where, Output i : represents the ith output value, where "i" represents the sequence number of the output.
[0054] T: represents the total number of time steps, that is, the time range or sequence length considered.
[0055] a ij : represents the weight of the ith output and the jth time step, where "i" is the output sequence number and "j" is the time step sequence number, and the weight determines the influence degree of each time step on the output.
[0056] V j : represents the value of the jth time step, that is, the specific numerical value of each time point in the sequence.
[0057] This output integrates key time step information (such as load peak) and suppresses irrelevant noise.
[0058] Weighted Fusion: Weighted sum of BiLSTM hidden states, highlighting key time points (such as load peak).
[0059] Step S2.7, input the result output by step S2.6 to the full connection layer processing, in this step, the Attention output is mapped to the target dimension (such as single step prediction or multi-step prediction), and in this embodiment, single step prediction is adopted. After this step, the initial prediction model is output and saved.
[0060] Step S3, test and optimize the model, output the final prediction model.
[0061] The test set data is preprocessed in the same way as the training set data preprocessing, and then the test set is used to test the initial prediction model, calculate the loss function of the prediction model, and update the network parameters of each layer according to the loss function using Adam algorithm.
[0062] Specifically, the three evaluation indexes of mean absolute percentage error (MAPE), root mean square error (RMSE) and mean error (ME) are used to evaluate the power load data, and the smaller the values of MAPE, RMSE and ME are, the more accurate the load prediction is.
[0063] The core of optimization in the application by using Adam algorithm includes: Gradient calculation: Based on the time sequence characteristics (such as periodicity and suddenness) of the power load data, the gradient gt of the loss function is calculated; First moment estimation (momentum) is as follows: m t = β 1⋅m t−1 +(1− β 1) ⋅g t Wherein, β 1=0.9, to balance the gradient update of long-term trend (such as seasonal change) and short-term fluctuation (such as daily peak value), and the noise (such as sudden change caused by abnormal weather) of load data is smoothed by first moment estimation (momentum). β 1).
[0064] Adaptive learning rate adjustment, second moment estimation (decay rate) is as follows: β 2): v t = β 2⋅v t−2 +(1− β 2)⋅gt2 Wherein, β 2=0.999, to dynamically adjust the learning rate for sparse gradient (such as holiday load mode), to avoid overfitting of the model to local noise.
[0065] Bias correction: m^t=m t / (1− β 1t ), v^t=v t / (1− β 2t ) Solve the problem of deviation of moment estimation to 0 in the initial stage.
[0066] Parameter update: θ t =θ t −1− η ⋅m^t / (v^t+ ε ) Wherein, η is the initial learning rate,ε Prevent zero.
[0067] The specific values of the above key control parameters and settings in this embodiment are shown in the following table:
[0068] It is worth noting that in the application scenario of the present application, for the momentum term of the Adam algorithm, β 1) Retaining the historical gradient direction, it cooperates with the bidirectional time sequence capture ability of BiLSTM, effectively solving the long-term dependence problem in load forecasting (such as annual electricity growth trend).
[0069] Second moment estimation ( β 2) Through the decay rate of gradient square, it effectively suppresses the random fluctuations in load data (such as abnormal values caused by equipment failure), and improves the robustness of the model.
[0070] Initial learning rate ( η =0.001) and decay strategy optimize the convergence speed for load forecasting, avoiding training instability caused by data dimension differences (such as temperature vs. load). Therefore, the present application adopts Adam algorithm, combined with the special scene of power load forecasting, through parameter customization and evaluation index design, it adapts to the special needs of power load forecasting, such as time series, noise suppression, etc.
[0071] Step S4, input the to-be-tested data into the final model output in step S3 for prediction, and output the prediction result.
[0072] As another embodiment of the present embodiment, considering that the data input to the model is normalized data, and the model output is also normalized prediction results, the present embodiment performs inverse normalization on the output prediction results by using the following formula:
[0073] Wherein, is the normalized load prediction value, is the actual power load prediction value obtained after inverse normalization.
[0074] It should be noted that, in the embodiment, by normalizing the data, the calculation difficulty can be reduced, the model response efficiency is more rapid, and the prediction is more efficient. The power load data usually has different dimensions (such as kW, ℃, GDP, etc.). The normalization processing can eliminate the dimensional difference, can scale all features to a unified interval (such as [0, 1]), and avoid the model from being biased to large-scale features due to the difference in the value range. On the other hand, the distribution of the normalized data is more uniform, which can accelerate the gradient descent process of the deep learning model such as AC-BiLSTM, reduce the training time, and improve the model convergence speed. More preferably, after the power load data is normalized, the weight distribution of the spatio-temporal features is more reasonable when they are fused, and the local features are prevented from being overwhelmed by the global features.
[0075] And the inverse normalization can restore the predicted value output by the model to the actual load value, which is convenient for calculating evaluation indicators such as mean square error (MSE) and mean absolute error (MAE). In addition, the downstream system (such as the power grid dispatching platform) usually requires data with original dimensions, and inverse normalization ensures data interface consistency and compatibility with other systems.
[0076] The normalization in the embodiment improves the model training effect by optimizing the feature distribution, and the inverse normalization ensures that the evaluation results are consistent with the real scene, both of which guarantee the usability of the prediction results. At the same time, the final output load curve is consistent with the actual historical data dimension, which is convenient for manual verification and visual analysis.
[0077] The embodiment also provides a prediction system for performing the above-mentioned prediction method, which includes the following modules: The data acquisition module is used to acquire power load data, and ensures that the acquired data includes power load data at different temperatures, seasons, and times. The acquired data is divided into a training set and a validation set according to a ratio of 8:2.
[0078] The data preprocessing module is used to preprocess the acquired power load data, mainly for preprocessing the data of the training set and the test set; The AC-BiLSTM prediction module is used to predict the input power load data to be tested. The prediction module includes a bidirectional long short-term memory network module (BiLSTM), an attention mechanism module (Attention), and a convolutional neural network module (CNN). The model evaluation module uses three evaluation indicators, including mean absolute percentage error, root mean square error, and mean error, to evaluate the performance of the power load prediction system. The result output module imports the real-time monitored data into the AC-BiLSTM prediction module to predict the short-term power load, and outputs the prediction result.
[0079] More preferably, the output prediction structure is also subjected to inverse normalization processing in the embodiment to unify the dimension to meet the actual power system data access requirements.
[0080] In addition, the embodiment also provides a processor and a computer readable storage medium, the processor is used to run a program, wherein the program executes the prediction method of the application when running. The computer readable storage medium includes a stored program, wherein the computer readable storage medium controls the device where the computer readable storage medium is located to execute the prediction method of the application when the program runs.
[0081] Although the embodiments of the present application have been shown and described, it is to be understood that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present application, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A power load machine learning prediction system integrating spatiotemporal features, comprising a data acquisition module and a data preprocessing module, characterized in that: It also includes an AC-BiLSTM prediction module, a model evaluation module, and a results output module, among which: The data acquisition module is used to collect power load data; The data preprocessing module is used to preprocess the collected power load data; The AC-BiLSTM prediction module is used to predict the input power load data to be measured. The prediction module includes a bidirectional long short-term memory network module, an attention mechanism module, and a convolutional neural network module. The model evaluation module uses three evaluation indicators—mean absolute percentage error, root mean square error, and mean error—to evaluate the performance of the power load forecasting system. The results output module imports real-time monitored data into the AC-BiLSTM prediction module to predict short-term power load and outputs the prediction results.
2. The prediction system according to claim 1, characterized in that: The data acquisition module collects power load data for different temperatures, seasons, and times, and divides the collected data into training and validation sets according to a certain ratio.
3. The prediction system according to claim 1, characterized in that: The AC-BiLSTM prediction module includes a one-dimensional convolutional layer, a one-dimensional max pooling layer, a dropout layer, a forward LSTM layer, a backward LSTM layer, an attention module, and a fully connected layer, connected in sequence.
4. A machine learning prediction method for power load integrating spatiotemporal features, characterized in that: The prediction system described in any one of claims 1-3 is used to predict the input power load data, specifically including the following steps: Step S1: Collect time-series power load data, divide it into training set and test set according to the ratio, and preprocess the data; Step S2: Build and train the AC-BiLSTM prediction module using the training set. After training is complete, output the AC-BiLSTM model and save it. Step S3: Test the model saved in step S2 using the test set, calculate the loss function, optimize the model using the Adam algorithm, and output the final prediction model. Step S4: Input the data to be tested into the final model output in step S3 for prediction, and output the prediction results.
5. The prediction method according to claim 4, characterized in that: In step S1, the preprocessed data is divided into training and test sets in an 8:2 ratio. The data preprocessing methods include data cleaning and feature standardization.
6. The prediction method according to claim 4, characterized in that: In step S2, the steps for constructing the AC-BiLSTM prediction module are as follows: Step S2.1: The power load time series data input into the model is divided into fixed-length windows using a sliding window mechanism to form supervised learning samples; Step S2.2: Set the parameters of the one-dimensional convolutional layer to capture local temporal patterns. The kernel size of the one-dimensional convolutional layer is 3. Slide it along the time axis, calculate the dot product of the local region and the kernel, and generate a feature map. Step S2.3: Take the maximum value of the feature map output by convolution in step S2.2 according to the pooling window; Step S2.4: Transfer the output of step S2.3 to the Dropout layer to prevent overfitting; Step S2.5: Pass the output of step S2.4 to the forward LSTM layer to capture historical information, then add a Dropout layer, and then pass it to the backward LSTM layer to learn the future context. Finally, output the hidden state at each time step and summarize the temporal pattern. Step S2.6: Input the output of step S2.5 into the Attention module for dynamic weight allocation; Step S2.7: Input the output of step S2.6 into the fully connected layer for processing. In this step, the Attention output is mapped to the target dimension. After completion, output and save the initial prediction model.
7. The prediction method according to claim 4, characterized in that: In step S3, the parameters of the prediction model optimized using the Adam algorithm are set as follows: first-moment estimation β 1 = 0.9, second moment estimate β 2 = 0.
999.
8. The prediction method according to any one of claims 4-7, characterized in that: In step S4, the prediction results are inversely normalized, as follows: in, This is the normalized load forecast value. This is the actual power load forecast obtained after inverse normalization.
9. A processor, characterized in that, The processor is used to run a program, wherein the program executes the prediction method according to any one of claims 4 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the prediction method according to any one of claims 4-7.
Citation Information
Cited By
Farmland microclimate station collector voltage prediction method and system
CN121636978A
Resident charging load prediction method and electronic equipment
CN121813300A
