Short-term electricity price prediction method, device and system, and storage medium

Through the combination of VMD decomposition and CNN-BILSTM-Attention hybrid neural network, combined with the optimization parameters of the dung beetle algorithm, the poor accuracy and feature redundancy problems in short-term electricity price prediction are solved, and more accurate electricity price prediction is achieved.

CN120450751APending Publication Date: 2025-08-08NORTH CHINA GRID MEASUREMENT CENT +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510586446.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

When dealing with non-stationary and random electricity price sequences, existing short-term electricity price prediction methods have problems such as poor accuracy, redundancy in feature, difficulty in optimizing model parameters, and easy distortion in data processing, which is difficult to accurately reflect the complex volatility and non-stationary characteristics of electricity prices.

Method used

The VMD decomposition algorithm is used to decompose the electricity price sequence into multiple subsequences with different characteristics, and combine the CNN-BILSTM-Attention hybrid neural network and the dung beetle algorithm to search for global model parameters. It is iteratively updated through the DBO algorithm, and the key influencing factors are screened using Spearman correlation coefficient and PCA dimensionality reduction processing is performed to build a short-term electricity price prediction model.

Benefits of technology

It effectively reduces the complex non-stationarity and timing volatility in electricity price prediction, improves the accuracy of electricity price prediction and the generalization ability of the model, and solves problems such as feature redundancy and data processing volatile distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450751A_ABST
    Figure CN120450751A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term electricity price prediction method, device and system, and a storage medium. The method comprises the following steps: decomposing an original electricity price sequence into a plurality of subsequences with different characteristics by using VMD; constructing a CNN-BILSTM-Attention short-term electricity price prediction model, performing global optimization and iterative updating on model parameters by using a dung beetle algorithm, and outputting an optimal model; taking the subsequences obtained by VMD decomposition and the normalized electricity price influence factor sequence as model input, and outputting an electricity price prediction value of each subsequence; and carrying out reverse normalization on an output value, and carrying out reconstruction and superposition to obtain a final electricity price prediction result. By adopting the technical scheme of the invention, the problems of poor precision, characteristic redundancy, difficult model parameter optimization, easy data processing distortion and the like existing in short-term electricity price prediction are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electricity price forecasting, and in particular relates to a short-term electricity price forecasting method and device, system, and storage medium. Background Art

[0002] In the power market, electricity prices reflect the supply and demand relationship and serve as a crucial basis for market operations. They are crucial for the development of business strategies, risk mitigation, and economic efficiency for various market players, including power generation companies, power retailers, and power users. With the significant investment in various renewable energy power generation methods, the factors influencing electricity prices are increasing, and their impact varies. The influence of various factors, including market supply and demand, electricity costs, load, climate conditions, and seasons, has led to significant nonlinear and non-stationary characteristics in electricity prices, making accurate short-term electricity price forecasting extremely challenging. Electricity price forecasting technology urgently needs to address challenges such as time series fluctuations, feature redundancy, and data processing distortion in short-term electricity prices.

[0003] Existing short-term electricity price forecasting methods can be roughly divided into statistical forecasting models and artificial intelligence forecasting models. Statistical forecasting methods have better forecasting effects in stationary electricity price series, but for non-stationary and highly random electricity price series, the forecasting ability of statistical models is limited. Intelligent forecasting models have been widely used in spot electricity price forecasting, but a single model is often unable to accurately reflect the changing trends of the data due to limitations such as its own parameters, and is unable to accurately predict electricity price data and changes. Therefore, combined forecasting methods have attracted considerable attention. The core of the combined forecasting method is to enhance the ability to extract data features and reduce electricity price forecast errors by combining and superimposing multiple models. The results of multiple forecasting algorithms can be superimposed as the final forecast result, or the original data can be decomposed and modeled separately for forecasting.

[0004] However, the collinearity among the multi-dimensional influencing factors of electricity prices will have a significant impact on the model's prediction accuracy, and the intelligent prediction model tends to ignore the time correlation and time domain and frequency domain characteristics of time series data. Its ability to deal with the complex volatility and non-stationary characteristics of electricity prices is relatively limited, and it is difficult to further extract the implicit time series and characteristic information in the electricity price series. The accuracy of the electricity price prediction results is difficult to achieve a breakthrough improvement. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a short-term electricity price prediction method and device, system and storage medium.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A short-term electricity price forecasting method comprises the following steps:

