Electricity price prediction method and device based on sparrow search depth hyper-parameter optimization, medium and product

Through the method based on the deep hyperparameter optimization of sparrow search, combined with empirical modal decomposition and core principal component analysis, a long-term and short-term memory network electricity price prediction model was constructed, which solved the problem of large errors in the existing electricity price prediction, and achieved more accurate and stable Electricity price forecast.

CN119323431APending Publication Date: 2025-01-17STATE GRID JIANGSU ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411343297.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The existing electricity price prediction methods have high prediction errors, especially in extreme electricity prices and infeasible electricity prices scenarios, which affect the operation of the electricity market and the decisions of market entities.

Method used

Using a method based on sparrow search depth hyperparameter optimization, the electric price feature sequence is extracted and dimensionalized by empirical modal decomposition and nuclear principal component analysis, and a electricity price prediction model is constructed in combination with long and short-term memory networks, which reduces the problem of gradient disappearance and explosion. Improved prediction accuracy.

Benefits of technology

It effectively reduces the electricity price prediction error and improves the accuracy and robustness of the electricity price prediction model, especially in extreme electricity price scenarios, providing stable prediction results to support the decision-making of market participants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323431A_ABST
    Figure CN119323431A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity price prediction method and device based on sparrow search depth hyper-parameter optimization, a medium and a product, and relates to the technical field of electricity price prediction, and the method comprises the steps: obtaining an original sequence set of a to-be-predicted electricity market; performing feature extraction on each original electricity price feature sequence by adopting empirical mode decomposition to obtain a sub-decomposition sequence set of the electricity market to be predicted; performing high-dimensional mapping and dimension reduction processing on each final decomposition sub-sequence by adopting kernel principal component analysis to obtain a dimension reduction sequence set of the electricity market to be predicted; inputting the dimensionality reduction sequence set of the to-be-predicted electricity market into the electricity price prediction model to obtain a predicted electricity price of the to-be-predicted electricity market; the electricity price prediction model is obtained by training an initial network by using a training set, the training set comprises a plurality of training dimension sequence sets and corresponding actual electricity prices, and the initial network is constructed based on a sparrow search algorithm and a long short-term memory network. According to the invention, the electricity price prediction error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electricity price prediction, and in particular to an electricity price prediction method, device, medium and product based on deep hyperparameter optimization of sparrow search. Background Art

[0002] In the electricity market, accurate prediction of electricity spot clearing prices is crucial for market participants to make correct decisions. The electricity spot market clearing price directly reflects the spatiotemporal value of electricity as a commodity. Compared with the medium- and long-term market prices of electricity, the electricity spot market price is more real-time and accurate, which is of great significance to power dispatching. Since the electricity spot market price helps to understand the congestion of transmission lines, regulators can use electricity price forecasting technology to gain insight into short-term price dynamics, assess market feasibility, and establish appropriate price ranges. In order to make decisions that are beneficial to the development of the enterprise in the electricity market, power generation companies or power sales companies mostly rely on electricity price forecasting models to predict short-term electricity prices. In summary, electricity price forecasting research helps to make correct decisions in power generation or consumption, and assists regulators in understanding and managing market dynamics.

[0003] At present, the research on electricity price forecasting mainly focuses on two methods: one is to indirectly predict electricity prices by establishing a market simulation model, and the other is to directly predict using data-driven machine learning technology. The simulation-based electricity price forecasting method predicts the market clearing price by considering the power system structure and related constraints. This method requires the establishment of a power system model to simulate the interaction between various power generation entities and power consumption entities in the power market. The simulation-based electricity price forecasting method requires the data of the power system to be extremely accurate. However, the power system in the real market is complex, and factors such as load, power generation, line conditions, and power consumption are changing rapidly. In addition, electricity cannot be stored, and real-time supply and demand balance must be maintained under transient conditions, resulting in large fluctuations in the electricity price series. It is challenging to accurately reflect the daily spot market electricity price dynamics through market simulation modeling forecasts, which hinders their practical application in production decisions. Therefore, recent research has focused on developing short-term electricity price forecasting models, especially electricity price forecasts involving scenarios of "extreme electricity prices" and "unfeasible electricity prices". However, the impact of these two types of electricity prices on the operation of the power market and the decision-making of market entities has been ignored, resulting in high prediction errors in existing electricity price forecasting methods. Summary of the invention

