Inter-province spot electricity price prediction method, device and system, and storage medium
The maximum mutual information coefficient method and the CEEMD decomposition algorithm screen the electricity price characteristics, and combined with the hybrid gray wolf optimization algorithm to optimize the BITCN-BIGRU-Attention model, the multi-dimensional influencing factor processing problem in the spot electricity price prediction between provinces is solved, and more efficient and stable electricity price prediction is achieved.
Patent Information
- Application Number
- CN202510591787.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
AI Technical Summary
The existing inter-provincial spot electricity price prediction methods have insufficient integration of new energy output volatility and prediction, imperfect cross-provincial transaction constraints and regional characteristic modeling, and limited prediction model processing capabilities, making it difficult to effectively quantify the impact of changes in multi-dimensional influencing factors on electricity prices. The nonlinear processing capabilities of traditional models are limited, neural networks are easy to overfit and time-consuming to train. Wavelet theory needs to rely on manual selection of decomposition scales and basis functions, and lacks an adaptive mechanism.
The maximum mutual information coefficient method is used to extract electricity price characteristics, build a two-layer structure similar daily screening model, combine the CEEMD decomposition algorithm and the hybrid gray wolf optimization algorithm to optimize the BITCN-BIGRU-Attention model, create a HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model, evaluate the model performance through the training set and the verification set, and finally make electricity price prediction on the test set.
It improves the accuracy and stability of spot electricity price prediction between provinces, enhances the robustness of multi-dimensional influencing factors, reduces the time and manual intervention of model training, and achieves a more efficient electricity price prediction effect.
Smart Images

