A deep learning-based power spot transaction volume prediction method

By employing deep learning methods to align the price, trading volume, and liquidity sequences of the electricity spot market with a unified time step and generate a dynamic adjacency matrix, and combining this with the physical constraints of the power grid, the accuracy and feasibility issues of electricity spot trading volume forecasting were resolved, achieving highly accurate and robust forecast results.

CN122243551APending Publication Date: 2026-06-19YANTAI POWER PLANT OF HUANENG SHANDONG POWER GENERATION CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANTAI POWER PLANT OF HUANENG SHANDONG POWER GENERATION CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously quantify the market timing characteristics, topological correlation characteristics, and grid physical constraints of the electricity spot market, resulting in insufficient accuracy in transaction volume prediction and a lack of physical feasibility.

Method used

A deep learning-based method for predicting electricity spot trading volume is constructed. By aligning price, trading volume, and liquidity sequences with a unified time step, a dynamic normalized adjacency matrix is ​​generated. Interactive attention learning is performed using temporal neural networks and spatiotemporal graph neural networks. The physical feasible region is projected by combining the power transmission distribution coefficient and tie-line power limit, and the quantile confidence interval is output.

Benefits of technology

It enables accurate modeling of electricity spot trading volume in complex market environments, improves the accuracy, robustness and engineering usability of forecasts, and ensures that forecast results conform to the physical constraints of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243551A_ABST
    Figure CN122243551A_ABST
Patent Text Reader

Abstract

This invention relates to the field of electricity spot market forecasting technology, and discloses a method for forecasting electricity spot market trading volume based on deep learning, comprising the following steps: Step 1, obtaining price, trading volume, liquidity, load, renewable energy output, and tie-line parameters for each price zone; Step 2, unifying the time step and aligning the sequences; Step 3, generating node features, edge features, and edge weights, and constructing a dynamically normalized adjacency matrix; Step 4, using a temporal neural network to perform cross-channel attention learning on the aligned sequences to obtain microscopic hidden states and preliminary predictions; Step 5, performing spatiotemporal attention propagation to obtain topological hidden states; Step 6, implementing topological regularization and edge weight feedback; Step 7, performing projection onto the physically feasible region to obtain corrected trading volume prediction results; Step 8, projecting onto quantiles to form quantile confidence intervals. This invention achieves high-precision prediction and uncertainty quantification of electricity spot market trading volume within the physically feasible region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electricity spot market forecasting technology, specifically relating to a method for forecasting electricity spot market trading volume based on deep learning. Background Technology

[0002] The electricity spot market, through the balance of supply and demand within a price range, forms transparent market prices and trading volumes, serving as a crucial foundation for the safe operation and market-based dispatch of the power system. With the rapid increase in the proportion of renewable energy and the continuous expansion of inter-regional trading, prices, trading volumes, and market liquidity exhibit stronger volatility and spatial correlations. This makes traditional trading volume forecasting methods, relying on statistical models or single time series methods, unable to simultaneously characterize market microstructure features, grid topology constraints, and inter-regional power flow changes. In existing technologies, forecasting frameworks based on linear or weakly nonlinear assumptions typically cannot effectively handle the complex coupling relationships between high-dimensional inputs, making it difficult to establish a consistent mapping between market behavior and the laws of electrical physics. Consequently, the forecast results suffer from significant deficiencies in terms of engineering feasibility and interpretability.

[0003] On the other hand, electricity spot market trading volume is not only affected by price trends and market liquidity, but also by the combined constraints of grid physical constraints such as tie-line power limits and power transmission distribution characteristics. Ignoring these inherent constraints of the power system may result in predictions that violate power flow balance or inter-regional capacity limits, making them unsuitable for direct dispatch or market clearing. While existing research attempts to introduce graph neural networks or attention mechanisms to represent interactions between nodes, they generally lack explicit modeling of physical quantities such as power transmission distribution coefficients, and a unified method for projecting deep learning outputs onto the physically feasible domain has not been established. Furthermore, electricity spot market data suffers from inconsistent frequencies, asynchronous sampling, and missing records; without unified alignment and feature masking, deep learning models struggle to obtain stable temporal and topological representations. Summary of the Invention

[0004] This invention provides a deep learning-based method for predicting electricity spot trading volume, which solves the technical problem in related technologies that it is difficult to simultaneously quantify market time-series characteristics, topological correlation characteristics, and power grid physical constraints, resulting in insufficient prediction accuracy and lack of physical feasibility for trading volume.

[0005] This invention provides a method for predicting electricity spot trading volume based on deep learning, comprising the following steps: Step 1: Obtain price series, trading volume series, liquidity series, load data, renewable energy output data for each price zone, as well as the characteristics of each inter-regional interconnection line, interconnection line power limit, and power transmission distribution coefficient. Step 2: Unify the time step and align the price series, volume series, and liquidity series; Step 3: Using price zones as nodes and connecting lines as edges, generate node features, edge features, and edge weights, and normalize them to obtain a dynamically normalized adjacency matrix. Step 4: Based on the aligned price sequence, aligned trading volume sequence, and aligned liquidity sequence, construct a temporal neural network to perform cross-channel interactive attention joint learning, and output the micro-hidden state and preliminary trading volume prediction results. Step 5: On the dynamically normalized adjacency matrix, a spatiotemporal graph neural network is used to perform spatiotemporal attention propagation on node features and edge features to obtain the topological hidden state. Step 6: Using the power transmission distribution coefficient as the physical prior, implement topological regularization co-attention and edge weight mutual feedback on the microscopic hidden state and the topological hidden state to update the dynamic normalized adjacency matrix. Step 7: Based on the preliminary transaction volume forecast results, and according to the power transmission distribution coefficient and tie-line power limit, perform physical feasible region projection to obtain the corrected transaction volume forecast results. Step 8: Perform physical feasible region projection on the quantiles of the preset quantiles to obtain the projection results of the low quantiles and high quantiles, and combine them with the corrected transaction volume prediction results to form the quantile confidence interval for the target time.