[0004] The purpose of this application is to provide an electricity price prediction method, device, medium and product based on deep hyperparameter optimization of sparrow search to solve the problem of high prediction error of some electricity price prediction methods.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an electricity price prediction method based on deep hyperparameter optimization of sparrow search, comprising:

[0007] Acquire an original sequence set of the power market to be predicted; the original sequence set includes: multiple groups of original electricity price feature sequences;

[0008] Using empirical mode decomposition, feature extraction is performed on each of the original electricity price feature sequences to obtain a sub-decomposition sequence set of the electricity market to be predicted; the decomposition sequence set includes: a final decomposition sub-sequence corresponding to each of the original electricity price feature sequences;

[0009] Using kernel principal component analysis, high-dimensional mapping and dimensionality reduction processing are performed on each of the final decomposition subsequences to obtain a set of reduced-dimensional sequences of the power market to be predicted; the set of reduced-dimensional sequences includes: reduced-dimensional electricity price feature sequences corresponding to each of the final decomposition subsequences;

[0010] The reduced-dimensional sequence set of the power market to be predicted is input into the electricity price prediction model to obtain the predicted electricity price of the power market to be predicted; the electricity price prediction model is obtained by training an initial network using a training set, and the training set includes: multiple training-dimensional sequence sets and corresponding actual electricity prices, and the initial network is constructed based on a sparrow search algorithm and a long short-term memory network.

[0011] Optionally, empirical mode decomposition is used to extract features from each of the original electricity price feature sequences to obtain a set of sub-decomposition sequences of the electricity market to be predicted, including:

[0012] Determine any of the original electricity price characteristic sequences as the current original electricity price characteristic sequence;

[0013] Add multiple groups of Gaussian white noise sequences to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences;

[0014] Performing Hilbert transform on each of the disturbance signal sequences respectively to obtain multiple groups of analyzed signal sequences;

[0015] Performing empirical mode decomposition on each of the analyzed signal sequences to obtain multiple groups of initial decomposition subsequences;

[0016] All the initial decomposition subsequences are averaged and integrated to obtain a final decomposition subsequence corresponding to the current original electricity price characteristic sequence.

[0017] Optionally, multiple groups of Gaussian white noise sequences are added to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences, including:

[0018] Using the white noise addition formula, multiple groups of Gaussian white noise sequences are added to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences; the white noise addition formula is:

[0019] Z i_n (t) = x i (t)+h n (t);

[0020] Among them, Z i _n(t) is the disturbance signal sequence after adding the nth group of Gaussian white noise sequence to the i-th group of original electricity price characteristic sequence; t is the time; x i (t) is the characteristic sequence of the original electricity price of the i-th group; h n (t) is the nth group of Gaussian white noise sequence.

[0021] Optionally, Hilbert transform is performed on each of the disturbance signal sequences to obtain multiple groups of analyzed signal sequences, including:

[0022] Using the Hilbert transform formula, each disturbance signal sequence is subjected to Hilbert transform to obtain multiple groups of analyzed signal sequences; the Hilbert transform formula is:

[0023] Z_h i_n (t) = Z i_n (t)+jH[Z i_n (t)];

[0024] Among them, Z_h i_n (t) is the value of Z i_n (t) The analyzed signal sequence obtained by Hilbert transform; j is an imaginary unit; H[·] is the Hilbert transform.

[0025] Optionally, empirical mode decomposition is performed on each of the analyzed signal sequences to obtain multiple groups of initial decomposition subsequences, including:

[0026] Using the empirical mode decomposition formula, each of the analyzed signal sequences is subjected to empirical mode decomposition to obtain multiple groups of initial decomposition subsequences; the empirical mode decomposition formula is:

[0027]

[0028] Where, P is the total number of iterations; For Z_h i_n (t) the initial decomposition subsequence under the pth iteration of the empirical mode decomposition; r i_n (t) is the value of Z_h i_n (t) Residual after empirical mode decomposition.

