Dynamic fractal-based spot market short-term electricity price prediction method and system

By eliminating dimensional differences through dynamic fractal methods, constructing a feature attention mechanism by combining Pearson correlation coefficient and mutual information, dynamically adjusting the fractal order, constructing a multidimensional pattern vector, and performing error correction, the problems of inaccurate data fusion and insufficient volatility adaptability in existing electricity price forecasting technologies are solved, and more accurate short-term electricity price forecasting is achieved.

CN121707614APending Publication Date: 2026-03-20STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing electricity price forecasting technologies fail to effectively eliminate dimensional differences when fusing multi-source data, ignore the nonlinear coupling characteristics of electricity price, load, and weather data, and traditional fractal analysis cannot adapt to differences in the intensity of electricity price fluctuations. The accuracy of similar pattern matching is insufficient, and the forecasting model has a large deviation during periods of sudden changes in electricity prices.

Method used

A dynamic fractal-based approach is adopted, which eliminates dimensional differences through Min-Max normalization, constructs a feature attention mechanism by combining Pearson correlation coefficient and mutual information, dynamically adjusts the range of fractal order, constructs a multi-dimensional pattern vector, performs error correction based on similar historical sequences, and uses box dimension to construct basic prediction values.

Benefits of technology

It enables more accurate short-term electricity price forecasts, improves forecasting effectiveness during periods of sudden price changes, and provides more efficient support for electricity market operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707614A_ABST
    Figure CN121707614A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic fractal-based spot market short-term electricity price prediction method and system. The method comprises the following steps: preprocessing multi-source data, calculating differential weight of each factor, and generating a fused electricity price sequence; the fractal order range is dynamically adjusted based on the fluctuation intensity of the fused electricity price sequence and the load fluctuation rate, the interval length and number are adaptively adjusted in combination with the load peak-valley difference rate, and the generalized Hurst index of the fused electricity price sequence is calculated; constructing a mode feature vector of the local sequence based on a fluctuation direction of the local sequence, a dynamic order generalized Hurst index and a time period weight, differentiating an attention weight based on a negative correlation coefficient of a mode feature and a prediction error, and identifying a similar historical sequence based on the attention weight; and obtaining a basic predicted value of the electricity price based on the global invariant attribute of the box dimension, and performing error correction on the basic predicted value through the fluctuation amplitude proportionality coefficient according to the similar historical sequence. According to the invention, accurate description and reliable prediction of electricity price fluctuation are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electricity price forecasting technology, and specifically relates to a method and system for short-term electricity price forecasting in the spot market based on dynamic fractals. Background Technology

[0002] In the context of the electricity market, electricity prices serve as a core signal for the optimal allocation of electricity resources. Accurate price forecasting plays an irreplaceable supporting role in enabling power generation companies to formulate scientific bidding strategies, power grid companies to conduct efficient dispatch optimization, and users to manage electricity costs. Current mainstream electricity price forecasting technologies mainly revolve around traditional time series models (such as ARIMA and LSTM), machine learning models (such as random forests and XGBoost), and fractal theory. However, due to the dual constraints of the complexity of the internal structure of the power system and the diversity of external influencing factors, existing technologies still have many significant limitations.

[0003] In the dimension of multi-source data fusion, electricity price fluctuations are affected by multiple factors such as electricity demand (load) and natural conditions (weather). Among them, load data (regional total load, industrial / residential load) directly reflects the intensity of demand on the electricity side, while weather data (wind speed, temperature) indirectly affects electricity prices by influencing load. However, when fusing data, existing technologies have not effectively eliminated the differences in the dimensions of electricity price, load, and weather data. This leads to subsequent feature weight calculations being biased towards factors with large numerical scales, failing to truly reflect the driving contribution of each factor to electricity prices. Furthermore, relying solely on Pearson correlation coefficient (linear association) or mutual information (non-linear association) as a single indicator to determine factor weights ignores the fact that there is both linear dependence and non-linear coupling between electricity prices and load and weather, making it difficult for the fusion sequence to accurately capture the core driving factors.

[0004] In terms of fractal feature extraction, electricity price series exhibits typical multifractal characteristics. However, traditional multifractal analysis techniques use a fixed range of fractal orders, which cannot adapt to the differences in the intensity of electricity price fluctuations at different times. It is difficult to capture local details during periods of high volatility, while there is computational redundancy during periods of low volatility. Furthermore, in the interval division for calculating the generalized Hurst exponent, the key role of load as the core of electricity demand is not taken into account, and the interval length is not adjusted according to the load peak-valley difference rate. The fixed interval division leads to limited accuracy in fractal feature extraction.

[0005] In the dimension of similarity pattern matching, existing technologies construct relatively simple pattern features, based solely on the direction or amplitude of electricity price fluctuations, without incorporating fractal features. Furthermore, they fail to assign differentiated weights to different pattern features and do not reflect the differences in fluctuation patterns between peak and off-peak electricity consumption periods, resulting in insufficient accuracy and poor adaptability in selecting similar historical sequences. In the dimension of prediction models, some models only construct basic predictions based on global fractal features such as box dimension, ignoring the impact of local fluctuations. This leads to significant biases during periods of sudden electricity price changes. Moreover, error correction based on similar historical sequences does not consider the difference in fluctuation amplitude between similar historical sequences and the current electricity price sequence; directly superimposing fluctuations introduces bias and reduces the correction effect. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a method and system for predicting short-term electricity prices in the spot market based on dynamic fractals, thereby resolving the deficiencies in the current analysis and prediction of electricity price fluctuation characteristics in the electricity spot market.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.

