Artificial intelligence-based real-time electricity price prediction method, system, device and medium
By constructing a spatiotemporal graph neural network model and integrating multi-granularity features and dynamic adjacency matrices, the accuracy and risk quantification problems of existing electricity price forecasting methods in complex market environments are solved, achieving high-precision electricity price forecasting and risk assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INSPUR ARTIFICIAL INTELLIGENCE RES INST CO LTD SHANDONG CHINA
- Filing Date
- 2026-01-20
- Publication Date
- 2026-06-12
AI Technical Summary
Existing electricity price forecasting methods are insufficient to deeply integrate spatiotemporal information and dynamically capture market interactions in a market environment with a high proportion of renewable energy access and strong inter-regional transactions. Furthermore, they cannot quantify and predict uncertainties, making it difficult to support refined risk decision-making.
An AI-based real-time electricity price prediction method is adopted. By constructing a spatiotemporal graph neural network model, node-level, node-pair-level, and graph-level features are integrated. The influence between nodes is quantified by time-delay mutual information. Combined with dynamic adjacency matrix and self-attention mechanism, the probability distribution parameters of future electricity prices are output.
It significantly improves forecast accuracy, adapts to market fluctuations, quantifies risks, and provides accurate and reliable decision-making support, making it suitable for market participants with different risk appetites.
Smart Images

