Long and short-term memory neural network electricity price interval prediction method considering multi-source data feature selection and quantile
By combining multi-source data feature selection and quantile regression and kernel density estimation of long and short-term memory neural networks, more accurate electricity price interval prediction is achieved, solving the problem of insufficient prediction accuracy in the existing technology, and optimizing the power market operation and energy system efficiency.
Patent Information
- Application Number
- CN202411447417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-03-11
AI Technical Summary
The existing electricity price prediction methods fail to make full use of multi-source data characteristics, resulting in insufficient prediction accuracy and ineffective optimization of power market operations and energy system efficiency.
The electricity price interval prediction method is adopted to consider the feature selection and quantiles of multi-source data. By integrating historical electricity price data, macroeconomic indicators, fossil energy prices, national carbon trading prices and unstructured data, a multi-source characteristic factor set is constructed, and quantile regression and core density estimation are used to achieve electricity price interval prediction.
It improves the accuracy and reliability of electricity price prediction, can more accurately reflect the dynamic changes in the power market, help power companies formulate more reasonable pricing strategies, optimize power generation and power purchase plans, thereby reducing costs, increasing returns, and promoting stability and fairness of the energy market.
Smart Images

Figure CN119599739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electricity price interval prediction, and in particular to a long short-term memory neural network electricity price interval prediction method considering multi-source data feature selection and quantiles. Background Art
[0002] As a key factor in energy market transactions, electricity prices have a profound impact on market dynamics and resource allocation. High-precision day-ahead electricity price forecasts can not only accurately reflect changes in electricity market demand, but also provide a detailed understanding of the operating conditions and behavior patterns of market players. This forecasting capability is essential for achieving effective resource allocation and improving energy efficiency. The current electricity market has a massive amount of data and information, which covers demand fluctuations, power generation costs, weather changes and other aspects. However, in existing research and applications, this information has not yet been fully mined and utilized, which means that although we have rich data resources, there is still room to further improve forecasting accuracy and resource allocation efficiency. By combining multi-source data with more advanced forecasting models, we can more comprehensively tap the potential value of this information, thereby optimizing market operations, improving the efficiency of the overall energy system, and promoting sustainable development. Summary of the invention
[0003] The present invention provides a long short-term memory neural network electricity price interval prediction method considering multi-source data feature selection and quantiles.
[0004] A method for predicting electricity price intervals using a long short-term memory neural network considering multi-source data feature selection and quantiles, comprising the following steps:
[0005] S1, Feature selection of multi-source data of electricity prices: By integrating historical electricity price data, macroeconomic indicators, fossil energy prices, national carbon trading prices and unstructured data, a multi-source feature factor set is constructed. By calculating the Pearson coefficient between each feature factor and the electricity price, the top 50% of the feature factors are selected as model input;
[0006] S2, data normalization: perform maximum and minimum normalization processing on the selected characteristic factors and electricity price data;
[0007] S3, constructing a quantile-based long short-term memory neural network prediction model: constructing a quantile regression (LSTMQR) model based on a long short-term memory network, and predicting the quantile values of electricity prices at different quantile points by minimizing the loss function, thus capturing the changing characteristics of electricity prices;
[0008] S4, interval prediction based on kernel density estimation: The quantile output by the long short-term memory network-based quantile regression (LSTMQR) model is used as the input of kernel density estimation, and the Gaussian kernel function is used to generate the probability density function of the electricity price. The fluctuation range and deterministic prediction value of the electricity price are determined at a 90% confidence level to achieve interval prediction of the electricity price.
[0009] Optionally, the macroeconomic indicators include the Shanghai Composite Index, and the fossil energy prices include the prices of crude oil, coal and natural gas.
[0010] Optionally, the maximum and minimum normalization processing is expressed as:
[0011]
[0012] Among them, x i ′ is the normalized value, x i Represents the value before normalization. The min and max functions return the minimum and maximum values in the sequence respectively.
[0013] Optionally, the step of constructing a quantile-based long short-term memory neural network prediction model in S3 includes:
[0014] S31, calculation of forget gate: The forget gate determines the information to be deleted from the state of the memory cell;
[0015] S32, calculation of input gate and new cell state: using input gate i t To determine the state C to be stored in the new cell t ;
[0016] S33, calculation of output gate: using output gate o t Calculate H t ;
[0017] S34, calculation of LSTM network output: Assume that there are K neurons in the LSTM hidden layer of the LSTM network, then the vector of the hidden layer output at time t is The hidden layer output vector is used as the input of the fully connected layer to calculate the output value of the LSTM network;
[0018] S35, Quantile regression: By minimizing the loss function, the weights and biases of the quantile regression (LSTMQR) model based on the long short-term memory network at different quantiles are estimated to obtain different quantiles of the predicted values. The number of quantiles ranges from 0.01 to 0.99 with an interval of 0.01. At the same quantile, the quantile regression (LSTMQR) model based on the long short-term memory network is run 20 times and the average quantile is taken as the final output quantile.
[0019] Optionally, the calculation of the forget gate in S31 is expressed as:
[0020] f t =σ(W fx x t +W fh h t-1 +W fc C t-1 +b f );
[0021] Among them, W fx Enter information x for the connection t The weight matrix, W fc Output value C of the connected neuron activation function t The diagonal matrix of the sum gate function, b f is the bias of the forget gate, C t-1 is the memory unit state, W fh is the weight matrix connecting the hidden layer output signal Ht.
[0022] Optionally, the calculation of the input gate and the new cell state in S32 is expressed as:
[0023] i t =σ(W ix x t +W ih h t-1 +W ic C t-1 +b i );
[0024] U t =g(W cx x t +W ch h t-1 +b c );
[0025] C t =C t-1 f t +U t i t ;
[0026] Among them, C t-1 f determines how much information will be received from C t-1 Forgotten in U t i t To determine how much information to add to the new cell state C t , W ix , W cx Enter information x for the connection t The weight matrix, W ic Output value C of the connected neuron activation functiont The diagonal matrix of the sum gate function, W ih , W ch is the weight matrix connecting the hidden layer output signal Ht, b i , b c They are the biases corresponding to the input gate and candidate value Ut respectively.
[0027] Optionally, the calculation of the output gate in S33 is expressed as:
[0028] o t =σ(W ox x t +W oh h t-1 +W oc C t-1 +b o );
[0029]
[0030] Among them, W ox Enter information x for the connection t The weight matrix, W oh is the weight matrix connecting the hidden layer output signal Ht, W oc Output value C of the connected neuron activation function t The diagonal matrix of the sum gate function, b o is the bias of the output gate.
[0031] Optionally, the calculation of the LSTM network output in S34 is expressed as:
[0032]
[0033] Among them, K is the number of inputs of the fully connected layer, w k and b are the weight and bias between the LSTM hidden layer output and the fully connected layer input, respectively.
[0034] Optionally, the interval prediction based on kernel density estimation in S4 includes:
[0035] S41, predicted quantile: the quantile regression (LSTMQR) model based on long short-term memory network is used to predict the quantile of electricity price at different quantile points;
[0036] S42, input preparation: using each quantile as input information for Gaussian kernel density estimation to describe the uncertainty of electricity prices and construct the probability density function of each prediction point;
[0037] S43, kernel density estimation calculation: Assume The electricity price forecast value of the ith forecast point under different quantiles is used to calculate the kernel density estimate of the electricity price forecast point.
[0038] Optionally, the kernel density estimation calculation in S43 is expressed as:
[0039]
[0040] Where n is the number of predicted value quantiles and K(·) is the Gaussian kernel function.
[0041] Beneficial effects of the present invention:
[0042] The present invention integrates information from different data sources and cooperates with the model based on long short-term memory neural network quantile regression and kernel density estimation to provide more accurate electricity price range prediction results, which can guide power companies to formulate more reasonable pricing strategies and optimize power generation and purchase plans, thereby reducing costs and increasing profits. The power sector can also better manage risks, optimize resource allocation, improve operational efficiency, ensure the stability of power supply, and promote stability and fairness in the energy market. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 Schematic diagram of the prediction method flow in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. At the same time, it is explained here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art may also adopt other alternatives to implement some known technologies; and the accompanying drawings are only for more specific description of the embodiments, and are not intended to specifically limit the present invention.
[0046] It should be noted that the references to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments" and the like in the specification indicate that the embodiments described may include specific features, structures or characteristics, but not every embodiment may include the specific features, structures or characteristics. In addition, when a specific feature, structure or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the art to implement such feature, structure or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0047] In general, a term can be understood, at least in part, from its use in context. For example, depending, at least in part, on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending, at least in part, on the context, allow for the presence of other factors that are not necessarily explicitly described.
[0048] like Figure 1 As shown, a long short-term memory neural network electricity price interval prediction method considering multi-source data feature selection and quantiles includes the following steps:
[0049] (1) Feature selection of multi-source data of electricity prices:
[0050] Electricity price fluctuations are affected by multiple factors and are highly uncertain and complex. To study price fluctuations, various influencing factors must be considered comprehensively. By comprehensively considering the impact of historical electricity prices, macroeconomic development levels, fossil energy prices, carbon trading prices, and unstructured data on electricity prices, a multi-source feature factor set can be constructed: 1) historical electricity price data; 2) macroeconomic indicators, including the Shanghai Stock Exchange Index; 3) fossil energy prices, including crude oil, coal, and natural gas prices; 4) national carbon trading prices; 5) unstructured data.
[0051] Then, the Pearson coefficient of each feature data and electricity price data was calculated, and the features were sorted according to the coefficient values, and the top 50% of the features were used as input.
[0052] (2) Data normalization:
[0053] Since the numerical difference between the characteristic data and the electricity price data is too large, normalization is required. The formula is Among them, x i ′ is the normalized value, x i Represents the value before normalization. The min and max functions return the minimum and maximum values in the sequence respectively.
[0054] (3) Constructing a quantile-based long short-term memory neural network prediction model:
[0055] The LSTM network effectively utilizes information with a long time interval (long-term information C) by adding forget gates, input gates, and output gates in the hidden layer, and captures features from temporally adjacent information (short-term information H). At each moment, the LSTM unit receives the current electricity price input x through three gates. t , from the previous hidden state output H t-1 and the memory cell state C t-1, then the mathematical calculation process of the LSTM network is:
[0056] 1) The forget gate helps LSTM decide which information will be deleted from the memory cell state. The formula is: t =σ(W fx x t +W fh h t-1 +W fc C t-1 +b f );
[0057] 2) LSTM uses input gate i t To determine the state C to be stored in the new cell t , the calculation process is:
[0058] i t =σ(W ix x t +W ih h t-1 +W ic C t-1 +b i ) (1)
[0059] U t =g(W cx x t +W ch h t-1 +b c ) (2)
[0060] C t =C t-1 f t +U t i t (3)
[0061] In the formula, C t-1 f determines how much information will be received from C t-1 Forgotten in t i t To determine how much information to add to the new cell state C t .
[0062] 3) Use output gate o t Calculate H t The process: o t =σ(W ox x t +W oh h t-1 +W oc C t-1 +b o ),
[0063] Where W ix , W fx , W ox , W cx Enter information x for the connection t The weight matrix of ic , W fc , W oc Output value c for the connected neuron activation function t The diagonal matrix of the sum gate function; W ih , W fh , W oh , W ch is the weight matrix connecting the hidden layer output signal Ht; b i , b f , b o , b c is the bias corresponding to the input gate, forget gate, output gate, and candidate value Ut.
[0064] Assuming that there are K neurons in the LSTM hidden layer of the LSTM network, the vector output by the hidden layer at time t is The output vector of the hidden layer is used as the input of the fully connected layer to obtain the output value of the LSTM network: Where K is the number of inputs to the fully connected layer; w k , b is the weight and bias between the LSTM hidden layer output and the fully connected layer input;
[0065] LSTMQR estimates the weights and biases of LSTMQR at different quantiles by minimizing the loss function, and then obtains different quantiles of the predicted value. The number of quantiles of LSTMQR ranges from 0.01 to 0.99, with an interval of 0.01. At the same quantile, it runs 20 times and takes the average quantile as the output quantile.
[0066] (4) Interval prediction based on kernel density estimation:
[0067] The trained LSTMQR output test samples are used to obtain the 99 quantiles at different quantile points, and the quantile column vector is used as the input information of the kernel density estimation (KDE) to obtain the probability density function of the electricity price at each prediction point, and at the same time, the fluctuation range of the electricity price at the 90% confidence level is calculated, and finally the mode of the probability density function of the electricity price is taken as the deterministic prediction value. The calculation steps of LSTMQR-KDE are as follows:
[0068] First, the LSTMQR network is used to predict the electricity price quantiles at different quantile points. Then, each quantile is used as the input information of the Gaussian kernel density estimation to obtain the fluctuation range that can describe the uncertainty of the electricity price and the probability density function of each prediction point. is the electricity price forecast value of the ith forecast point under different quantiles, and the mathematical expression for the kernel density estimate of the electricity price forecast point is:
[0069]
[0070] Where n is the number of predicted value quantiles; K(·) is the kernel function, and this paper chooses the Gaussian kernel function. Where η is the smoothing parameter of the bandwidth, η>0, which highly affects the shape of the distribution; the optimal bandwidth can be determined by the plug-in bandwidth selector.
[0071] Case Study:
[0072] The price range is predicted based on the daily average electricity price data of a city in China, where the training data set and the test data set account for 80% and 20% of the original data set respectively. In order to objectively evaluate the prediction performance of the model in this paper, the existing benchmark models are selected for comparative testing. The selected comparative models are: BP neural network quantile regression model (BPQR-KDE), neural network quantile regression model (RNNQR-KDE), and long short-term memory network quantile regression model (LSTMQR-KDE). The comparison indicators are FICP interval coverage and FIAW interval average width. The specific comparison results are shown in Table 1.
[0073] Most of the actual values of each model fall within the confidence interval, and LSTMQR-KDE has the highest interval coverage. From the perspective of the average width of the interval, the average width of LSTMQR-KDE is smaller than that of BPQR-KDE and RNNQR-KDE models, indicating that LSTMQR-KDE has the best interval prediction effect.
[0074] Table 1 Comparison results
[0075] Model FICP / % FIAM BPQR-KDE 94 251.12 RNNQR-KDE 95 230.61 LSTMQR-KDE 97 220.13
[0076] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0077] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for predicting electricity price intervals using a long short-term memory neural network considering multi-source data feature selection and quantiles, characterized in that: The following steps are involved: S1, Feature selection of multi-source data of electricity prices: By integrating historical electricity price data, macroeconomic indicators, fossil energy prices, national carbon trading prices and unstructured data, a multi-source feature factor set is constructed. By calculating the Pearson coefficient between each feature factor and the electricity price, the top 50% of the feature factors are selected as model input; S2, data normalization: perform maximum and minimum normalization processing on the selected characteristic factors and electricity price data; S3, constructing a quantile-based long short-term memory neural network prediction model: constructing a quantile regression model based on the long short-term memory network, and predicting the quantile values of electricity prices at different quantile points by minimizing the loss function, thus capturing the changing characteristics of electricity prices; S4, interval prediction based on kernel density estimation: The quantiles output by the quantile regression model based on the long short-term memory network are used as the input of the kernel density estimation, and the Gaussian kernel function is used to generate the probability density function of the electricity price. The fluctuation range and deterministic prediction value of the electricity price are determined at a 90% confidence level to achieve interval prediction of the electricity price.
2. According to claim 1, a method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles is characterized in that: The macroeconomic indicators include the Shanghai Composite Index, and the fossil energy prices include the prices of crude oil, coal and natural gas.
3. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 2 is characterized in that: The maximum and minimum normalization processing is expressed as: Among them, x i ′ is the normalized value, x i Represents the value before normalization. The min and max functions return the minimum and maximum values in the sequence respectively.
4. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 3 is characterized in that: The quantile-based long short-term memory neural network prediction model constructed in S3 includes: S31, calculation of forget gate: The forget gate determines the information to be deleted from the state of the memory cell; S32, calculation of input gate and new cell state: using input gate i t To determine the state C to be stored in the new cell t ; S33, calculation of output gate: using output gate o t Calculate H t ; S34, calculation of LSTM network output: Assume that there are K neurons in the LSTM hidden layer of the LSTM network, then the vector of the hidden layer output at time t is The hidden layer output vector is used as the input of the fully connected layer to calculate the output value of the LSTM network; S35, Quantile regression: By minimizing the loss function, the weights and biases of the quantile regression model based on the long short-term memory network at different quantiles are estimated to obtain different quantiles of the predicted values. The number of quantiles ranges from 0.01 to 0.99 with an interval of 0.
01. At the same quantile, the quantile regression model based on the long short-term memory network is run 20 times and the average quantile is taken as the final output quantile.
5. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 4 is characterized in that: The calculation of the forget gate in S31 is expressed as: f t =σ(W fx x t +W fh h t-1 +W fc C t-1 +b f ); Among them, W fx Enter information x for the connection t The weight matrix, W fc Output value C of the connected neuron activation function t The diagonal matrix of the sum gate function, b f is the bias of the forget gate, C t-1 is the memory unit state, W fh is the weight matrix connecting the hidden layer output signal Ht.
6. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 5, characterized in that: The calculation of the input gate and the new cell state in S32 is expressed as: i t =σ(W ix x t +W ih h t-1 +W ic C t-1 +b i ); U t =g(W cx x t +W ch h t-1 +b c ); C t =C t-1 f t +U t i t ; Among them, C t-1 f determines how much information will be received from C t-1 Forgotten in U t i t To determine how much information to add to the new cell state C t , W ix , W cx Enter information x for the connection t The weight matrix, W ic Output value C of the connected neuron activation function t The diagonal matrix of the sum gate function, W ih , W ch is the weight matrix connecting the hidden layer output signal Ht, b i 、b c They are the biases corresponding to the input gate and candidate value Ut respectively.
7. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 6, characterized in that: The calculation of the output gate in S33 is expressed as: o t =σ(W ox x t +W oh h t-1 +W oc C t-1 +b o ); Among them, W ox Enter information x for the connection t The weight matrix, W oh is the weight matrix connecting the hidden layer output signal Ht, W oc Output value C of the connected neuron activation function t The diagonal matrix of the sum gate function, b o is the bias of the output gate.
8. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 7 is characterized in that: The calculation of the LSTM network output in S34 is expressed as: Among them, K is the number of inputs of the fully connected layer, w k and b are the weight and bias between the LSTM hidden layer output and the fully connected layer input, respectively.
9. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 8, characterized in that: The interval prediction based on kernel density estimation in S4 includes: S41, predicted quantile: Use the quantile regression model based on long short-term memory network to predict the electricity price quantile at different quantile points; S42, input preparation: using each quantile as input information for Gaussian kernel density estimation to describe the uncertainty of electricity prices and construct the probability density function of each prediction point; S43, kernel density estimation calculation: Assume The electricity price forecast value of the ith forecast point under different quantiles is used to calculate the kernel density estimate of the electricity price forecast point.
10. The method for predicting electricity price intervals by using a long short-term memory neural network considering multi-source data feature selection and quantiles according to claim 9, characterized in that: The kernel density estimation calculation in S43 is expressed as: Where n is the number of predicted value quantiles and K(·) is the Gaussian kernel function.
Citation Information
Cited By
Charging and discharging optimization scheduling method and device
CN122118849A