[0008] S1. Obtain historical data on electricity spot prices and their influencing factors, perform preprocessing, use the Spearman correlation coefficient to screen out key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data;

[0009] S2, using VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics;

[0010] S3. Establish a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention according to the CNN-BILSTM-Attention hybrid neural network and the Dung Beetle algorithm. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm.

[0011] S4. The subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors are used as the input of the model, and the prediction results of each subsequence are output;

[0012] S5. Denormalize the model output and superimpose it to obtain the final short-term electricity price forecast value.

[0013] Preferably, the S3 includes:

[0014] S301, inputting the normalized electricity price subsequence and the normalized electricity price influencing factor sequence into a CNN convolutional layer, outputting the electricity price corresponding to the electricity price influencing factor data vector, and performing feature extraction on the data through a multi-pooling operation of the CNN convolutional layer;

[0015] S302: Input the feature-extracted training set data into the BILSTM network and the Attention layer for training.

[0016] S303, perform global optimization and iterative update of the hyperparameters of the hybrid neural network according to the DBO algorithm. As a preferred method, a CNN-BILSTM-Attention short-term electricity price prediction model is constructed, specifically including:

[0017] (1) The CNN convolutional layer identifies the local trend of electricity prices through local perception and automatically extracts the features of the data from low-level to high-level through multi-layer convolution and pooling operations;

[0018] (2) The BILSTM network is a forward LSTM used to extract the forward dependency features of the sequence and a reverse LSTM layer used to extract the backward dependency features of the sequence.

[0019] (3) The Attention mechanism is used to capture the information features of CNN feature convolution and BISLTM and beyond.

[0020] As a preferred method, the dung beetle algorithm is used to optimize the parameters of the CNN-BILSTM-Attention hybrid neural network, including:

[0021] A1. Initialize the population and randomly generate the initial position of each dung beetle;

[0022] A2. Define the fitness function as the prediction error and the inverse of the mean square error of the electricity price prediction model, and calculate the fitness of each dung beetle based on the objective function;

[0023] A3. The position of the mobile rolling ball population is updated based on 90% unobstructed and 10% obstructed;

[0024] A4. Calculate boundaries and update breeding population locations;

[0025] A5. Calculate the boundary and update the foraging population position;

[0026] A6. Update the location of the stealing population;

[0027] A7. Calculate the fitness based on the dung beetle's new position;

[0028] A8. Update the global optimal solution and the optimal solutions of the foraging population and the stealing population based on fitness;

[0029] A9. Iterate the dung beetle algorithm to obtain the optimal parameter combination for the short-term electricity price forecast model and complete the parameter optimization of the CNN-BILSTM-Attention hybrid neural network. The population solution is updated after each iteration until the fitness function converges.

[0030] Preferably, the position update target constraint expressions for the dung beetle's rolling behavior, dancing behavior, breeding behavior, foraging behavior, and stealing behavior are as follows:

[0031] The goal of dung beetle optimization is to find the dung beetle position with the minimum fit.

[0032]

[0033] Among them, (x1, x2) is the position coordinate of the dung beetle; fit is the fitness, which is used to evaluate the quality of the current position.

[0034] The present invention also provides a short-term electricity price forecasting device, comprising:

[0035] The first processing module is used to obtain historical data on electricity spot prices and their influencing factors, perform preprocessing, use the Spearman correlation coefficient to screen out key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data;

[0036] The second processing module uses the VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics;

[0037] The third processing module establishes a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention according to the CNN-BILSTM-Attention hybrid neural network and the Dung Beetle algorithm. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm.

[0038] The fourth processing module takes the subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors as the input of the model and outputs the prediction results of each subsequence;

[0039] In the fifth processing module, the model output is denormalized and superimposed to obtain the final short-term electricity price forecast value.

[0040] The present invention also provides a short-term electricity price prediction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a long-term electricity price prediction method when executed by the processor.

[0041] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the short-term electricity price prediction method when running.