[0029] Optionally, all the initial decomposition subsequences are averaged and integrated to obtain a final decomposition subsequence corresponding to the current original electricity price characteristic sequence, including:

[0030] By using the average product formula, all the initial decomposition subsequences are averagely integrated to obtain the final decomposition subsequence corresponding to the current original electricity price characteristic sequence; the average product formula is:

[0031]

[0032] in, is the final decomposed subsequence corresponding to the i-th group of original electricity price feature sequence; N is the total number of Gaussian white noise sequences.

[0033] Optionally, high-dimensional mapping and dimensionality reduction processing are performed on each of the final decomposed subsequences to obtain a set of dimensionality reduction sequences of the power market to be predicted, including:

[0034] Determine any final decomposition subsequence as the current final decomposition subsequence;

[0035] Mapping the current final decomposition subsequence to a high-dimensional space using a mapping function to obtain a current feature space covariance matrix;

[0036] The eigenvalues ​​of the current feature space covariance matrix are determined, and the reduced-dimensional electricity price feature sequence corresponding to the current final decomposition subsequence is determined based on the eigenvalues ​​of the current feature space covariance matrix.

[0037] In a second aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned methods for electricity price prediction based on deep hyperparameter optimization of sparrow search.

[0038] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for electricity price prediction based on deep hyperparameter optimization of sparrow search.

[0039] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for electricity price prediction based on deep hyperparameter optimization of sparrow search.

[0040] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0041] The present application discloses an electricity price prediction method, device, medium and product based on deep hyperparameter optimization of sparrow search. First, the original sequence set of the electricity market to be predicted is obtained; the original sequence set includes: multiple groups of original electricity price feature sequences; secondly, empirical mode decomposition is used to extract features from each original electricity price feature sequence to obtain a sub-decomposition sequence set of the electricity market to be predicted; the decomposition sequence set includes: the final decomposition subsequence corresponding to each original electricity price feature sequence; then, kernel principal component analysis is used to perform high-dimensional mapping and dimensionality reduction processing on each final decomposition subsequence to obtain a reduced dimensionality sequence set of the electricity market to be predicted; the reduced dimensionality sequence set includes: the reduced dimensionality electricity price feature sequence corresponding to each final decomposition subsequence; finally, the reduced dimensionality sequence set of the electricity market to be predicted is input into the electricity price prediction model to obtain the predicted electricity price of the electricity market to be predicted; the electricity price prediction model is obtained by training the initial network using a training set, the training set includes: multiple training dimensional sequence sets and corresponding actual electricity prices, and the initial network is constructed based on the sparrow search algorithm and the long short-term memory network. The present application combines the empirical modal decomposition (EEMD) with the kernel principal component analysis (KPCA) to achieve efficient removal of redundancy of the original electricity price feature sequence and improve the purity of the reduced dimensionality sequence set. The electricity price prediction model is determined based on the initial network constructed by the Sparrow Search Algorithm (SSA) and the Long Short-Term Memory (LSTM), which avoids problems such as gradient disappearance and explosion and reduces the electricity price prediction error. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0043] Figure 1 A schematic diagram of a flow chart of an electricity price prediction method based on deep hyperparameter optimization of sparrow search provided in an embodiment of the present application;

[0044] Figure 2 This is a schematic diagram of the implementation principle of electricity price prediction based on deep hyperparameter optimization of sparrow search;

[0045] Figure 3 This is a schematic diagram of the long short-term memory network framework;

[0046] Figure 4 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] The purpose of this application is to provide an electricity price prediction method, device, medium and product based on deep hyperparameter optimization of sparrow search, aiming to reduce the error of electricity price prediction.

[0049] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0050] In an exemplary embodiment, Figure 1 and Figure 2 As shown, the electricity price prediction method based on deep hyperparameter optimization of sparrow search in this embodiment includes:

[0051] Step 1: Obtain the original sequence set of the power market to be predicted.

[0052] The original sequence set includes: multiple groups of original electricity price feature sequences.