[0006] The beneficial effects of this invention are as follows: This invention achieves accurate modeling of electricity spot trading volume in complex market environments by constructing a deep learning prediction framework that integrates temporal features, spatial topology, and power grid physical constraints. This invention utilizes a cross-channel interactive attention mechanism to characterize the dynamic coupling relationship between price, trading volume, and liquidity sequences, fully extracting market microstructure features and improving the ability to express temporal information. By introducing a spatiotemporal graph neural network onto a dynamically normalized adjacency matrix, this invention can capture the impact of cross-regional tie-line topology and inter-node correlations on changes in trading volume, achieving joint modeling of market behavior and power grid structure. Furthermore, this invention constructs a physical prior using the power transmission distribution coefficient and, through topological regularization co-attention and edge weight feedback mechanisms, ensures that the deep learning model maintains physical consistency during training, avoiding prediction results that violate power flow constraints. This invention obtains corrected predictions that satisfy capacity and non-negativity constraints through projection onto the physically feasible region and further outputs quantile confidence intervals, quantifying the uncertainty of the prediction results. Overall, this invention improves the accuracy, robustness, and engineering usability of electricity spot trading volume prediction. Attached Figure Description

[0007] Figure 1 This is a flowchart of a deep learning-based method for predicting electricity spot trading volume according to the present invention. Detailed Implementation

[0008] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.

[0009] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0010] like Figure 1 As shown, a method for predicting electricity spot trading volume based on deep learning includes the following steps: Step 1: Obtain price series, trading volume series, liquidity series, load data, renewable energy output data for each price zone, as well as the characteristics of each inter-regional interconnection line, interconnection line power limit, and power transmission distribution coefficient. Step 2: Unify the time step and align the price series, volume series, and liquidity series; Step 3: Using price zones as nodes and connecting lines as edges, generate node features, edge features, and edge weights, and normalize them to obtain a dynamically normalized adjacency matrix. Step 4: Based on the aligned price sequence, aligned trading volume sequence, and aligned liquidity sequence, construct a temporal neural network to perform cross-channel interactive attention joint learning, and output the micro-hidden state and preliminary trading volume prediction results. Step 5: On the dynamically normalized adjacency matrix, a spatiotemporal graph neural network is used to perform spatiotemporal attention propagation on node features and edge features to obtain the topological hidden state. Step 6: Using the power transmission distribution coefficient as the physical prior, implement topological regularization co-attention and edge weight mutual feedback on the microscopic hidden state and the topological hidden state to update the dynamic normalized adjacency matrix. Step 7: Based on the preliminary transaction volume forecast results, and according to the power transmission distribution coefficient and tie-line power limit, perform physical feasible region projection to obtain the corrected transaction volume forecast results. Step 8: Perform physical feasible region projection on the quantiles of the preset quantiles to obtain the projection results of the low quantiles and high quantiles, and combine them with the corrected transaction volume prediction results to form the quantile confidence interval for the target time.

[0011] In one embodiment of the present invention, the price sequence is the settlement price time sequence of the price zone at time k, with the unit being currency / electricity; the trading volume sequence is the trading volume of the price zone at time k, with the unit being electricity. The price zone refers to the price settlement unit divided in the electricity spot market according to the grid topology, transmission capacity constraints, and regional supply and demand characteristics. There are usually no significant transmission bottlenecks within each price zone, but different electricity spot prices may be formed between different price zones due to the limitation of inter-regional transmission capacity. The liquidity sequence at each time point consists of three components arranged in a fixed order to quantify the market microstructure state, namely: bid-ask spread component, order book depth component, and order imbalance component. Among them, the bid-ask spread component is the difference between the lowest selling price and the highest buying price, the order book depth component is the sum of the tradable quantities of the first N price levels, and the order imbalance component is the normalized difference between the buying volume and the selling volume. Load data refers to the time series of electricity consumption within the price zone, while renewable energy output data refers to the time series of available or generated power from renewable sources such as wind and solar power within the price zone. The tie-line power limit is the upper bound of the positive transmission capacity of the inter-regional tie-line at time k, expressed in power. The tie-line characteristics include available transmission capacity and congestion level. Available transmission capacity represents the remaining transmission capacity available for spot trading at a given time point under the constraints of tie-line power limit, maintenance occupancy, and planned occupancy. Congestion level represents a measure of tie-line utilization at a given time point. The power transmission distribution coefficient, expressed in matrix form, provides the linear sensitivity of tie-line power flow to net node injection, with a size of number of tie-lines × number of nodes.