[0042] The present invention uses VMD to decompose the original electricity price sequence into multiple subsequences with different features; constructs a CNN-BILSTM-Attention short-term electricity price prediction model, uses the dung beetle algorithm to globally optimize the model parameters and iteratively update them, and outputs the optimal model; uses the subsequences obtained by VMD decomposition and the normalized electricity price influencing factor sequence as model input, outputs the electricity price prediction value of each subsequence; denormalizes the output value, reconstructs and superimposes it, and obtains the final electricity price prediction result. The present invention processes the input of the model through variational mode decomposition, reducing the complex non-stationary and time series volatility of the original electricity price signal; constructs the main body of the CNN-BILSTM-Attention electricity price prediction model with feature integration-bidirectional memory-attention extraction, and uses the DBO algorithm to iteratively optimize the model hyperparameters, overcoming the problems that the combined model parameters are prone to falling into local optimality and the hyperparameter selection time is long. It can effectively deal with the problems of complex time series fluctuations, feature redundancy, and easy distortion of data processing in the electricity price prediction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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.

[0044] Figure 1 This is a flow chart of a method for short-term electricity price prediction according to an embodiment of the present invention;

[0045] Figure 2 A schematic diagram of the VMD decomposition model structure provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the structure of the CNN-BISLTM-Attention short-term electricity price prediction model provided by an embodiment of the present invention;

[0047] Figure 4 This is a flow chart of the DBO optimization algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] 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.

[0049] 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.

[0050] Example 1:

[0051] like Figure 1 As shown, an embodiment of the present invention provides a short-term electricity price forecasting method, comprising:

[0052] S1. Obtain short-term electricity prices and their influencing factors data, perform preprocessing, use the Spearman correlation coefficient to screen out the key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data. The short-term electricity prices and their influencing factors data include historical clearing electricity prices, electricity demand, electricity consumption, new energy power generation characteristics, power generation costs, maximum temperature, minimum temperature, precipitation, wind speed, sea level pressure, light intensity, etc. The implementation method is as follows:

[0053] S101. Use the interquartile range of the box plot to detect abnormal points in the short-term electricity price and influencing factor data, and perform linear filling. Use the moving median method to detect outliers and fill the outliers to clean the data.

[0054] S102, standardizing the electricity price-related series after correcting the abnormal values to eliminate errors caused by different dimensions in the prediction results;

[0055] S103, using forward filling and linear interpolation methods to identify and fill missing values in the standardized electricity price-related data;

[0056] S104, performing Spearman correlation calculation on the pre-processed electricity price and its influencing factor data, and retaining influencing factors with correlation coefficients greater than or equal to 0.5 as key factors affecting short-term electricity prices;

[0057] The Spearman correlation is used to screen the correlation between electricity prices and their influencing factors. The specific calculation expression is as follows:

[0058]

[0059] Among them, R(x) and R(y) are the ranks of x and y respectively; and Represent the average ranking respectively.

[0060] S105. Perform PCA dimensionality reduction on the key influencing factors screened by Spearman. The specific expression of PCA dimensionality reduction is as follows:

[0061] A1. Represent a dataset of n samples and m features as a matrix X∈R n×m First, each feature is normalized to have a mean of zero and a variance of one:

[0062]

[0063] A2. Use the covariance matrix C to describe the linear correlation between different features:

[0064]

[0065] A3. By performing eigenvalue decomposition on the covariance matrix C, we can obtain the eigenvalue λ i and the corresponding eigenvector v i The eigenvalue reflects the importance of the principal component represented by the corresponding eigenvector.

[0066] A4. Select the eigenvectors corresponding to the first k largest eigenvalues to form the projection matrix W:

[0067] W=[v1,v2,…,v k ]

[0068] A5. Project the original data onto the selected principal component to obtain the dimension-reduced data Y:

[0069] Y=X norm W

[0070] Here, μ is the mean of each feature and σ is the standard deviation.

[0071] S2. Use the VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics. The implementation method is as follows:

[0072] S201, performing denoising on the pre-processed electricity price related data;

[0073] S202: Divide the original data into a training set and a test set, and set the VMD decomposition parameters as follows:

[0074] The original data is divided into a training set and a test set according to the ratio of training set length to test set length = 7:1. The VMD decomposition parameters include the number of decompositions K and the penalty factor α. The VMD decomposition has K = 8 and α = 3000.

[0075] S203, using the variational mode decomposition (VMD) model to decompose and reduce noise on the electricity price data, and obtain a series of electricity price subsequences with different characteristics. Figure 2 As shown in the figure, variational mode decomposition (VMD) can decompose a complex signal into a set of sub-signals with specific frequency bands and bandwidths, minimizing the bandwidth of each modal signal and accurately extracting the useful signal from the noise signal. The specific implementation is as follows:

[0076] When VMD decomposes, the original electricity price signal is decomposed into several intrinsic mode functions (IMF s ), each modal function has a center frequency and bandwidth; let the kth modal component have a center frequency ω k Given the limited bandwidth of the power supply, VMD decomposes the signal in the frequency domain using a variational method to minimize the sum of the estimated bandwidths of each mode. The constraint is that the sum of all modes is equal to the input signal f, i.e., the original electricity price sequence. Using the Hilbert transform to analyze the electricity price signal, the constrained optimization expression of the VMD model can be transformed into:

[0077]

[0078] Where K is the total number of modes, u k (t) is the kth mode function, ω k is the center frequency of the kth mode, is the time derivative, δ(t) is the Dirac distribution, represents the convolution operation, ‖·‖2 represents the two-norm, and f is the original signal.

[0079] By introducing the Lagrange multiplication operator λ into the variational optimization model, the constrained variational problem can be transformed into an unconstrained variational problem. The calculation formula is as follows:

[0080]

[0081] Among them, {u k}={u1,u2,…,u k} represents the decomposed IMF; {ω k}={ω1,ω2,…,ω k} represents the center frequency of each component; α is the quadratic penalty factor; λ(t) is the Lagrange multiplication operator.

[0082] Use the alternating direction multiplier method to update u alternately k 、ω k The saddle point of λ and λ, the modal optimal solution is the iterative update formula of the saddle point as follows:

[0083]

[0084] The update formula of the Lagrange multiplication operator λ is as follows:

[0085]

[0086] Where n is the number of iterations; u k (t),ω k (t), the Fourier transform corresponding to λ(t); γ is the noise tolerance.

[0087] When the relative error is less than the convergence accuracy, VMD stops decomposition and obtains K IMF components. The stop decomposition constraint expression is as follows:

[0088]

[0089] S204: Normalize the sequence of factors influencing electricity prices, specifically:

[0090] The sequence of factors affecting electricity prices is mapped to the interval [0,1] using the maximum and minimum normalization method:

[0091]

[0092] Among them, y k represents the normalized result of the kth point of the subsequence, a k Indicates the influencing factor of the kth point in the subsequence, a max and a min are the maximum and minimum values of the influencing factors in the subsequence respectively.

[0093] S3, build a CNN-BILSTM-Attention hybrid neural network, such as Figure 3 As shown. According to the hybrid neural network and dung beetle optimization algorithm, a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention is established. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm. The features include: the CNN-BILSTM-Attention hybrid neural network is composed of a CNN feature extraction module, a BILSTM bidirectional memory module and an attention mechanism feature weighting module, and the dung beetle optimization algorithm is a DBO parameter optimization module; the electricity price subsequence input to the CNN feature extraction module is connected with the VMD decomposition and the BILSTM bidirectional memory module to extract features from the electricity price subsequence, and the extracted feature information is transmitted to the BILSTM. LSTM bidirectional memory module; the BILSTM bidirectional memory module is connected to the CNN feature extraction module and is used to perform bidirectional long-short-term memory sequence analysis on the feature information extracted by the CNN feature extraction module; the attention mechanism feature weighting module is connected to the BILSTM bidirectional memory module and is used to assign different weights to different time series features when the BILSTM bidirectional memory module performs bidirectional long-short-term memory sequence analysis; the DBO parameter optimization module is connected to the BILSTM bidirectional memory module and is used to perform global optimization and iterative update on the parameters of the CNN-BILSTM-Attention hybrid neural network to improve the model's accurate prediction of electricity price trends.

[0094] S301: The electricity price subsequence obtained by VMD decomposition and the normalized electricity price influencing factor sequence are input into the CNN feature extraction module. Specifically:

[0095] The electricity price subsequences obtained by VMD decomposition and the normalized electricity price influencing factor sequence are used as the input of CNN. The electricity price corresponding to the vector of electricity price influencing factor data is used as the output. The CNN model is trained to extract electricity price features.

[0096] The CNN model uses the ReLU activation function, a 1*1 pooling layer, two one-dimensional convolutional layers Conv1D with 64 convolution kernels, and the maximum number of pooling layers is set to 2 to reduce the data feature dimension.