[0008] This invention first discloses a method for predicting short-term electricity prices in the spot market based on dynamic fractals, which includes the following steps: Step 1: Acquire electricity price data, load data, and weather data. Preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weights of each factor, and generate a fused electricity price sequence. Step 2: Based on the volatility intensity and load volatility of the merged electricity price series, dynamically adjust the fractal order range, and combine the adaptive adjustment interval length and number of load peak-valley difference rates to calculate the generalized Hurst exponent of the merged electricity price series; Step 3: Construct a pattern feature vector for the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent, and time period weight. Assign differentiated attention weights to the pattern feature vector based on the negative correlation coefficient between the pattern features and the prediction error. Identify similar historical sequences of the current electricity price sequence based on the attention weights. Step 4: Obtain the basic forecast value of electricity price based on the globally invariant property of box dimension, correct the error of the basic forecast value according to similar historical series, and eliminate the amplitude difference between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

[0009] The present invention further includes the following preferred embodiments: The method of constructing a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculating the differentiated weights of each factor, and generating a fused electricity price sequence further includes: Let the total length of the time series be... Input factor quantity , build Feature matrix ,in For the first Time of the first Normalized values ​​of each factor; The weights are determined based on the linear and nonlinear correlations between each factor and the electricity price series. The first step is to calculate the weights of the factors. Pearson correlation coefficients between the factors and the electricity price series Then calculate their mutual information. ,right Normalized and normalized Attention weights are obtained by weighting. :

[0010]

[0011] In the formula Let be the attention weight for the m-th input factor, and let the sum of all factor weights be 1. For balance coefficient, Let r be the Pearson correlation coefficient between the m-th input factor and the electricity price series. k Let Pearson's correlation coefficient be the k-th input factor with the electricity price series. For the first The mean of each factor, The original electricity price, This represents the average electricity price. For the first Mutual information between input factors and electricity price series; I k The mutual information between the k-th input factor and the electricity price sequence; x mi For time i, the first... Normalized values ​​of each factor; Each factor is weighted according to attention weights and added to the original electricity price sequence, preserving the core information of electricity prices while incorporating the fluctuation characteristics of load and weather, resulting in the fused sequence P:

[0012] In the formula Let the combined electricity price be at time n. Let be the original clearing price at time n.

[0013] The dynamic adjustment range of the fractal order based on the volatility intensity and load volatility of the fused electricity price sequence further includes: Using the moving standard deviation of fusion sequences Characterizing time The fluctuation intensity, the sliding window length Cross-validation confirmed that:

[0014] In the formula No. The intensity of fluctuations at any given time, in units consistent with the consolidated electricity price, Current time index, For the summation variable, For the first Real-time integrated electricity pricing For the first The average of the merged electricity price within the corresponding sliding window at any given time; The sliding coefficient of variation of the total regional electricity load is used to characterize the degree of load fluctuation:

[0015] In the formula For the first Load fluctuation rate at any given time; Indicates the first The standard deviation of the total load within the sliding window at any given time; Indicates the first The average total load within the sliding window at any given time; Establish , A linear mapping relationship with the order range, while setting upper and lower limits for the order:

[0016] In the formula and Indicates the upper and lower limits of the dynamic fractal order. Order adjustment factor.

[0017] The calculation of the generalized Hurst exponent of the merged electricity price series further includes: For fusion sequences After removing the mean, perform cumulative summation to obtain the cumulative sequence. :

[0018] In the formula For the first The mean-free cumulative sequence at time step; The average electricity price is the combined price. Calculate the interval length based on the load peak-valley difference rate. :

[0019] In the formula This indicates the dynamically adjusted interval length. Indicates the length of the reference interval. This represents the influence coefficient of peak-valley difference rate. Indicates the load peak-valley difference rate:

[0020] In the formula, the load represents the maximum, minimum, and average load values ​​for the day; Interval length After adjustment, the number of intervals will be corrected synchronously:

[0021] In the formula This represents the corrected number of intervals. λ is the interval number correction coefficient; Δ is the total duration of the time series; λ is the length of a single interval; For each interval, calculate different orders. The following fluctuation function:

[0022] In the formula Indicates the length of the corresponding interval and fractal order The fluctuation function, for The quadratic fitting polynomial of the interval is in the th interval. The value at each element; Y (i-1)s+k The mean-free cumulative sequence at time (i-1)s+k; For different interval lengths corresponding and In linear regression, the slope of the fitted line is the corresponding order. Generalized Hurst exponent . The method of constructing a pattern feature vector for a local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent, and time period weights further includes: Determine the direction of fluctuation of each element in the current local sequence relative to the previous element, and generate a fluctuation direction sequence: 1 for upward, 0 for flat, and -1 for downward.

[0023] In the formula This indicates the direction of fluctuation at time (k) in the current local sequence. This represents the merged electricity price at time (k) in the current local sequence. This represents the merged electricity price at time (k-1) in the current local sequence; Select three key orders within the dynamic order range

[0024] Calculate the generalized Hurst exponent of the current local sequence to obtain ; Assign time period weights:

[0025] The weight of the time period in which the current local sequence is located; By concatenating the fluctuation direction sequence, the dynamic Hurst exponent, and the time period weights in sequence, the pattern vector of the current local sequence is obtained. .

[0026] The method of identifying similar historical sequences to the current electricity price sequence based on attention weights further includes: Based on all lengths in the historical fusion sequence Local sequences, i.e. Constructing the pattern vector for each historical local sequence ; Calculate the negative correlation coefficient between each pattern feature and the subsequent one-step prediction error of the historical local sequence, and use the normalized negative correlation coefficient as the attention weight for that feature. ; Define a similarity metric between historical local sequence patterns and current local sequence patterns. The smaller the value, the higher the similarity between the two patterns.

[0027] In the formula This represents the i-th eigenvalue of the historical pattern vector; This represents the i-th feature value of the current pattern vector; For all historical local sequences Values ​​are sorted in ascending order, and the first few are selected. The sequence that is most similar to the current local sequence is denoted as: .

[0028] The basic predicted electricity price obtained from the globally invariant property based on box dimension further includes: The merged electricity price sequence is converted into a two-dimensional coordinate system with the horizontal axis representing the time index n and the vertical axis representing discrete points on the merged electricity price. Calculate the Euclidean distance from each discrete point to the origin, and sort the distances in ascending order to generate a distance sequence R = [r1, r2, ..., r...]. n ],in ;P n The combined electricity price at time n; By using different box side lengths Coverage quantity , fitting and The linear relationship is such that the slope is the box dimension:

[0029] In the formula Describes the box dimension of the merged electricity price series. This indicates that the side length of the box is The minimum number of boxes required to cover all two-dimensional discrete points; Let the time to be predicted be (N+1), and its corresponding discrete points be... The distance to the origin is Based on the global invariance of box dimension, add The dimension of the new sequence box remains the same. ,therefore Satisfying distance sequence The fractal characteristics are consistent with the original sequence; by fitting the distance distribution of the original sequence, the following can be derived. The value of is then used to solve for the basic predicted value. : .

[0030] This invention also discloses a dynamic fractal-based short-term electricity price forecasting system for the spot market, utilizing the aforementioned dynamic fractal-based method for forecasting short-term electricity prices in the spot market, comprising: The integrated electricity price sequence generation module is used to acquire electricity price data, load data and weather data, preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weight of each factor, and generate an integrated electricity price sequence. The generalized Hurst index calculation module is used to dynamically adjust the fractal order range based on the volatility intensity and load volatility of the fused electricity price series, and to calculate the generalized Hurst index of the fused electricity price series by combining the adaptive adjustment interval length and number of load peak-valley difference rate. The feature extraction module is used to construct a pattern feature vector of the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent and time period weight. Based on the negative correlation coefficient between the pattern features and the prediction error, the module assigns differentiated attention weights to the pattern feature vector and identifies similar historical sequences of the current electricity price sequence based on the attention weights. The prediction module is used to obtain the basic predicted value of electricity price based on the globally invariant property of box dimension, correct the error of the basic predicted value according to similar historical series, and eliminate the difference in amplitude between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

[0031] Accordingly, this application also discloses a terminal, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the aforementioned method for predicting short-term electricity prices in the spot market based on dynamic fractals.

[0032] Accordingly, this application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned method for predicting short-term electricity prices in the spot market based on dynamic fractals.

[0033] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides a method and system for short-term electricity price forecasting in the spot market based on dynamic fractals. It eliminates dimensional differences through Min-Max normalization, constructs a feature attention mechanism by combining Pearson correlation coefficient and mutual information, and generates an electricity price sequence that integrates core driving factors. Simultaneously, it dynamically adjusts the fractal order range based on the volatility intensity and load volatility of the integrated sequence, balancing the capture of details during high-volatility periods with the computational efficiency during low-volatility periods. A multi-dimensional pattern vector of "fluctuation direction + dynamic Hurst exponent + period weight" is constructed, and attention weights are assigned through the negative correlation coefficient between features and prediction errors, improving the accuracy of similar historical sequence screening. In the prediction stage, a basic prediction is constructed using box dimension, and errors are corrected by combining the volatility amplitude ratio coefficient and the volatility patterns of similar historical sequences, achieving "global + local" collaborative prediction and improving the effect during periods of sudden price changes. Through the collaborative design of multi-source data attention fusion, dynamic order multifractal analysis, attention-enhanced similar pattern matching, and fractal-driven prediction, the limitations of existing technologies are overcome, providing more accurate short-term electricity price forecast results for electricity market participants and supporting the efficient operation of the electricity market. Attached Figure Description

[0034] Figure 1 This is a flowchart of the spot market electricity price forecasting method in this invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0036] The embodiments described in this application are merely some, not all, embodiments of the present invention. Based on the spirit of the present invention, other embodiments obtained by those skilled in the art without inventive effort are all within the protection scope of the present invention.

