Load prediction method and device based on multi-source historical data

By performing noise processing, timescale division and correlation analysis on multi-source historical data, combined with weighted fusion and neural network model, the problems of data redundancy and noise interference in load prediction are solved, and the stability and accuracy of the prediction results are improved.

CN119514805APending Publication Date: 2025-02-25STATE GRID HEBEI ELECTRIC POWER CO LTD +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411753981.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Existing load prediction methods are prone to data redundancy, noise interference and other problems when processing multi-source historical data, resulting in unstable prediction results and low accuracy.

Method used

By obtaining multi-source historical data (including historical load data, historical meteorological data and renewable energy power generation data), noise processing and time scale division, correlation analysis and feature screening, dynamically adjust the weight of the characteristics of each time scale, and load prediction is performed using weighted fusion and neural network models.

Benefits of technology

It improves the stability and accuracy of load prediction results, reduces data redundancy and noise interference, and enhances the robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514805A_ABST
    Figure CN119514805A_ABST
Patent Text Reader

Abstract

The invention provides a load prediction method and device based on multi-source historical data, and relates to the technical field of power grids. According to the method, noise processing and time scale division are performed on the multi-source historical data to obtain an initial sequence of a plurality of time scales, so that the influence of noise on a prediction result is reduced. Furthermore, correlation analysis and feature screening are performed on the feature sequences of the time scales in the multi-source historical data, so that redundancy among the feature sequences of the time scales is reduced, the prediction result is more stable, and the stability of the load prediction result and the prediction accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power grid, and in particular to a load forecasting method and device based on multi-source historical data. Background Art

[0002] For smart grids, short-term electricity demand forecasting is an important measure to promote the stability of the power system. It can fully guide power system managers to allocate resources, guide power companies to optimize power dispatching and power generation plans, and enhance the emergency regulation capabilities of the power grid. The accuracy of load forecasting is the basis for stable power demand forecasting, especially after large-scale new energy is connected to the power grid. The finer the prediction granularity, the better we can understand the load changes, so as to carry out more accurate and economical power dispatching. Due to the addition of distributed new energy, the volatility of load has become more complex, the variability of natural factors, the interaction between electricity prices and loads in the power market, and people's production activities, etc., make load forecasting face greater challenges.

[0003] The basic methods of load forecasting are divided into traditional methods and methods based on machine learning and deep learning. Traditional methods include time series analysis methods and regression analysis methods. The advantages of traditional methods are that they require less data and simple prediction methods. They usually only consider historical loads and rarely consider uncertain factors such as holidays and weather. Machine learning-based methods include support vector machines, decision trees, and random forests. After a large number of distributed renewable energy sources are connected to the power system, power load forecasting should refine the influence of factors such as weather, geographical environment, wind and solar energy reserves, so as to obtain more accurate and reasonable long-term forecast results. At the same time, power load is greatly affected by regional policies and economy, so the influence of factors such as electricity prices and holidays on load should be considered.

[0004] In load forecasting, due to the diversity of time scales, simply splicing data from different time scales together can easily lead to data redundancy, noise interference and other problems, resulting in unstable model prediction results and low accuracy. For example, historical data from different periods are highly correlated, and data from the previous day and the previous week sometimes reflect similar load change patterns. This correlation will lead to redundant features, increase model complexity, and affect prediction performance. For another example, historical data may contain outliers or noise, especially when new energy is greatly affected by weather, short-term fluctuations may amplify noise. Directly using these data for prediction is likely to lead to unstable prediction results and low prediction accuracy. Summary of the invention

[0005] The present invention provides a load forecasting method and device based on multi-source historical data, which can improve the stability and accuracy of load forecasting results.

[0006] In a first aspect, the present invention provides a load forecasting method based on multi-source historical data, the method comprising: acquiring multi-source historical data related to the load, the multi-source historical data comprising historical load data, historical meteorological data and renewable energy power generation data; performing noise processing and time scale division on the multi-source historical data to obtain initial sequences of multiple time scales; performing correlation analysis and feature screening based on the initial sequences of multiple time scales to obtain feature sequences of multiple time scales; performing weighted fusion based on the feature sequences of multiple time scales and preset weights corresponding to each time scale to obtain fused features; performing load forecasting based on the fused features and a preset load forecasting model to obtain a predicted load value.

[0007] In one possible implementation, noise processing and time-scale division are performed on multi-source historical data to obtain initial sequences of multiple time scales, including: time-scale division is performed on multi-source historical data to obtain historical data of multiple time scales for each type of data source; anomaly detection and noise removal are performed on historical data of multiple time scales for each type of data source to obtain initial sequences of multiple time scales.