[0012] In one embodiment of the present invention, unifying the time step and aligning the price series, volume series, and liquidity series includes: Step 11: Set a uniform time step and establish an ordered time index. For each price range, within each time step interval, take the most recent observation value of the price series and liquidity series before the end of the interval, and sum the trading volume series within the interval. When there are no records in the interval, the price series and liquidity series are kept forward from the previous valid observation value. When there is no previous value for the first time, a missing value is set. Step 12: Set up an alignment window to mitigate the effects of observation noise and asynchronous sampling. The alignment window contains the current time index and its equidistant positions before and after it, and the number of positions is a fixed positive integer. The equidistant position means that the index within the window progresses in unit steps. Establish alignment weight sets for the price series, trading volume series and liquidity series respectively. Each alignment weight is non-negative and sums to one within the alignment window. Step 13: For each time index, based on the alignment weight set, perform a weighted summation of the price sequence, volume sequence, and liquidity sequence within the alignment window to obtain the aligned price sequence, aligned volume sequence, and aligned liquidity sequence; boundary value preservation is used for positions outside the window. If the price or liquidity is missing within the entire window, the corresponding alignment result is still marked as missing, and the missing marker is handled according to the established masking rules in subsequent networks.

[0013] Through the above process, this embodiment standardizes price, trading volume, and liquidity inputs by unifying the time step, window weighted alignment, and missing label re-normalization; achieves cross-channel synchronization and noise suppression; and strengthens representation learning of micro-topological coupling by providing consistent temporal semantics and feature scale for deep learning networks, ultimately improving the prediction accuracy, stability, and interpretability of electricity spot trading volume.

[0014] In one embodiment of the present invention, using price zones as nodes and connecting lines as edges, node features, edge features, and edge weights are generated, and normalized to obtain a dynamically normalized adjacency matrix, including: Step 21: For each price zone and each time index, arrange the aligned price sequence, aligned liquidity sequence, aligned liquidity sequence, load data, and renewable energy output data in a fixed order to form node features; the order of the above five quantities remains unchanged throughout the text to ensure channel consistency and traceability.

[0015] Step 22: For each tie line and each time index, arrange the tie line features in a fixed order to form edge features; and in the power transmission distribution coefficient, sum the absolute values ​​of the coefficients of each price zone in the corresponding row of the tie line to obtain the tie line sensitivity; where available transmission capacity is defined as the remaining capacity under the tie line power limit and real-time power flow; congestion degree is defined as the percentage of used capacity. A tie line is a transmission channel connecting two price zones, including a single circuit or a set of multiple circuits, and the tie line undertakes power transmission across price zones.

[0016] Step 23: For each tie line, normalize the available transmission capacity, congestion level, and tie line sensitivity to the interval between zero and one, and sum them using weighted averages to obtain the edge weights. Calculate the ratio using the sum of edge weights within each node's row as the denominator and each edge weight as the numerator to obtain the dynamically normalized adjacency matrix. When the sum of edge weights within a row is zero, that row remains zero. Since the dynamically normalized adjacency matrix updates with the time index, the matrix elements roll over time, forming dynamic adjacencies.

[0017] Through the above process, this embodiment assembles aligned prices, trading volumes, liquidity, load, and renewable energy output into node features in a fixed order, and integrates available transmission capacity, congestion degree, and sensitivity derived from power transmission distribution coefficient into edge weights, thereby achieving graph-structured input construction for deep learning. Through inline normalization and time rolling, it can express cross-regional connection strength and physical sensitivity under the same probabilistic semantics. Ultimately, this invention enables stable learning of the coupling relationship between market micro-level and grid physics in the spatiotemporal graph neural network and topology regularization stages, improving the accuracy and interpretability of predictions.

[0018] In one embodiment of the present invention, a temporal neural network is constructed based on the aligned price sequence, the aligned trading volume sequence, and the aligned liquidity sequence to perform cross-channel interactive attention joint learning, outputting micro-hidden states and preliminary trading volume prediction results, including: Step 31: Linear mapping and biasing are applied to the aligned price sequence, aligned volume sequence, and aligned liquidity sequence, respectively, and time position encoding corresponding to the time index is superimposed to obtain price embedding, volume embedding, and liquidity embedding. The above embeddings are processed by a shared time-series encoder, which consists of attention sub-layer and feedforward sub-layer stacked sequentially. Both are equipped with residual connections and layer normalization to ensure stable information expression across time indices. Step 32: Within the same time index, to achieve cross-channel interactive attention joint learning, the query is determined to be a fixed-order concatenation of price embedding and liquidity embedding, and the key and value are determined to be a fixed-order concatenation of price embedding, liquidity embedding, and volume embedding. The relevance score is calculated using the vector dot product of the query and key, scaled by the square root of the channel dimension. Exponential normalization is performed within the three channels to obtain the attention coefficient, and the values ​​are weighted using the attention coefficient to obtain the weighted result, which serves as the input to this layer of the shared temporal encoder. The formula for calculating the weighted result is as follows: ; in, This indicates the weighted result. , and These represent price embedding, volume embedding, and liquidity embedding, respectively, with d representing the scaling dimension, which is taken as the key vector dimension. , and Let represent the learnable projection matrices for the three attention methods, ... express and Assemble in a fixed order; It should be noted that in this process, the query comes from price and liquidity, emphasizing the dominance of microstructure in attention; the key and value come from price, liquidity and trading volume, so that the three interact within the index at the same time; the scaling and softmax axes are clear, ensuring that the attention weights are interpretable and sum to one.

[0019] Step 33: The output of the shared time-series encoder is determined as the micro-hidden state. The micro-hidden state is linearly mapped and biased to obtain preliminary volume prediction results. A multi-task uncertainty weighted loss is established, and the weights for volume regression loss, price volatility loss, and liquidity loss are calculated using their corresponding learnable variances. Specifically, each loss is multiplied by half the inverse of its corresponding variance and added to the logarithm of the variance, then the sum of the three terms is used as the training target. Specifically, the micro-hidden state is a deep learning representation of price embedding, volume embedding, and liquidity embedding after their interaction in the time-series and channel dimensions. It includes the time-series changes and short-term trends of the price sequence, the historical structure and interval characteristics of volume, and micro-market structure information such as price spreads, depth, and imbalance. After obtaining the micro-hidden state, this invention uses a single-layer linear mapping as the prediction head, projecting the hidden state onto the volume space corresponding to the target prediction step size to obtain preliminary volume prediction results for each price zone. Subsequent steps further incorporate physical constraints such as topological hidden states, power transmission distribution coefficients, and tie-line power limits, and correct the predictions through projection onto the physical feasible region.