[0037] To address the shortcomings of existing technologies, this invention proposes a method and system for short-term spot market electricity price forecasting based on dynamic fractals. It eliminates dimensional differences in electricity price, load, and weather data through Min-Max normalization, and constructs a feature attention mechanism by combining Pearson correlation coefficient (linear correlation) and mutual information (non-linear correlation) to calculate the differentiated weights of each factor, generating a fused electricity price sequence that accurately reflects the core driving factors and fully exploring the contribution of load and weather to electricity price fluctuations. Secondly, it dynamically adjusts the fractal order range based on the fluctuation intensity (sliding standard deviation) and load volatility (sliding coefficient of variation) of the fused sequence, ensuring the capture of local details during high-fluctuation periods and reducing computational redundancy during low-fluctuation periods. Simultaneously, it adaptively adjusts the interval length and number by incorporating the load peak-valley difference rate to adapt to the electricity price fractal feature extraction requirements under different load fluctuations, improving the calculation accuracy of the generalized Hurst exponent and multifractal spectrum. It constructs a " A multi-dimensional pattern vector consisting of "fluctuation direction + dynamic order generalized Hurst exponent + time period weight" comprehensively characterizes local sequence features. Based on the negative correlation coefficient between pattern features and prediction errors, it assigns differentiated attention weights to features, highlighting the impact of key features on matching results. The time period weight reflects the difference in fluctuation patterns between peaks and troughs, improving the adaptability of similar historical sequences to the current electricity price sequence and ensuring that the selected similar historical sequences have high reference value. Finally, a basic prediction is constructed based on the "globally invariant property" of box dimension to ensure the accuracy of the overall trend of the electricity price sequence. In the error correction stage, the amplitude difference between similar historical sequences and the current electricity price sequence is eliminated by the fluctuation amplitude ratio coefficient. The basic prediction value is corrected by combining the subsequent fluctuation patterns of similar historical sequences, realizing the synergy between global fractal features and local similar fluctuations, improving the accuracy of short-term electricity price prediction, especially improving the prediction effect during periods of sudden changes in electricity prices.

[0038] The present invention discloses a spot market electricity price forecasting method based on fractal theory, comprising the following steps: Step 1: Acquire electricity price data, load data, and weather data. Preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weights of each factor, and generate a fused electricity price sequence.

[0039] The input data contains three types of core factors, as shown in the table below:

[0040] The data preprocessing process is as follows: Outliers (such as sudden increases / decreases in electricity prices due to sensor malfunctions, negative load values, and extreme temperature values) were removed using the 3σ criterion. Data with no more than three consecutive missing periods were filled using linear interpolation, while data with more than three missing periods were filled using the average of adjacent dates. The normal data range is as follows:

[0041] in This represents the mean. It represents the standard deviation.

[0042] Weather data (mostly hourly in the original form) is unified into a 15-minute time granularity consistent with electricity price and load sequences through linear interpolation, ensuring that the three types of data correspond one-to-one in time. Min-Max normalization is used to map each factor to the [0,1] interval to avoid the influence of dimensional differences on subsequent attention weight calculation.

[0043] In the formula The raw data representing a certain factor; and These represent the maximum and minimum values ​​of the data after removing outliers for this factor; The result is the result after input factor normalization, with a value range of [0,1], which is used to eliminate the interference of dimensional differences on attention weight calculation.

[0044] To highlight the contribution of load and weather to electricity price fluctuations, a feature attention mechanism is introduced to calculate the weights of each factor, ensuring that the fused sequence accurately reflects the core driving factors of electricity price fluctuations. The specific steps are as follows: Let the total length of the time series be... Input factor quantity (Including one type of electricity price data, three types of load data, and two types of weather data), construct Feature matrix ,in For the first Time of the first The normalized values ​​of each factor.

[0045] The weights are determined based on the linear and nonlinear correlations between each factor and the electricity price series. The first step is to calculate the weights of the factors. Pearson correlation coefficients between the factors and the electricity price series (Characterizing the strength of linear correlation, with values ​​ranging from [-1, 1]), then calculate the mutual information between the two. (Characterizing the strength of nonlinear correlation, with values ​​ranging from [0, +∞)), for Normalized (mapped to [0,1]) and normalized Attention weights are obtained by weighting. :

[0046]

[0047] in, (r) m Map from [-1,1] to [0,1]). (replace I m Normalized to [0,1]), the formula simplifies to:

[0048] In the formula The attention weight of the m-th input factor is in the range of [0,1], and the sum of the weights of all factors is 1. The larger the weight, the more significant the impact of the factor on electricity price fluctuations (e.g., the weight of the load factor is usually higher than that of the weather factor). This is a balancing coefficient, with a value range of [0,1] and a default value of 0.5. It is used to balance linear correlation. Nonlinear correlation Contributions; Let r be the Pearson correlation coefficient between the m-th input factor and the electricity price series. k Let Pearson's correlation coefficient be the k-th input factor with the electricity price series. For the first The mean of each factor, The original electricity price, x is the average electricity price; mi For time i, the first... Normalized values ​​of each factor; For the first The mutual information between the input factors and the electricity price sequence, I k The mutual information between the k-th input factor and the electricity price sequence is calculated using the K-nearest neighbor method to capture nonlinear relationships that the linear correlation coefficient cannot reflect.

[0049] Each factor is weighted according to attention weights and added to the original electricity price sequence, preserving the core information of electricity prices while incorporating the fluctuation characteristics of load and weather, resulting in the fused sequence P:

[0050] In the formula Let the combined electricity price be at time n. Let be the original clearing price at time n.

[0051] Step 2: Based on the volatility intensity and load volatility of the merged electricity price series, dynamically adjust the fractal order range, and combine the adaptive adjustment interval length and number of load peak-valley difference rates to calculate the generalized Hurst exponent of the merged electricity price series.