[0008] In a possible implementation, correlation analysis and feature screening are performed based on initial sequences of multiple time scales to obtain feature sequences of multiple time scales, including: based on the initial sequences of multiple time scales and historical load data, a grey correlation analysis method is used to calculate the average grey correlation coefficient of each type of data in each time scale; the average grey correlation coefficient is used to represent the correlation between each type of data in each time scale and the load data of the total time series; based on the average grey correlation coefficient, the initial sequences of multiple time scales are screened to obtain feature sequences of multiple time scales.

[0009] In a possible implementation, before weighted fusion is performed based on feature sequences of multiple time scales and preset weights corresponding to each time scale to obtain fused features, the method also includes: performing convolution processing based on feature sequences of multiple time scales to obtain convolution features of multiple time scales; and determining the weights corresponding to each time scale based on the convolution features of multiple time scales and a preset weight generation network.

[0010] In a possible implementation, load forecasting is performed based on fusion features and a preset load forecasting model, and before obtaining the predicted load value, it also includes: acquiring multi-source historical data within a historical period; dividing the multi-source historical data within the historical period into time windows to obtain multi-source historical data for multiple time windows; determining the fusion features of each time window based on the multi-source historical data for multiple time windows; determining multiple training samples using the fusion features of each time window as input and the load data of the next time window of each time window as output; and performing neural network training based on the multiple training samples to obtain a preset load forecasting model.

[0011] In a possible implementation, the multiple training samples include a training set and a validation set; based on the multiple training samples, a neural network training is performed to obtain a preset load forecasting model, including: based on the training set, a neural network training is performed to obtain an initial forecasting model; based on the validation set, the initial forecasting model is verified to obtain a verification result; if the verification result does not meet the set conditions, the network parameters of the weight generation network are modified; based on the multi-source historical data of multiple time windows and the revised weight generation network, the weights of each time scale in each time window are regenerated; based on the multi-source historical data of multiple time windows and the regenerated weights of each time scale in each time window, the fusion features of each time window are regenerated; based on the regenerated fusion features of each time window, the training samples are updated; based on the training set in the updated training samples, the neural network training is re-performed to obtain a retrained forecasting model; based on the validation set in the updated training samples, the retrained forecasting model is verified to obtain a retraining verification result; if the retraining verification result does not meet the set conditions, the network parameters of the weight generation network are repeatedly modified until the retraining verification result meets the set conditions.

[0012] In a possible implementation, the preset load prediction model includes an input layer, a first CNN layer, a second CNN layer, a first LSTM layer, a second LSTM layer, an attention layer, a fully connected layer and an output layer; based on the fused features and the preset load prediction model, load prediction is performed to obtain a predicted load value, including: inputting the fused features into the first CNN layer and the second CNN layer to extract features to obtain extracted features; based on the fused features and the extracted features, feature merging is performed to obtain merged features; the merged features are input into the first LSTM layer and the second LSTM layer to obtain a feature vector; the feature vector is input into the attention layer for weight calculation to obtain a feature weight corresponding to the feature vector; based on the feature vector and the feature weight corresponding to the feature vector, a feature weight vector is obtained; the feature weight vector is input into the fully connected layer to obtain a predicted load value.

[0013] In the second aspect, an embodiment of the present invention provides a load forecasting device based on multi-source historical data, the device comprising: a communication module for acquiring multi-source historical data related to the load, the multi-source historical data comprising historical load data, historical meteorological data and renewable energy power generation data; a processing module for performing noise processing and time scale division on the multi-source historical data to obtain an initial sequence of multiple time scales; performing correlation analysis and feature screening based on the initial sequences of multiple time scales to obtain feature sequences of multiple time scales; performing weighted fusion based on the feature sequences of multiple time scales and preset weights corresponding to each time scale to obtain fused features; performing load forecasting based on the fused features and a preset load forecasting model to obtain a predicted load value.

[0014] In one possible implementation, the processing module is specifically used to divide the multi-source historical data into time scales to obtain historical data of multiple time scales for each type of data source; perform anomaly detection and noise removal on the historical data of multiple time scales for each type of data source to obtain initial sequences of multiple time scales.

[0015] In a possible implementation, the processing module is specifically used to calculate the average grayscale correlation coefficient of each type of data in each time scale based on the initial sequences of multiple time scales and historical load data using the gray correlation analysis method; the average grayscale correlation coefficient is used to represent the correlation between each type of data in each time scale and the load data of the total time series; based on the average grayscale correlation coefficient, the initial sequences of multiple time scales are screened to obtain characteristic sequences of multiple time scales.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, the memory storing a computer program, the processor being used to call and run the computer program stored in the memory to perform the steps of the method described in the first aspect and any possible implementation method of the first aspect.

