A power spot transaction data time series mining method capable of characterizing market fluctuation characteristics

By combining variational mode decomposition and multi-head attention mechanism, the problem of accurately representing the market volatility characteristics in electricity spot trading is solved, achieving high-fidelity prediction under extreme conditions and improving the accuracy and stability of electricity price prediction.

CN121352906BActive Publication Date: 2026-05-01SHAANXI WOFU ELECTRIC POWER TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAANXI WOFU ELECTRIC POWER TECHNOLOGY CO LTD
Filing Date
2025-12-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately characterize market volatility in electricity spot trading. In particular, they cannot adaptively remove non-causal noise under extreme weather conditions or rule adjustments, resulting in model response lag or signal loss, and failing to meet the high-fidelity prediction requirements under complex operating conditions.

Method used

The variational mode decomposition algorithm is used to decompose historical electricity price time series data into intrinsic mode function components. The sample entropy and kernel density estimation algorithm are used to identify dynamic diversion thresholds. The differential autoregressive moving average model and the multi-head attention mechanism are combined to process the trend and fluctuation components respectively. The prediction accuracy is improved by the causal sparsity pre-gating pruning mechanism.

Benefits of technology

It achieves accurate characterization of high-frequency mutations and long-term trends in electricity spot trading data, can adaptively adjust in non-stationary environments, reduce computational dimensionality, improve the accuracy and stability of forecasts, and adapt to changes in the market environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121352906B_ABST
    Figure CN121352906B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of electric power transaction data processing, and discloses a power spot transaction data time sequence mining method capable of representing market fluctuation characteristics, which comprises the following steps: performing variational mode decomposition on electric price data, locking a probability density trough by using kernel density estimation to determine a dynamic shunt threshold, routing components to a trend or fluctuation channel according to the dynamic shunt threshold, respectively generating prediction values by using a linear extrapolation model and a multi-head attention mechanism with a causal mask introduced and superimposing the prediction values, the application realizes adaptive boundary locking in a non-stationary environment by using data topological morphology, and blocks invalid feature interference by mutual information causal gating, solves the contradiction between mean regression and peak capture of a traditional model, and improves the effectiveness of a prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a time-series mining method for electricity spot trading data that can characterize market volatility, belonging to the field of electricity trading data processing technology. Background Technology

[0002] In current electricity spot trading, the marginal electricity price at each node reflects the system's supply and demand relationship and network congestion. The increasing proportion of renewable energy grid connection and the increasing complexity of trading rules have caused the electricity price time series data to exhibit strong non-stationarity, multi-scale, and peak-and-fat-tailed characteristics. Existing technologies mostly use statistical models or deep learning networks to model historical electricity price sequences, treating electricity price fluctuations as a unified stochastic process. They use the statistical regularities of historical data to extrapolate numerical changes. During periods of smooth load fluctuations and stable supply and demand, capturing the autocorrelation of the sequence can yield prediction results that meet settlement requirements.

[0003] The spot price formation mechanism is inherently dualistic, driven by long-term trends determined by load and unit costs, yet also affected by instantaneous shocks caused by network congestion, unit shutdowns, or game-theoretic behavior. A unified modeling approach uses a single parameter to fit vastly different physical components, with the optimization objective set as minimizing the mean square error. To achieve overall optimal performance, the model tends to suppress the weight of high-frequency abrupt signal changes to smooth the prediction curve. The endogenous mean regression characteristic means that existing technologies exhibit response lags and even signal loss defects when dealing with price spikes with commercial value and risk attributes. Besides the inherent limitations of the aforementioned general modeling approach in handling complex signals, existing technologies also have shortcomings in data mining logic for specific trading scenarios. For example, the Chinese publication with publication number CN119090544A... The invention patent discloses a method and system for predicting the volume and price declaration behavior of inter-provincial spot transactions. Although the solution attempts to divide the transaction scenario into power supply guarantee type and cost reduction type through historical power gap data and couples recurrent neural networks for prediction respectively, this coarse-grained classification based on historical statistical characteristics is essentially still a direct fitting of mixed mode signals. The method lacks a frequency domain orthogonal decoupling mechanism for deterministic trends and random fluctuations in time series data. When the market is impacted by extreme weather or rule adjustments, causing the basic distribution to drift, the model cannot adaptively remove non-causal noise, nor can it accurately lock the high-frequency price peaks caused by game behavior from the aliased signals. It cannot meet the high-fidelity representation requirements of market volatility characteristics under complex working conditions.

[0004] Therefore, the technical problem to be solved by this invention is how to construct a data processing mechanism that decouples trends and fluctuations from the data mechanism, dynamically shields non-causal noise, and adapts to market distribution drift, so as to achieve accurate characterization of the fluctuation characteristics of electricity spot prices. Summary of the Invention

[0005] To address the problems mentioned in the background art, the technical solution of the present invention is as follows: A method for time series mining of electricity spot trading data capable of characterizing market volatility, comprising the following steps:

[0006] Step S100: Obtain historical time-series data of electricity spot trading prices of the target node, and use variational mode decomposition algorithm to decompose the historical time-series data of electricity prices into several eigenmode function components with different center frequencies.

[0007] Step S200: Calculate the sample entropy of each intrinsic mode function component and establish a sample entropy set. Use the kernel density estimation algorithm to generate the probability density function curve of the sample entropy set, identify the two local maximum peaks in the probability density function curve, search for the global minimum point of probability density located between the two local maximum peaks, and set the entropy value corresponding to the global minimum point of probability density as the dynamic diversion threshold.

[0008] Step S300: Input the intrinsic mode function components whose sample entropy is less than the dynamic diversion threshold into the basic trend processing branch and accumulate and reconstruct the basic trend sequence; input the intrinsic mode function components whose sample entropy is greater than the dynamic diversion threshold into the random fluctuation processing branch and accumulate and reconstruct the random fluctuation sequence.

[0009] Step S400: In the basic trend processing branch, the basic trend sequence is linearly extrapolated using the differential autoregressive moving average model to obtain the trend prediction value.