[0052] Load is the core of electricity demand, and its fluctuations directly affect electricity prices. Based on the fluctuation intensity and load volatility of the fused sequence, the fractal order range is dynamically adjusted. To ensure that local details are captured during periods of high volatility and computational redundancy is reduced during periods of low volatility, the specific steps are as follows: Using the moving standard deviation of fusion sequences Characterizing time The fluctuation intensity, the sliding window length Determined through cross-validation (default) (This corresponds to a 6-hour window for 15-minute data, balancing short-term fluctuations and computational efficiency)

[0053] In the formula: No. The intensity of fluctuations at any given time, in units consistent with the consolidated electricity price, Current time index, For the summation variable, For the first Real-time integrated electricity pricing For the first The average value of the combined electricity price within the corresponding sliding window at any given time.

[0054] The coefficient of variation can eliminate the impact of differences in load size. The sliding coefficient of variation of the total regional electricity load is used to characterize the degree of load fluctuation. Load fluctuation is directly related to the supply and demand balance of electricity prices, and its volatility can effectively reflect the causes of electricity price fluctuations.

[0055] In the formula For the first The load fluctuation rate at any given time; the larger the value, the more significant the load fluctuation. Indicates the first The standard deviation of the total load within the sliding window at any given time is calculated using the same logic. , only Replace with total regional load data; Indicates the first The average total load within the sliding window at any given time.

[0056] Establish , A linear mapping relationship with the order range, while setting upper and lower limits for the order:

[0057] In the formula and This represents the upper and lower limits of the dynamic fractal order, controlling the sensitivity of higher and lower orders to fluctuations in magnitude. The upper limit is set to 4, and the lower limit is set to -2. The order adjustment factor has a value range of [0.5, 2]. The larger the value, the more significant the change in the order range with the intensity of the fluctuation.

[0058] The generalized Hurst exponent is a core indicator characterizing multifractal features. This invention calculates the generalized Hurst exponent of the fused sequence based on a dynamically determined order range and an adaptive interval division of load peak-valley difference rate (adapting to load fluctuation differences and replacing the original new energy penetration rate parameter). The steps are as follows: For fusion sequences After removing the mean, cumulative summation is performed to eliminate the influence of the sequence mean on fractal feature extraction, resulting in a cumulative sequence. :

[0059] In the formula For the first The mean-free cumulative sequence at time step; To incorporate the average electricity price.

[0060] The higher the load peak-valley difference rate (the ratio of the difference between the maximum and minimum load values ​​within a day to the average), the more frequent the short-term fluctuations in electricity prices, requiring a shorter interval length. Capturing local fluctuations; the lower the peak-valley difference rate, the more stable the long-term trend of electricity prices, requiring greater... Reduce fitting error:

[0061] In the formula This indicates the dynamically adjusted interval length. Indicates the length of the reference interval. This represents the peak-to-valley difference rate influence coefficient, with a default value of 0.3. It controls the rate at which the interval length decreases with the peak-to-valley difference rate. The load peak-to-valley difference rate is expressed as follows:

[0062] In the formula, Load day This represents the daily load. This represents the daily average load.

[0063] Interval length After adjustment, the number of intervals is synchronously corrected to ensure complete coverage of the time series, while peak-to-valley difference rate weights are introduced to avoid insufficient number of intervals for peak-to-valley difference rate periods:

[0064] In the formula This represents the corrected number of intervals. This is the interval number correction coefficient, with a default value of 0.01. It controls the gain of the peak-to-valley difference rate on the number of intervals, avoiding an excessive number of intervals at peak-to-valley differences. Δ represents the total duration (or total span) of the time series, i.e., the total length of the entire time series to be analyzed from start to end. λ represents the length of a single interval.

[0065] For each interval, calculate different orders. The fluctuation function at this scale quantifies the fluctuation characteristics of the sequence:

[0066] In the formula Indicates the length of the corresponding interval and fractal order The fluctuation function, for The quadratic fitting polynomial of the interval is in the th interval. The values ​​at each element are determined using the least squares method, Y. (i-1)s+k Let be the mean-free cumulative sequence at time (i-1)s+k.

[0067] For different interval lengths corresponding and In linear regression, the slope of the fitted line is the corresponding order. Generalized Hurst exponent .

[0068] Multifractal spectrum The multifractal intensity of quantifiable time series can be transformed using the Legendre transform to convert the generalized Hurst exponent. Convert to singularity index With fractal spectrum .

[0069] Strangeness Index Characterizing the corresponding order The singularity of the local fluctuations, through right Solve for the derivative:

[0070] In the formula Indicates the corresponding fractal order The singularity index, For fractal order The first derivative operator is calculated using the central difference method in practice.

[0071] Fractal spectrum Characterized by the singularity index The probability density of occurrence is solved using the Legendre transform:

[0072] Through the width of the multifractal spectrum Quantization of the multifractal intensity of the fused sequence:

[0073] In the formula The width of the multifractal spectrum, Represents the maximum and minimum values ​​of the singularity index in the multifractal spectrum, corresponding to Below .

[0074] Step 3: Construct a pattern feature vector for the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent, and time period weight. Assign differentiated attention weights to the pattern feature vector based on the negative correlation coefficient between the pattern features and the prediction error, and identify similar historical sequences of the current electricity price sequence based on the attention weights.