[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is executed by a processor, the steps of the method described in the first aspect and any possible implementation method of the first aspect are implemented.

[0018] The present invention provides a load forecasting method and device based on multi-source historical data. The present invention first performs noise processing and time scale division on the multi-source historical data to obtain initial sequences of multiple time scales, thereby reducing the impact of noise on the forecasting results. Furthermore, the present invention performs correlation analysis and feature screening on the feature sequences of each time scale in the multi-source historical data, thereby reducing the redundancy between the feature sequences of each time scale, making the forecasting results more stable, and improving the stability and forecasting accuracy of the load forecasting results. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 It is a flow chart of a load forecasting method based on multi-source historical data provided by an embodiment of the present invention;

[0021] Figure 2 is a structural schematic diagram of an average grey correlation coefficient provided by an embodiment of the present invention;

[0022] Figure 3 is a structural schematic diagram of a load forecasting model provided by an embodiment of the present invention;

[0023] Figure 4 It is a schematic diagram of a training process of a load forecasting model provided by an embodiment of the present invention;

[0024] Figure 5 It is a structural schematic diagram of a load forecasting device based on multi-source historical data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0026] In the description of the present invention, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "plurality" refer to two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0027] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0028] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.

[0029] In order to make the purpose, technical solutions and advantages of the present invention more clear, the following will be described through specific embodiments in conjunction with the accompanying drawings of the present invention.

[0030] As described in the background art, current load forecasting methods have technical problems such as unstable forecasting results and low forecasting accuracy.

[0031] To solve this technical problem, an embodiment of the present invention provides a load forecasting method and device based on multi-source historical data, which fully considers various factors affecting the load, takes historical load, temperature, day-ahead electricity price, solar and wind power generation, radiation intensity and working day type as input features, constructs the input sequence of the model from three dimensions: adjacent time points, short cycles and long cycles, dynamically adjusts the weights of each time scale feature, and adopts a noise suppression mechanism to improve the reliability of the data and the robustness of the model, thereby greatly improving the stability and accuracy of the prediction.

[0032] like Figure 1 As shown, an embodiment of the present invention provides a load forecasting method based on multi-source historical data. The method includes steps S101-S105.

[0033] S101. Acquire multi-source historical data related to load.

[0034] In the embodiment of the present application, the multi-source historical data includes historical load data, historical meteorological data and renewable energy power generation data.

[0035] In some embodiments, the data collection interval may be 1 hour. Historical load data includes actual load, forecasted load, and day-ahead electricity price. Meteorological data includes temperature, direct radiation intensity, and diffuse radiation intensity. Renewable energy output includes actual wind power generation and actual photovoltaic power generation.

[0036] S102, performing noise processing and time scale division on multi-source historical data to obtain initial sequences of multiple time scales.

[0037] As a possible implementation manner, step S102 may be specifically implemented as steps S1021 - S1022 .

[0038] S1021. Divide the multi-source historical data into time scales to obtain historical data of multiple time scales for each type of data source.

[0039] S1022: Perform anomaly detection and noise removal on the historical data of multiple time scales of each type of data source to obtain initial sequences of multiple time scales.

[0040] As a possible implementation method, an embodiment of the present invention can obtain multi-source historical data related to load and perform preprocessing; perform correlation analysis and feature selection on the preprocessed multi-source historical data features; construct a multi-time scale feature sequence, generate weights for each time scale sequence and perform weighted feature fusion; input the feature fusion sequence into a neural network training model; and predict short-term loads using a trained neural network based on the multi-source data to be predicted.

[0041] Exemplarily, the embodiments of the present invention can preprocess multi-source historical data. For example, the removal of missing data, data standardization, and non-numeric day type expansion. Among them, the non-numeric day type expansion encodes the weekday type, with weekdays as 0 and weekends as 1. Data standardization uses the maximum and minimum normalization method to scale all input data to the range of [0,1] and convert the data into a model input tensor, as follows:

[0042]

[0043] Where x′ is the normalized input variable; max(x) and min(x) are the maximum and minimum values ​​of the variable to be normalized, respectively.

[0044] Exemplarily, preprocessing also includes the detection and elimination of data noise. When preprocessing the input data, statistical methods are first used to detect and eliminate outliers and noise. For example, for abnormal fluctuations in renewable energy power generation data, the standard deviation bound method can be used to detect and eliminate outliers. The specific formula is as follows:

[0045] Assume that the historical data of a certain time scale is x1, x2,…, x m , calculate the mean μ and standard deviation σ of the data, if a data point x i Satisfies: |x i If -μ|>3σ, the data point is considered an outlier and will be removed or smoothed with adjacent data in subsequent processing.