[0020] The formula for calculating the multi-task uncertainty-weighted loss is as follows: ; This represents the result of the uncertainty-weighted loss for multiple tasks. This represents the volume regression loss, used to measure the deviation between predicted and actual trading volume. This represents the loss due to price volatility, used to constrain the model to learn the gains on the price side simultaneously, thus enhancing the structural interpretation of trading volume. This represents liquidity loss and is used to constrain the consistency of the model's representation across the bid-ask spread component, order book depth component, and order imbalance component; all three types of loss can be represented by mean squared error. , and These represent three learnable variance parameters used to quantify the noise intensity of each task; Through the above process, this embodiment achieves explicit modeling of the coupling relationship between price, liquidity, and trading volume by implementing cross-channel interactive attention joint learning on the aligned price series, aligned trading volume series, and aligned liquidity series within a unified time position encoding and equal-dimensional embedding space. By sharing the micro-hidden state output by the time sequence encoder and jointly constraining price fluctuation loss and liquidity loss with multi-task uncertainty weighted loss, it can stably extract key time series representations for trading volume prediction and adaptively balance task weights, ultimately improving the prediction accuracy and robustness of electricity spot trading volume and enhancing the model's ability to explain changes in market microstructure.

[0021] In one embodiment of the present invention, a spatiotemporal graph neural network is used to perform spatiotemporal attention propagation on node features and edge features on a dynamically normalized adjacency matrix to obtain a topological hidden state, including: Step 41: For each price zone and each time index, the topological hidden state and node features of the previous time index are linearly transformed to obtain node projections, which are used to map historical topological information and current node features to a unified latent space, so that the representations of each node are comparable when scoring attention in the future. The edge features are linearly transformed to obtain edge embeddings, so that the available transmission capacity and congestion degree and other link information are encoded into vector form. In the first time index, the result of the linear transformation of the node features is used as the initial value of the topological hidden state of the previous time index. Step 42: Within the same time index, for each connection line, connect them in a fixed order of node projection, adjacent node projection, and edge embedding. Generate an unnormalized score using a scorer with LeakyReLU. Within the same node row and within the adjacency range of the dynamically normalized adjacency matrix, exponentially normalize the score to obtain the attention coefficient. Set the attention coefficient to zero for non-adjacent positions. Specifically, the scorer with LeakyReLU means that the connection vectors used to calculate spatial attention are first linearly mapped, and then nonlinearly transformed using the LeakyReLU function to maintain a non-zero slope in the negative domain, thereby enhancing the discriminability of the score and avoiding complete gradient vanishing, resulting in an unnormalized attention score. The formula for calculating the unstandardized scoring is as follows: ; This indicates that the scoring was not standardized. express function, This represents the node projection of node i at time k. This represents the projection of node j, which is adjacent to node i. This represents the edge embedding between node i and node j. Indicates a fixed order , and Concatenate, where 'a' represents the learnable weight vector; Step 43: Within each node row, the vector of the topological hidden state of the previous time index of the adjacent nodes, after linear transformation, is weighted and summed using the attention coefficient to obtain the spatial message, which summarizes the influence of neighboring regions on this region. Using the spatial message and the topological hidden state of the previous time index as input, the update gate, reset gate, and candidate state are calculated sequentially. The update gate and reset gate use Sigmoid, and the candidate state uses hyperbolic tangent. The topological hidden state of the previous time index and the candidate state are weighted and synthesized using the update gate to obtain the topological hidden state of the current time index.

[0022] Specifically, the update gate controls whether to retain more historical topological hidden states or adopt more new candidate states at the current time step, thus adapting to changes at different time scales; the reset gate adjusts how much historical information should be retained when generating candidate states, thereby suppressing irrelevant long-term memories; the candidate states are used to construct candidate topological representations at the current time step given spatial information and reset historical states; finally, the update gate performs a weighted synthesis of the topological hidden states and candidate states from the previous time index to achieve a smooth update of the topological hidden states, enabling the model to respond to new spatial perturbations while maintaining the continuity and stability of the topological evolution process.

[0023] Through the above process, this embodiment explicitly characterizes the impact of cross-regional connections on the evolution of transaction volume in the local area by implementing spatial attention normalization and gated time recursion within the adjacency range of the dynamically normalized adjacency matrix; it realizes the learnable propagation of neighboring region impacts to the local region's response; and through joint modeling with node features and edge features, it can extract stable topological hidden states under the deep learning framework, ultimately supporting the invention to achieve higher prediction accuracy and interpretability under complex network conditions.