[0010] Step S500: In the random fluctuation processing branch, acquire the external driving factor data of the time to be predicted and the historical time, calculate the mutual information value between the external driving factor data and the random fluctuation sequence within a preset short period window, construct the correlation mask matrix, force the weight parameters corresponding to the driving factors whose mutual information value is lower than the preset lower limit to be set to zero, and use the multi-head attention mechanism to perform weighted summation on the random fluctuation sequence of the historical time based on the correlation mask matrix to obtain the fluctuation prediction value.

[0011] Step S600: The trend forecast value and the fluctuation forecast value are summed to generate the electricity price forecast result of the electricity spot trading data.

[0012] Preferably, in step S100, the process of decomposing the data using the variational mode decomposition algorithm includes: initializing the intrinsic mode function components and their center frequencies; iteratively updating each intrinsic mode function component and its center frequency using the alternating direction multiplier method within the constrained variational model framework; stopping the iteration when the frequency domain characteristic difference of the intrinsic mode function components in two adjacent iterations meets the preset convergence condition, and outputting the finally converged intrinsic mode function components.

[0013] Preferably, in step S200, the step of generating the probability density function curve using the kernel density estimation algorithm includes: selecting a Gaussian kernel function as the smoothing kernel, calculating an adaptive bandwidth parameter based on the number of data points and the standard deviation in the sample entropy set; performing a convolution operation on the sample entropy set using the Gaussian kernel function and the adaptive bandwidth parameter to obtain a probability density function curve that reflects the distribution shape of the intrinsic mode function components in the entropy domain; the two local maxima peaks of the probability density function curve correspond to the trend-dominated low-entropy mode set and the fluctuation-dominated high-entropy mode set, respectively.

[0014] Preferably, in step S200, the step of searching for the global minimum point of probability density located between two local maxima is used to determine the adaptive classification boundary under non-stationary conditions; when the statistical distribution characteristics of electricity spot trading data drift with the market environment, causing the overall shape of the probability density function curve to shift or deform, the dynamic diversion threshold is adjusted accordingly based on the position of the global minimum point of probability density in the entropy domain, so as to define the dividing point between the trend component and the fluctuation component.

[0015] Preferably, in step S500, the process of obtaining the fluctuation prediction value using the multi-head attention mechanism specifically includes the following weighted correction steps: calculating the Euclidean distance between the query vector at the time to be predicted and the key-value vector at the historical time in the feature space; selecting the k closest key-value vectors, calculating their average distance, and using the average distance as the feature space similarity index at the current time; mapping the feature space similarity index to a weighted coefficient with values ​​in the range of zero to one using a preset nonlinear decay function; calculating the moving average value of the target node at the current time as the benchmark value; and using the weighted coefficient to perform a weighted summation of the original fluctuation prediction value output by the multi-head attention mechanism and the benchmark value to obtain the final fluctuation prediction value; wherein, the larger the value of the feature space similarity index, the smaller the weight value of the original fluctuation prediction value.

[0016] Preferably, in step S500, the external driving factor data includes at least the net load forecast data of the target node, the date type identification data, and the electricity price gradient data of adjacent nodes; the mutual information value is used to characterize the correlation between the external driving factor data and the random fluctuation sequence within a preset short period window; the correlation mask matrix is ​​a matrix with the same dimension as the attention score matrix of the multi-head attention mechanism; the operation of forcibly setting the weight parameter to zero is to set the position of the element corresponding to the low correlation driving factor in the correlation mask matrix to negative infinity, so that the corresponding attention weight in the subsequent Softmax function normalization operation approaches zero.

[0017] Preferably, the weighted summation calculation process using the multi-head attention mechanism in step S500 follows the following formula: ,in, This is the predicted value for fluctuations. A query matrix constructed based on external driving factor data at the time to be predicted. A key-value matrix constructed based on external driving factor data at historical moments. A value matrix constructed based on a random fluctuation sequence at historical moments. Let be the dimension of the key-value vector. It is a correlation mask matrix, which takes the value of negative infinity at positions where the mutual information value is below a preset lower limit, and takes the value of zero at other positions.

[0018] Preferably, in step S400, before performing linear extrapolation calculation using the differential autoregressive moving average model, a stationarity test step is further included: performing a unit root test on the basic trend sequence; if the test result shows that the basic trend sequence is non-stationary, then performing differencing on the basic trend sequence until it meets the stationarity requirement; determining the autoregressive order and moving average order of the differential autoregressive moving average model using the Akaike information criterion or the Bayesian information criterion, and estimating the parameters of the basic trend sequence based on the determined order.

[0019] Preferably, in step S600, after generating the electricity price prediction result of the electricity spot trading data, the method further includes performing an interval generation step based on entropy: extracting the statistical mean of the sample entropy set calculated in step S200; setting the confidence interval width of the prediction result based on the statistical mean; increasing the width of the confidence interval to characterize the uncertainty of the prediction result when the statistical mean increases; and outputting the confidence interval in association with the electricity price prediction result.

[0020] Preferably, the method is applied to the real-time clearing price prediction scenario of the electricity spot market; the step S100 of obtaining the historical time series data of the electricity spot transaction price of the target node specifically includes: reading the node marginal electricity price data of the target node within a preset historical time period from the database interface of the electricity trading system; performing missing value interpolation and outlier removal processing on the read data to obtain standardized time series data.

[0021] Compared with the prior art, the beneficial effects of the present invention are:

[0022] 1. In electricity spot trading data with volatile market characteristics, an orthogonal decoupling mechanism based on sample entropy constraints resolves the inherent contradiction between mean regression and peak capture. Sample entropy is introduced as a physical diversion criterion, and a dual-stream orthogonal processing architecture for electricity price time series data is constructed in conjunction with variational mode decomposition algorithm. Based on the inherent disorder characteristics of the data sequence, the original electricity price signal is forcibly decomposed into a deterministic trend subspace and a random fluctuation subspace. The low-entropy trend component uses the linear logic of the differential autoregressive moving average model to maintain the inertia and stability of the basic price trend; the high-entropy fluctuation component uses the nonlinear mapping capability of the multi-head attention mechanism to capture high-frequency mutations caused by market games. From the data structure level, the smoothing effect that inevitably occurs when a single model fits the full spectrum signal is eliminated, enabling the system to accurately reproduce the long-term supply and demand trend of the market and independently and sensitively respond to instantaneous price peaks caused by network congestion or unit tripping, achieving a high-fidelity representation of the full-frequency characteristics of market volatility.

[0023] 2. To avoid model drift in non-stationary environments, an adaptive threshold optimization mechanism based on probability density topology is used. To address the problem of basic chaos drift in the electricity spot market under different seasons or policy cycles, an adaptive threshold locking logic based on kernel density estimation is constructed. Without relying on manually set fixed parameters, the probability density function of the intrinsic mode function sample entropy set is calculated in real time. The dual-modal topological characteristics of the data distribution are identified, and the probability density minimum point located between the two peaks is automatically locked as the dynamic cutting boundary. Based on the system's ability to perceive and self-calibrate the market background noise level, the fluctuation signal and background noise are objectively and stably separated according to the statistical form of the data itself, regardless of whether the market is in a high-volatility or low-volatility cycle, thus avoiding systematic prediction deviations caused by changes in environmental parameters.

[0024] 3. Based on the pre-gating pruning mechanism of causal sparsity, the signal-to-noise ratio and computational efficiency of the feature space are improved. The multi-head attention mechanism is pre-embedded with causal gating logic based on instantaneous mutual information or correlation. Taking advantage of the sparsity and time-varying characteristics of causal relationships in the power market, the effectiveness of external driving factors is scanned in real time. A dynamic mask matrix is ​​constructed to block low-correlation factors from participating in subsequent weighted calculations. The pre-purification process removes invalid features and introduces random disturbances, so that the prediction model focuses only on key variables with actual driving force at the current moment, reduces the computational dimension, improves the focusing ability of the attention mechanism under complex and variable conditions, and ensures the purity and interpretability of the fluctuation component reconstruction results. Attached Figure Description

[0025] Figure 1 This is a flowchart of the dual-stream time series mining based on variational mode decomposition and entropy determination in this invention;

[0026] Figure 2 This is a time-domain waveform comparison diagram of the original electricity price sequence and the decoupled trend and fluctuation components of this invention;

[0027] Figure 3This is a radar chart comparing the decoupling characteristics of the trend component and the fluctuation component and the multidimensional performance of the present invention.

[0028] Figure 4 This is a schematic diagram of the system architecture of the present invention, which integrates an intelligent sorting engine and a confidence calibration mechanism. Detailed Implementation

[0029] The specific embodiments of this invention are intended to further explain and illustrate the technical solutions defined in the claims, but should not be construed as limiting the scope of protection of this invention. Those skilled in the art should understand that any equivalent substitutions or obvious modifications made based on the teachings of this invention without departing from the inventive concept are included within the scope of protection of this invention.

[0030] This invention provides a time-series mining method for electricity spot trading data capable of characterizing market volatility. The data processing flow, running on a computer processing system, utilizes variational mode decomposition and kernel density estimation techniques to orthogonally decouple deterministic trends and stochastic fluctuations in electricity price time-series data. It also combines linear extrapolation and causal gating attention mechanisms for mining and prediction. In the first stage of executing the mining method, the data processing system reads historical time-series electricity price data from the target node's electricity spot trading database or a preset data interface. The system cleans and preprocesses the read data, fills in missing time points using cubic spline interpolation, and then uses box-line interpolation... Figure 4 Quantile interval rules identify and correct outliers, generating standardized input time series. To address the mixed low-frequency supply and demand trends and high-frequency congestion fluctuations in electricity price signals, the system employs the Variational Mode Decomposition (VMD) algorithm to analyze the input time series. Frequency domain decoupling is performed during the execution of the VMD algorithm, specifically the number of intrinsic mode functions (IMF) decomposed. Determined based on the center frequency observation method: Preset initial The value is decomposed using trial methods, and the center frequency of each modal component is calculated. If the difference between the center frequencies of two modes is less than a preset threshold or the spectral overlap exceeds a set limit, then the value is reduced. The values ​​are then re-decomposed until each intrinsic mode function component is free of aliasing in the frequency domain and has independent physical meaning. The spectral correlation iterative closed-loop calibration procedure is then executed, and the initial number of modes is set. and spectral overlap tolerance Calculate any two modes spectral correlation coefficient : ,in Let be the modal power spectral density, if And the center frequency residual ,make Continue iterating; if Triggered the circuit breaker, output This quantitative logic replaces manual observation, locks in the physical orthogonal boundaries, and the decomposition process iteratively optimizes within the constrained variational model framework using the Alternating Direction Multiplier Method (ADMM), ultimately outputting... Each intrinsic mode function component and its corresponding center frequency .

[0031] And for each eigenmode function component obtained from the decomposition The system calculates its sample entropy to quantify the sequence complexity and self-similarity of each component. During the calculation, the embedding dimension is set. The similarity tolerance is 2. Output the entropy value for each component, which is 0.2 times the standard deviation of the original sequence. To address the issue of fixed threshold failure caused by seasonal and policy cycle drift in electricity market background noise, this method employs an adaptive threshold optimization logic based on probability density topology. The system establishes a sample entropy set containing all intrinsic mode function components within a current preset historical time window, such as the past 30 days. The probability density function curve of this set is generated using the kernel density estimation (KDE) algorithm. In kernel density estimation, a Gaussian kernel function is selected as the smoothing kernel, and the adaptive bandwidth parameter is calculated based on the standard deviation and quantity of the sample data using Silverman's rule. To balance the smoothness and feature retention of the probability density curve, the system performs extremum analysis on the generated probability density function curve, identifying two local maxima peaks, corresponding to the low-entropy trend-dominant mode group and the high-entropy fluctuation-dominant mode group, respectively. The system then searches for the global minimum point of probability density located between these two local maxima peaks and locks its corresponding entropy value on the horizontal axis as the current dynamic diversion threshold. Based on this threshold The system will use sample entropy Less than The components are identified as trend components, and their values ​​are linearly superimposed to reconstruct the basic trend sequence. ; Sample entropy Greater than The components were identified as fluctuation components, and their values ​​were linearly superimposed to reconstruct a random fluctuation sequence. .