[0053] Specifically, the original sequence set X is expressed as: X = [x1(t), x2(t), ..., x M (t)], where x1(t) is the first group of original electricity price characteristic sequence; x2(t) is the second group of original electricity price characteristic sequence; M (t) is the original electricity price feature sequence of the Mth group. The original sequence set X corresponds to Figure 2 Feature 1-Feature M in.

[0054] Step 2: Use empirical mode decomposition to extract features from each original electricity price feature sequence and obtain a set of sub-decomposition sequences for the electricity market to be predicted.

[0055] The decomposition sequence set includes: the final decomposition subsequences corresponding to each original electricity price feature sequence.

[0056] Specifically, in order to extract the subsequences of the electricity price feature sequence that are significantly related to seasonality and to achieve efficient cleaning of redundant feature sequences, it is necessary to perform feature extraction on each original electricity price feature sequence.

[0057] As an optional implementation, step 2 includes:

[0058] Step 21: Determine any original electricity price characteristic sequence as the current original electricity price characteristic sequence.

[0059] Step 22: Add multiple groups of Gaussian white noise sequences to the current original electricity price feature sequence to obtain multiple groups of disturbance signal sequences.

[0060] As an optional implementation, step 22 includes:

[0061] Using the white noise addition formula, multiple groups of Gaussian white noise sequences are added to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences; the white noise addition formula is:

[0062] Z i_n (t) = x i (t)+h n (t) (1)

[0063] Among them, Z i_n (t) is the disturbance signal sequence after adding the nth group of Gaussian white noise sequence to the i-th group of original electricity price feature sequence; t is the time; x i (t) is the characteristic sequence of the original electricity price of the i-th group; h n (t) is the nth group of Gaussian white noise sequence.

[0064] Specifically, by adding Gaussian white noise sequences of different sequences, the three problems of uneven distribution of extreme points of the original electricity price characteristic sequence are solved, and the missing scale in the original electricity price characteristic sequence is supplemented.

[0065] Step 23: Perform Hilbert transform on each disturbance signal sequence respectively to obtain multiple groups of analyzed signal sequences.

[0066] As an optional implementation, step 23 includes:

[0067] Using the Hilbert transform formula, each disturbance signal sequence is subjected to Hilbert transform to obtain multiple groups of analyzed signal sequences; the Hilbert transform formula is:

[0068] Z_h i_n (t) = Z i_n (t)+jH[Z i_n (t)] (2)

[0069] Among them, Z_h i_n (t) is the value of Z i_n (t) The analyzed signal sequence obtained by Hilbert transform; j is an imaginary unit; H[·] is the Hilbert transform.

[0070] Step 24: Perform empirical mode decomposition on each analyzed signal sequence to obtain multiple groups of initial decomposition subsequences.

[0071] As an optional implementation, step 24 includes:

[0072] Using the empirical mode decomposition formula, each analyzed signal sequence is subjected to empirical mode decomposition to obtain multiple groups of initial decomposition subsequences; the empirical mode decomposition formula is:

[0073]

[0074] Where, P is the total number of iterations; For Z_h i_n (t) the initial decomposition subsequence under the pth iteration of the empirical mode decomposition; r i_n (t) is the value of Z_h i_n (t) Residual after empirical mode decomposition.

[0075] Step 25: Perform average integration on all initial decomposition subsequences to obtain the final decomposition subsequence corresponding to the current original electricity price feature sequence.

[0076] As an optional implementation, step 25 includes:

[0077] Using the average product formula, all initial decomposition subsequences are averaged and integrated to obtain the final decomposition subsequence corresponding to the current original electricity price characteristic sequence; the average product formula is:

[0078]

[0079] in, is the final decomposed subsequence corresponding to the i-th group of original electricity price feature sequence; N is the total number of Gaussian white noise sequences.

[0080] Specifically, the sub-decomposition sequence set Y of the power market to be predicted is recorded as: Y = [y1, y2, ..., y M ].

[0081] in, represents the final decomposed subsequence corresponding to the first group of original electricity price feature sequences; represents the final decomposed subsequence corresponding to the second group of original electricity price feature sequence; Represents the final decomposition subsequence corresponding to the Mth group of original electricity price feature sequences.