[0046] S103. Based on the initial sequences of multiple time scales, correlation analysis and feature screening are performed to obtain feature sequences of multiple time scales.

[0047] As a possible implementation manner, step S103 may be specifically implemented as steps S1031 - S1032 .

[0048] S1031. Based on the initial sequences of multiple time scales and historical load data, the grey correlation analysis method is used to calculate the average grey correlation coefficient of each type of data in each time scale.

[0049] In some embodiments, the average grayscale correlation coefficient is used to represent the correlation between each type of data in each time scale and the load data of the total time series.

[0050] S1032. Based on the average grayscale correlation coefficient, the initial sequences of multiple time scales are screened to obtain characteristic sequences of multiple time scales.

[0051] As a possible implementation method, correlation analysis includes using grey correlation analysis to calculate the average grey correlation coefficient of electricity price, temperature, radiation intensity, solar and wind power generation, and non-numerical quantity day type with load in the entire time series, and using the Spearman model to calculate the correlation between each feature sequence and the load sequence.

[0052] Furthermore, data selection means that after performing the correlation analysis, based on the results of the correlation analysis, data sequences that are strongly correlated with the load are used as input features, and data sequences that are not significantly correlated are excluded.

[0053] Furthermore, the construction of the feature sequence is specifically as follows: constructing the feature sequence of the model from three time dimensions: adjacent timestamps, short time periods and long time periods. For the load at time t to be predicted, the feature sequence includes the historical load data of adjacent times t-1 and t-2, the historical load data t-25, t-24, t-23 of the previous day and the historical load data t-169, t-168, t-167 of the same time of the previous week; including the historical electricity price data at the prediction time t, adjacent times t-1, t+1; including the temperature T(t), radiation intensity R(t), solar power generation S(t) and wind power generation W(t) at the prediction time t, the extended day type D, and the feature sequence has a total of 22 dimensions.

[0054] For example, Figure 2 As shown in the figure, the correlation analysis includes using the grey correlation analysis method to calculate the average grey correlation coefficient of electricity price, temperature, radiation intensity, solar and wind power generation, and non-numerical quantity day type with the load in the entire time series, and using the Spearman model to calculate the correlation between each feature sequence and the load sequence. The correlation coefficients calculated by the grey correlation analysis method are all above 0.5, indicating that these factors have a strong correlation with the load and can be used as input features. Among them, the load is most affected by the electricity price. If both radiation intensities are used as input variables, feature redundancy will occur. Therefore, the scattered radiation intensity with a larger correlation coefficient is selected.

[0055] In this embodiment, the constructed feature sequence includes the temperature T(t), diffuse radiation intensity R(t), solar power generation S(t), wind power generation W(t), workday type D(t) (0 or 1) at the prediction point, and the historical load L(t-1), L(t-2), electricity price P(t-1), P(t), P(t+1) at the adjacent time of the prediction moment; the historical load and electricity price of the day before the prediction moment, L(t-25), L(t-24), L(t-23), P(t-25), P(t-24), P(t-23); the historical load and electricity price of the week before the prediction moment, L(t-169), L(t-168), L(t-167), P(t-169), P(t-168), P(t-167). The final input feature vector is x t =[T(t), R(t), S(t), W(t), D(t), L(t-1), L(t-2), L(t-25), L(t-24), L(t-23), L(t-168), L(t-167), P(t-16 9), P(t-1), P(t), P(t+1), P(t-25), P(t-24), P(t-23), P(t-169), P(t-168), P(t-167)], which is a 3-dimensional tensor of n×24×22.

[0056] S104: Perform weighted fusion based on feature sequences of multiple time scales and preset weights corresponding to each time scale to obtain fused features.

[0057] It should be noted that the feature weighted fusion is as follows: Let X1, X2,…, X n are input features of different time scales (adjacent moments, previous day, previous week), F1, F2, …, F n is the feature representation after convolution or feature extraction. In order to dynamically generate the weight α of each time scale feature i ,A small weight generation network is needed to output these weights. The weight generation network can accept the concatenation or some aggregation form of all time scale features as input and generate corresponding weights.

[0058] All time scale features F1, F2, ..., F n Splice and get input F concat :

[0059] F concat =Concat(F1,F2,…,F n )

[0060] The concatenated features are input into a small fully connected network to generate a weight score z for each time scale i ;

[0061] z i =W z ·F concat +b z ;

[0062] Among them, W z is the weight matrix of the fully connected layer, b z is the bias term. i Represents the unnormalized weight score.