[0032] For the separated basic trend sequence Primarily driven by fundamental factors such as system load levels and unit marginal costs, the system exhibits strong inertia and periodicity. The system employs an Autoregressive Moving Average (ARIMA) model for linear extrapolation forecasting. Before modeling, the system analyzes the sequence... Perform the Enhanced Dickey-Fowler (ADF) unit root test. If the test result indicates that the series is non-stationary, perform first-order or multiple-order differencing on the series until it meets the stationarity requirement. The autoregressive order of the ARIMA model is then determined. and moving average order By minimizing the Akaike Information Content Criterion (AIC), the system fits the sequence and performs multi-step extrapolation based on the determined parameters to obtain the trend prediction value. For the separated random fluctuation sequence This involves nonlinear mutations caused by network congestion, generator failures, and market dynamics. The system employs a deep neural network based on a multi-head attention mechanism for data mining. In this stage, external driving factor data is introduced, including the target node's net load forecast data (defined as total load minus wind and solar power output), date type identifiers (including weekdays, weekends, and holidays), and historical electricity price gradient data of neighboring nodes with strong electrical connections to the target node. To eliminate noise interference introduced by non-causal features, the system performs causal gating pruning before constructing the attention matrix. For each time point to be predicted, the system calculates the relationship between each external driving factor sequence and the random fluctuation sequence within the current backtracking window, such as the past 24 hours. The system sets a lower limit threshold for the mutual information value, which is determined based on the lower quartile of the historical correlation statistical distribution. When the mutual information value of a driving factor is lower than this lower limit, the system determines that the factor is a non-driving factor in the current time period and constructs a correlation mask matrix with the same dimensions as the attention score matrix. In the mask matrix In the middle, the position corresponding to the non-driving factor is assigned the value of negative infinity ( ), and assign zero to the remaining positions.