[0097] S302: Input the features extracted by the CNN feature extraction module into the BILSTM bidirectional memory module, specifically:

[0098] The BILSTM bidirectional memory module consists of two LSTM layers: one is a forward LSTM layer, which is used to capture the information flow from the past to the present in the time series and extract the forward dependency features of the sequence; the other is a backward LSTM layer, which is used to capture the reverse information flow from the future to the present and extract the backward dependency features of the sequence.

[0099] The BILSTM neural network has two layers, a batch size of 128, and 64 neurons. It uses the Adam optimizer, a learning rate of 0.001, a Sigmoid function as the activation function, and a dropout layer of 2 to prevent overfitting and improve model generalization performance.

[0100] The calculation formulas for the hidden layer update states of the forward LSTM and reverse LSTM and the final output of the BiLSTM are as follows:

[0101] A i =f1(w1*x i +w2*A i-1 )

[0102] B i =f2(w3*x i +w5*B i+1 )

[0103] h i =αA i +βB i

[0104] y i =f3(w4*A i +w6*B i )=σ(h i )

[0105] Among them, A i 、B i Represents the hidden layer update state of the forward LSTM and the reverse LSTM respectively. The forward LSTM and the reverse LSTM are connected to the output layer together. i The output result is h i is the output of the BILSTM network after the weighted sum of the forward hidden layer and the backward hidden layer, α + β = 1, σ is the activation function, f1, f2, f3 are the activation functions between different layers, and w1 to w6 are shared weights.

[0106] S303: The attention mechanism feature weighting module assigns weights to the BILSTM bidirectional memory module sequence information, specifically:

[0107] The attention mechanism distributes the attention of the model to different time steps through dynamic weights, thereby improving the model’s ability to capture important information in electricity price forecasting. It is used to capture the information features after CNN feature convolution and BILSTM memory; the data h calculated by the BILSTM neural network is i Input the attention mechanism layer and calculate the output S of the attention mechanism layer. The specific process is:

[0108] Calculate weight: For a given query and a set of keys, calculate the correlation score between the two;

[0109] e t =tanh(W h *h i +b h )

[0110] Normalization: Use the Softmax function to normalize the relevance score to obtain the key weight;

[0111]

[0112] Weighted summation: The final output vector is obtained according to the weighted sum value (Value);

[0113]

[0114] 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.

[0115] S304, using the DBO parameter optimization module to globally optimize and iteratively update the parameters of the CNN-BILSTM-Attention hybrid neural network. By simulating the various behaviors of dung beetles, the algorithm can conduct a wide search in the solution space, preventing the model from falling into local optimality, thereby achieving the search for the global optimal solution. Figure 4 As shown, the DBO parameter optimization module uses the initial function to initialize the population, the boundary function to ensure that the parameters of the individual are within the defined boundaries, and the Calculate Fitness function to calculate the fitness of each individual in the population;

[0116] A1. Initialize the population and randomly generate the initial position of each dung beetle;

[0117] A2. Define the fitness function as the prediction error and the inverse of the mean square error of the electricity price prediction model, and calculate the fitness of each dung beetle based on the objective function;

[0118] A3. The position of the mobile rolling ball population is updated based on 90% unobstructed and 10% obstructed;

[0119] A4. Calculate boundaries and update breeding population locations;

[0120] A5. Calculate the boundary and update the foraging population position;

[0121] A6. Update the location of the stealing population;

[0122] A7. Calculate the fitness based on the dung beetle's new position;

[0123] A8. Update the global optimal solution and the optimal solutions of the foraging population and the stealing population based on fitness;

[0124] A9. Iterate the dung beetle algorithm to obtain the optimal parameter combination for the short-term electricity price forecast model and complete the parameter optimization of the CNN-BILSTM-Attention hybrid neural network. The population solution is updated after each iteration until the fitness function converges.

[0125] The method for updating the population position in the dung beetle algorithm is as follows:

[0126] (1) Rolling

[0127]

[0128] Where α is 1 or -1; k is a random number between (0, 0.2]; b is a constant between (0, 1); x worst is the global worst position of the dung beetle; Δx is the change in simulated light intensity.

[0129] (2) Dancing behavior

[0130]

[0131] [1, p1) dung beetles perform ball rolling or dancing behaviors with probability. The specific update formula is as follows:

[0132]

[0133] (3) Reproductive behavior

[0134] Lb * =max(X * ×(1-R),Lb)