[0024] In one embodiment of the present invention, using the power transmission distribution coefficient as a physical prior, topological regularization co-attention and edge weight mutual feedback are applied to the microscopic hidden state and the topological hidden state to update the dynamically normalized adjacency matrix, including: Step 51: Within the same time index, the micro-hidden state and the topological hidden state are linearly mapped to obtain the query vector and the key vector, respectively; the result of scaling the point integral of the query vector and the key vector by the square root of the dimension is normalized in the same node row to obtain the first attention coefficient representing the micro-to-topological and the second attention coefficient representing the topological to the micro-; the attention coefficients of the non-adjacent positions of the dynamically normalized adjacency matrix are set to zero to keep the attention propagation restricted by the real cross-region structure; The formulas for calculating the first attention coefficient and the second attention coefficient include: ; ; Let represent the first attention coefficient from the microscopic to the topological level, used to indicate how much information node i should absorb from the topological hidden state of node j during the update process. The second attention coefficient, representing the topology-to-microscopic approach, measures how much information the microscopic behavior of node j should contribute to the topology update of node i when the system topology is being updated. Let represent the query vector after linear mapping of the microscopic hidden state of node i. Let represent the key vector after the topological hidden state linear mapping of node j. The query vector represents the result of a linear mapping of the topological hidden state of node i. Let represent the key vector after linear mapping of the microscopic hidden state of node j. Let represent the set of adjacencies of node i at time k under the dynamically normalized adjacency matrix, and exp represent the exponential function.

[0025] Step 52: After taking the absolute value of the power transmission distribution coefficient element by element, multiply its transpose by itself to obtain the node-to-node physical prior matrix, which is used to describe the influence intensity of node-injected disturbances on other nodes, and is normalized within the same node row to ensure comparability; establish a consistency constraint, and sum the sum of the squares of the differences between the first attention coefficient and the elements of the physical prior matrix and the sum of the squares of the differences between the second attention coefficient and the elements of the transpose of the physical prior matrix, as an additional term and incorporate it into the training objective; the consistency constraint is used to force the attention structure to follow the physical distribution characteristics of cross-regional power flow, so that the quantification of cross-regional flow patterns by the deep learning model no longer completely depends on data, but integrates the inherent physical logic of the power system; The formula for calculating the additional items is as follows: ; The loss value representing the additional term is incorporated into the training objective along with the multi-task uncertainty-weighted loss. This represents the element in the i-th row and j-th column of the physical prior matrix. This represents the element in the j-th row and i-th column of the physical prior matrix; Step 53 involves linearly scoring the micro-hidden states and adding a bias to obtain node activation values. These activation values ​​are then processed using the Sigmoid function and scaled according to a temperature coefficient to obtain row gating for adjusting edge weights. The edge weights are then scaled proportionally by row using row gating and normalized within the same node row to obtain an updated dynamically normalized adjacency matrix. When the sum of the edge weights in a row after scaling is zero, that row remains zero. This step enables edge weights to be updated in real-time according to the current market microstructure, reflecting the dynamic adjustment of the importance of cross-regional connections as market conditions change.

[0026] Through the above process, this embodiment incorporates the power transmission distribution coefficient as a physical prior into the deep learning framework, enabling bidirectional constraints between the microscopic hidden state and the topological hidden state through a co-attention mechanism. Furthermore, it utilizes physical consistency loss and row-gated updates to ensure the learnability and physical rationality of the dynamically normalized adjacency matrix. Therefore, this invention not only improves the structural accuracy of cross-regional correlation modeling but also enhances the model's sensitivity and stability to changes in market conditions, giving it stronger predictive power and higher interpretability in complex electricity market environments.

[0027] In one embodiment of the present invention, based on the preliminary transaction volume prediction results, and according to the power transmission distribution coefficient and the tie-line power limit, a physical feasible region projection is performed to obtain a revised transaction volume prediction result, including: Step 61: Combine the preliminary volume prediction results into a volume vector according to the price zone order; apply a fixed linear transformation to the volume vector according to a fixed positive and negative direction convention to obtain a node net injection power vector corresponding to each price zone; the fixed positive and negative direction convention refers to the pre-set power injection direction sign for each price zone, which specifies that when the volume is positive, the corresponding node injects power outward, and when it is negative, the corresponding node absorbs power from the outside. The positive and negative direction convention is represented by a sign matrix, for example, assigning a value of 1 to some zones and a value of -1 to others. Multiplying the sign matrix with the volume vector yields the node net injection power vector. Step 62: Apply the power transmission distribution coefficient to the node net injected power vector, calculate the tie-line power flow vectors arranged in tie-line order, and summarize the tie-line power limits to form the capacity upper bound vector; express the upper and lower bounds corresponding to the power flow not exceeding the capacity upper bound vector as two sets of linear inequalities, respectively defining the upper and lower bounds; specifically, multiply the node net injected power vector by the matrix formed by the power transmission distribution coefficient to obtain the power flow vectors arranged in tie-line order; the two sets of linear inequalities are: and , and These represent the upper and lower bounds corresponding to the capacity upper bound vector, respectively. The upper and lower bounds are used to prevent the predicted transaction volume from causing the cross-regional flow to exceed the safety limit. Step 63: Based on the upper limit constraint of trading volume, establish amplitude box constraints for each price zone, that is, limit the trading volume to be no less than zero and no more than the upper limit constraint of trading volume; merge the two sets of linear inequalities with the amplitude box constraints and define them as the physical feasible region, which is used to describe all allowed trading volume vectors that satisfy the physical laws of power flow. Step 64: Using half the square of the Euclidean distance between the desired trading volume vector and the preliminary trading volume prediction result as the objective function, a convex quadratic programming projection model is established within the physically feasible region. The goal is to minimize this objective function while satisfying the physical feasible region. This model is used to make the corrected trading volume as close as possible to the preliminary prediction given by the deep learning model under strict physical constraints, thereby maximizing the preservation of the model's statistical learning ability. The desired trading volume vector represents the optimization variable solved during the projection process within the physical feasible region, and its components are the desired trading volume values ​​for each price zone. The objective function is constructed and the solution is obtained by minimizing the objective function within the physical feasible region. Step 65: Use a convex quadratic programming solver to solve the convex quadratic programming projection model to obtain the optimal trading volume vector. That is, the optimal trading volume vector is obtained by solving the objective function to the minimum value within the physical feasible region. When the preliminary trading volume prediction result satisfies the physical feasible region, the preliminary trading volume prediction result is used as the optimal trading volume vector. The optimal trading volume vector is then split into the corrected trading volume prediction results corresponding to each price zone.