[0082] Step 3: Use kernel principal component analysis to perform high-dimensional mapping and dimensionality reduction processing on each final decomposed subsequence to obtain a set of reduced-dimensional sequences for the power market to be predicted.

[0083] The dimension reduction sequence set includes: the dimension reduction electricity price feature sequence corresponding to each final decomposition subsequence.

[0084] Specifically, since each original electricity price feature sequence in the original sequence set has a certain degree of multivariate correlation and nonlinearity, problems such as data redundancy and noise will occur when performing empirical mode decomposition. Due to the nonlinear characteristics of each original electricity price feature sequence, the performance of traditional dimensionality reduction methods is poor.

[0085] Therefore, the kernel function is introduced to process the data cleaning and dimensionality reduction of the electricity price feature subsequence. Due to the nonlinear characteristics of the electricity price feature subsequence, the performance of the traditional dimensionality reduction method is poor. Therefore, the kernel function is introduced to process the data cleaning and dimensionality reduction of the electricity price feature subsequence.

[0086] As an optional implementation, step 3 includes:

[0087] Step 31: Determine any final decomposition subsequence as the current final decomposition subsequence.

[0088] Step 32: Use a mapping function to map the current final decomposition subsequence to a high-dimensional space to obtain the current feature space covariance matrix.

[0089] Specifically, firstly, the decomposed i-th sequence yi is mapped to a high-dimensional space using a mapping function, as shown in equations (5) to (7):

[0090]

[0091]

[0092] λ i ξ i =Cξ i (7)

[0093] in, for y i The mapping function of T is the transpose; λ i is the eigenvalue of matrix C; ξ i is i The corresponding feature vector.

[0094] Based on equations (5) to (7), a kernel matrix is ​​introduced to assist in calculating the feature space covariance matrix. The final decomposed subsequence is mapped to a high-dimensional space through the kernel function, as shown in equations (8) to (9).

[0095]

[0096]

[0097] The eigenvector ξ of the feature space covariance matrix is ​​obtained from formula (10):

[0098]

[0099] Among them, K i for y i The corresponding kernel matrix; is the eigenvalue of the kernel matrix K; α i is the eigenvalue The corresponding eigenvector, yes The corresponding k-th coefficient.

[0100] Step 33: Determine the eigenvalues ​​of the current feature space covariance matrix, and determine the reduced-dimensionality electricity price feature sequence corresponding to the current final decomposition subsequence based on the eigenvalues ​​of the current feature space covariance matrix.

[0101] Specifically, the dimensionality reduction sorting process is carried out to better retain the local structural information and effectively realize the dimensionality reduction processing of nonlinear structured data, so as to better capture the complex relationship between the data. Sort them, calculate the cumulative contribution rate, and finally get the dimensionality reduction electricity price feature sequence corresponding to yi:

[0102]

[0103] Among them, P i (y) is y i The corresponding reduced-dimensional electricity price feature sequence.

[0104] Each reduced-dimensionality electricity price feature sequence constitutes a reduced-dimensionality sequence set: D = {P1(y), P2(y), ..., P M (y)}, while retaining the original information, reducing redundancy, thus playing a role in denoising. Among them, P1(y) is the dimensionality-reduced electricity price feature sequence corresponding to y1; P2(y) is the dimensionality-reduced electricity price feature sequence corresponding to y1; P M (y) is y M The corresponding reduced-dimensional electricity price feature sequence.

[0105] Step 4: Input the reduced-dimensional sequence set of the power market to be predicted into the electricity price prediction model to obtain the predicted electricity price of the power market to be predicted.

[0106] Among them, the electricity price prediction model is obtained by training the initial network using the training set. The training set includes: multiple training dimensional sequence sets and corresponding actual electricity prices. The initial network is constructed based on the sparrow search algorithm and the long short-term memory network.

[0107] Specifically, the sparrow search algorithm is an intelligent optimization algorithm inspired by the foraging and anti-predation dynamic behaviors of sparrow populations. Currently, commonly used optimization search algorithms include particle swarm optimization (PSO) and grey wolf optimization (GWO). However, compared with advanced algorithms such as PSO and GWO, the sparrow search algorithm has advantages in speed preference and stability.