[0135] Ub * =max(X * ×(1+R),Ub)

[0136]

[0137] Among them, Lb * and Ub * Represent the lower and upper bounds of spawning, X * is the current local optimal position, max iter is the maximum number of iterations. Lb and Ub represent the lower bound and upper bound of the optimization problem respectively. is the position information of the i-th egg ball at the t-th iteration, b1 and b2 are two independent random vectors of size 1×dim.

[0138] (4) Foraging behavior

[0139] Lb b =max(X b ×(1-R),Lb)

[0140] Ub b =max(X b ×(1+R),Ub)

[0141]

[0142] Among them, Lb b and Ub b They represent the lower and upper bounds of the optimal foraging area, respectively, and X b For all optimal positions, is the position information of the i-th dung beetle at the t-th iteration, C1 is a random number that obeys the normal distribution, and C2 is a random vector in the range of (0,1).

[0143] (5) Theft

[0144]

[0145] in, is the location information of the i-th dung beetle thief at the t-th iteration; S is a constant; g is a random vector of size 1×dim that obeys the normal distribution.

[0146] S4. The subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors are used as the input of the model, and the prediction results of each subsequence are output;

[0147] S401, inputting the subsequence after VMD decomposition into a short-term electricity price prediction model to train the short-term electricity price prediction model, wherein, during the training process, the parameters of the model are adjusted by iteratively optimizing the loss function;

[0148] S402 : Using the trained short-term electricity price prediction model, predict the electricity price subsequences respectively to obtain prediction results for each subsequence.

[0149] S5. Denormalize the model output and superimpose it to obtain the final short-term electricity price forecast value, which is:

[0150] The prediction results of the electricity price subsequence are denormalized, and the prediction results are reconstructed and superimposed to obtain the final electricity price prediction result. The denormalization expression is:

[0151] x″=(x max -x min )*x′+x min

[0152] Among them, x′ is the normalized data; x″ is the denormalized data; x0 is the original data; x max is the maximum value of the data; x min is the minimum value of the data.

[0153] The present invention first acquires and preprocesses data: short-term electricity prices and their influencing factors are collected, including historical clearing electricity prices, electricity demand, electricity consumption, renewable energy generation characteristics, power generation costs, maximum and minimum temperatures, precipitation, wind speed, sea level pressure, and light intensity. After detecting and correcting outliers and missing values in the acquired data, the data is normalized to eliminate potential errors introduced by different dimensions. Correlation analysis of the original influencing factors is performed using the Spearman coefficient to identify key factors influencing short-term electricity prices. Principal Component Analysis (PCA) dimensionality reduction and normalization are then performed. Data de-noising and decomposition are performed: VMD is used to extract key time series features of electricity prices. The electricity price subsequences derived from VMD decomposition and the normalized sequence of price influencing factors are input into a CNN convolutional layer for data feature extraction. The subsequences are then fed into a BILSTM for bidirectional detail memory. An attention mechanism further focuses on time steps. Optimization and output: The Determined Bypass (DBO) optimization algorithm is used to fine-tune the parameters of the short-term electricity price forecast model, performing a global optimization search and iterative update. The forecast model outputs short-term electricity price forecasts, taking into account all historical electricity price trends, time series fluctuations, and key influencing factors. The embodiments of the present invention are used to solve the problems of poor accuracy, feature redundancy, difficulty in optimizing model parameters, and easy distortion in data processing in short-term electricity price forecasting.

[0154] Example 2:

[0155] An embodiment of the present invention further provides a short-term electricity price prediction device, comprising:

[0156] The first processing module is used to obtain historical data on electricity spot prices and their influencing factors, perform preprocessing, use the Spearman correlation coefficient to screen out key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data;

[0157] The second processing module uses the VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics;

[0158] The third processing module establishes a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention according to the CNN-BILSTM-Attention hybrid neural network and the Dung Beetle algorithm. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm.

[0159] The fourth processing module takes the subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors as the input of the model and outputs the prediction results of each subsequence;

[0160] In the fifth processing module, the model output is denormalized and superimposed to obtain the final short-term electricity price forecast value.

[0161] Example 3:

[0162] The present invention also provides a short-term electricity price prediction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a long-term electricity price prediction method when executed by the processor.

[0163] Example 4:

[0164] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the short-term electricity price prediction method when running.