[0075] Define the current local sequence as the fused sequence with a length of 0 at the end. The subsequences are constructed to include "fluctuation direction + dynamics". The multi-dimensional model with "+time period weighting" comprehensively depicts local fluctuation characteristics. The steps are as follows: Determine the direction of fluctuation of each element in the current local sequence relative to the previous element, and generate a fluctuation direction sequence (1 = upward, 0 = flat, -1 = downward):

[0076] In the formula This indicates the direction of fluctuation at time (k) in the current local sequence. This represents the merged electricity price at time (k) in the current local sequence. This represents the fused electricity price at the (k-1)th time step in the current local sequence.

[0077] Select three key orders within the dynamic order range

[0078] The generalized Hurst exponent of the current local sequence is calculated using the method in step 2, and the result is obtained. Used to quantify the fractal features of local sequences.

[0079] Electricity price fluctuation patterns differ significantly across different time periods (e.g., peak / off-peak electricity consumption), necessitating the assignment of time period weights to highlight the impact of key periods.

[0080] The weight of the time period in which the current local sequence is located.

[0081] By concatenating the fluctuation direction sequence, the dynamic Hurst exponent, and the time period weights in sequence, the pattern vector of the current local sequence is obtained. .

[0082] Based on all lengths in the historical fusion sequence Local sequences, i.e. Constructing the pattern vector for each historical local sequence .

[0083] Calculate the negative correlation coefficient between each pattern feature (11 elements of the fluctuation direction sequence, 3 elements of the dynamic H(q), and 1 element of the time period weight) and the subsequent one-step prediction error of the historical local sequence. Normalize the negative correlation coefficient and use it as the attention weight for that feature. The larger the absolute value of the negative correlation coefficient, the greater the feature weight.

[0084] Define a similarity metric between historical local sequence patterns and current local sequence patterns. The smaller the value, the higher the similarity between the two patterns.

[0085] In the formula This represents the i-th eigenvalue of the historical pattern vector; This represents the i-th feature value of the current pattern vector.

[0086] For all historical local sequences Values ​​are sorted in ascending order, and the first few are selected. indivual, Determined through cross-validation, with a default value of 5, the sequence is selected as the most similar historical sequence to the current local sequence, denoted as: .

[0087] Step 4: Obtain the basic forecast value of electricity price based on the globally invariant property of box dimension, correct the error of the basic forecast value according to similar historical series, and eliminate the amplitude difference between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

[0088] Box dimension is a key indicator characterizing the overall fractal features of a sequence and possesses a globally invariant property, meaning that the box dimension remains essentially unchanged after adding a small amount of new data. This invention constructs a basic prediction model based on this property, with the following steps: The merged electricity price sequence is converted into a two-dimensional coordinate system with the horizontal axis representing the time index n and the vertical axis representing discrete points on the merged electricity price. Calculate the Euclidean distance from each discrete point to the origin, and sort the distances in ascending order to generate a distance sequence R = [r1, r2, ..., r...]. n ],in ;P n Let be the combined electricity price at time n.

[0089] Box dimension calculated using an improved covering method That is, by using different box side lengths Coverage quantity , fitting and The linear relationship is such that the slope is the box dimension:

[0090] In the formula Describes the box dimension of the merged electricity price series. This indicates that the side length of the box is The minimum number of boxes required to cover all two-dimensional discrete points.

[0091] Let the time to be predicted be (N+1), and its corresponding discrete points be... The distance to the origin is Based on the global invariance of box dimension, add... The dimension of the new sequence box remains the same. ,therefore Must satisfy distance sequence The fractal characteristics are consistent with the original sequence. R is the distance sequence corresponding to the original merged electricity price sequence. By fitting the distance distribution of the original sequence, the following is derived: The value of is then used to solve for the basic predicted value. :

[0092] The basic prediction only utilizes the overall fractal characteristics of the sequence. To improve prediction accuracy, it is necessary to combine the subsequent fluctuation patterns of similar historical sequences for error correction. The steps are as follows: Get each similar historical sequence The actual electricity price sequence for the subsequent T time points (T is the prediction step size, default (T=4), corresponding to 1-hour level prediction), i.e. .

[0093] Calculate the proportionality coefficient To eliminate the effects of amplitude differences:

[0094] In the formula Let be the coefficient representing the proportionality of the fluctuation range between the k-th similar historical sequence and the current electricity price sequence. Let represent the maximum and minimum values ​​of the k-th similar historical sequence, respectively; These are the maximum and minimum values ​​of the current electricity price sequence, respectively.

[0095] Subsequent fluctuations of each similar historical sequence were analyzed according to... The weighted values ​​are then added to the base forecast to obtain the revised forecast:

[0096] In the formula This is represented as the corrected electricity price (final forecast) predicted at step t. This represents the base forecast value for step t. This represents the total number of similar historical sequences. The actual electricity price at time t following the kth similar historical sequence; The mean of the kth similar historical sequence, i.e. It is used to eliminate the difference between the overall level of similar historical series and the current electricity price series.