[0028] Through the aforementioned physical feasible region projection mechanism, this embodiment combines the prediction results of deep learning with the power flow physics of the power system. This ensures that the transaction volume prediction not only relies on data-driven microscopic and topological representations but also strictly satisfies the physical boundaries defined by the power transmission distribution coefficient and tie-line power limits. This process effectively prevents the deep learning model from generating unrealizable or power flow-constrained predictions, improving the feasibility, reliability, and engineering usability of electricity spot transaction volume prediction, thereby enhancing the prediction accuracy and stability of this invention in complex power market environments.

[0029] In one embodiment of the present invention, a physical feasible region projection is performed on the quantiles of a preset quantile to obtain the projection results of the low quantiles and the high quantiles, which, together with the corrected trading volume prediction results, form the quantile confidence interval for the target time, including: Step 71: Determine the preset quantile set. For the lower and higher quantiles in the preset quantile set, summarize the corresponding quantiles in order of price zones, and generate lower and higher quantile vectors respectively. The preset quantile set is a set of quantiles that the model selects at fixed intervals during the training phase to output the upper and lower bounds of the predicted distribution. The lower and higher quantiles are preferably 5% and 95% respectively. This step organizes the quantiles for each price zone into a unified vector form, so that it can share the same optimization structure with the physical feasible region projection model. Step 72: Project the low quantile vector and the high quantile vector into the physical feasible region respectively to determine the projection results of the low quantile and the high quantile. When the input has satisfied the physical feasible region, take the input as the corresponding projection result. The projection adopts the same convex quadratic programming projection model as the modified transaction volume prediction and adopts the same objective function form, which is to minimize half of the square of the Euclidean distance between the vector to be solved and the given vector. However, the object approximated in step 64 is the preliminary transaction volume prediction result, while the object approximated in the quantile projection is the quantile vector corresponding to the preset quantile. Step 73: Compare the projection results of the lower quantile and the projection results of the higher quantile in each price zone and arrange them in ascending order to determine the lower and upper bounds of the confidence interval; combine the lower and upper bounds in order of price zone and use them together with the modified trading volume prediction result as the quantile confidence interval and point estimate for the target time. The modified trading volume prediction result is used as the point estimate, and the lower and upper bounds form the quantile confidence interval for the target time.

[0030] Through the aforementioned quantile projection process, this embodiment introduces physical feasible region constraints into the deep learning prediction framework, enabling transaction volume prediction to not only possess point prediction capabilities but also interval prediction capabilities that satisfy physical power flow laws. This mechanism ensures that the upper and lower bounds of the quantile confidence interval are achievable under the constraints of the power transmission distribution coefficient and tie-line power limits. This allows the invention to maintain physical consistency and operational feasibility even in the presence of prediction uncertainties, enhancing the model's credibility, interpretability, and application value in the electricity spot market.

[0031] In one embodiment of the present invention, the missing markers generated along the alignment process are propagated throughout the shared temporal encoder, spatiotemporal graph neural network, and topological regularization co-attention pathway, and are subject to masking control, including: In the shared time-series encoder, for time indices and price regions with missing value labels, the relevance score and channel gating score of the corresponding channel attention calculation are set to zero. That is, when calculating the similarity between the query vector and the key vector, the score is directly set to zero so that it does not participate in the softmax weight normalization. The channel gating score is set to zero so that the channel does not participate in the weighting and recursion within the time index. For channels without missing value labels, the original calculation is maintained. This masking method ensures that missing values ​​will not spread to other time indices or price regions through attention. In the spatiotemporal graph neural network and topologically regularized co-attention, within the adjacency range of the dynamically normalized adjacency matrix, node features and edge features with missing labels are set to zero in spatial attention scoring and gating recursion to prevent them from affecting the spatial attention coefficients. During the recursion of the gating loop unit, the hidden state update coefficients of the nodes are also set to zero to ensure that topological information is propagated only by valid nodes. Within the same node row of the first and second attention coefficients, the coefficients at corresponding positions are set to zero. These masking rules are consistent across the entire time index and price range to ensure the stability and reliability of the co-attention structure.

[0032] By introducing a full-link shielding control mechanism for missing data labels, this invention avoids interference from missing data on cross-channel attention learning and spatiotemporal dependency modeling in the shared temporal encoder, spatiotemporal graph neural network, and topology regularized co-attention. This ensures that the deep learning model performs representation learning and topology propagation only within the effective observation range. This mechanism enables the invention to maintain robustness and consistency when facing problems such as missing data and data asynchrony in the real electricity market, thereby improving the reliability and physical consistency of trading volume prediction.

[0033] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0034] The embodiments of the present invention have been described above, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of the present embodiments, all of which are within the protection scope of the present embodiments.

Claims