Figure CN120450752A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electricity price forecasting, and in particular relates to a method and device, a system, and a storage medium for forecasting inter-provincial spot electricity prices. Background Art
[0002] In 2024, my country's interprovincial electricity spot market officially launched, with installed renewable energy capacity surpassing thermal power for the first time. The volatility and intermittency of renewable energy generation exacerbated the temporal and spatial mismatch between electricity supply and demand, leading to frequent extreme prices in the spot market. The need to consider the output characteristics of renewable energy and couple them with the spot market has become increasingly prominent. With the significant investment in diverse renewable energy sources, interprovincial spot electricity prices have become more complex. The influence of multiple factors, including market supply and demand, load, renewable energy output, the environment, and seasonality, has led to significant volatility and non-stationarity in interprovincial spot electricity prices, making accurate short-term electricity price forecasting extremely challenging.
[0003] Against the backdrop of the accelerated development of new power markets, existing interprovincial spot price forecasting methods face challenges such as insufficient integration of renewable energy output volatility into forecasts, imperfect modeling of interprovincial trading constraints and regional characteristics, and limited forecasting model processing capabilities. These challenges make it difficult to effectively quantify the impact of changes in multidimensional influencing factors on electricity prices. Traditional models have limited nonlinear processing capabilities, time series methods struggle to capture price jumps and heteroscedasticity, neural networks are prone to overfitting and time-consuming to train, and wavelet theory relies on manual selection of decomposition scales and basis functions, limiting robustness in complex scenarios. While combined forecasting improves stability, multi-model weight optimization still relies on experience and lacks adaptive mechanisms. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for predicting inter-provincial spot electricity prices.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for predicting inter-provincial spot electricity prices comprises the following steps:
[0007] S1. Divide the electricity price forecast-related data obtained based on the inter-provincial spot electricity price formation mechanism into training set, test set and validation set, and pre-process the data for outliers and missing values;
[0008] S2. Use the maximum mutual information coefficient method to extract electricity price characteristics, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set D1;
[0009] S3. Based on the new dataset D1, a two-layer similar day screening model is constructed. The first layer uses the relative error method to screen the initial set of similar days. The second layer uses the weighted grey correlation method to further screen similar days to determine the similar day dataset D2 with similar characteristics to the test day. The influencing factor dataset in D1 and the similar day dataset D2 are combined as the feature branch dataset of the model input, recorded as D3.
[0010] S4. Decompose the pre-processed electricity price data in D1 into multiple subsequences with different features according to the CEEMD decomposition algorithm. This subsequence is used as the electricity price branch data set for the model input, denoised as D4, to achieve noise reduction and feature splitting of the electricity price signal.
[0011] S5. Based on the electricity price branch dataset D4 and the feature branch dataset D3, the attention mechanism and hybrid gray wolf optimization algorithm are used to optimize the parameters of the BITCN-BIGRU model, and the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model is created. The short-term electricity price prediction model is trained using the training set, and the prediction performance of the short-term electricity price prediction model is evaluated using the validation set.
[0012] S6. Input the test set into the short-term electricity price prediction model trained in S5 to obtain the prediction results of inter-provincial spot electricity prices.
[0013] Preferably, in S1, the electricity price forecast data includes historical electricity price data, historical load data, fuel price, new energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
[0014] Preferably, S2 is specifically as follows: collating and unifying the data set format of historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, and precipitation influencing factors, collecting inter-provincial spot electricity prices at intervals of every 15 minutes, taking the influencing factors in the boundary conditions with the same time dimension as the electricity price collection as the feature sequence, calculating the correlation between each boundary condition data and the historical electricity price, that is, the mutual information coefficient, arranging the mutual information coefficients of the multidimensional influencing factors and the historical electricity price from large to small, and selecting variables with a mutual information coefficient greater than 0.6 as key influencing factors; extracting hour, day of the week, month, season, and weekday features from the date type information, and adding them to the data set as additional feature factors to obtain a new data set.
[0015] The present invention also provides an inter-provincial spot electricity price forecasting device, comprising:
[0016] The first processing module is used to divide the electricity price forecast-related data obtained based on the inter-provincial spot electricity price formation mechanism into a training set, a test set, and a validation set, and perform outlier and missing value preprocessing on the data;
[0017] The second processing module is used to extract electricity price characteristics using the maximum mutual information coefficient method, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set D1;
[0018] The third processing module is used to construct a two-layer similar day screening model based on the new dataset D1. The first layer uses the relative error method to screen the initial set of similar days. The second layer uses the weighted grey correlation method to further screen similar days to determine the similar day dataset D2 with similar characteristics to the day to be tested. The influencing factor dataset in D1 and the similar day dataset D2 are combined as the feature branch dataset of the model input, recorded as D3.
[0019] The fourth processing module is used to decompose the pre-processed electricity price data in D1 into multiple subsequences with different features according to the CEEMD decomposition algorithm. These subsequences are used as the electricity price branch data set input to the model, denoised as D4, to achieve noise reduction and feature splitting of the electricity price signal.
[0020] The fifth processing module is used to optimize the parameters of the BITCN-BIGRU model using the attention mechanism and the hybrid gray wolf optimization algorithm based on the electricity price branch dataset D4 and the feature branch dataset D3, create the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model, train the short-term electricity price prediction model using the training set, and evaluate the prediction performance of the short-term electricity price prediction model using the validation set;
[0021] The sixth processing module is used to input the test set into the trained short-term electricity price prediction model to obtain the prediction result of the inter-provincial spot electricity price.
[0022] Preferably, the electricity price forecast data includes historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
[0023] Preferably, the second processing module is used to organize and unify the data set format of historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, and precipitation influencing factors. The inter-provincial spot electricity price is collected every 15 minutes. The influencing factors in the boundary conditions with the same time dimension as the electricity price collection are used as feature sequences, and the correlation between each boundary condition data and the historical electricity price, that is, the mutual information coefficient, is calculated. The mutual information coefficients of the multidimensional influencing factors and the historical electricity price are arranged from large to small, and variables with a mutual information coefficient greater than 0.6 are selected as key influencing factors; hour, day of the week, month, season, and weekday features are extracted from the date type information and added to the data set as additional feature factors to obtain new data.
[0024] The present invention also provides an inter-provincial spot electricity price forecasting system, comprising: a memory and a processor, wherein the memory stores a computer program run by the processor, and the computer program executes the inter-provincial spot electricity price forecasting method when run by the processor.
[0025] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is run, the inter-provincial spot electricity price forecasting method is executed.
[0026] The present invention first obtains electricity price forecast-related data based on the inter-provincial spot electricity price formation mechanism, constructs an initial data set, performs outlier and missing value checks, and normalizes the data set to divide it into a training set, a test set, and a validation set; uses the maximum mutual information coefficient method to extract electricity price characteristics, determines the key influencing factors of electricity prices and their weight coefficients, eliminates factors with weak correlation, and constructs a new data set D1; constructs a dual-structure similar day screening model, uses the relative error method to screen the initial set of similar days at coarse granularity, and uses the weighted grey correlation method to screen similar days at fine granularity to determine the similar day data set D2 with similar characteristics to the day to be tested, and combines the influencing factor data set in D1 with the similar day data set D2 for the same day. The feature branch dataset for the model input is denoted as D3; the pre-processed electricity price data in D1 is decomposed into multiple subsequences with different features according to the CEEMD decomposition algorithm, which is used as the electricity price branch dataset for the model input, denoted as D4, to achieve noise reduction and feature splitting of the electricity price signal; the electricity price branch dataset D4 and the feature branch dataset D3 are input, and the attention mechanism is added to highlight the influence of important factors. The hybrid gray wolf optimization algorithm is used to optimize the parameters of the BITCN-BIGRU model, and the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model is created. The model is trained using the training set, and the model prediction performance is evaluated using the validation set. The test set is input into the trained model to obtain the prediction results of the inter-provincial spot electricity price. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0028] Figure 1 This is a flow chart of a method for predicting inter-provincial spot electricity prices according to an embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram of the method for selecting dual-structure similar days;
[0030] Figure 3This is a schematic diagram of the CEEMD decomposition model structure;
[0031] Figure 4 Schematic diagram of the HGWO-BITCN-BIGRU-attention inter-provincial spot electricity price prediction model structure. DETAILED DESCRIPTION
[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Example 1:
[0035] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting inter-provincial spot electricity prices, comprising:
[0036] S1. Based on the inter-provincial spot electricity price formation mechanism, obtain electricity price forecast-related data, construct an initial data set, check for outliers and missing values, and normalize the data set to divide it into training set, test set, and validation set. The implementation method is as follows:
[0037] S101. The obtained electricity price forecast data includes historical electricity price data, historical load data, fuel price, new energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
[0038] S102. Detect outliers in the initial data set using the interquartile range of the box plot and perform linear filling. Use the moving median method to detect outliers and fill the data using the outlier filling method. Identify and fill missing values using forward filling and linear interpolation.
[0039] S103, standardizing the data set after correcting outliers and missing values to eliminate errors in the prediction results caused by different dimensions;
[0040] S104, divide the data set into training set, test set and validation set according to the ratio of 80:10:10.
[0041] S2. Use the maximum mutual information coefficient method to extract electricity price characteristics, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set D1. The implementation method is as follows:
[0042] The data sets for influencing factors, including historical electricity prices, historical load data, fuel prices, renewable energy output, available transmission capacity of key channels, temperature, and precipitation, were collated and standardized. Interprovincial spot electricity prices were collected at 15-minute intervals. The influencing factor data were standardized into 15-minute intervals and used as feature sequences. The mutual information method was used to calculate the correlation between each feature sequence and historical electricity prices.
[0043] Assume that the electricity price data and feature data set are:
[0044]
[0045] Among them, k is the number of time nodes, n is the number of influencing factors, and x i (i=1,...,n) is the time characteristic series of the i-th influencing factor, and y is the time series of inter-provincial spot electricity prices.
[0046] Calculate the mutual information between each feature data and the inter-provincial spot electricity price. The calculation formula of mutual information is as follows:
[0047]
[0048] Among them, X i is the i-th feature, F MI (X i ; Y) is feature X i The mutual information between the electricity price Y, p(x i ,y) is X i Take the value x at the same time as Y i and the probability of y, p(x i ) and p(y) are X i and the marginal probability of Y.
[0049] Assume that the i-th influencing factor x i The data set composed of inter-provincial spot electricity price y is P = {(x i ,y),i=1,...,n}, divide the scatter plot of its variables into grids, and the variable x i The range of the variable y is divided into segments a, and the range of the variable y is divided into segments b, and the grid set G(x i ,y), traverse all grids and find the maximum mutual information value of the variables in the grid
[0050]
[0051] Among them, P|G is the division of the data set P under the grid G, F MIP|G is the mutual information value in the P|G case.
[0052] The maximum mutual information value in each grid is normalized to obtain a value in the range of (0,1), and the MIC coefficient value of the influencing factors and electricity price is taken as the maximum value. The calculation formula is:
[0053]
[0054] Where B is a variable, usually B(n)=n 0.6 .
[0055] The MIC coefficients of multidimensional features and historical electricity prices are arranged from large to small. According to the principle of setting the threshold of statistical correlation coefficient, variables with a MIC coefficient greater than 0.6 are selected as key influencing factors.
[0056] By calculating mutual information, we can find the factors with the strongest correlation with inter-provincial spot electricity prices, extract electricity price features, and remove the time series of factors with weak correlation in the original data set, and obtain the new data set D1:
[0057]
[0058] Where: m is the number of extracted electricity price features, x i (i=1,...,m) is the time series vector of the i-th influencing factor.
[0059] Hour, day of the week, month, season, and weekday features are extracted from the date type information and added to the dataset D1 as additional feature factors.
[0060] S3, build a dual-structure similar day screening model. Figure 2 As shown in the figure. The first layer uses the relative error method to screen the initial set of similar days. The second layer uses the weighted grey correlation method to further screen similar days to determine the similar day dataset D2 with similar characteristics to the day to be tested. The influencing factor dataset in D1 and the similar day dataset D2 are used as the feature branch dataset of the model input, which is recorded as D3. The implementation method is as follows:
[0061] Based on the relative error method, similar days are preliminarily screened, and the relative errors of the time values of the predicted day factors and the historical operation day factors are calculated.
[0062] Assume the factor matrix of the day to be tested is X a , each factor matrix of the historical running day set is X i , then the factor matrix is:
[0063]
[0064] Among them, m is the number of factors finally extracted by mutual information, X aj is the value at the jth moment of the day to be measured, X ijis the value of the i-th factor at the j-th moment, i = 1, 2, ...m, j = 1, 2, ...q.
[0065] Calculate the relative error between the factor matrix of the day to be tested and the factor matrix of the historical running day:
[0066]
[0067] Among them, μ(i,j) is the relative error between the value at the jth moment on the measured day and the value at the jth moment of the i-th factor.
[0068] The selection criteria for similar days for each indicator are:
[0069]
[0070] When all moments j of the i-th indicator satisfy the above formula, it means that the i-th indicator meets the similar day selection condition. The selection criteria are:
[0071]
[0072] Among them, mix(μ i ) is the relative error between the value of the i-th factor at any time on the day to be measured and the corresponding time.
[0073] When all indicators i satisfy the above formula, it indicates that the historical operating day can be used as the initial date data set for the second round of similar day screening.
[0074] Based on the weighted grey correlation method, similar days are selected twice. The correlation between each influencing factor and the inter-provincial spot electricity price is added to the screening process of similar days. The weight coefficient of each feature and electricity price is calculated based on the mutual information coefficient, and then the weighted sum and average are taken to obtain the weighted grey correlation.
[0075] The weight coefficient is calculated based on the MIC coefficient between each influencing factor and the inter-provincial spot electricity price. The specific steps are as follows:
[0076] The feature vectors of the test day and the historical operation day are constructed from the new data set D1 that has been screened by mutual information. The test day factors constitute the test day feature vector, and the historical operation day feature vectors constitute the historical feature vector set.
[0077] X a =[x a1 ,...,x ai ,...,x am ]
[0078] Among them, x ai is the i-th factor vector of the day to be tested.
[0079] Select s historical operating day feature vectors to form a historical feature vector set:
[0080] Ω={X1,...,X p ,...,X s},
[0081] X p =[x p1 ,...,x pi ,...,x pm ],p=1,2,...s
[0082] Among them, x pi is the i-th influencing factor vector on the p-th historical day, and s is the total number of historical days.
[0083] Taking the MIC coefficient of each influencing factor and electricity price as the weight factor, the weight coefficient of each feature in the similar day selection is calculated:
[0084]
[0085] The obtained weight vector is:
[0086] W=[ω1,ω2,...,ω m ]
[0087] The grey correlation analysis method is used to calculate the similarity of the i-th influencing factor between the test day and similar days. The calculation formula is:
[0088]
[0089] Among them, ε∈(0,1) is the resolution coefficient, which is generally set to 0.5.
[0090] Get the grey correlation coefficient matrix between the day and the day to be tested:
[0091] ξ j =[ξ j (1),ξ j (2),...,ξ j (m)]
[0092] Using the weight coefficient and the grey correlation coefficient matrix, the weighted sum and average are used to obtain the weighted grey correlation coefficient, and the weighted grey correlation degree between the historical day and the forecast day is calculated:
[0093]
[0094] The obtained weighted grey correlation coefficient is used as the similarity between the historical day and the test day. The coefficients are sorted from large to small, and the top-ranked dates are selected as the similar day screening results. The similar day data set D2 composed of the corresponding electricity prices and characteristics is used as the input data of the electricity price prediction model, recorded as D3.
[0095] S4, according to the CEEMD decomposition algorithm, decompose the pre-processed electricity price data in D1 into multiple subsequences with different features, which are used as the electricity price branch data set input to the model, denoised as D4, to achieve noise reduction and feature splitting of the electricity price signal. The CEEMD decomposition algorithm structure is as follows: Figure 3 As shown, the implementation method is as follows:
[0096] The CEEMD decomposition form can be expressed as:
[0097]
[0098] Where x(t) is the initial signal, IMF(t) is the intrinsic mode function component, r(t) is the residual, and k is the order.
[0099] By adding positive / negative random white noise to the same noise signal in the initial signal, a pair of mixed signals is obtained, as shown in the following formula:
[0100]
[0101] x i (t) is the i-th pair of initial signals, α is the noise intensity factor, ε i (t) is white noise.
[0102] For mixed signals and Perform empirical mode EMD decomposition and determine the intrinsic mode function components IMF and residuals according to the following formula:
[0103]
[0104] and The IMF numbers obtained from the decomposition may be inconsistent, so alignment is required. Shorter IMF sequences are padded with zeros and excess orders are discarded. The IMFs are first averaged within pairs and then averaged globally.
[0105] First, perform internal averaging on the same pair of noise (pair i), and the calculation formula is as follows:
[0106]
[0107] Then take the overall average of all noise pairs (i=i,2,...N):
[0108]
[0109] in, is the average component of the natural mode, and N is the set number of tests.
[0110] Similarly, perform EMD decomposition on the residuals of the i-th pair of experiments:
[0111]
[0112] First, perform internal averaging according to the following formula:
[0113]
[0114] Then all noise pairs (i=i,2,...N) are averaged as a whole, and the calculation formula is as follows:
[0115]
[0116] S5. Add attention mechanism to highlight the influence of important factors, use hybrid gray wolf optimization algorithm to optimize the parameters of BITCN-BIGRU model, and create HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model. The model structure is as follows: Figure 4 The model is trained using the training set of S1, and the model prediction performance is evaluated using the validation set of S1. The implementation method is as follows:
[0117] The multi-feature time series data of interprovincial spot electricity prices is first passed through a BITCN network using convolution operations to extract local features of the time series data. The BITCN output is then fed into a BIGRU network to capture long-term dependencies. An attention mechanism is then used to fuse spatial and temporal features. By calculating attention weights, the model focuses on important features before performing feature enhancement and fusion. Finally, a fully connected layer is used for high-precision prediction. A hybrid gray wolf optimization algorithm is used to optimize the parameters of the BITCN-BIGRU-Attention model. The HGWO-BITCN-BIGRU-Attention short-term electricity price forecasting model is created. This model is trained using the S1 training set, and its performance is evaluated using the S1 validation set.
[0118] S501: The electricity price subsequence obtained by CEEMD decomposition and the normalized feature sequence are input into the BITCN module, which is used to extract temporal spatial features. The Bidirectional Temporal Convolutional Network (BITCN) combines bidirectional temporal modeling with the Temporal Convolutional Network (TCN). By simultaneously capturing the forward and backward dependencies of the time series, the model improves its ability to understand the temporal context. The specific steps are as follows:
[0119] Based on causality, we ensure that the output of the current time step depends only on the current and historical inputs, and expand the receptive field through interval sampling. The formula is:
[0120]
[0121] Where d is the expansion coefficient, w kis the convolution kernel weight, and K is the convolution kernel size.
[0122] BITCN introduces bidirectional processing based on TCN, capturing temporal dependencies in different directions through forward TCN and backward TCN respectively:
[0123] Forward TCN: Process the original sequence X = [x1, x2, ..., x T ], output feature H forward .
[0124] Backward TCN: Processing the reversed sequence X reversed =[x T ,x T-1 ,...,x1], output feature H backward .
[0125] Align and merge the outputs from both directions:
[0126] in, It is the result of the reversed TCN output and is aligned with the forward feature. fuse is the fusion function.
[0127] Each BITCN layer usually contains residual connections to alleviate gradient disappearance:
[0128] Output=Activation(H bi +Shortcut(X))
[0129] Multiple BITCN layers are stacked to build a deep network, and the expansion factor of each layer increases exponentially.
[0130] For the inter-provincial spot electricity price input sequence X∈R T×D (T is the time step, D is the feature dimension), the output of BITCN is:
[0131]
[0132] S502. Use the BIGRU module to capture the forward and reverse information of long time series. The BIGRU module consists of a two-layer GRU network. The time series is propagated into the network training through the forward GRU layer to mine the forward correlation characteristics of the data; in the reverse GRU layer, the input sequence is trained through backpropagation to mine the reverse correlation of the data. BIGRU achieves bidirectional extraction of time series features through the fusion of two GRU layers, splicing the hidden states in the forward and reverse input sequences, and fully capturing the global time series relationship. The specific steps are as follows:
[0133] The single time step calculation of GRU is divided into the following steps:
[0134] Update gate - determines how much historical information to retain:
[0135] z t =σ(W z ·[h t-1 ,x t ])
[0136] Reset gate - determines how much historical information to discard:
[0137] r r =σ(W r ·[h t-1 ,x t ])
[0138] The reset gate is used to adjust the historical state and generate candidate hidden states:
[0139]
[0140] Where ⊙ represents element-wise multiplication.
[0141] The historical state and the candidate state are fused through the update gate:
[0142]
[0143] BIGRU consists of two independent GRU layers:
[0144] Forward GRU: Process the input sequence X = [x1, x2, ..., x T ], generate hidden state sequence
[0145] Backward GRU: Process the input sequence X in reverse order (t=T→1) reversed =[x T ,x T-1 ,...,x1], generating a hidden state sequence
[0146] The forward and backward hidden states are aligned and concatenated or added at each time step to form the final context-aware representation:
[0147]
[0148] in, is the state of the forward GRU at time step t; the output sequence of the backward GRU is reversed to align the time steps, is the state of the backward GRU at time step t; [;] represents vector concatenation, and the final state dimension is the sum of the forward and backward hidden dimensions.
[0149] For the input sequence X∈R T×D(T is the time step, D is the feature dimension):
[0150] Forward GRU:
[0151]
[0152] Backward GRU:
[0153]
[0154] Bidirectional output:
[0155]
[0156] S503, the Attention mechanism is used to establish an association between the BITCN and BIGRU outputs. By calculating the query, key, and value, different features are weighted according to the importance of different time steps, so that the model focuses more on important time steps to capture the feature information extracted by BITCN-BIGRU. The specific steps are as follows:
[0157] The data h calculated by the BITCN-BIGRU network i Input the attention mechanism layer and calculate the output S of the attention mechanism layer. The specific process is:
[0158] Calculate weight: For a given query and a set of keys, calculate the correlation score between the two;
[0159] e t =tanh(W h *h i +b h )
[0160] Normalization: Use the Softmax function to normalize the relevance score to obtain the key weight;
[0161]
[0162] Weighted summation: The final output vector is obtained according to the weighted sum value (Value);
[0163]
[0164] Where: W h and b h are the attention weight and bias respectively; e t Score attention; h i Characterized by t is the normalized attention weight; S is the output vector after the weight is assigned by the attention mechanism.
[0165] S504, sequence average pooling and fully connected layer module, uses sequence average pooling operation and fully connected layer to perform prediction, effectively mapping spatiotemporal features to the prediction result space;
[0166] S505: Introduce the differential evolution algorithm to optimize the hunting process of the gray wolf algorithm, establish the HGWO optimization algorithm, and use the HGWO parameter optimization module to globally optimize and iteratively update the parameters of the hybrid neural network. Specifically:
[0167] The chaotic sequence generated by Tent chaotic mapping is used to initialize the population, and the initial solution is distributed as evenly as possible in the solution space. The calculation process is as follows:
[0168]
[0169] Among them, k is the population number, I is the current iteration number, and to maintain the randomness of the algorithm initialization information, u is set to rand(0,1). Further generate the initial position sequence of gray wolf individuals in the search area:
[0170]
[0171] in, They are Lower and upper bounds for a sequence.
[0172] The differential evolution of the gray wolf population includes individual mutation, crossover, and selection, which can make up for the defect of the gray wolf algorithm that is prone to falling into local optimal solutions and improve the algorithm's global search ability. The individual mutation operation can be expressed as:
[0173]
[0174] Among them, V i (τ) is the i-th individual after mutation; is the unmutated i-th individual; M is the unscaled factor; τ is the number of iterations.
[0175] The calculation formula of the individual crossover process is as follows:
[0176]
[0177] in, is the j-th dimension variable in the final k-th individual; is the j-th dimension variable in the k-th individual after mutation; The j-th dimension variable in the k-th individual of the original dimension C CR is the crossover probability factor; d ' is the sample dimension.
[0178] In order to ensure the superiority of the population, selection operation is required. The calculation formula is as follows:
[0179]
[0180] S506 , training and adjusting parameters to obtain a trained short-term electricity price forecast model, inputting the data set of the test day to obtain the clearing electricity price forecast result of the test day, and obtaining an electricity price curve containing 96 time points.
[0181] S6. Input the test set obtained in step S1 into the short-term electricity price prediction model trained in S5 to obtain the prediction result of the inter-provincial spot electricity price.
[0182] Example 2:
[0183] An embodiment of the present invention further provides an inter-provincial spot electricity price forecasting device, comprising:
[0184] The first processing module is used to divide the electricity price forecast-related data obtained based on the inter-provincial spot electricity price formation mechanism into a training set, a test set and a validation set;
[0185] The second processing module is used to extract electricity price characteristics using the maximum mutual information coefficient method, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set;
[0186] The third processing module is used to construct a two-layer similar day screening model based on the new data set; the first layer uses the relative error method to screen the initial set of similar days, and the second layer uses the weighted grey correlation method to further screen similar days to determine the similar day data set with similar characteristics to the day to be tested;
[0187] The fourth processing module is used to decompose the similar day data set into multiple subsequences with different features according to the CEEMD decomposition algorithm, thereby achieving noise reduction and feature splitting of the electricity price signal;
[0188] The fifth processing module is used to optimize the parameters of the BITCN-BIGRU model using the attention mechanism and the hybrid gray wolf optimization algorithm based on the electricity price subsequence obtained by CEEMD decomposition and the normalized feature sequence, to create the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model, train the short-term electricity price prediction model using the training set, and evaluate the prediction performance of the short-term electricity price prediction model using the validation set;
[0189] The sixth processing module is used to input the test set into the trained short-term electricity price prediction model to obtain the prediction result of the inter-provincial spot electricity price.
[0190] As an implementation method of an embodiment of the present invention, the electricity price forecast data includes historical electricity price data, historical load data, fuel price, new energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
[0191] As an implementation method of an embodiment of the present invention, the second processing module is used to organize and unify the data set format of historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, and precipitation influencing factors. The inter-provincial spot electricity price is collected once every 15 minutes. The influencing factors in the boundary conditions with the same time dimension as the electricity price collection time are used as feature sequences, and the correlation between each boundary condition data and the historical electricity price, that is, the mutual information coefficient, is calculated. The mutual information coefficients of the multidimensional influencing factors and the historical electricity price are arranged from large to small, and variables with a mutual information coefficient greater than 0.6 are selected as key influencing factors; hour, day of the week, month, season, and weekday features are extracted from the date type information and added to the data set as additional feature factors to obtain new data.
[0192] Example 3:
[0193] The present invention also provides an inter-provincial spot electricity price forecasting system, comprising: a memory and a processor, wherein the memory stores a computer program run by the processor, and the computer program executes the inter-provincial spot electricity price forecasting method when run by the processor.
[0194] Example 4:
[0195] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is run, the inter-provincial spot electricity price forecasting method is executed.
[0196] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by persons skilled in the art should fall within the scope of protection defined by the claims of the present invention.
Claims
1. A method for predicting inter-provincial spot electricity prices, characterized in that: The following steps are involved: S1. Divide the electricity price forecast-related data obtained based on the inter-provincial spot electricity price formation mechanism into training set, test set and validation set, and pre-process the data for outliers and missing values; S2. Use the maximum mutual information coefficient method to extract electricity price characteristics, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set D1; S3. Based on dataset D1, a two-layer similar day screening model is constructed. The first layer uses the relative error method to screen the initial set of similar days. The second layer uses the weighted grey correlation method to further screen similar days to determine the similar day dataset D2 with similar characteristics to the test day. The influencing factor dataset in D1 and the similar day dataset D2 are combined as the feature branch dataset of the model input, recorded as D3. S4. Decompose the pre-processed electricity price data in D1 into multiple subsequences with different features according to the CEEMD decomposition algorithm. This subsequence is used as the electricity price branch data set for the model input, denoised as D4, to achieve noise reduction and feature splitting of the electricity price signal. S5. Based on the electricity price branch dataset D4 and the feature branch dataset D3, the attention mechanism and hybrid gray wolf optimization algorithm are used to optimize the parameters of the BITCN-BIGRU model, and the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model is created. The short-term electricity price prediction model is trained using the training set, and the prediction performance of the short-term electricity price prediction model is evaluated using the validation set. S6. Input the test set into the short-term electricity price prediction model trained in S5 to obtain the prediction results of inter-provincial spot electricity prices.
2. The inter-provincial spot electricity price forecasting method according to claim 1, characterized in that: In S1, the electricity price forecast data includes historical electricity price data, historical load data, fuel price, new energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
3. The inter-provincial spot electricity price forecasting method according to claim 2, characterized in that: The S2 is specifically as follows: collating and unifying the data set formats of historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, and precipitation influencing factors; collecting inter-provincial spot electricity prices at intervals of every 15 minutes; taking the influencing factors in the boundary conditions with the same time dimension as the electricity price collection as the feature sequence; calculating the correlation between each boundary condition data and the historical electricity price, i.e., the mutual information coefficient; arranging the mutual information coefficients of the multidimensional influencing factors and the historical electricity price from large to small; selecting variables with a mutual information coefficient greater than 0.6 as key influencing factors; extracting hour, day of the week, month, season, and weekday features from the date type information, and adding them to the data set as additional feature factors to obtain a new data set.
4. An inter-provincial spot electricity price forecasting device, characterized in that: include: The first processing module is used to divide the electricity price forecast-related data obtained based on the inter-provincial spot electricity price formation mechanism into a training set, a test set, and a validation set, and perform outlier and missing value preprocessing on the data; The second processing module is used to extract electricity price characteristics using the maximum mutual information coefficient method, determine the key influencing factors of electricity prices and their weight coefficients, eliminate factors with weak correlation, and construct a new data set D1; The third processing module is used to construct a two-layer similar day screening model based on the new dataset D1. The first layer uses the relative error method to screen the initial set of similar days. The second layer uses the weighted grey correlation method to further screen similar days to determine the similar day dataset D2 with similar characteristics to the day to be tested. The influencing factor dataset in D1 and the similar day dataset D2 are combined as the feature branch dataset of the model input, recorded as D3. The fourth processing module is used to decompose the pre-processed electricity price data in D1 into multiple subsequences with different features according to the CEEMD decomposition algorithm. These subsequences are used as the electricity price branch data set input to the model, denoised as D4, to achieve noise reduction and feature splitting of the electricity price signal. The fifth processing module is used for the electricity price branch dataset D4 and the feature branch dataset D3. It uses the attention mechanism and the hybrid gray wolf optimization algorithm to optimize the parameters of the BITCN-BIGRU model, creates the HGWO-BITCN-BIGRU-Attention short-term electricity price prediction model, trains the short-term electricity price prediction model using the training set, and uses the validation set to evaluate the prediction performance of the short-term electricity price prediction model; The sixth processing module is used to input the test set into the trained short-term electricity price prediction model to obtain the prediction result of the inter-provincial spot electricity price.
5. The inter-provincial spot electricity price forecasting device according to claim 4, characterized in that: Electricity price forecast data includes historical electricity price data, historical load data, fuel prices, renewable energy output, available transmission capacity of key channels, temperature, precipitation, and date type.
6. The inter-provincial spot electricity price forecasting device according to claim 5, characterized in that: The second processing module is used to organize and unify the data set format of historical electricity price data, historical load data, fuel prices, new energy output, available transmission capacity of key channels, temperature, and precipitation influencing factors. Inter-provincial spot electricity prices are collected every 15 minutes. The influencing factors in the boundary conditions with the same time dimension as the electricity price collection are used as feature sequences. The correlation between each boundary condition data and the historical electricity price, that is, the mutual information coefficient, is calculated. The mutual information coefficients of the multidimensional influencing factors and the historical electricity price are arranged from large to small, and variables with a mutual information coefficient greater than 0.6 are selected as key influencing factors; hour, day of the week, month, season, and weekday features are extracted from the date type information and added to the dataset as additional feature factors to obtain new data.
7. An inter-provincial spot electricity price forecasting system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the inter-provincial spot electricity price forecasting method according to any one of claims 1 to 3 is executed.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when running, executes the inter-provincial spot electricity price forecasting method according to any one of claims 1 to 3.