[0097] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides a method and system for short-term electricity price forecasting in the spot market based on dynamic fractals. It eliminates dimensional differences through Min-Max normalization, constructs a feature attention mechanism by combining Pearson correlation coefficient and mutual information, and generates an electricity price sequence that integrates core driving factors. Simultaneously, it dynamically adjusts the fractal order range based on the volatility intensity and load volatility of the integrated sequence, balancing the capture of details during high-volatility periods with the computational efficiency during low-volatility periods. A multi-dimensional pattern vector of "fluctuation direction + dynamic Hurst exponent + period weight" is constructed, and attention weights are assigned through the negative correlation coefficient between features and prediction errors, improving the accuracy of similar historical sequence screening. In the prediction stage, a basic prediction is constructed using box dimension, and errors are corrected by combining the volatility amplitude ratio coefficient and the volatility patterns of similar historical sequences, achieving "global + local" collaborative prediction and improving the effect during periods of sudden price changes. Through the collaborative design of multi-source data attention fusion, dynamic order multifractal analysis, attention-enhanced similar pattern matching, and fractal-driven prediction, the limitations of existing technologies are overcome, providing more accurate short-term electricity price forecast results for electricity market participants and supporting the efficient operation of the electricity market.

[0098] This invention can be a system, method, and / or computer program product. This invention also discloses a dynamic fractal-based short-term electricity price forecasting system for the spot market, based on the aforementioned dynamic fractal-based method, comprising: The integrated electricity price sequence generation module is used to acquire electricity price data, load data and weather data, preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weight of each factor, and generate an integrated electricity price sequence. The generalized Hurst index calculation module is used to dynamically adjust the fractal order range based on the volatility intensity and load volatility of the fused electricity price series, and to calculate the generalized Hurst index of the fused electricity price series by combining the adaptive adjustment interval length and number of load peak-valley difference rate. The feature extraction module is used to construct a pattern feature vector of the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent and time period weight. Based on the negative correlation coefficient between the pattern features and the prediction error, the module assigns differentiated attention weights to the pattern feature vector and identifies similar historical sequences of the current electricity price sequence based on the attention weights. The prediction module is used to obtain the basic predicted value of electricity price based on the globally invariant property of box dimension, correct the error of the basic predicted value according to similar historical series, and eliminate the difference in amplitude between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

[0099] Based on the spirit of this invention, those skilled in the art will readily conceive of a computer program product derived from the aforementioned dynamic fractal-based short-term electricity price forecasting method for the spot market. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded to enable a processor to implement various aspects of this disclosure. That is, this application also includes a terminal comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned dynamic fractal-based short-term electricity price forecasting method for the spot market.

[0100] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0101] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0102] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method for predicting short-term electricity prices in the spot market based on dynamic fractals, characterized in that, Includes the following steps: Step 1: Acquire electricity price data, load data, and weather data. Preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weights of each factor, and generate a fused electricity price sequence. Step 2: Based on the volatility intensity and load volatility of the merged electricity price series, dynamically adjust the fractal order range, and combine the adaptive adjustment interval length and number of load peak-valley difference rates to calculate the generalized Hurst exponent of the merged electricity price series; Step 3: Construct a pattern feature vector for the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent, and time period weight. Assign differentiated attention weights to the pattern feature vector based on the negative correlation coefficient between the pattern features and the prediction error. Identify similar historical sequences of the current electricity price sequence based on the attention weights. Step 4: Obtain the basic forecast value of electricity price based on the globally invariant property of box dimension, correct the error of the basic forecast value according to similar historical series, and eliminate the amplitude difference between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

2. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 1, characterized in that, The step of constructing a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculating the differentiated weights of each factor, and generating a fused electricity price sequence further includes: Let the total length of the time series be... Input factor quantity , build Feature matrix ,in For the first Time of the first Normalized values ​​of each factor; The weights are determined based on the linear and nonlinear correlations between each factor and the electricity price series. The first step is to calculate the weights of the factors. Pearson correlation coefficients between the factors and the electricity price series Then calculate their mutual information. ,right Normalized and normalized Attention weights are obtained by weighting. : In the formula Let be the attention weight for the m-th input factor, and let the sum of all factor weights be 1. For balance coefficient, Let r be the Pearson correlation coefficient between the m-th input factor and the electricity price series. k Let Pearson's correlation coefficient be the k-th input factor with the electricity price series. For the first The mean of each factor, The original electricity price, This represents the average electricity price. For the first Mutual information between input factors and electricity price series; I k The mutual information between the k-th input factor and the electricity price sequence; x mi For time i, the first... Normalized values ​​of each factor; Each factor is weighted according to attention weights and added to the original electricity price sequence, preserving the core information of electricity prices while incorporating the fluctuation characteristics of load and weather, resulting in the fused sequence P: In the formula Let the combined electricity price be at time n. Let be the original clearing price at time n.

3. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 2, characterized in that, The dynamic adjustment range of the fractal order based on the volatility intensity and load volatility of the fused electricity price sequence further includes: Using the moving standard deviation of fusion sequences Characterizing time The fluctuation intensity, the sliding window length Cross-validation confirmed that: In the formula No. The intensity of fluctuations at any given time, in units consistent with the consolidated electricity price. Current time index, For the summation variable, For the first Real-time integrated electricity pricing For the first The average of the merged electricity price within the corresponding sliding window at any given time; The sliding coefficient of variation of the total regional electricity load is used to characterize the degree of load fluctuation: In the formula For the first Load fluctuation rate at any given time; Indicates the first The standard deviation of the total load within the sliding window at any given time; Indicates the first The average total load within the sliding window at any given time; Establish , A linear mapping relationship with the order range, while setting upper and lower limits for the order: In the formula and Indicates the upper and lower limits of the dynamic fractal order. Order adjustment factor.

4. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 3, characterized in that, The calculation of the generalized Hurst exponent of the merged electricity price series further includes: For fusion sequences After removing the mean, perform cumulative summation to obtain the cumulative sequence. : In the formula For the first The mean-free cumulative sequence at time step; The average electricity price is the combined price. Calculate the interval length based on the load peak-valley difference rate. : In the formula This indicates the dynamically adjusted interval length. Indicates the length of the reference interval. This represents the influence coefficient of peak-valley difference rate. Indicates the load peak-valley difference rate: In the formula, the load represents the maximum, minimum, and average load values ​​for the day; Interval length After adjustment, the number of intervals will be corrected synchronously: In the formula This represents the corrected number of intervals. λ is the interval number correction coefficient; Δ is the total duration of the time series; λ is the length of a single interval; For each interval, calculate different orders. The following fluctuation function: In the formula Indicates the length of the corresponding interval and fractal order The fluctuation function, for The quadratic fitting polynomial of the interval is in the th interval. The value at each element; Y (i-1)s+k The mean-free cumulative sequence at time (i-1)s+k; For different interval lengths corresponding and In linear regression, the slope of the fitted line is the corresponding order. Generalized Hurst exponent .

5. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 4, characterized in that, The method of constructing a pattern feature vector for a local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent, and time period weights further includes: Determine the direction of fluctuation of each element in the current local sequence relative to the previous element, and generate a fluctuation direction sequence: 1 for upward, 0 for flat, and -1 for downward. In the formula This indicates the direction of fluctuation at time (k) in the current local sequence. This represents the merged electricity price at time (k) in the current local sequence. This represents the fused electricity price at time (k-1) in the current local sequence; Select three key orders within the dynamic order range Calculate the generalized Hurst exponent of the current local sequence to obtain ; Assign time period weights: The weight of the time period in which the current local sequence is located; By concatenating the fluctuation direction sequence, the dynamic Hurst exponent, and the time period weights in sequence, the pattern vector of the current local sequence is obtained. .

6. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 5, characterized in that, The method of identifying similar historical sequences to the current electricity price sequence based on attention weights further includes: Based on all lengths in the historical fusion sequence Local sequences, i.e. Constructing the pattern vector for each historical local sequence ; Calculate the negative correlation coefficient between each pattern feature and the subsequent one-step prediction error of the historical local sequence, and use the normalized negative correlation coefficient as the attention weight for that feature. ; Define a similarity metric between historical local sequence patterns and current local sequence patterns. The smaller the value, the higher the similarity between the two patterns. In the formula This represents the i-th eigenvalue of the historical pattern vector; This represents the i-th feature value of the current pattern vector; For all historical local sequences Values ​​are sorted in ascending order, and the first few are selected. The sequence that is most similar to the current local sequence is denoted as: 。 7. The method for predicting short-term electricity prices in the spot market based on dynamic fractals according to claim 6, characterized in that, The basic predicted electricity price obtained from the globally invariant property based on box dimension further includes: The merged electricity price sequence is converted into a two-dimensional coordinate system with the horizontal axis representing the time index n and the vertical axis representing discrete points on the merged electricity price. Calculate the Euclidean distance from each discrete point to the origin, and sort the distances in ascending order to generate a distance sequence R = [r1, r2, ..., r...]. n ],in ;P n The combined electricity price at time n; By using different box side lengths Coverage quantity , fitting and The linear relationship is such that the slope is the box dimension: In the formula The box dimension of the merged electricity price series. This indicates that the side length of the box is The minimum number of boxes required to cover all two-dimensional discrete points; Let the time to be predicted be (N+1), and its corresponding discrete points be... The distance to the origin is Based on the global invariance of box dimension, add The dimension of the new sequence box remains the same. ,therefore Satisfying distance sequence The fractal characteristics are consistent with the original sequence; by fitting the distance distribution of the original sequence, the following can be derived. The value of is then used to solve for the basic predicted value. : 。 8. A short-term electricity price forecasting system for the spot market based on dynamic fractals, characterized in that, include: The integrated electricity price sequence generation module is used to acquire electricity price data, load data and weather data, preprocess the acquired multi-source data, eliminate dimensional differences through Min-Max normalization, construct a feature attention mechanism by combining Pearson correlation coefficient and mutual information, calculate the differential weight of each factor, and generate an integrated electricity price sequence. The generalized Hurst index calculation module is used to dynamically adjust the fractal order range based on the volatility intensity and load volatility of the fused electricity price series, and to calculate the generalized Hurst index of the fused electricity price series by combining the adaptive adjustment interval length and number of load peak-valley difference rate. The feature extraction module is used to construct a pattern feature vector of the local sequence based on the fluctuation direction, dynamic order of the generalized Hurst exponent and time period weight. Based on the negative correlation coefficient between the pattern features and the prediction error, the module assigns differentiated attention weights to the pattern feature vector and identifies similar historical sequences of the current electricity price sequence based on the attention weights. The prediction module is used to obtain the basic predicted value of electricity price based on the globally invariant property of box dimension, correct the error of the basic predicted value according to similar historical series, and eliminate the difference in amplitude between similar historical series and current electricity price series through the fluctuation amplitude ratio coefficient.

9. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method for predicting short-term spot market electricity prices based on dynamic fractals according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method for predicting short-term spot market electricity prices based on dynamic fractals as described in any one of claims 1-7.