[0063] To ensure that all weights α i The sum of is 1, and each weight is non-negative, using the Softmax function for z i Normalize:

[0064]

[0065] Among them, α i is the weight of the i-th time scale, ensuring

[0066] After the weights are generated, the time scale features F i According to the corresponding weight α i Perform weighted fusion to obtain the final fusion feature Ffused .

[0067] Weighted fusion feature F fuscd It will be used as the input of the subsequent network.

[0068] S105. Based on the fusion features and the preset load prediction model, load prediction is performed to obtain a predicted load value.

[0069] In some embodiments, the preset load forecasting model includes an input layer, a first CNN layer, a second CNN layer, a first LSTM layer, a second LSTM layer, an attention layer, a fully connected layer, and an output layer.

[0070] As a possible implementation manner, step S105 can be specifically implemented as steps S1051-S1056.

[0071] S1051. Input the fused features into the first CNN layer and the second CNN layer to perform feature extraction to obtain extracted features.

[0072] S1052: Based on the fused features and the extracted features, feature merging is performed to obtain merged features.

[0073] S1053. Input the merged features into the first LSTM layer and the second LSTM layer to obtain a feature vector.

[0074] S1054. Input the feature vector into the attention layer for weight calculation to obtain the feature weight corresponding to the feature vector.

[0075] S1055. Obtain a feature weight vector based on the feature vector and the feature weight corresponding to the feature vector.

[0076] S1056. Input the feature weight vector into the fully connected layer to obtain the predicted load value.

[0077] For example, Figure 3 As shown in the figure, the preset load forecasting model, namely the CNN-LSTM-Attention neural network, includes an input layer, two CNN layers and two LSTM hidden layers, an Attention layer, a fully connected layer, and an output layer. The input sequence starts from the input layer. After passing through two CNN layers, the output vector is merged with the original input vector and then passes through two LSTM hidden layers. The processed vector output is used as the input of the Attention layer. In the Attention layer, the weight vector is first calculated based on the input vector of the current layer, and then the weight vector is merged with the input vector of the current layer to obtain a new vector, which is input to the fully connected layer, and finally the predicted value is calculated.

[0078] Furthermore, the workflow of the CNN-LSTM-Attention neural network is as follows:

[0079] For the input feature vector x at time t t , the output of the two CNN layers is:

[0080]

[0081] Among them, x t is the input feature vector at time t; ω j is the convolution kernel weight matrix; b is the bias value; k is the number of convolution kernels.

[0082] In the LSTM layer, each cell is composed as follows:

[0083] The input node receives the hidden node output at the previous moment and the input at this time, and is processed with the tanh activation function; the input gate uses sigmoid as the activation function, and its input is the hidden node output at the previous time point and the current input; the input of the internal state node includes the output of the current input after being filtered by the input gate and the output of the internal state node at the previous time point; the input of the forgetting gate is the hidden layer output at the previous moment and the current input, and uses the sigmoid activation function; the output gate uses sigmoid as the activation function, and its input is the hidden node output at the previous time point and the current input.

[0084] The calculation formula of each LSTM unit is as follows, where F t represents the forgetting threshold, I t represents the input threshold, Indicates the cell state at the previous moment, Indicates the cell status, O t Represents the output threshold, H t represents the output of the current unit, H t-1 Represents the output of the unit at the previous moment.

[0085] f t =σ(W f ·[h t-1 ,x t ]+b f );

[0086] i t =σ(W i ·[h t-1 ,x t ]+b i );

[0087]

[0088] o t=σ(W o [h t-1 ,x t ]+b o );

[0089] h t =o t *tanh(C t );

[0090] Among them, W f , W i , W c , W o Represents the corresponding gate and the current input feature x respectively t and the previous unit output h t-1 The matrix weight obtained by multiplication, b i , b f , b o , b c is the bias term, σ is the sigmoid function; the new state value C t From the previous state value C t-1 、Forget gate t , input gate i t And the current neuron candidate value Decision, get the new state value C t After that, the output value h of the hidden layer can be obtained t Among them, the forget gate adaptively retains information that is useful for current prediction and suppresses the propagation of noise by learning the correlation of data at different time scales.

[0091] The role of the attention mechanism is to calculate the feature vector of the last layer of LSTM to obtain the feature weight, and then multiply the feature weight and the LSTM feature vector to obtain the feature weight vector. The specific calculation formula is as follows:

[0092]

[0093] h k '=H(C k ,h k ,x k );