[0165] 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 short-term electricity price forecasting method, characterized in that: The following steps are involved: S1. Obtain historical data on electricity spot prices and their influencing factors, perform preprocessing, use the Spearman correlation coefficient to screen out key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data; S2, using VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics; S3. Establish a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention according to the CNN-BILSTM-Attention hybrid neural network and the Dung Beetle algorithm. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm. S4. The subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors are used as the input of the model, and the prediction results of each subsequence are output; S5. Denormalize the model output and superimpose it to obtain the final short-term electricity price forecast value.

2. The short-term electricity price forecasting method according to claim 1, characterized in that: The S3 includes: S301, inputting the normalized electricity price subsequence and the normalized electricity price influencing factor sequence into a CNN convolutional layer, outputting the electricity price corresponding to the electricity price influencing factor data vector, and performing feature extraction on the data through a multi-pooling operation of the CNN convolutional layer; S302: Input the feature-extracted training set data into the BILSTM network and the Attention layer for training. S303. Perform global optimization and iterative update on the hyperparameters of the hybrid neural network according to the DBO algorithm.

3. The short-term electricity price forecasting method according to claim 2, wherein: Construct a CNN-BILSTM-Attention short-term electricity price prediction model, which includes: (1) The CNN convolutional layer identifies the local trend of electricity prices through local perception and automatically extracts the features of the data from low-level to high-level through multi-layer convolution and pooling operations; (2) The BILSTM network is a forward LSTM used to extract the forward dependency features of the sequence and a reverse LSTM layer used to extract the backward dependency features of the sequence. (3) The Attention mechanism is used to capture the information features of CNN feature convolution and BISLTM and beyond.

4. The short-term electricity price forecasting method according to claim 3, characterized in that: The dung beetle algorithm is used to optimize the parameters of the CNN-BILSTM-Attention hybrid neural network, including: A1. Initialize the population and randomly generate the initial position of each dung beetle; A2. Define the fitness function as the prediction error and the inverse of the mean square error of the electricity price prediction model, and calculate the fitness of each dung beetle based on the objective function; A3. The position of the mobile rolling ball population is updated based on 90% unobstructed and 10% obstructed; A4. Calculate boundaries and update breeding population locations; A5. Calculate the boundary and update the foraging population position; A6. Update the location of the stealing population; A7. Calculate the fitness based on the dung beetle's new position; A8. Update the global optimal solution and the optimal solutions of the foraging population and the stealing population based on fitness; A9. Iterate the dung beetle algorithm to obtain the optimal parameter combination for the short-term electricity price forecast model and complete the parameter optimization of the CNN-BILSTM-Attention hybrid neural network. The population solution is updated after each iteration until the fitness function converges.

5. The short-term electricity price forecasting method according to claim 4, characterized in that: The position update target constraint expressions for the dung beetle's rolling behavior, dancing behavior, breeding behavior, foraging behavior, and stealing behavior are as follows: The goal of dung beetle optimization is to find the dung beetle position with the minimum fit. Among them, (x1, x2) is the position coordinate of the dung beetle; fit is the fitness, which is used to evaluate the quality of the current position.

6. A short-term electricity price forecasting device, characterized in that: include: The first processing module is used to obtain historical data on electricity spot prices and their influencing factors, perform preprocessing, use the Spearman correlation coefficient to screen out key influencing factors of electricity prices, and use PCA to reduce the dimensionality of the influencing factor data; The second processing module uses the VMD decomposition algorithm to decompose the original electricity price sequence into multiple subsequences with different characteristics; The third processing module establishes a short-term electricity price prediction model based on DBO-CNN-BILSTM-Attention according to the CNN-BILSTM-Attention hybrid neural network and the Dung Beetle algorithm. The hyperparameters in the model are iteratively optimized and updated according to the DBO algorithm. The fourth processing module takes the subsequences obtained by VMD decomposition and the normalized sequence of electricity price influencing factors as the input of the model and outputs the prediction results of each subsequence; In the fifth processing module, the model output is denormalized and superimposed to obtain the final short-term electricity price forecast value.

7. A short-term 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 long-cycle electricity price prediction method according to any one of claims 1 to 5 is executed.

8. A storage medium, characterized in that: The storage medium stores a computer program, which, when running, executes the short-term electricity price prediction method according to any one of claims 1 to 5.