[0108] Considering the accuracy advantage of LSTM for time series prediction and the potential problems of gradient explosion and gradient vanishing, this application chooses to combine SSA with LSTM as the initial network. This application uses SSA to optimally adjust the optimal number of hidden units, model training times and initial learning rate of LSTM.

[0109] The number of sparrows initialized corresponds to the number of hyperparameters required for optimization, such as the number of optimal hidden units, the number of model training times, etc. In addition, the parameter settings of various types of parameters required by the sparrow search algorithm, such as the number of iterations, the number of guards who perceive danger, etc., are also determined. In the population, they are mainly divided into finders, followers, and the remaining guards who play a major role in foraging. In the process of searching for food, the mathematical formula for updating the finder's position is shown in Equation (12).

[0110]

[0111] in, is the position of the jth sparrow in the g+1th generation population in the dth dimension; is the position of the j-th sparrow in the g-th generation population in the d-th dimension; exp[·] is an exponential function; α is a random number between (0, 1]; T1 is the maximum number of iterations; R2 is the warning value; ST is the safety value; f is a random number that follows a standard normal distribution; L is a matrix with j rows and d columns and each element is 1.

[0112] The abstract expression of the follower position update is shown in formula (12).

[0113]

[0114] in, is the worst position of each sparrow in the g-th generation population in the d-th dimension; is the optimal position of each sparrow in the g+1 generation population in the dth dimension; A + is the random coefficient; I is the total number of sparrows in the population.

[0115] when When the discoverer stops, it means that the followers are no longer eligible to compete with the discoverer for food and need to look for other areas.

[0116] when When , followers will forage near the optimal individual.

[0117] The expression for updating the guards is shown in formula (14).

[0118]

[0119] in, is the global optimal position of each sparrow in the g-th generation population in the d-th dimension; β is the step control parameter; f j is the fitness of the jth sparrow; f c is the optimal fitness of the game; M is a random number between [-1, 1]; f w is the global worst fitness; δ is a constant. The discoverer and follower will search for resources and adjust their positions according to equations (13) and (14) until the maximum number of iterations to find the global optimal solution is reached.

[0120] LSTM is based on Recurrent Neural Network (RNN), which is a data-driven prediction algorithm with higher accuracy and the ability to consider global factors. Figure 3 shown.

[0121] Figure 3 At time tt, the storage unit receives the input signal x at time tt. tt and the hidden state information h at time tt-1 tt-1 , and use equations (15)-(17) to calculate the forget gate f at time tt tt , input gate i tt and output gate o tt :

[0122] f tt =σ(W xf x tt +W hf h tt-1 +W cf c tt-1 +b f ) (15)

[0123] i tt =σ(W xi x tt +W hi h tt-1 +W ci c tt-1 +b i ) (16)

[0124] o tt =σ(W xox tt +W ho h tt-1 +W co c tt-1 +b o ) (17)

[0125] Among them, σ() is the sigmoid activation function; W xf For x tt Corresponding to the forget gate f tt The weight coefficient matrix of hf h tt-1 Corresponding to the forget gate f tt The weight coefficient matrix of cf c tt-1 Corresponding to the forget gate f tt The weight coefficient matrix of tt-1 is the updated unit state at time tt-1; b f is the bias term corresponding to the forget gate; W xi For x tt Corresponding to input gate i tt The weight coefficient matrix of hi h tt-1 Corresponding to input gate i tt The weight coefficient matrix of ci c tt-1 Corresponding to input gate i tt The weight coefficient matrix of i is the bias term corresponding to the input gate; W xo For x tt Corresponding to the output gate o tt The weight coefficient matrix of ho h tt-1 Corresponding to the output gate o tt The weight coefficient matrix of co c tt-1 Corresponding to the output gate o tt The weight coefficient matrix of o is the bias term corresponding to the output gate.

[0126] Forget Gate tt Used to select a certain level of information to be retained by reading information from the previous section of the unit. Its value is in the range of [0, 1], where 0 means complete forgetting and 1 means complete retention.

[0127] Input Gate i tt For using the forget gate f tt Complete the update of the unit status.

[0128] Output gate o tt Used to determine the final state.

[0129] Then, according to formula (18), the information update unit state is obtained:

[0130]

[0131] Among them, C tt is the updated unit state at time tt, is the candidate unit state at time tt, as shown in formula (19):

[0132]

[0133] Among them, tanh() is the hyperbolic tangent activation function; W xc and W hc is the weight coefficient matrix corresponding to the unit state; b c is the bias term corresponding to the unit state.

[0134] Finally, after determining C tt After that, calculate the updated unit hidden state h tt , as shown in formula (20):

[0135] h tt =o tt tanh(C tt ) (20)

[0136] The training dimension sequence set, the corresponding actual electricity price and the parameters to be optimized are input into the initial network. The initial network is optimized using the sparrow search optimization algorithm to optimize the parameters to be optimized. After the optimization process is completed, the optimized parameters are reintroduced to construct the optimal LSTM network and obtain the electricity price prediction model.

[0137] In this application, EEMD and KPCA are combined. By introducing white noise and performing multiple averaging during the decomposition process, the problem of modal aliasing in the decomposition of complex electricity price feature sequences is solved. Compared with the EMD and VMD methods, the proposed method has better superiority. By introducing the kernel function, the decomposition set of the original feature sequence that may have high correlation is mapped from the low-dimensional space to the high-dimensional space for dimensionality reduction and cleaning. This process effectively removes redundant feature sequences, thereby improving the purity of the data set. Finally, the LSTM is used to predict electricity prices using a hyperparameter optimization model based on the sparrow search algorithm. The sparrow optimization algorithm is used to optimize various hyperparameters of the prediction algorithm to avoid problems such as gradient vanishing and explosion. In addition, the ability of the LSTM algorithm to consider global features improves the accuracy and robustness of the prediction results. The main advantages are as follows:

[0138] (1) The electricity price prediction model based on the sparrow search algorithm and LSTM proposed in this application effectively cleans up and reduces the feature sequence. Compared with the traditional model, the model can effectively extract regular features from highly correlated electricity price feature sequences during the modeling process. By removing redundant and interfering information, the model significantly improves the prediction accuracy of the electricity price prediction model.

[0139] (2) KPCA is conducive to the analysis of nonlinear data. It can identify the subsequences that contribute most to the prediction of electricity price series, thereby improving the efficiency of feature sorting and future trend prediction.

[0140] (3) The experimental results show that the electricity price forecasting model has good stability and can accurately capture the electricity price trend. When the electricity price is relatively stable, the electricity price forecasting model has a high forecasting accuracy. In addition, when extreme electricity prices occur, the electricity price forecasting model provides relatively stable EPF results, which is valuable for the decision-making of market participants.

[0141] In an exemplary embodiment, a computer device is provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an electricity price prediction method based on deep hyperparameter optimization of sparrow search.

[0142] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, an electricity price prediction method based on deep hyperparameter optimization of sparrow search is implemented.

[0143] In an exemplary embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements an electricity price prediction method based on deep hyperparameter optimization of sparrow search.

[0144] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for predicting electricity prices based on deep hyperparameter optimization of sparrow search is implemented.

[0145] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0146] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0147] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0148] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0150] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for predicting electricity prices based on deep hyperparameter optimization of sparrow search, characterized in that: The electricity price prediction method based on deep hyperparameter optimization of sparrow search includes: Acquire an original sequence set of the power market to be predicted; the original sequence set includes: multiple groups of original electricity price feature sequences; Using empirical mode decomposition, feature extraction is performed on each of the original electricity price feature sequences to obtain a sub-decomposition sequence set of the electricity market to be predicted; the decomposition sequence set includes: a final decomposition sub-sequence corresponding to each of the original electricity price feature sequences; Using kernel principal component analysis, high-dimensional mapping and dimensionality reduction processing are performed on each of the final decomposition subsequences to obtain a set of reduced-dimensional sequences of the power market to be predicted; the set of reduced-dimensional sequences includes: reduced-dimensional electricity price feature sequences corresponding to each of the final decomposition subsequences; The reduced-dimensional sequence set of the power market to be predicted is input into the electricity price prediction model to obtain the predicted electricity price of the power market to be predicted; the electricity price prediction model is obtained by training an initial network using a training set, and the training set includes: multiple training-dimensional sequence sets and corresponding actual electricity prices, and the initial network is constructed based on a sparrow search algorithm and a long short-term memory network.

2. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 1 is characterized in that: By using empirical mode decomposition, feature extraction is performed on each of the original electricity price feature sequences to obtain a set of sub-decomposition sequences of the electricity market to be predicted, including: Determine any of the original electricity price characteristic sequences as the current original electricity price characteristic sequence; Add multiple groups of Gaussian white noise sequences to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences; Performing Hilbert transform on each of the disturbance signal sequences respectively to obtain multiple groups of analyzed signal sequences; Performing empirical mode decomposition on each of the analyzed signal sequences to obtain multiple groups of initial decomposition subsequences; All the initial decomposition subsequences are averaged and integrated to obtain a final decomposition subsequence corresponding to the current original electricity price characteristic sequence.

3. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 2 is characterized in that: Multiple groups of Gaussian white noise sequences are added to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences, including: Using the white noise addition formula, multiple groups of Gaussian white noise sequences are added to the current original electricity price characteristic sequence to obtain multiple groups of disturbance signal sequences; the white noise addition formula is: Z i_n (t)=x i (t)+h n (t); Among them, Z i_n (t) is the disturbance signal sequence after adding the nth group of Gaussian white noise sequence to the i-th group of original electricity price feature sequence; t is the time; x i (t) is the characteristic sequence of the original electricity price of the i-th group; h n (n) is the nth group of Gaussian white noise sequence.

4. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 3 is characterized in that: Performing Hilbert transform on each of the disturbance signal sequences respectively to obtain multiple groups of analyzed signal sequences, including: Using the Hilbert transform formula, each disturbance signal sequence is subjected to Hilbert transform to obtain multiple groups of analyzed signal sequences; the Hilbert transform formula is: Z_h i_n (t)=Z i_n (t)+jH[Z i_n (t)]; Among them, Z_h i_n (t) is the value of Z i_n (t) The analyzed signal sequence obtained by Hilbert transform; j is an imaginary unit; H[·] is the Hilbert transform.

5. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 4 is characterized in that: Performing empirical mode decomposition on each of the analyzed signal sequences respectively to obtain multiple groups of initial decomposition subsequences, including: Using the empirical mode decomposition formula, each of the analyzed signal sequences is subjected to empirical mode decomposition to obtain multiple groups of initial decomposition subsequences; the empirical mode decomposition formula is: Where, P is the total number of iterations; For Z_h i_n (t) the initial decomposition subsequence under the pth iteration of the empirical mode decomposition; r i_n (t) is the value of Z_h i_n (t) Residual after empirical mode decomposition.

6. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 5 is characterized in that: All the initial decomposition subsequences are averaged and integrated to obtain the final decomposition subsequence corresponding to the current original electricity price characteristic sequence, including: By using the average product formula, all the initial decomposition subsequences are averagely integrated to obtain the final decomposition subsequence corresponding to the current original electricity price characteristic sequence; the average product formula is: in, is the final decomposed subsequence corresponding to the i-th group of original electricity price feature sequence; N is the total number of Gaussian white noise sequences.

7. The electricity price prediction method based on deep hyperparameter optimization of sparrow search according to claim 1 is characterized in that: Performing high-dimensional mapping and dimensionality reduction processing on each of the final decomposed subsequences respectively to obtain a set of dimensionality reduction sequences of the power market to be predicted, including: Determine any final decomposition subsequence as the current final decomposition subsequence; Mapping the current final decomposition subsequence to a high-dimensional space using a mapping function to obtain a current feature space covariance matrix; The eigenvalues ​​of the current feature space covariance matrix are determined, and the reduced-dimensional electricity price feature sequence corresponding to the current final decomposition subsequence is determined based on the eigenvalues ​​of the current feature space covariance matrix.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the electricity price prediction method based on deep hyperparameter optimization of sparrow search as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting electricity prices based on deep hyperparameter optimization of sparrow search described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting electricity prices based on deep hyperparameter optimization of sparrow search described in any one of claims 1 to 7 is implemented.