[0094] Among them, α ki represents the attention weight assigned to the elements in the output sequence of the last layer of the LSTM hidden layer, i represents the sequence number of the elements in the output sequence of the LSTM hidden layer, T x Represents the length of the LSTM hidden layer output sequence, s ki Indicates the matching degree between the element to be encoded and other elements in the LSTM hidden layer output sequence. k' represents the hidden layer state value of the final output, H represents the feature weight vector function, C k Represents the attention weighted sum corresponding to the LSTM hidden layer output sequence.

[0095] The present invention provides a load forecasting method based on multi-source historical data, which first performs noise processing and time scale division on the multi-source historical data to obtain initial sequences of multiple time scales, thereby reducing the impact of noise on the forecasting results. Furthermore, the present invention performs correlation analysis and feature screening on the feature sequences of each time scale in the multi-source historical data, thereby reducing the redundancy between the feature sequences of each time scale, making the forecasting results more stable, and improving the stability and forecasting accuracy of the load forecasting results.

[0096] Optionally, the load forecasting method based on multi-source historical data provided by the embodiment of the present invention further includes steps S201 - S202 before step S104 .

[0097] S201, performing convolution processing based on feature sequences of multiple time scales to obtain convolution features of multiple time scales.

[0098] S202: Based on the convolution features of multiple time scales and a preset weight generation network, determine the weight corresponding to each time scale.

[0099] In this way, the embodiment of the present invention can automatically generate weights corresponding to each time scale through a weight generation network, thereby improving the stability and prediction accuracy of load forecasting results.

[0100] Optionally, the load forecasting method based on multi-source historical data provided by the embodiment of the present invention further includes steps S301 - S305 before step S105 .

[0101] S301. Acquire multi-source historical data within a historical period.

[0102] S302 , dividing the multi-source historical data within the historical period into time windows to obtain multi-source historical data in multiple time windows.

[0103] S303: Determine the fusion features of each time window based on the multi-source historical data of multiple time windows.

[0104] S304: Taking the fusion features of each time window as input and the load data of the next time window of each time window as output, a plurality of training samples are determined.

[0105] S305: Perform neural network training based on multiple training samples to obtain a preset load forecasting model.

[0106] In some embodiments, the plurality of training samples includes a training set and a validation set;

[0107] For example, Figure 4 As shown, step S305 can be specifically implemented as steps A1-A9.

[0108] A1. Based on the training set, neural network training is performed to obtain the initial prediction model.

[0109] A2. Based on the validation set, the initial prediction model is validated to obtain the validation results.

[0110] A3. If the verification result does not meet the set conditions, the network parameters of the weight generation network are modified.

[0111] A4. Based on multi-source historical data of multiple time windows and the revised weight generation network, the weights of each time scale in each time window are regenerated.

[0112] A5. Based on multi-source historical data of multiple time windows and the weights of each time scale in each regenerated time window, the fusion features of each time window are regenerated.

[0113] A6. Update the training samples based on the regenerated fusion features of each time window.

[0114] A7. Retrain the neural network based on the training set in the updated training samples to obtain a retrained prediction model.

[0115] A8. Based on the validation set in the updated training samples, the retrained prediction model is validated to obtain a retraining validation result.

[0116] A9. If the retraining verification result does not meet the set conditions, the network parameters of the weight generation network are repeatedly modified until the retraining verification result meets the set conditions.

[0117] For example, the training process of the CNN-LSTM-Attention neural network structure model is as follows:

[0118] Step 1: Select a 24-hour time step as a training input sample, and the load of the next 24 hours as the training output sample. Assume that there are n training samples in total. Since the prediction input at a single moment is 22-dimensional and the time step is 24, that is, the load of the next 24 hours is continuously predicted, the input data is stored in the form of a (n×24×22) 3D tensor.

[0119] Using the constructed feature sequence, the Adam optimizer is used to train the CNN LSTM-Attention network to achieve the optimal solution of the parameters, thereby obtaining a trained load forecasting model. The parameters of the Adam optimizer used are set to lr = 0.001, weight_decay = 0, step_size = 20, gamma = 0.1, and the others are default values. The model is iterated repeatedly until the model converges or reaches the specified number of iterations.

[0120] Step 2: Input the input data of the training set into the neural network to obtain the predicted value.

[0121] Step 3: Calculate the error based on the predicted value and the true value.

[0122] Step 4: Use the error-based back-propagation algorithm to update the weights and implement supervised learning, where the optimization algorithm is Adam.

[0123] The specific back propagation optimization process is as follows:

[0124] Assume that the final prediction value is The true value is y, then the loss function can be a commonly used regression loss function, such as the mean square error (MSE):

[0125]

[0126] Where N is the number of samples, is the model's predicted value for the i-th sample, and yi is the true value.