Figure CN122199011A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a real-time electricity price prediction method, system, device, and medium based on artificial intelligence. Background Technology
[0002] With the deepening of electricity market reform, real-time electricity price forecasting is crucial for market participants. However, in a market environment characterized by high-proportion renewable energy integration, strong inter-regional trading, and complex spatiotemporal load correlations, traditional forecasting methods face severe challenges. Existing methods often focus on time series analysis of single nodes or only statically consider spatial factors, making it difficult to effectively characterize the dynamic transmission mechanism and spatiotemporal coupling effect of electricity prices within the power grid. Furthermore, most models only output deterministic point predictions, failing to quantify forecast uncertainty and thus hindering refined risk-based decision-making. Therefore, a novel electricity price forecasting method is urgently needed that can deeply integrate spatiotemporal information, dynamically capture market interactions, and provide probabilistic forecasting results. Summary of the Invention
[0003] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method, system, device and medium for real-time electricity price prediction based on artificial intelligence to solve the above-mentioned technical problems.
[0004] In a first aspect, the present invention provides a real-time electricity price prediction method based on artificial intelligence, comprising: Real-time acquisition of time-series data and related external factor data of multiple spatial nodes in the target electricity market; Based on the acquired data, node-level instantaneous features, node-pair-level interaction features, and graph-level global features are constructed in parallel or sequentially to form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence intensity and propagation delay between nodes. The spatiotemporal feature vector is input into a pre-trained spatiotemporal graph neural network model, which outputs the probability distribution parameters of the electricity price at the future target time. Based on the probability distribution parameters, point prediction values or interval prediction values are generated.
[0005] In one optional implementation, time-series data and relevant external factor data of multiple spatial nodes in the target electricity market are acquired in real time, including: The time series data is obtained by acquiring at least one of the following: historical electricity price sequence of the multiple spatial nodes, real-time load data, real-time power data of inter-regional power transmission channels, and real-time and predicted power output data of new energy sources. Meteorological data and key time marker data are acquired as the external factor data; The time-series data is continuously collected at a preset sampling interval higher than the market clearing frequency, and includes at least a historical window of data for a set time length.
[0006] In one optional implementation, based on the acquired data, node-level instantaneous features, node-pair-level interaction features, and graph-level global features are constructed in parallel or sequentially, collectively forming a spatiotemporal feature vector, including: Based on the load and electricity price data of each node within a preset short time window, the elasticity coefficient reflecting the sensitivity of load changes to electricity price changes is calculated as a node-level instantaneous feature. Based on mutual information calculation under different time delays, the maximum mutual information value and corresponding time delay between any two nodes are extracted as node-pair level interaction features. Based on the load curve of the entire network and the output curve of new energy sources, mathematical factors for the morphology of the duck-shaped curve are calculated and quantified as global features at the graph level.
[0007] In one optional implementation, based on mutual information calculation under different time delays, the maximum mutual information value and corresponding time delay between any two nodes are extracted as node-pair level interaction features, including: For any two spatial nodes, under a set of preset time delay sequences, calculate the mutual information value between the historical data time series of the first node and the historical data time series of the second node after corresponding time delay offset; The maximum value among the calculated mutual information values is selected as the maximum mutual information value, and the time delay corresponding to the maximum value is taken as the corresponding time delay.
[0008] In an optional implementation, based on the overall network load curve and the renewable energy output curve, a mathematical factor is calculated to quantify the duck-shaped curve morphology as a graph-level global feature, including: Based on the network load curve, identify and obtain the morning peak load peak, midday load trough, and evening peak load peak; Based on the morning peak load peak and the midday load trough, the duck body depth is calculated, whereby the duck body depth represents the degree of decrease in midday load trough relative to the morning peak. Based on the midday load trough, the evening peak load peak and their corresponding time points, the duck neck steepness is calculated, which represents the rate of load increase from the midday trough to the evening peak. Based on the output data of the new energy power output curve during the midday period, the duckbill convexity is calculated, which represents the degree of fluctuation in the new energy power output during this period.
[0009] In an optional implementation, the pre-trained spatiotemporal graph neural network model is obtained through the following model construction and training method: The model building steps include: A fusion module is constructed to divide the time series of each spatial node into non-overlapping time series blocks, and convert the starting point time encoding of each block into a vector through an embedding layer and fuse it with the time series block features. A dynamic graph attention module is constructed, which realizes information interaction between nodes based on a region adaptive adjacency matrix. The basic part of the adjacency matrix is determined by the power grid topology, and the dynamic part is updated online according to real-time power grid operation data. A prediction output module is constructed to output the distribution parameters of the Gaussian mixture model of electricity price at the future target time. The variance calculation of at least one component of the Gaussian mixture model introduces an adjustment factor based on the volatility of new energy output. The model training steps include: using historical spatiotemporal feature samples and their corresponding real electricity price data to form a training set; and using a combined loss function to train the model, wherein the combined loss function includes a negative log-likelihood loss for probability prediction and a spatial consistency loss for constraining the reasonableness of prediction results of adjacent nodes.
[0010] In an optional implementation, generating point prediction values or interval prediction values based on the probability distribution parameters includes: From the probability distribution defined by the probability distribution parameters, the predicted value with the highest probability density is determined as the predicted value of the point; Based on the probability distribution parameters, the prediction interval at a given confidence level is calculated as the interval prediction value.
[0011] Secondly, the present invention provides a real-time electricity price prediction system based on artificial intelligence, comprising: The data acquisition module is used to acquire time-series data and related external factor data of multiple spatial nodes in the target electricity market in real time; The feature extraction module is used to construct node-level instantaneous features, node-pair-level interaction features, and graph-level global features in parallel or sequentially based on the acquired data, which together form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence strength and propagation delay between nodes; The feature processing module is used to input the spatiotemporal feature vector into a pre-trained spatiotemporal graph neural network model and output the probability distribution parameters of the electricity price at the future target time. The result calculation module is used to generate point prediction values or interval prediction values based on the probability distribution parameters.
[0012] Thirdly, a device is provided, comprising: Memory for storing AI-based real-time electricity price prediction programs; A processor is configured to implement the steps of the AI-based real-time electricity price prediction method provided in the first aspect when executing the AI-based real-time electricity price prediction program.
[0013] Fourthly, a computer-readable medium is provided, on which an artificial intelligence-based real-time electricity price prediction program is stored, wherein when the artificial intelligence-based real-time electricity price prediction program is executed by a processor, it implements the steps of the artificial intelligence-based real-time electricity price prediction method provided in the first aspect.
[0014] The beneficial effects of this invention are as follows: the real-time electricity price prediction method, system, device, and medium based on artificial intelligence provided by this invention accurately quantifies the strength and delay of the influence between nodes through multi-granularity spatiotemporal dynamic coupling feature extraction, and constructs a dedicated model that integrates timestamps and dynamic graph attention, achieving a deep characterization of the spatiotemporal transmission mechanism of electricity prices. Its beneficial effects include: significantly improving prediction accuracy in environments with high proportions of new energy and strong inter-regional trading; enabling the model to adapt to market fluctuations and quantify prediction risks through dynamic adjacency matrices and probabilistic output; and providing accurate and reliable decision-making basis for market participants with different risk preferences through the final point and interval predictions, demonstrating outstanding practical value. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.
[0017] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.
[0018] Figure 3 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0021] The real-time electricity price prediction method based on artificial intelligence provided in this embodiment of the invention is executed by a computer device, and correspondingly, the real-time electricity price prediction system based on artificial intelligence runs in the computer device.
[0022] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The implementing entity can be an AI-based real-time electricity price forecasting system. Depending on different needs, the order of steps in this flowchart can be changed, and some steps can be omitted.
[0023] like Figure 1 As shown, the method includes: S1. Real-time acquisition of time-series data and related external factor data of multiple spatial nodes in the target electricity market; S2. Based on the acquired data, node-level instantaneous features, node-pair-level interaction features, and graph-level global features are constructed in parallel or sequentially to form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence intensity and propagation delay between nodes; S3. Input the spatiotemporal feature vector into a pre-trained spatiotemporal graph neural network model; the model is configured to comprehensively utilize the node-level, node-pair-level, and graph-level features, process the node-level instantaneous features through its internal time-series block encoder that integrates timestamps, explicitly model the node-pair-level interaction features through a graph attention interaction layer based on a dynamic adjacency matrix, and combine self-attention mechanism and graph-level global features for prediction, outputting the probability distribution parameters of the electricity price at the future target time; S4. Generate point prediction values or interval prediction values based on the probability distribution parameters.
[0024] A power grid load is currently transitioning from the midday low ("duck body") to the evening peak ("duck neck"). At this time, a real-time electricity price forecasting system automatically triggers a new forecast every 5 minutes, aiming to predict electricity prices at key points within the province for the next hour (until 3:00 PM). The electricity price forecasting method includes the following steps.
[0025] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0026] S101. Data Source and Access Method The system connects with the following business systems in real time via dedicated lines or secure data gateways: The power trading center system obtains historical electricity price sequences (day-ahead market clearing price and real-time market clearing price) for the entire province and designated nodes (such as Jinan, Qingdao, Yantai, etc.).
[0027] SCADA / EMS: Acquires real-time load data of each spatial node, real-time active power data of inter-regional transmission channels, and real-time output and ultra-short-term forecast output data of new energy (photovoltaic, wind power) power plants.
[0028] Meteorological data service platform: Obtains meteorological data of target areas and key power transmission points (such as Mengxi) through API interfaces, including temperature, humidity, wind speed, solar radiation intensity and weather phenomena (such as sandstorm warnings).
[0029] Internal system clock and calendar: Generates key time identifier data, such as the current hour and minute information, as well as identifiers based on the calendar to determine whether it is a weekday, holiday, or a specific peak-valley electricity price period.
[0030] S102. Specific requirements for data acquisition Sampling interval: The time series data collection frequency is set to 5 minutes or 15 minutes, which is significantly higher than the clearing frequency of 15 minutes or 1 hour in most current power markets in my country, thus providing higher resolution input information for the model.
[0031] Historical window length: The system continuously maintains a rolling historical data window in memory or cache. The window length must cover at least the past 12 hours (corresponding to 48 data points at 15-minute intervals or 144 data points at 5-minute intervals) to ensure that the model can capture the complete daily cycle and longer dependency patterns.
[0032] Continuous data collection mechanism: The data collection process is automatically executed by the background service, which pulls or receives the latest data pushed from the source system in a near real-time stream or high-frequency polling (such as every minute), and adds a unified timestamp to ensure the continuity and timeliness of the data stream.
[0033] S103. Data Preprocessing The raw data acquired will undergo preliminary preprocessing before being used for feature construction, including: Alignment and interpolation: Data from different sources, which may be slightly delayed, are aligned according to a unified timestamp. For the very few cases of temporary data loss due to communication interruptions, linear interpolation or previous value padding is used for appropriate interpolation.
[0034] Format standardization: Convert the data into a uniform numerical tensor format that the model can process, in order to prepare for the next step of "constructing multi-granular spatiotemporal features".
[0035] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0036] S201. Node-level Instantaneous Characteristic Calculation: Dynamic Load-Price Elasticity Coefficient To capture the real-time price sensitivity of each node under the current market environment, the system calculates the dynamic elasticity coefficient: Short window setting: Select 1 hour before the current time t (for example, for 15-minute interval data, including 4 data points t-3, t-2, t-1, t) as the calculation window.
[0037] Calculation process: Calculate the load sequence L for node i within the window. i and electricity price series P i The mean (μ) L ,μ P ) and the amount of change.
[0038] The central difference method is used to approximate the rate of change. For example, in the k-th interval within the window, the load change rate is (L... i [k]-L i [k-1]) / μ L The same applies to the rate of change in electricity prices.
[0039] Elasticity coefficient E i (t) is calculated as the average of the ratio of the electricity price change rate to the load change rate. The formula can be simplified to: E i (t)=mean((ΔP / μ P ) / (ΔL / μ L )), where mean represents the average of the ratios of the intervals within the window.
[0040] Output and meaning: E i (t) is a scalar. A value greater than 1 indicates that load fluctuations at that node have a significant impact on electricity prices (price-sensitive zone), while a value close to 0 indicates a weak impact. This feature is updated in real time, dynamically reflecting changes in the pricing power of each node in the global market.
[0041] S202. Calculation of Node-to-Node Interaction Features: Time-Delay Mutual Information To quantify the strength and propagation speed of the influence between any two nodes A and B, the system performs the following steps: Delay sequence setting: A set of delay sequences lag∈{0,1,2,3,4} is preset, corresponding to delays of 0, 15, 30, 45, and 60 minutes respectively.
[0042] Mutual information calculation: For each time lag, construct two sequences: the electricity price sequence P for node A within a historical window (e.g., the past 6 hours). A [t], and the sequence P after node B is offset by lag. B [t+lag].
[0043] Calculate P using the histogram method or kernel density estimation method. A [t] and P B The mutual information value MI(A->B,lag) of [t+lag]. Mutual information measures the knowledge of P. A After P takes a value, B The amount of uncertainty reduced.
[0044] Feature extraction: Maximum mutual information value MI max (A->B): Take the maximum value among all the mutual information values calculated from all lags, i.e., max{MI(A->B,lag)foralllag}. This value quantifies the maximum influence strength of A on B.
[0045] Optimal time delay Lag opt (A->B): The lag value corresponding to the attainment of the maximum mutual information value. This value quantifies the typical delay time required for the effect to propagate from A to B.
[0046] Output: For N nodes, the system generates an N×N matrix to store the (MI) values of all node pairs. max ,Lag opt ), which serves as an important input for understanding spatial transmission dynamics in the model.
[0047] S203. Calculation of Global Features at the Graphical Level: Quantification of Duck Curve Morphology To depict the overall pattern of the interaction between the daily load of the entire network and new energy sources, the system calculates the following three mathematical factors: Key point identification: Based on the daily network load curve, the peak load P during the morning peak is automatically identified using a peak detection algorithm. morning (Usually around 8:00-10:00), midday load trough V noon (Usually around 12:00-14:00), peak evening load P evening (Usually around 17:00-19:00) and its corresponding time T morning ,T noon ,T evening .
[0048] Duck body depth calculation: D body =(P morning -V noon ) / P morningThis factor reflects the relative depth of the load drop caused by the midday surge in solar power generation; the larger the value, the more concave the "duck's body" (the area affected by the solar load drop).
[0049] Duck neck steepness calculation: S neck =(P evening -V noon ) / (T evening -T noon This factor reflects the average rate at which the evening load rapidly climbs from the trough to the evening peak. The larger the value, the steeper the "duck neck" and the greater the pressure on the system to regulate peak loads.
[0050] Duckbill convexity calculation: Extract the power output curve G(t) of new energy (photovoltaic) during the midday period (e.g., 11:00-14:00).
[0051] The ideal smooth approximation of the output during this period (such as using a moving average) is used to obtain G. smooth (t).
[0052] Duckbill convexity C beak Calculated as the sum of squared residuals: This factor quantifies the volatility and intermittency of photovoltaic power output. The larger the value, the less smooth the "duckbill" effect, and the stronger the impact on the real-time balance of the system.
[0053] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0054] 1. Specific implementation of the model building steps The overall architecture of the model is built on the PyTorch or TensorFlow deep learning framework and mainly includes the following three core modules: a) Implementation of the fusion module Time series partitioning: For each spatial node, its time series of length L (e.g., 48, representing 15 minutes of data from the past 12 hours) is divided into P non-overlapping blocks (e.g., P=8, each block contains 6 time steps).
[0055] Block encoding: Each block is mapped to a D through a shared fully connected layer (linear projection). model 3D eigenvectors.
[0056] Timestamp fusion: Extract the start timestamp of each block (e.g., containing "hour" and "minute" information).
[0057] Through a learnable embedding layer, "hours" and "minutes" are mapped to vectors respectively, then merged and passed through a linear layer to generate a D. model A time-encoded vector of dimension.
[0058] The time encoding vector is added element-wise to the corresponding block feature vector to achieve the fusion of time information.
[0059] b) Implementation of the dynamic graph attention module Basic adjacency matrix: Based on the physical connections of the power grid and the electrical distances between nodes, a static, sparse N×N adjacency matrix A is predefined. base (N is the number of nodes), and the initial weight can be set as the reciprocal of the electrical distance.
[0060] Dynamic weight update: During each forward propagation (inference or training), the dynamic weight matrix A is calculated online based on the real-time data at the current moment. dynamic .
[0061] For example, A dynamic [i,j] can be calculated as: α* (normalized absolute value of power flow between current nodes i and j) + β* (maximum mutual information value in the node-pair level interaction features of node pair (i,j)). Here, α and β are adjustable parameters.
[0062] Final adjacency matrix: The final adjacency matrix is A = A base +γ*A dynamic γ is a learnable or preset scalar that controls the intensity of the influence of the dynamic part.
[0063] Graph Attention Network: A multi-head graph attention network is adopted, using the dynamic adjacency matrix A as the prior attention bias, to aggregate and update the block features of all nodes that have fused timestamps.
[0064] c) Implementation of the prediction output module Feature aggregation: Aggregate the temporal features belonging to the future target time after processing by the dynamic graph attention module and subsequent self-attention encoder (e.g., take the feature vector of the corresponding time step).
[0065] Gaussian Mixture Model Parameter Prediction: The converged features are mapped to the parameters of a Gaussian mixture model through a fully connected output layer. The number of mixture components is set to K (e.g., K=3).
[0066] Output K mean values μ k K mixed weights π k (The sum is guaranteed to be 1 via Softmax) and K variances .
[0067] Dynamic adjustment of variance: Instead of being output directly, it is calculated as follows: Where MLP(h) is a small neural network mapping to feature h, δ is the current renewable energy fluctuation index (e.g., calculating the variance of the rate of change in renewable energy output over the past hour), and is a trainable parameter used to adjust the degree of influence of the fluctuation index on prediction uncertainty.
[0068] 2. Specific implementation of model training steps a) Training set construction: Using historical data from the past year, a training sample set is constructed according to a rolling time window (e.g., one sample every 15 minutes). Each sample includes: a "spatiotemporal feature vector" constructed based on historical data as input X, and the actual electricity price at the corresponding future time as label Y.
[0069] b) Loss function calculation: Negative log-likelihood loss: For each sample, calculate the negative log-likelihood of the true electricity price Y under the Gaussian mixture model distribution of the model output:
[0070] It represents the natural logarithm (base e). This represents the summation of all K components in a Gaussian mixture model. The mixing coefficient (weight) represents the k-th Gaussian component.
[0071] The mean is variance is The probability density function value of the normally distributed observation Y.
[0072] This formula uses the negative log-likelihood of the true observation Y under the entire Gaussian mixture model distribution as the main optimization objective for model training.
[0073] Spatial consistency loss: For each sample, calculate the bias penalty between the predicted mean difference and the historical mean difference for all physically directly connected node pairs (i, j).
[0074] This represents the summation of the set of edges E consisting of all connected node pairs (i,j) in the power grid topology.
[0075] and : These represent the average electricity prices predicted by the model for node i and node j, respectively.
[0076] : Represents the average (expected) value of the electricity price difference between nodes i and j in the historical training data.
[0077] : This is a preset tolerance threshold (e.g., 0.2) used to control the allowable deviation range.
[0078] : This indicates that the penalty is only applied when the value in parentheses is greater than 0, meaning that only prediction deviations exceeding a certain percentage of the historical average (controlled by the threshold τ) are penalized.
[0079] Total loss: , where λ is a hyperparameter used to balance the two losses. This is an adjustable hyperparameter used to balance the weights of negative log-likelihood loss and spatial consistency loss in the total loss.
[0080] c) Model optimization: The Adam optimizer is used for multiple rounds of iterative training on the training set. Early stopping is performed on the validation set to prevent overfitting, and the model with the minimum negative log-likelihood loss on the validation set is saved as the final "pre-trained spatiotemporal graph neural network model".
[0081] The model processing flow includes: inputting features into a pre-trained spatiotemporal graph neural network. The model sequentially performs: 1) temporal block encoding and fusing precise timestamps; 2) using a dynamically updated adjacency matrix based on real-time data for graph attention interaction to explicitly model relationships between nodes; and 3) fusing temporal dependencies and injecting graph-level global features through a self-attention mechanism. Finally, the model outputs Gaussian mixture model parameters for future electricity prices, with its variance dynamically adjusted based on the volatility of renewable energy sources.
[0082] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0083] S401. Point Prediction Value Generation To obtain the parameters of a Gaussian mixture model (GMM) at a future target time, i.e., the mean of the K components. ,variance and mixing coefficient Then, the system generates point prediction values according to the following logic: Calculate the peak value of each component: For each Gaussian component k, the peak value (i.e., mode) of its probability density function is its mean. The density value at this peak is .
[0084] Determine the maximum density value: Compare the weighted density values of all K components at their respective means. .
[0085] Output point prediction: The mean value corresponding to the component with the largest weighted density value. (in This is determined as the predicted final point value at that moment.
[0086] S402. Generation of Interval Predicted Values To provide risk information, the system also calculates the prediction interval at a given confidence level (e.g., 95%): Define the target probability: Set a confidence level of 1-α (e.g., α=0.05). The goal is to find the interval [L,U] such that the probability of being in this interval under the GMM distribution is 1-α, i.e., P(L≤Y≤U)=1-α, and usually the probabilities of the two tails are each α / 2.
[0087] Numerical solution for interval boundaries: Since the cumulative distribution function of the GMM has no analytical solution, the system uses a numerical method to solve it. Method 1 (Quantilometer Search): Utilize the probability density function of the GMM and calculate the cumulative distribution function through numerical integration (such as the adaptive Simpson method). Then, use a binary search method to find the quantiles L and U that satisfy F(L) = α / 2 and F(U) = 1 - α / 2, respectively.
[0088] Method 2 (Approximation Method): To improve calculation speed, the variance-weighted method can be used to approximate the calculation interval. First, calculate the approximate value of the overall variance of the GMM. Then, using point prediction values Centered on, the calculation interval is , where z is the quantile corresponding to the standard normal distribution (e.g., z≈1.96 at a 95% confidence level).
[0089] Output interval prediction value: The lower limit L and upper limit U of the finally calculated interval are output as the interval prediction value (i.e., confidence interval) at that moment. The system usually uses the numerical solution method by default to ensure accuracy, and provides the point prediction value and its confidence interval in the prediction result, for example, "Predicted electricity price: 0.85 yuan / kWh, 95% confidence interval: [0.81, 0.89] yuan / kWh".
[0090] In some embodiments, the AI-based real-time electricity price forecasting system may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the AI-based real-time electricity price forecasting system may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) A function for real-time electricity price prediction based on artificial intelligence.
[0091] In this embodiment, the AI-based real-time electricity price forecasting system can be divided into multiple functional modules based on its functions, such as... Figure 2As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0092] The data acquisition module is used to acquire time-series data and related external factor data of multiple spatial nodes in the target electricity market in real time; The feature extraction module is used to construct node-level instantaneous features, node-pair-level interaction features, and graph-level global features in parallel or sequentially based on the acquired data, which together form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence strength and propagation delay between nodes; The feature processing module is used to input the spatiotemporal feature vector into a pre-trained spatiotemporal graph neural network model. The model is configured to comprehensively utilize the node-level, node-pair-level, and graph-level features, process the node-level instantaneous features through its internal time-series block encoder that integrates timestamps, explicitly model the node-pair-level interaction features through a graph attention interaction layer based on a dynamic adjacency matrix, and combine a self-attention mechanism with graph-level global features to make predictions and output the probability distribution parameters of the electricity price at the future target time. The result calculation module is used to generate point prediction values or interval prediction values based on the probability distribution parameters.
[0093] Figure 3 The AI-based real-time electricity price prediction method provided in the embodiments of this application can be applied to devices. Those skilled in the art will understand that the device structure involved in the embodiments of this invention does not constitute a limitation on the device. A device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the device includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0094] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0095] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is able to perform some or all of the steps in the above method embodiments.
[0096] The processor 310 serves as the control center of the storage device, connecting various parts of the electronic device via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.
[0097] The communication unit 330 is used to establish a communication channel, enabling the storage device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.
[0098] The present invention also provides a computer medium, wherein the computer medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0099] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer device (which may be a personal computer, a server, or a second device, network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0100] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0101] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.
[0102] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0104] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A real-time electricity price forecasting method based on artificial intelligence, characterized in that, include: Real-time acquisition of time-series data and related external factor data of multiple spatial nodes in the target electricity market; Based on the acquired data, node-level instantaneous features, node-pair-level interaction features, and graph-level global features are constructed in parallel or sequentially to form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence intensity and propagation delay between nodes. The spatiotemporal feature vector is input into a pre-trained spatiotemporal graph neural network model, which outputs the probability distribution parameters of the electricity price at the future target time. Based on the probability distribution parameters, point prediction values or interval prediction values are generated.
2. The method according to claim 1, characterized in that, Real-time acquisition of time-series data and relevant external factor data from multiple spatial nodes in the target electricity market, including: The time series data is obtained by acquiring at least one of the following: historical electricity price sequence of the multiple spatial nodes, real-time load data, real-time power data of inter-regional power transmission channels, and real-time and predicted power output data of new energy sources. Meteorological data and key time marker data are acquired as the external factor data; The time-series data is continuously collected at a preset sampling interval higher than the market clearing frequency, and includes at least a historical window of data for a set time length.
3. The method according to claim 1, characterized in that, Based on the acquired data, node-level instantaneous features, node-pair-level interaction features, and graph-level global features are constructed in parallel or sequentially, collectively forming a spatiotemporal feature vector, including: Based on the load and electricity price data of each node within a preset short time window, the elasticity coefficient reflecting the sensitivity of load changes to electricity price changes is calculated as a node-level instantaneous feature. Based on mutual information calculation under different time delays, the maximum mutual information value and corresponding time delay between any two nodes are extracted as node-pair level interaction features. Based on the load curve of the entire network and the output curve of new energy sources, mathematical factors for the morphology of the duck-shaped curve are calculated and quantified as global features at the graph level.
4. The method according to claim 3, characterized in that, Based on mutual information calculation under different time delays, the maximum mutual information value and corresponding time delay between any two nodes are extracted as node-pair level interaction features, including: For any two spatial nodes, under a set of preset time delay sequences, calculate the mutual information value between the historical data time series of the first node and the historical data time series of the second node after corresponding time delay offset; The maximum value among the calculated mutual information values is selected as the maximum mutual information value, and the time delay corresponding to the maximum value is taken as the corresponding time delay.
5. The method according to claim 3, characterized in that, Based on the overall network load curve and the renewable energy output curve, mathematical factors for quantifying the duck-shaped curve shape are calculated as graph-level global features, including: Based on the network load curve, identify and obtain the peak load value during the morning peak, the trough load value at noon, and the peak load value during the evening peak; Based on the morning peak load peak and the midday load trough, the duck body depth is calculated, whereby the duck body depth represents the degree of decrease in midday load trough relative to the morning peak. Based on the midday load trough, the evening peak load peak and their corresponding time points, the duck neck steepness is calculated, which represents the rate of load increase from the midday trough to the evening peak. Based on the output data of the new energy power output curve during the midday period, the duckbill convexity is calculated, which represents the degree of fluctuation in the new energy power output during this period.
6. The method according to claim 1, characterized in that, The pre-trained spatiotemporal graph neural network model is obtained through the following model construction and training methods: The model building steps include: A fusion module is constructed to divide the time series of each spatial node into non-overlapping time series blocks, and convert the starting point time encoding of each block into a vector through an embedding layer and fuse it with the time series block features. A dynamic graph attention module is constructed, which realizes information interaction between nodes based on a region adaptive adjacency matrix. The basic part of the adjacency matrix is determined by the power grid topology, and the dynamic part is updated online according to real-time power grid operation data. A prediction output module is constructed to output the distribution parameters of the Gaussian mixture model of electricity price at the future target time. The variance calculation of at least one component of the Gaussian mixture model introduces an adjustment factor based on the volatility of new energy output. The model training steps include: using historical spatiotemporal feature samples and their corresponding real electricity price data to form a training set; and using a combined loss function to train the model, wherein the combined loss function includes a negative log-likelihood loss for probability prediction and a spatial consistency loss for constraining the reasonableness of prediction results of adjacent nodes.
7. The method according to claim 1, characterized in that, Based on the probability distribution parameters, point prediction values or interval prediction values are generated, including: From the probability distribution defined by the probability distribution parameters, the predicted value with the highest probability density is determined as the predicted value of the point; Based on the probability distribution parameters, the prediction interval at a given confidence level is calculated as the interval prediction value.
8. A real-time electricity price forecasting system based on artificial intelligence, characterized in that, include: The data acquisition module is used to acquire time-series data and related external factor data of multiple spatial nodes in the target electricity market in real time; The feature extraction module is used to construct node-level instantaneous features, node-pair-level interaction features, and graph-level global features in parallel or sequentially based on the acquired data, which together form a spatiotemporal feature vector; wherein, the node-pair-level interaction features include features based on time-delay mutual information calculation, used to quantify the influence strength and propagation delay between nodes; The feature processing module is used to input the spatiotemporal feature vector into a pre-trained spatiotemporal graph neural network model and output the probability distribution parameters of the electricity price at the future target time. The result calculation module is used to generate point prediction values or interval prediction values based on the probability distribution parameters.
9. A real-time electricity price prediction device based on artificial intelligence, characterized in that, include: Memory for storing AI-based real-time electricity price prediction programs; A processor, configured to implement the steps of the AI-based real-time electricity price prediction method as described in any one of claims 1-7 when executing the AI-based real-time electricity price prediction program.
10. A computer-readable medium storing a computer program, characterized in that, The readable medium stores an AI-based real-time electricity price prediction program, which, when executed by a processor, implements the steps of the AI-based real-time electricity price prediction method as described in any one of claims 1-7.