Day-ahead electricity price depth intelligent prediction method based on adaptive dynamic window
By adopting the deep intelligent prediction method of adaptive dynamic windows in the power spot market and combining the IQR-RANSAC method for electricity price model training, the problem of difficulty in accurately predicting electricity prices in the existing technology has been solved, and more accurate and real-time electricity price prediction has been achieved, and the support ability of transaction decisions has been improved.
Patent Information
- Application Number
- CN202510347947.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the prior art to accurately predict the recent electricity prices in the spot power market, especially in a short period of time affected by a variety of uncertainties.
The deep intelligent prediction method based on adaptive dynamic window is adopted. By collecting electricity price data from the database, preprocessing and feature extraction, model training is carried out in combination with the IQR-RANSAC method, the first and second estimated models of electricity price are obtained, and a comprehensive analysis is carried out to predict the real-time electricity price a few days ago.
It has achieved more accurate and real-time predictions of the recent electricity prices, improved the adaptability of the prediction model to short-term and long-term electricity price fluctuations, and enhanced the decision-making support capabilities of spot electricity trading.
Smart Images

Figure CN119919168A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electricity price prediction, and specifically relates to a method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window. Background Art
[0002] With the rapid development of the domestic electricity spot market and the continuous improvement of the market operation mechanism, electricity price forecasting has become an indispensable tool for market participants. The accuracy of electricity price forecasting directly affects the formulation of trading strategies, the assessment of market risks, and the optimization of resource allocation.
[0003] The day-ahead electricity price in the electricity spot market is highly complex and uncertain due to the combined influence of multiple factors. For example, the relationship between electricity supply and demand will change due to the influence of multiple factors, thus affecting the fluctuation of electricity prices. In addition, the core idea of the existing technology is mainly to use a large amount of historical electricity price data to train the model through traditional machine learning or neural network methods, while the domestic electricity spot market is affected by the uncertainty of inter-provincial power dispatch and new energy access, and the fluctuation of electricity prices in a shorter period is stable, which is not suitable for real-time prediction of day-ahead transaction electricity prices. Summary of the invention
[0004] The purpose of the present invention is to provide a method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window, so as to solve the problems faced in the above-mentioned background technology.
[0005] The purpose of the present invention can be achieved through the following technical solutions: A method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window, the method comprising: Step 1: Collecting the original data of electricity prices from the database and preprocessing the collected original data; Step 2: input the pre-processed data into the window processing subsystem for processing and analysis to obtain a first estimation model of the electricity price; Step 3: Collect relevant parameter information related to electricity price, process and analyze it, and obtain a second estimation model of electricity price; Step 4: Perform a comprehensive analysis based on the first electricity price estimation model and the second electricity price estimation model to predict the day-ahead real-time electricity price.
[0006] Furthermore, the method for obtaining the first estimation model of the electricity price in step 2 is: S21: First, the data is converted into three-dimensional window data, where the first dimension of the three-dimensional data represents the number of samples, the second dimension represents the position of the window (i.e., the time step), and the third dimension represents the number of features; S22: converting the preprocessed data into two-dimensional window data, where each window represents data for three consecutive days, but there is no continuity between windows, and data is obtained by random sampling; S23: The processed window data is processed by IQR method to remove outliers. The principle is shown in formula (2): (2) in, and As shown in formula (3) and (4): (3) (4) Where Q1 is the first quartile, Q3 is the third quartile, and the IQR formula is shown in (5): (5) After processing the outlier data, the data is normalized as shown in formula (6): (6) in, is the original data, For the processed data, is the mean of the data, is the standard deviation of the data; S24: Extract features. The transformed features are shown in formula (7): (7) After feature extraction, it contains: Constant term 1; First-order term: original feature ,(j=1,2,…,m); Quadratic term: original eigenproduct , and the square of each feature (in ); Cubic terms: the product of each set of three features , and the cubic of each feature (in ); Quartic term: the product of each group of four features , and the fourth power of each feature (in ), m is the number of original features; S25: Perform regression training on the processed window data using the RANSAC algorithm to obtain a first estimation model for the electricity price.
[0007] Furthermore, the principle formula for performing regression training on the processed window data using the RANSAC algorithm in S25 is shown in (8): (8) in, is the optimal model parameter selected by maximizing the number of inliers, as shown in formula (9): (9) in, represents the maximum interior point set, and the definition of the interior point set is shown in formula (10): (10).
[0008] Furthermore, the characteristics in S24 include the interconnection line plan, new energy forecast, unified electricity load and day-ahead price of electricity prices, and the relevant parameter information in step three includes weather information in different time periods and electricity consumption information in different time periods.
[0009] Furthermore, the method for obtaining the second estimation model of the electricity price in step 3 is: According to the different power consumption time periods, divide the n power consumption time periods of the day into different periods and obtain the previous period The amount of light energy converted into And the power load ; So through the formula The first estimation model of electricity price is obtained ; in, is the environmental impact factor, as well as is the preset scaling factor, is the preset standard light energy conversion amount in this time period. The preset standard power load for this time period. as well as are their respective conversion coefficients, For the day before The electricity price for a period of time.
[0010] Furthermore, the light energy conversion amount The method to obtain it is: Get the previous time period The light intensity curve over time And the photovoltaic panel temperature change curve over time ; So through the formula The amount of light energy converted ; in, is the light energy conversion coefficient, for The start time of the time period, for The end time of the time period, for Cloud cover for the time period.
[0011] Furthermore, the method for predicting the day-ahead electricity price in step 4 is: By formula Predict the day-ahead electricity price for each time period .
[0012] Beneficial effects of the present invention: The present invention collects the original data of electricity prices from a historical database, pre-processes the collected original data, and then inputs the pre-processed data into a window processing subsystem for processing and analysis to obtain a first estimation model of electricity prices. The first estimation model calculates the empirical threshold of the data through the interquartile range method and preliminarily filters out abnormal values. In the model training stage, the RANSAC random sampling consistency algorithm is used to continuously iterate and train to obtain the optimal training set. The traditional machine learning method is combined with the IQR-RANSAC method and applied to the actual day-ahead price prediction task of electric power spot trading, so that the overall model of the electricity price of the day can be obtained more accurately, which is convenient for evaluating and predicting the day-ahead electricity price. The present invention can also perform analysis and processing based on relevant parameter information of different time periods of the day to obtain a second estimation model for the electricity price in each time period, and predict the electricity price in the current time period the day before based on the electricity price in the previous time period and the electricity price in the current time period of the previous day, so as to make a real-time prediction of the electricity price in the current time period, thereby more accurately understanding the real-time fluctuation of the electricity price.
[0013] The present invention can also make a comprehensive analysis based on the overall electricity price model of the day before and the electricity price models of different time periods of the day to accurately predict the electricity price for the next time period. In this way, the electricity price can be more accurately predicted in real time based on factors such as electricity consumption time period, residents' electricity demand and weather changes, so as to improve the adaptability of the prediction model to short-term and long-term fluctuations.
[0014] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0016] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0018] In one embodiment, a method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window is disclosed, such as Figure 1 As shown, the prediction method includes: Step 1: Collecting the original data of electricity prices from the database and preprocessing the collected original data; Step 2: input the pre-processed data into the window processing subsystem for processing and analysis to obtain a first estimation model of the electricity price; Step 3: Collect relevant parameter information related to electricity prices, process and analyze it, and obtain a second estimation model of electricity prices. The relevant parameter information includes weather information in different time periods and electricity consumption information in different time periods. Step 4: Perform a comprehensive analysis based on the first electricity price estimation model and the second electricity price estimation model to predict the day-ahead real-time electricity price.
[0019] Through the above technical scheme, the present application collects the original data of electricity prices from the historical database, pre-processes the collected original data, and then inputs the pre-processed data into the window processing subsystem for processing and analysis to obtain the first estimation model of electricity prices. It first calculates the empirical threshold of the data through the interquartile range method and preliminarily filters out the outliers, and continuously iterates the training through the RANSAC random sampling consistency algorithm in the model training stage to obtain the optimal training set, combines the traditional machine learning method with the IQR-RANSAC method, and applies it to the actual day-ahead price prediction task of electricity spot trading, so that the model of the electricity price of the day (history) can be obtained more accurately, which is convenient for evaluating and predicting the day-ahead electricity price, and then analyzes and processes the relevant parameter information of different time periods of the day to obtain the second estimation model of the electricity price (real-time), and finally combines the first estimation model of the electricity price and the second estimation model for comprehensive analysis to predict the day-ahead electricity price. In this way, a comprehensive analysis can be performed based on the overall electricity price model of the day before and the electricity price models of different time periods of the day to accurately predict the electricity price of the next time period. In this way, the electricity price can be more accurately predicted in real time based on factors such as electricity consumption time period, residential electricity demand, and weather changes, so as to improve the adaptability of the prediction model to short-term and long-term fluctuations. As an embodiment of the present invention, the method for obtaining the first estimation model of the electricity price in step 2 is: S21: First, the data is converted into three-dimensional window data, where the first dimension of the three-dimensional data represents the number of samples, the second dimension represents the position of the window (i.e., the time step), and the third dimension represents the number of features; S22: converting the preprocessed data into two-dimensional window data, where each window represents data for three consecutive days, but there is no continuity between windows, and data is obtained by random sampling; S23: The processed window data is processed by IQR method to remove outliers. The principle is shown in formula (2): (2) in, and As shown in formula (3) and (4): (3) (4) Where Q1 is the first quartile, Q3 is the third quartile, and the IQR formula is shown in (5): (5) After processing the outlier data, the data is normalized as shown in formula (6): (6) in, is the original data, For the processed data, is the mean of the data, is the standard deviation of the data; S24: Extract features, including the interconnection line plan of electricity price, new energy forecast, unified electricity load and day-ahead price, etc. The transformed features are shown in formula (7): (7) After feature extraction, it contains: Constant term 1; First-order term: original feature ,(j=1,2,…,m); Quadratic term: original eigenproduct , and the square of each feature (in ); Cubic terms: the product of each set of three features , and the cubic of each feature (in ); Quartic term: the product of each group of four features , and the fourth power of each feature (in ), m is the number of original features; S25: Use the RANSAC algorithm to perform regression training on the processed window data to obtain the first estimation model of electricity price, whose principle formula is shown in (8): (8) in, is the optimal model parameter selected by maximizing the number of inliers, as shown in formula (9): (9) in, represents the maximum interior point set, and the definition of the interior point set is shown in formula (10): (10).
[0020] Through the above technical solution, this embodiment provides a method for obtaining a first electricity price estimation model, which specifically includes the following steps S21: first, convert the data into three-dimensional window data, wherein the first dimension of the three-dimensional data represents the number of samples, the second dimension represents the position of the window (i.e., the time step), and the third dimension represents the number of features; S22: convert the preprocessed data into two-dimensional window data, wherein each window represents data for three consecutive days, but there is no continuity between windows, and the data is obtained by random sampling; S23: remove outliers from the processed window data by the IQR method, and the principle is shown in formula (2): (2) in, and As shown in formula (3) and (4): (3) (4) Where Q1 is the first quartile, Q3 is the third quartile, and the IQR formula is shown in (5): (5) After processing the outlier data, the data is normalized as shown in formula (6): (6) in, is the original data, For the processed data, is the mean of the data, is the standard deviation of the data; S24: Extract features. The transformed features are shown in formula (7): (7) After feature extraction, it contains: constant term 1; first-order term: original feature ,(j=1,2,…,m); quadratic term: original feature product , and the square of each feature (in ); Cubic term: the product of three features in each group , and the cubic of each feature (in ); quartic term: the product of each group of four features , and the fourth power of each feature (in ), m is the number of original features; S25: Use the RANSAC algorithm to perform regression training on the processed window data to obtain the first estimation model of electricity price, whose principle formula is shown in (8): (8) in, is the optimal model parameter selected by maximizing the number of inliers, as shown in formula (9): (9) in, represents the maximum interior point set, and the definition of the interior point set is shown in formula (10): (10). It can be seen that this method is mainly composed of three key subsystems, including (1) data preprocessing system: at this stage, the raw data undergoes a series of processing steps to improve the quality and efficiency of subsequent analysis, including feature extraction, that is, constructing important features related to electricity prices based on the raw data. In addition, the data is normalized to adjust the numerical ranges of different features to the same scale to avoid excessive impact on the model due to differences in feature values. (2) Window processing subsystem: the preprocessed data is transmitted to the window processing subsystem. The system analyzes the data of the day, dynamically selects the appropriate window size and groups it, and then divides the data into training sets and test sets based on the grouping results. (3) Forecasting subsystem: the data after window processing finally enters the forecasting subsystem for forecasting to obtain the first forecast model of the electricity price of the day. In this way, the size of the daily training window can be flexibly adjusted according to the market fluctuations and data characteristics of the day, so as to capture more timely price change trends, thereby more accurately deriving a model of the day-ahead electricity price, so as to improve the adaptability of the forecasting model to short-term and long-term fluctuations.
[0021] As an implementation mode of the present invention, the method for obtaining the second estimation model of the electricity price in step 3 is: According to the different power consumption time periods, divide the n power consumption time periods of the day into n periods and obtain the previous period The amount of light energy converted into And the power load ; So through the formula The first estimation model of electricity price is obtained ; in, is the environmental impact factor, as well as is the preset scaling factor, is the preset standard light energy conversion amount in this time period. The preset standard power load for this time period. as well as are their respective conversion coefficients, For the day before Electricity price in the time period, light energy conversion The method to obtain it is: Get the previous time period The light intensity curve over time And the photovoltaic panel temperature change curve over time ; So through the formula The amount of light energy converted ; in, is the light energy conversion coefficient, for The start time of the time period, for The end time of the time period, for Cloud cover for the time period.
[0022] Through the above technical solution, this embodiment provides a method for obtaining a second estimation model of electricity price. Since the supply and demand in each time period are different, the impact of electricity price will also fluctuate in the short term, and the prediction model can only predict the overall electricity price of the day, so it is impossible to make a more accurate real-time prediction of the electricity price. Therefore, this application divides n electricity consumption time periods of a day into different time periods, and obtains the previous time period. The amount of light energy converted into And the power load , where the power load is obtained based on the power consumption data, and the light energy conversion By formula It is concluded that the amount of light energy conversion is mainly related to the light intensity, the amount of cloud cover and the temperature of the photovoltaic panel. Generally speaking, the greater the light intensity, the greater the light energy conversion. The higher the temperature of the photovoltaic panel or the greater the cloud cover, the lower its photovoltaic conversion efficiency. Therefore, The light intensity curve over time And the photovoltaic panel temperature change curve over time , so that through the formula The amount of light energy converted , the influence of temperature and cloud cover can be eliminated to make the result more accurate; then through the formula The first estimation model of electricity price is obtained In this way, the electricity price situation in the current time period can be predicted based on the electricity price situation in the previous time period and the electricity price situation in the current time period of the previous day, so as to make a real-time prediction of the electricity price in the current time period and understand the real-time fluctuation of electricity prices more accurately.
[0023] It should be noted that environmental factors Real-time preset according to the weather forecast of the day, preset scale factor as well as , their respective conversion coefficients as well as , light energy conversion coefficient All can be determined based on historical data combined with empirical data, and the preset standard light energy conversion amount The standard power load can be predicted based on the weather forecast for different time periods. Determined based on historical electricity consumption data, cloud cover The size is obtained through cloud radar technology, which is again beyond description.
[0024] As an implementation mode of the present invention, the method for predicting the day-ahead electricity price in step 4 is: By formula Predict the day-ahead electricity price for each time period .
[0025] Through the above technical solution, this real-time final formula Predict the day-ahead electricity price for each time period According to the overall model of the day before and the model of the current time period, the real-time electricity price of each time period of the day before can be understood more accurately in real time, the adaptability of the prediction model to short-term and long-term fluctuations can be improved, and trading plans can be better formulated, thereby minimizing the risk of electricity price trading.
[0026] The above contents are merely examples and explanations of the concept of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window, characterized in that: The method comprises: Step 1: Collecting the original data of electricity prices from the database and preprocessing the collected original data; Step 2: input the pre-processed data into the window processing subsystem for processing and analysis to obtain a first estimation model of the electricity price; Step 3: Collect relevant parameter information related to electricity price, process and analyze it, and obtain a second estimation model of electricity price; Step 4: Perform a comprehensive analysis based on the first electricity price estimation model and the second electricity price estimation model to predict the day-ahead real-time electricity price.
2. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 1 is characterized in that: The method for obtaining the first estimation model of the electricity price in step 2 is: S21: First, the data is converted into three-dimensional window data, where the first dimension of the three-dimensional data represents the number of samples, the second dimension represents the position of the window (i.e., the time step), and the third dimension represents the number of features; S22: converting the preprocessed data into two-dimensional window data, where each window represents data for three consecutive days, but there is no continuity between windows, and data is obtained by random sampling; S23: The processed window data is processed by IQR method to remove outliers. The principle is shown in formula (2): (2) in, and As shown in formula (3) and (4): (3) (4) Where Q1 is the first quartile, Q3 is the third quartile, and the IQR formula is shown in (5): (5) After processing the outlier data, the data is normalized as shown in formula (6): (6) in, is the original data, For the processed data, is the mean of the data, is the standard deviation of the data; S24: Extract features. The transformed features are shown in formula (7): (7) After feature extraction, it contains: Constant term 1; First-order term: original feature ,(j=1,2,…,m); Quadratic term: original eigenproduct , and the square of each feature (in ); Cubic terms: the product of each set of three features , and the cubic of each feature (in ); Quartic term: the product of each group of four features , and the fourth power of each feature (in ), m is the number of original features; S25: Perform regression training on the processed window data using the RANSAC algorithm to obtain a first estimation model for the electricity price.
3. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 2 is characterized in that: The principle formula for performing regression training on the processed window data using the RANSAC algorithm in S25 is shown in (8): (8) in, is the optimal model parameter selected by maximizing the number of inliers, as shown in formula (9): (9) in, represents the maximum interior point set, and the definition of the interior point set is shown in formula (10): (10)。 4. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 3 is characterized in that: The features in S24 include the interconnection line plan, new energy forecast, unified electricity load and day-ahead price of electricity prices, and the relevant parameter information in step three includes weather information in different time periods and electricity consumption information in different time periods.
5. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 4 is characterized in that: The method for obtaining the second estimation model of the electricity price in step 3 is: According to the different power consumption time periods, divide the n power consumption time periods of the day into n periods and obtain the previous period The amount of light energy converted into And the power load ; So through the formula The first estimation model of electricity price is obtained ; in, is the environmental impact factor, as well as is the preset scaling factor, is the preset standard light energy conversion amount in this time period. The preset standard power load for this time period. as well as are their respective conversion coefficients, For the day before The electricity price for a period of time.
6. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 5, characterized in that: The light energy conversion The method to obtain it is: Get the previous time period The light intensity curve over time And the temperature change curve of photovoltaic panels over time ; So through the formula The amount of light energy converted ; in, is the light energy conversion coefficient, for The start time of the time period, for The end time of the time period, for Cloud cover for the time period.
7. The method for deep intelligent prediction of day-ahead electricity prices based on an adaptive dynamic window according to claim 6, characterized in that: The method for predicting the day-ahead electricity price in step 4 is: By formula Predict the day-ahead electricity price for each time period .
Citation Information
Patent Citations
Ultra-short-term electricity price prediction method based on adaptive LGBM
CN116523540A