[0127] (1) Forward propagation: Input multi-time scale data X1, X2, …, X n ,F1,F2,…,F are obtained through the feature extraction module n , generate weight α through the weight generation network i , and then calculate the weighted fusion feature F fuscd .

[0128] (1) Loss calculation: predicted value by the model Calculate the loss with the true value y

[0129] (2) Gradient calculation: loss function The gradient of the network parameters is calculated, including the parameters W of the weight generation network. z , bias b z , as well as the parameters of the original model (such as weights in CNN and LSTM).

[0130] (3) Parameters W of the weight generation network z and b z To update:

[0131]

[0132]

[0133] (4) The same update operation is performed on the parameters of the CNN, LSTM and other networks in the original model.

[0134] Furthermore, the trained neural network is used for prediction, as follows:

[0135] Use the trained neural network and input the test set data to predict the load for the next 24 hours. The evaluation indicators of the prediction results include the percentage error E PE , Maximum absolute percentage error E MAX , mean absolute percentage error E MAPE And the root mean square error E RMSE , whose expression is as follows.

[0136]

[0137] E MAX =max(|E PE,t |),t=1,2,3…n;

[0138]

[0139] Among them, y f is the predicted value, y r is the true value.

[0140] It should be noted that the present invention is based on multi-source historical data related to load, fully considers various influencing factors of load, multi-scale periodic characteristics of load, new energy fluctuations and social activity laws to train neural networks, improves the prediction accuracy of short-term load of power system, and has a guiding role in the intelligent and efficient operation of power system. This scheme solves the problems of multi-time scale data redundancy and noise by introducing an adaptive weighting mechanism, and improves the robustness of the model by combining the noise suppression mechanism, which is particularly suitable for scenarios with large fluctuations in new energy load. Dynamic adjustment of time scale weights: Through the adaptive weighting mechanism, the importance of data at different time scales is optimized according to actual conditions, effectively avoiding data redundancy and noise problems. Multi-level noise suppression: From data preprocessing, LSTM forget gate to adaptive weighting, multiple levels filter noise, which improves the stability of the prediction model in complex scenarios. Innovative time scale data combination method: This method not only integrates multi-time scale data, but also enables the model to intelligently respond to new energy load fluctuations through adaptive learning, thereby improving the flexibility and robustness of the model.

[0141] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0142] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0143] Figure 5 The load prediction device 400 according to the embodiment of the present invention comprises a communication module 401 and a processing module 402 .

[0144] The communication module 401 is used to obtain multi-source historical data related to the load, where the multi-source historical data includes historical load data, historical meteorological data and renewable energy power generation data;

[0145] Processing module 402 is used to perform noise processing and time scale division on multi-source historical data to obtain initial sequences of multiple time scales; perform correlation analysis and feature screening based on the initial sequences of multiple time scales to obtain feature sequences of multiple time scales; perform weighted fusion based on the feature sequences of multiple time scales and preset weights corresponding to each time scale to obtain fusion features; perform load forecasting based on the fusion features and a preset load forecasting model to obtain a predicted load value.

[0146] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A load forecasting method based on multi-source historical data, characterized in that: include: Acquire multi-source historical data related to load, wherein the multi-source historical data includes historical load data, historical meteorological data, and renewable energy power generation data; Performing noise processing and time scale division on the multi-source historical data to obtain initial sequences of multiple time scales; Based on the initial sequences of the multiple time scales, correlation analysis and feature screening are performed to obtain feature sequences of the multiple time scales; Based on the feature sequences of the multiple time scales and the preset weights corresponding to the time scales, weighted fusion is performed to obtain fusion features; Based on the fusion features and the preset load forecasting model, load forecasting is performed to obtain the predicted load value.

2. The load forecasting method based on multi-source historical data according to claim 1 is characterized in that: The noise processing and time scale division of the multi-source historical data to obtain initial sequences of multiple time scales includes: Dividing the multi-source historical data into time scales to obtain historical data of multiple time scales for each type of data source; Anomaly detection and noise removal are performed on the historical data of multiple time scales of each type of data source to obtain initial sequences of the multiple time scales.

3. The load forecasting method based on multi-source historical data according to claim 1 is characterized in that: The initial sequences based on the multiple time scales are subjected to correlation analysis and feature screening to obtain feature sequences of multiple time scales, including: Based on the initial sequences of the multiple time scales and the historical load data, the average gray correlation coefficient of each type of data in each time scale is calculated by using the gray correlation analysis method; the average gray correlation coefficient is used to represent the correlation between each type of data in each time scale and the load data of the total time series; Based on the average grayscale correlation coefficient, the initial sequences of the multiple time scales are screened to obtain the characteristic sequences of the multiple time scales.