[0033] During the multi-head attention mechanism operation, the system uses the external driving factors at the time to be predicted as the query vector. External driving factors at historical moments are used as key-value vectors. The random fluctuation sequence values ​​at historical moments are used as value vectors. The system calculates the query vector. With key value vector The dot product is then divided by the scaling factor. (in (The dimension of the key-value vector), superimposed with a correlation mask matrix. The superposition result is processed by the Softmax normalization function, which makes the weights corresponding to the negative infinity position zero, thereby physically blocking the data path of invalid factors and implementing instruction-level computation graph collapse control to transform the mask matrix. In The identifier is mapped to the conditional step instruction of the Tensor Processing Unit (TPU). When a mask bit is detected, a no-op (NOP) is written to the Matrix Multiplication Unit (MMU) instruction pipeline. This physically cuts off the column strobe signal of the corresponding logic gate, prevents floating-point multiply-accumulate (FMA) operations from being triggered, forces the gradient backpropagation value of that dimension to be zero, and utilizes hardware-level sparsity to execute the logic. This prevents numerical underflow noise caused by invalid features, reduces computational power consumption, and the system uses normalized weights to adjust the value vector. Perform weighted aggregation to output the original fluctuation prediction value. Its calculation logic follows the formula: ,in, For querying the matrix, It is a key-value matrix. For value matrices, The dimension of the key-value vector is... For the correlation mask matrix, This indicates the matrix transpose.

[0034] To avoid the risk of overconfidence in deep learning models when facing extreme conditions not seen in the training set, the system introduces a confidence calibration mechanism based on the sparsity of the feature space neighborhood. The system calculates the query vector at the current time step. Calculate the Euclidean distance between the vector and all vectors in the historical key-value vector library, and use the fast nearest neighbor search algorithm to select the nearest neighbor. For example, with 5 key-value vectors, the system calculates this... The arithmetic mean of the minimum distances is defined as the sparsity index of the neighborhood in the feature space. The system constructs a nonlinear decay mapping function, such as a variant of the sigmoid function, to... Mapped to confidence coefficients with values ​​between 0 and 1 The mapping logic is set as follows: when When the value approaches 0, it means that the current operating condition is highly similar to the historical operating condition. Approaching 1; when When the preset outlier threshold is exceeded, The value rapidly decays to near zero, while the system calculates the simple moving average of the random fluctuation sequence at the current time as a robust baseline value without model assumptions. The final fluctuation forecast value Calculated using the following formula: This mechanism ensures that in the event of unprecedented extreme market conditions, the forecast results can smoothly degrade to a conservative statistical baseline, guaranteeing the safety of decision-making; finally, the system will convert the trend forecast values... Compared with the calibrated fluctuation prediction value Algebraic superposition is performed to generate the final electricity price prediction result. The statistical mean of the sample entropy set calculated in the previous step is extracted and used as an uncertainty measure factor to dynamically generate the confidence interval of the prediction result. When the mean of sample entropy increases, it indicates that the overall market chaos is increasing, and the system correspondingly increases the bandwidth of the output confidence interval.

[0035] Example 1: In a specific electricity spot market trading node price prediction scenario, the target node is located in the coastal power grid terminal area affected by seasonal typhoons, containing a high proportion of offshore wind power access capacity. In this scenario, facing the extreme condition of a typhoon passing through, the electricity price data processed by the system exhibits non-stationary and multimodal characteristics. Specifically, the base load shows a deterministic downward trend due to a sudden drop in temperature, and the offshore wind power output experiences a violent fluctuation from full capacity to offload within a short period due to the typhoon's influence. This, coupled with random power outages caused by strong winds, leads to a momentary spike in the node marginal price (LMP) exceeding 500% of the benchmark value. Under this condition, the data processing system initiates a process of mining the historical time-series data of the target node's electricity price. The system uses the variational mode decomposition (VMD) algorithm to decompose the read non-stationary price sequence into a set of intrinsic mode function components. The system calculates the sample entropy for each component and uses the kernel density estimation (KDE) algorithm to generate the probability density function curve of the sample entropy set within the current time window. Due to the typhoon's passage causing a sharp increase in overall market disorder, the probability density function curve shows an overall rightward shift on the coordinate axis, with the right-hand extreme peak representing random fluctuations becoming higher. Through topological extreme value search logic, the system locks the global minimum point of probability density located between the left-hand trend peak and the right-hand fluctuation peak, and determines its corresponding entropy value as the dynamic diversion threshold adapted to the current highly chaotic environment. This step enables the system to correctly identify high-frequency components that might be classified as noise during calm periods as volatility components containing valid market information in this high-volatility environment, and then route them to a random volatility sequence. The reconstructed channel is used, while the remaining low-entropy components are routed to the underlying trend sequence. .

[0036] For the separated basic trend sequence The system uses the Autoregressive Moving Average (ARIMA) model to capture its gradual downward trajectory caused by temperature changes and outputs trend prediction values. Meanwhile, for random fluctuation sequences containing information on wind turbine tripping and line tripping... The system performs calculations based on a causal gating multi-head attention mechanism. In this step, the system calculates external driving factors such as wind power output forecasts and critical line state positions. The mutual information value is calculated higher than the preset lower limit because the correlation between wind power output and electricity price fluctuations is extremely strong in the current period. Therefore, the system constructs the correlation mask matrix. When wind power factors are present, the weighted channels corresponding to them are retained; conversely, for historical temperature factors with weaker correlation, their weights are omitted in the mask matrix. The corresponding position in the vector is assigned a value of negative infinity, thereby blocking the interference of this invalid feature on the prediction result in the subsequent Softmax weighted calculation. Based on the gated and purified feature vector, the system outputs the original fluctuation prediction value using a multi-head attention network. To address rare supply and demand patterns that may emerge during the passage of a typhoon eye and not be recorded in historical databases, the system further performs confidence calibration based on the sparsity of the feature space neighborhood. The system calculates the query vector at the current moment. Find the nearest neighbor by Euclidean distance from the historical key-value vector library. The average distance of the vectors is greater than the normal level, resulting in a higher sparsity index in the feature space neighborhood. As the confidence coefficient increases, the system uses a nonlinear decay mapping function to adjust the confidence coefficient. This reduces the original fluctuation prediction value output by the deep learning model. Weighting in the final result and proportionally increasing the baseline value. The weights are determined by the formula, and the final system uses them. Generate calibrated fluctuation predictions.

[0037] Example 2: This example verifies the actual predictive performance and engineering stability of the proposed electricity spot trading data time series mining method under complex operating conditions. The experimental scenario is the actual operating environment of a provincial electricity spot market during the peak summer season. During this period, the power grid faces the dual impact of high load and strong convective weather, and the electricity price series has extremely high volatility and non-stationary characteristics, making it an ideal testing ground for the algorithm's performance. The experiment relies on a high-performance parallel computing cluster to build a simulation platform, which integrates a market clearing engine and a historical data playback module, and can accurately reproduce the physical constraints and trading logic of the real market. The historical electricity price, load, and renewable energy output data used in the experiment are all from the production database of the provincial electricity trading center. The data sampling frequency is 15 minutes, covering the entire summer peak period (July 1 to August 31). To simulate noise interference in the real data acquisition environment, Gaussian white noise with a signal-to-noise ratio of 20dB is artificially superimposed on the original electricity price series, and 5% of data loss and distortion are randomly injected to assess the algorithm's data cleaning capability.

[0038] The setting of the core parameter dynamic shunting threshold follows an adaptive optimization logic based on probability density topology. In the experiment, the sliding window length for sample entropy calculation was set to 30 days, and the bandwidth parameter for kernel density estimation was... Based on Silverman's rule of thumb, the technical trade-off for this parameter setting lies in the following: if the window is too short or the bandwidth is too small, the probability density curve will exhibit too many local spurious peaks, leading to unstable threshold locking; if the window is too long or the bandwidth is too large, it will be unable to respond promptly to rapid changes in the market's microstructure. Through backtesting of historical data, it was determined that the above parameter combination can capture market state switching points while ensuring threshold stability. After the experiment started, the system read the noisy electricity price sequence, used cubic spline interpolation and box plot rules to complete data cleaning, and performed variational mode decomposition (VMD) to decompose the electricity price sequence into... The system calculates the sample entropy of each intrinsic mode function component in real time and dynamically updates the shunting threshold. Based on this, the components are reorganized into a basic trend sequence. With random fluctuation sequence ,against Linear extrapolation was performed using the ARIMA(2,1,2) model; for Wind power output, load forecasting, and power flow at key sections were introduced as external driving factors. After causal gating, these factors were input into a multi-head attention network. To verify the effectiveness of the causal gating mechanism, a control group A (with the causal gating module removed and all external factors introduced) and the sample group of this invention (with the causal gating module enabled) were set up. Table 1 shows the performance of the two models on random fluctuation sequences during a typical evening peak and thunderstorm period (August 15, 18:00-20:00). The predicted performance is shown in the table. The mean absolute error (MAE) and root mean square error (RMSE) are both dimensionless indicators based on normalized electricity price data.

[0039] Table 1: Performance Verification Data of Causal Gating Mechanism

[0040]

[0041] Data shows that in control group A, due to the failure to remove irrelevant features such as photovoltaic power output (ineffective at night) and non-blocking cross-section power flow, the model not only increased computation time but also decreased prediction accuracy due to noise interference. In contrast, the sample group of this invention reduced the input feature dimension from 35 to 12 dimensions through causal gating, resulting in a 38.7% reduction in MAE and a 3.6-fold increase in convergence speed. This result strongly demonstrates the advantages of the causal gating mechanism in improving model focusing ability and computational efficiency. Furthermore, to verify the defense capability of the confidence calibration mechanism under extreme conditions, the experiment set up control group B (using only deep learning model prediction) and the sample group of this invention (enabling feature space sparsity calibration). The experiment selected an extreme sample point where the network load reached a new high and the UHVDC blockade occurred, which had never occurred in history. Table 2 shows the comparison between the predicted output of the two models and the actual electricity price when the extreme sample point was triggered.

[0042] Table 2: Confidence Calibration Mechanism Stability Verification Data Table

[0043]

[0044] Data shows that the deep learning model of control group B exhibits overconfident and blind extrapolation when faced with unknown inputs, giving predictions far exceeding reality, which can easily mislead trading decisions. In contrast, the sample group of this invention detected a feature space sparsity of up to 0.92, automatically triggering a circuit breaker mechanism, tilting the prediction weights toward the robust baseline, and the final output prediction value deviated from the true value by only 7.1%, and correctly issued a high-risk warning.

[0045] Example 3: This example combines Figures 1 to 4 This paper describes a time-series data mining method for electricity spot trading that can characterize market volatility. Figure 1 As shown, the overall process begins with acquiring historical time-series data of electricity prices at the target node, aiming to obtain raw electricity spot trading data to be mined. The process then moves to the core data processing stage, using the Variational Mode Decomposition (VMD) algorithm to decompose the raw data into several Intrinsic Mode Function (IMF) components. Based on the decomposition results, kernel density estimation and trough locking steps are performed. By identifying probability density troughs, a dynamic diversion threshold is determined. On this basis, the system performs sample entropy determination, comparing the entropy values ​​of each component with the dynamic threshold. If the entropy value is less than the threshold, the process enters the basic trend processing branch, reconstructing the basic trend sequence by accumulating the corresponding components. A differential processing using the linear extrapolation model ARIMA is then performed to generate trend prediction values. If the entropy value is greater than the threshold, the process enters the random fluctuation processing branch, reconstructing the random fluctuation sequence by accumulating the corresponding components. Mutual information causal gating is introduced to construct a correlation mask matrix to block interference, and a multi-head attention mechanism is input for weighted summation to generate fluctuation prediction values. Finally, the process converges to the prediction value superposition step, adding the trend prediction value and the fluctuation prediction value to output the final electricity spot trading price prediction result.

[0046] like Figure 2 As shown, the horizontal axis represents a scale range from 0 to 95, with 15-minute intervals, and the vertical axis represents the electricity price in yuan / MWh. The solid line represents the original, highly volatile electricity price sequence, containing all mixed market information, while the short dashed line represents the separated basic trend sequence. It exhibits a smooth and regular low-frequency trend, with the long dashed line representing the separated random fluctuation sequence. The sequence oscillates at a high frequency near the zero axis; for example... Figure 3As shown, this radar chart constructs five evaluation index axes: stationarity, trend capture, fluctuation capture, separation, and reconstruction accuracy. The numerical scale range for each index is set from 0 to 100. The performance polygon of the basic trend sequence is depicted by solid lines in the chart. The score of this component in the stationarity and trend capture dimensions is close to 100, indicating that it can stably represent the long-term deterministic laws driven by load level and unit cost. However, the score in the fluctuation capture dimension is at a low level of 20, verifying that it has good filtering characteristics for high-frequency random noise. The performance polygon of the random fluctuation sequence is depicted by dashed lines in the chart. Its geometric shape complements that of the solid lines. The score in the fluctuation capture dimension is close to 100, while the scores in the stationarity and trend capture dimensions are both at a low level of 20. This objectively reflects the component's sensitive response to nonlinear sudden change signals caused by network congestion or game behavior. In addition, the solid and dashed lines coincide with the full score of 100 in both the separation and reconstruction accuracy dimensions.

[0047] like Figure 4 As shown, the entire system originates from the power trading cloud database, which is responsible for collecting source data and transmitting it to the intelligent sorting engine. The intelligent sorting engine, as the core preprocessing module, integrates variational mode decomposition and probability trough locking functions. The sorted data stream is split into two parallel computing nodes, one on the left and one on the right. The left node is the basic trend calculation node, which has a built-in linear extrapolation model for handling deterministic trends. The right node is the random fluctuation mining node, which not only receives internal data but also accesses external driving factors, including wind, solar, and load factors, and performs in-depth mining through causal gating and attention mechanisms. The outputs of the two nodes converge to the result synthesis and calibration module, which includes a confidence circuit breaker protection mechanism to ensure output safety. The final processing result is transmitted to the spot trading decision terminal for visual display of price prediction curves and risk range dashboards.

[0048] Example 4: This example is for adaptive bandwidth parameters. Setting process, correlation mask matrix The details of the construction and the mapping logic of the nonlinear attenuation function are supplemented with targeted explanations and engineering calibrations to eliminate potential algorithmic black boxes, ensure the reproducibility and determinism of the technical solution, and address the adaptive bandwidth parameters. To determine this, the present invention constructs a dynamic calculation model based on sample statistical characteristics during the kernel density estimation (KDE) process, for each set of sample entropy to be processed. The system calculates the standard deviation of the set. and sample size The bandwidth parameter was calculated using an improved Silverman's Rule of Thumb. Its calculation formula is defined as: In the formula, The interquartile range (IQRa) is the difference between the upper and lower quartiles of the sample entropy set. This calculation logic considers not only the dispersion of the data. Furthermore, by introducing Enhance the effectiveness for long-tailed distributions or outliers, and ensure that the generated probability density curve achieves an optimal balance between smoothness and feature resolution, thereby enabling stable identification of bimodal modes of trends and fluctuations.

[0049] In causal gating mechanisms, the correlation mask matrix The construction depends on the lower limit threshold of the mutual information value. To ensure precise setting and avoid biases caused by subjective settings, this embodiment uses a statistical quantile method based on a rolling time window to determine the threshold. The system maintenance length is... like Hourly historical mutual information value queue It also records the mutual information calculation results of all driving factors and target electricity price fluctuation sequences over the past week. At each prediction time, the system calculates the queue. lower quartiles and will Set as The dynamic multiple, i.e. ,in This is a preset sensitivity coefficient, typically between 1.0 and 1.2. Based on this threshold, for the current time period... Each driving factor, if its mutual information value Then the mask matrix The corresponding element The value assigned is ;otherwise Assigning a value of 0 ensures that the gating mechanism can adaptively adjust the screening criteria as the market environment changes, retaining only statistically relevant driving factors in attention calculation; and for the confidence calibration mechanism, the sparsity index of the feature space neighborhood is used. Mapped to confidence coefficient The nonlinear decay function adopts a modified Sigmoid form to achieve a smooth response to abnormal operating conditions. This mapping function is defined as: ,in, The sparsity baseline threshold is set to the 95th percentile of the mean distance between all query vectors in the historical training set and their nearest neighbor key value vectors. The decay slope parameter controls the rate at which the confidence level decreases with increasing sparsity. It is typically determined through cross-validation, for example, by taking... This function ensures that when Less than hour, When the value is close to 1, the model primarily relies on deep learning predictions; when... Greater than hour, It drops rapidly, approaching 0.

[0050] Example 5: This example provides a standardized offline calibration and data filling procedure to solve the problems of system initialization parameter setting and historical data dependency, ensuring the reproducibility and stability of the technical solution during initial deployment. For the historical mutual information value queue, which serves as the core feature selection basis, and the historical key-value vector library used for confidence calibration, the quality of their initial state directly determines the predictive performance during the system's cold start phase. Before the system officially goes live, an offline construction project based on long-term historical data is executed, obtaining full historical electricity price, load, and external driving factor data for the target node from the power trading center for at least three complete years. The dataset is cleaned and standardized, and then used for replay-style simulation calculations. This involves simulating the prediction process of historical moments one by one in chronological order. During the simulation, the system calculates the mutual information value of each driving factor at each moment in real time and stores it in the mutual information value queue. At the same time, the feature vectors extracted from historical moments are paired with the corresponding real fluctuation values ​​and stored in the key-value vector library. Through this historical replay method, the system has a knowledge base containing tens of thousands of high-quality samples at the initial run, thereby avoiding parameter drift or prediction distortion caused by the lack of cold start data and ensuring that the dynamic threshold and confidence calibration mechanism can play an effective role in the first prediction cycle.

[0051] To address the adaptability of this solution to different electricity market environments, this embodiment provides a set of pre-deployment calibration and commissioning procedures. Since trading rules and physical constraints differ across markets, directly transferring model parameters may lead to suboptimal results. Therefore, when deploying the system to a new target node, the following standardized commissioning process must be performed: A two-week shadow operation period is set, during which the system only receives real-time data and outputs prediction results, but does not participate in actual trading decisions. The prediction error data generated during the shadow operation period is used to adjust the decay slope parameter in the confidence calibration function. A grid search optimization is performed to minimize the root mean square error of the prediction within the specified time period. Simultaneously, the spectral characteristics of the electricity price fluctuation at this node are analyzed. If the proportion of high-frequency components is found to be higher than the baseline model, the initial number of modes in the variational mode decomposition is adjusted accordingly. The bandwidth correction factor for kernel density estimation can only be used to terminate debugging and officially switch to live trading if the calibrated system shows a prediction accuracy that is at least 5% better than the existing benchmark system in three consecutive trading days of simulated backtesting.

[0052] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for time-series mining of electricity spot trading data capable of characterizing market volatility, characterized in that, Includes the following steps: Step S100: Obtain historical time-series data of electricity spot trading prices for the target node. The marginal electricity price of the node reflects the system's supply and demand relationship and network congestion status. The historical time-series data of the electricity price is decomposed into several intrinsic mode function (EMF) components with different center frequencies using a variational mode decomposition algorithm; the number of EMF components... Determined based on the center frequency observation method: Preset initial The value is decomposed using trial decomposition, and the center frequency of each modal component is calculated. If the difference between the center frequencies of two modes is less than a preset threshold or the spectral overlap exceeds a set limit, then the value is reduced. The values ​​are then re-decomposed until the components of each intrinsic mode function are free of aliasing in the frequency domain, and the spectral correlation iterative closed-loop calibration procedure is executed. Step S200: Calculate the sample entropy of each intrinsic mode function component and establish a sample entropy set. Use the kernel density estimation algorithm to generate the probability density function curve of the sample entropy set, identify the two local maximum peaks in the probability density function curve, search for the global minimum point of probability density located between the two local maximum peaks, and set the entropy value corresponding to the global minimum point of probability density as the dynamic diversion threshold. Step S300: Input the intrinsic mode function components whose sample entropy is less than the dynamic diversion threshold into the basic trend processing branch and accumulate and reconstruct the basic trend sequence; input the intrinsic mode function components whose sample entropy is greater than the dynamic diversion threshold into the random fluctuation processing branch and accumulate and reconstruct the random fluctuation sequence. Step S400: In the basic trend processing branch, the basic trend sequence is linearly extrapolated using the differential autoregressive moving average model to obtain the trend prediction value. Step S500: In the random fluctuation processing branch, acquire the external driving factor data for the time to be predicted and historical times, calculate the mutual information value between the external driving factor data and the random fluctuation sequence within a preset short period window, construct a correlation mask matrix, implement instruction-level computational graph collapse control, and transform the mask matrix... In The identifier is mapped to the conditional step instruction of the Tensor Processing Unit (TPU). When the mask bit is detected, a no-op (NOP) is written to the instruction pipeline of the Matrix Multiplication Unit (MMU). The column strobe signal of the corresponding logic gate is physically cut off to prevent the floating-point multiply-accumulate (FMA) operation from being triggered. The gradient backpropagation value of this dimension is forced to be zero. Hardware-level sparsity is used to execute the logic to prevent numerical underflow noise caused by invalid features. The multi-head attention mechanism is used to perform weighted summation of the random fluctuation sequence of historical time based on the correlation mask matrix to obtain the fluctuation prediction value. The system also introduces a confidence calibration mechanism based on the sparsity of the feature space neighborhood, and calculates the query vector at the current time step. Calculate the Euclidean distance between the vector and all vectors in the historical key-value vector library, and use the fast nearest neighbor search algorithm to select the nearest neighbor. The system calculates these key-value vectors. The arithmetic mean of the minimum distances is defined as the sparsity index of the neighborhood in the feature space. The system constructs a nonlinear decay mapping function, which will... Mapped to confidence coefficients with values ​​between 0 and 1 The mapping logic is set as follows: when When it approaches 0, Approaching 1; when When the preset outlier threshold is exceeded, The value rapidly decays to near zero, while the system calculates the simple moving average of the random fluctuation sequence at the current time as a robust baseline value without model assumptions. The final fluctuation forecast value Calculated using the following formula: ; Step S600: The trend forecast value and the fluctuation forecast value are summed to generate the electricity price forecast result of the electricity spot trading data.

2. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S100, the process of decomposing the data using the variational mode decomposition algorithm includes: initializing the intrinsic mode function components and their center frequencies; iteratively updating each intrinsic mode function component and its center frequency using the alternating direction multiplier method under the constrained variational model framework; stopping the iteration when the frequency domain feature difference of the intrinsic mode function components in two adjacent iterations meets the preset convergence condition, and outputting the finally converged intrinsic mode function components.

3. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S200, the step of generating the probability density function curve using the kernel density estimation algorithm includes: selecting a Gaussian kernel function as the smoothing kernel, calculating the adaptive bandwidth parameter based on the number of data points and standard deviation in the sample entropy set; performing a convolution operation on the sample entropy set using the Gaussian kernel function and the adaptive bandwidth parameter to obtain a probability density function curve that reflects the distribution shape of the intrinsic mode function components in the entropy domain; the two local maxima peaks of the probability density function curve correspond to the trend-dominated low-entropy mode set and the fluctuation-dominated high-entropy mode set, respectively.

4. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S200, the step of searching for the global minimum point of probability density located between two local maxima is used to determine the adaptive classification boundary under non-stationary conditions. When the statistical distribution characteristics of electricity spot trading data drift with the market environment, causing the overall shape of the probability density function curve to shift or deform, the dynamic diversion threshold is adjusted accordingly based on the position of the global minimum point of probability density in the entropy domain to define the dividing point between the trend component and the fluctuation component.

5. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S500, the process of obtaining the fluctuation prediction value using the multi-head attention mechanism specifically includes the following weighted correction steps: calculating the Euclidean distance between the query vector at the time to be predicted and the key value vector at the historical time in the feature space; selecting the k closest key value vectors, calculating their average distance, and using the average distance as the feature space similarity index at the current time; and using a preset nonlinear decay function to map the feature space similarity index into a weighted coefficient with values ​​in the range of zero to one. The moving average of the target node at the current time is calculated as the baseline value; the original fluctuation prediction value output by the multi-head attention mechanism and the baseline value are weighted and summed using weighting coefficients to obtain the final fluctuation prediction value; among them, the larger the value of the feature space similarity index, the smaller the weight value of the original fluctuation prediction value.

6. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S500, the external driving factor data includes at least the net load forecast data of the target node, the date type identification data, and the electricity price gradient data of adjacent nodes; Mutual information values ​​are used to characterize the degree of correlation between external driving factor data and random fluctuation sequences within a preset short-period window; The relevance mask matrix is ​​a matrix with the same dimensions as the attention score matrix of the multi-head attention mechanism; The operation of forcibly setting the weight parameters to zero is achieved by setting the position of the element corresponding to the low-correlation driving factor in the correlation mask matrix to negative infinity, so that the corresponding attention weights in the subsequent Softmax function normalization operation approach zero.

7. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, The weighted summation calculation process using the multi-head attention mechanism in step S500 follows the formula below: ,in, This is the predicted value for fluctuations. A query matrix constructed based on external driving factor data at the time to be predicted. A key-value matrix constructed based on external driving factor data at historical moments. A value matrix constructed based on a random fluctuation sequence at historical moments. Let be the dimension of the key-value vector. It is a correlation mask matrix, which takes the value of negative infinity at positions where the mutual information value is below a preset lower limit, and takes the value of zero at other positions.

8. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S400, before performing linear extrapolation calculation using the differential autoregressive moving average model, a stationarity test step is also included: performing a unit root test on the basic trend series; if the test result shows that the basic trend series is non-stationary, then performing differencing on the basic trend series until it meets the stationarity requirement; using the Akaike information criterion or the Bayesian information criterion to determine the autoregressive order and moving average order of the differential autoregressive moving average model, and estimating the parameters of the basic trend series based on the determined order.

9. The method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, In step S600, after generating the electricity price prediction result of the electricity spot trading data, the method further includes performing an interval generation step based on entropy: extracting the statistical mean of the sample entropy set calculated in step S200; setting the confidence interval width of the prediction result based on the statistical mean; increasing the width of the confidence interval to characterize the uncertainty of the prediction result when the statistical mean increases; and outputting the confidence interval in association with the electricity price prediction result.

10. A method for time-series mining of electricity spot trading data capable of characterizing market volatility as described in claim 1, characterized in that, The method is applied to the real-time clearing price prediction scenario of the electricity spot market; the step S100 of obtaining the historical time series data of the electricity spot transaction price of the target node specifically includes: reading the node marginal electricity price data of the target node within a preset historical time period from the database interface of the electricity trading system; performing missing value interpolation and outlier removal on the read data to obtain standardized time series data.

Citation Information

Patent Citations

  • Inter-provincial spot transaction volume price declaration behavior prediction method and system

    CN119090544A

  • Electric power spot market price prediction method

    CN118446726A

  • Electric power spot market price prediction method and system based on artificial intelligence

    CN119515453A