1. A method for predicting electricity spot trading volume based on deep learning, characterized in that, Includes the following steps: Step 1: Obtain price series, trading volume series, liquidity series, load data, renewable energy output data for each price zone, as well as the characteristics of each inter-regional interconnection line, interconnection line power limit, and power transmission distribution coefficient. Step 2: Unify the time step and align the price series, volume series, and liquidity series; Step 3: Using price zones as nodes and connecting lines as edges, generate node features, edge features, and edge weights, and normalize them to obtain a dynamically normalized adjacency matrix. Step 4: Based on the aligned price sequence, aligned trading volume sequence, and aligned liquidity sequence, construct a temporal neural network to perform cross-channel interactive attention joint learning, and output the micro-hidden state and preliminary trading volume prediction results. Step 5: On the dynamically normalized adjacency matrix, a spatiotemporal graph neural network is used to perform spatiotemporal attention propagation on node features and edge features to obtain the topological hidden state. Step 6: Using the power transmission distribution coefficient as the physical prior, implement topological regularization co-attention and edge weight mutual feedback on the microscopic hidden state and the topological hidden state to update the dynamic normalized adjacency matrix. Step 7: Based on the preliminary transaction volume forecast results, and according to the power transmission distribution coefficient and tie-line power limit, perform physical feasible region projection to obtain the corrected transaction volume forecast results. Step 8: Perform physical feasible region projection on the quantiles of the preset quantiles to obtain the projection results of the low quantiles and high quantiles, and combine them with the corrected transaction volume prediction results to form the quantile confidence interval for the target time.

2. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, The liquidity sequence at each point in time consists of three components arranged in a fixed order: bid-ask spread, order book depth, and order imbalance. The bid-ask spread is the difference between the lowest bid price and the highest bid price, the order book depth is the sum of the tradable quantities for the first N price levels, and the order imbalance is the normalized difference between the buy and sell volumes. The characteristics of the tie line include: available transmission capacity and congestion level.

3. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, Unify the time step and align the price series, volume series, and liquidity series, including: Step 11: Set a uniform time step and establish an ordered time index. For each price range, within each time step interval, take the most recent observation value of the price series and liquidity series before the end of the interval, and sum the trading volume series within the interval. When there are no records in the interval, the price series and liquidity series are kept forward from the previous valid observation value. When there is no previous value for the first time, a missing value is set. Step 12: Set up an alignment window. The alignment window contains the current time index and its equidistant positions before and after it, and the number of positions is a fixed positive integer. Establish alignment weight sets for the price series, volume series, and liquidity series respectively. Each alignment weight is non-negative and sums to one within the alignment window. Step 13: For each time index, perform a weighted summation of the price sequence, volume sequence, and liquidity sequence within the alignment window according to the alignment weight set to obtain the aligned price sequence, aligned volume sequence, and aligned liquidity sequence; boundary value preservation is used for positions that exceed the window limits.

4. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, Using price zones as nodes and connecting lines as edges, node features, edge features, and edge weights are generated and normalized to obtain a dynamically normalized adjacency matrix, including: Step 21: For each price zone and each time index, arrange the aligned price sequence, aligned liquidity sequence, aligned liquidity sequence, load data, and renewable energy output data in a fixed order to form node features; Step 22: For each tie line and each time index, arrange the tie line features in a fixed order to form edge features; and in the power transmission distribution coefficient, sum the absolute values ​​of the price zone coefficients of the corresponding row of the tie line to obtain the tie line sensitivity. Step 23: For each tie line, normalize the available transmission capacity, congestion degree, and tie line sensitivity to the interval between zero and one, and sum them by weight to obtain the edge weights; use the sum of the edge weights in each node's row as the denominator and the edge weights as the numerator to calculate the ratio to obtain the dynamically normalized adjacency matrix; keep the row zero when the sum of the edge weights in the row is zero.

5. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, A temporal neural network is constructed to perform cross-channel interactive attention joint learning, outputting micro-hidden states and preliminary transaction volume prediction results, including: Step 31: Linear mapping and biasing are applied to the aligned price sequence, aligned volume sequence, and aligned liquidity sequence, respectively, and time position encoding is superimposed to obtain price embedding, volume embedding, and liquidity embedding; a shared time sequence encoder is adopted, which consists of attention sub-layer and feedforward sub-layer stacked sequentially, both of which are configured with residual connections and layer normalization. Step 32: Within the same time index, determine that the query is a connection of price embedding and liquidity embedding in a fixed order, and determine that the key and value are connected in a fixed order of price embedding, liquidity embedding and volume embedding; calculate the relevance score using the result of the vector dot product of query and key scaled by the square root of the channel dimension, perform exponential normalization within the three channels to obtain the attention coefficient, and weight the value with the attention coefficient. Step 33: Determine the output of the shared time encoder as the micro hidden state. Use the micro hidden state as a linear mapping and add a bias to obtain the preliminary trading volume prediction result. Establish a multi-task uncertainty weighted loss. Calculate the weights of the trading volume regression loss, price fluctuation loss and liquidity loss with the corresponding learnable variance. That is, first multiply each loss by half of the inverse of the corresponding variance and add it to the logarithm of the variance, and then sum the three terms as the training target.

6. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, On the dynamically normalized adjacency matrix, a spatiotemporal graph neural network is used to perform spatiotemporal attention propagation on node features and edge features to obtain the topological hidden state, including: Step 41: For each price zone and each time index, the topological hidden state of the previous time index and the node features are linearly transformed to obtain the node projection, and the edge features are linearly transformed to obtain the edge embedding. In the first time index, the result of the linear transformation of the node features is used as the initial value of the topological hidden state of the previous time index. Step 42: Within the same time index, for each connection line, connect them in a fixed order of node projection, adjacent node projection and edge embedding. Generate an unnormalized score using a scorer with LeakyReLU. In the same node row and within the adjacency range of the dynamically normalized adjacency matrix, exponentially normalize the score to obtain the attention coefficient. Set the attention coefficient to zero for non-adjacent positions. Step 43: Within each node row, the vector of the topological hidden state of the previous time index of the adjacent node after linear transformation is weighted and summed with the attention coefficient to obtain the spatial message; taking the spatial message and the topological hidden state of the previous time index as input, the update gate, reset gate and candidate state are calculated in sequence. The update gate and reset gate adopt Sigmoid, the candidate state adopts hyperbolic tangent, and the update gate is used to weight and synthesize the topological hidden state of the previous time index and the candidate state to obtain the topological hidden state of the current time index.

7. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, Using the power transmission distribution coefficient as a physical prior, topological regularization co-attention and edge weight mutual feedback are applied to the microscopic hidden state and the topological hidden state to update the dynamically normalized adjacency matrix, including: Step 51: Within the same time index, the micro-hidden state and the topological hidden state are linearly mapped to obtain the query vector and the key vector, respectively; the result of scaling the point integral of the query vector and the key vector by the square root of the dimension is normalized in the same node row to obtain the first attention coefficient representing the micro-to-topological and the second attention coefficient representing the topological to the micro-; the attention coefficients of the non-adjacent positions of the dynamically normalized adjacency matrix are set to zero. Step 52: After taking the absolute value of the power transmission distribution coefficient element by element, multiply the transpose of the coefficient by itself to obtain the node-to-node physical prior matrix, and normalize it in the same node row; establish a consistency constraint, and sum the sum of the squares of the differences between the first attention coefficient and the elements of the physical prior matrix and the sum of the squares of the differences between the second attention coefficient and the elements of the transpose of the physical prior matrix, and add them as an additional term to the training objective. Step 53: The microscopic hidden states are linearly scored and biased to obtain the node activation values. The values ​​are then processed by the Sigmoid function and scaled according to the temperature coefficient to obtain row gating. The edge weights are scaled proportionally by row using row gating and normalized within the same node row to obtain the updated dynamic normalized adjacency matrix.

8. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, Based on the preliminary trading volume forecast, and according to the power transmission distribution coefficient and tie-line power limit, a physical feasible region projection is performed to obtain the revised trading volume forecast, including: Step 61: Combine the preliminary trading volume prediction results into a trading volume vector according to the price zone order; apply a fixed linear transformation to the trading volume vector according to the fixed positive and negative direction convention to obtain the node net injection power vector corresponding to each price zone. Step 62: Apply the power transmission distribution coefficient to the node net injected power vector, calculate the tie-line power flow vectors arranged in tie-line order, and summarize the tie-line power limits to form the capacity upper bound vector; express the upper and lower bounds corresponding to the power flow not exceeding the capacity upper bound vector as two sets of linear inequalities, respectively limiting the upper and lower bounds. Step 63: Based on the upper limit constraint of trading volume, establish amplitude box constraints for each price zone, that is, limit the trading volume to not less than zero and not exceed the upper limit constraint of trading volume; merge the two sets of linear inequalities with the amplitude box constraints and define them as the physical feasible region. Step 64: Using half the square of the Euclidean distance between the volume vector to be determined and the preliminary volume prediction result as the objective function, establish a convex quadratic programming projection model within the physical feasible region. The goal is to minimize the objective function while satisfying the physical feasible region. Step 65: Use a convex quadratic programming solver to solve the convex quadratic programming projection model to obtain the optimal trading volume vector; when the preliminary trading volume prediction result satisfies the physical feasible region, use the preliminary trading volume prediction result as the optimal trading volume vector; divide the optimal trading volume vector into corrected trading volume prediction results according to the price range.

9. The method for predicting electricity spot trading volume based on deep learning according to claim 1, characterized in that, The physical feasible region projection is performed on the quantiles of the preset quantiles to obtain the projection results of the low quantiles and high quantiles. These projections, together with the corrected trading volume prediction results, form the quantile confidence interval for the target time, including: Step 71: Determine the preset quantile set. For the lower and higher quantiles in the preset quantile set, summarize the corresponding quantiles in order of price range and generate the lower quantile vector and the higher quantile vector respectively. Step 72: Project the low quantile vector and the high quantile vector into the physical feasible region respectively to determine the projection results of the low quantile and the high quantile; when the input has satisfied the physical feasible region, take the input as the corresponding projection result. Step 73: Compare the projection results of the lower quantile and the projection results of the higher quantile in each price zone and arrange them in ascending order to determine the lower and upper bounds of the confidence interval; combine the lower and upper bounds in order of price zone and use them together with the corrected volume prediction results as the quantile confidence interval and point estimate for the target time.

10. A method for predicting electricity spot trading volume based on deep learning according to claim 6, characterized in that, Missing labels generated along the alignment process are propagated throughout the shared temporal encoder, spatiotemporal graph neural network, and topological regularization co-attention pathway, and masking control is implemented, including: In the shared time encoder, for time indices and price zones with missing labels, the relevance score of the attention calculation and the channel gating score of the corresponding channels are set to zero, and they do not participate in weighting and recursion within the time index. For channels without missing labels, the original calculation is maintained. In spatiotemporal graph neural networks and topologically regularized co-attention, within the adjacency range of the dynamically normalized adjacency matrix, node features and edge features with missing labels are set to zero in spatial attention scoring and gating recursion. In the same node row of the first attention coefficient and the second attention coefficient, the coefficients at the corresponding positions are set to zero.