4. The load forecasting method based on multi-source historical data according to claim 1 is characterized in that: Before performing weighted fusion based on the feature sequences of the multiple time scales and the preset weights corresponding to the time scales to obtain the fused features, the method further includes: Performing convolution processing based on the feature sequences of the multiple time scales to obtain convolution features of the multiple time scales; Based on the convolution features of the multiple time scales and a preset weight generation network, a weight corresponding to each time scale is determined.

5. The load forecasting method based on multi-source historical data according to claim 1 is characterized in that: The method of performing load forecasting based on the fusion feature and the preset load forecasting model to obtain the predicted load value also includes: Obtain historical data from multiple sources over a historical period; Dividing the multi-source historical data in the historical period into time windows to obtain multi-source historical data in multiple time windows; Determining a fusion feature of each time window based on the multi-source historical data of the multiple time windows; Taking the fusion features of each time window as input and the load data of the next time window of each time window as output, a plurality of training samples are determined; Based on the multiple training samples, neural network training is performed to obtain the preset load forecasting model.

6. The load forecasting method based on multi-source historical data according to claim 5 is characterized in that: The multiple training samples include a training set and a validation set; The performing of neural network training based on the plurality of training samples to obtain the preset load forecasting model includes: Based on the training set, neural network training is performed to obtain an initial prediction model; Based on the verification set, verifying the initial prediction model to obtain a verification result; If the verification result does not meet the set conditions, modify the network parameters of the weight generation network; Based on the multi-source historical data of the multiple time windows and the modified weight generation network, regenerate the weights of each time scale in each time window; Regenerate the fusion features of each time window based on the multi-source historical data of the multiple time windows and the weight of each time scale in each regenerated time window; Based on the regenerated fusion features of each time window, updating the training sample; Based on the training set in the updated training samples, the neural network is retrained to obtain a retrained prediction model; Based on the verification set in the updated training samples, the retrained prediction model is verified to obtain a retraining verification result; If the retraining verification result does not meet the set conditions, the network parameters of the weight generation network are repeatedly modified until the retraining verification result meets the set conditions.

7. The load forecasting method based on multi-source historical data according to claim 6 is characterized in that: The preset load forecasting model includes an input layer, a first CNN layer, a second CNN layer, a first LSTM layer, a second LSTM layer, an attention layer, a fully connected layer and an output layer; The load forecasting is performed based on the fusion features and the preset load forecasting model to obtain the predicted load value, including: Inputting the fused features into the first CNN layer and the second CNN layer to perform feature extraction to obtain extracted features; Based on the fused features and the extracted features, feature merging is performed to obtain a merged feature; Inputting the merged features into the first LSTM layer and the second LSTM layer to obtain a feature vector; Input the feature vector into the attention layer for weight calculation to obtain a feature weight corresponding to the feature vector; Based on the feature vector and the feature weight corresponding to the feature vector, a feature weight vector is obtained; The feature weight vector is input into the fully connected layer to obtain the predicted load value.

8. A load forecasting device based on multi-source historical data, characterized in that: include: A communication module, used to obtain multi-source historical data related to load, wherein the multi-source historical data includes historical load data, historical meteorological data and renewable energy power generation data; A processing module, used for performing noise processing and time scale division on the multi-source historical data to obtain initial sequences of multiple time scales; Based on the initial sequences of the multiple time scales, correlation analysis and feature screening are performed to obtain feature sequences of the multiple time scales; based on the feature sequences of the multiple time scales and preset weights corresponding to each time scale, weighted fusion is performed to obtain fusion features; Based on the fusion features and the preset load forecasting model, load forecasting is performed to obtain the predicted load value.

9. The load forecasting device based on multi-source historical data according to claim 8, characterized in that: The processing module is specifically used to divide the multi-source historical data into time scales to obtain historical data of multiple time scales for each type of data source; perform anomaly detection and noise removal on the historical data of multiple time scales for each type of data source to obtain the initial sequences of the multiple time scales.

10. The load forecasting device based on multi-source historical data according to claim 8, characterized in that: The processing module is specifically used to calculate the average gray correlation coefficient of each type of data in each time scale based on the initial sequences of the multiple time scales and the historical load data by using the gray correlation analysis method; the average gray correlation coefficient is used to represent the correlation between each type of data in each time scale and the load data of the total time series; Based on the average grayscale correlation coefficient, the initial sequences of the multiple time scales are screened to obtain the characteristic sequences of the multiple time scales.

Citation Information

Cited By

  • Charging pile load prediction method based on LSTM and multi-source feature fusion

    CN121072893A

  • Charging pile load prediction method based on lstm and multi-source feature fusion

    CN121072893B