Power transaction matching method and system based on smart contract
By collecting power grid data and using graph neural networks to predict power grid overload risks, generating congestion paths, and setting additional fees in smart contracts, the computational complexity and trust issues in the power trading system are solved, achieving efficient, secure, and fair power trading.
Patent Information
- Application Number
- CN202511078216.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-08-01
AI Technical Summary
In existing power trading systems, centralized optimization algorithms lead to single-point-of-failure risks, are computationally complex, have low trading efficiency, and lack decentralized trust mechanisms for trading path allocation, affecting the fairness and transparency of trading execution.
By collecting power grid topology data and line temperature distribution data, graph neural networks are used to predict potential overload risk nodes in the power grid, generate congestion path prediction results, and generate congestion surcharge items in smart contracts to guide both parties to choose non-congestion paths for power transaction matching.
It has improved the real-time performance and security of electricity trading, reduced transaction failures, optimized the allocation of electricity resources, and improved the operational efficiency and fairness of the electricity market.
Smart Images

Figure CN120894136B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart contract technology, and in particular to a method and system for matching electricity transactions based on smart contracts. Background Technology
[0002] With the advancement of power market reforms, the scale of inter-regional power transactions is continuously expanding, and transmission congestion is becoming increasingly prominent. During peak load periods, power grids are prone to line overload, leading to transaction failures or decreased transmission efficiency. Therefore, there is an urgent need for an automated matching method capable of predicting congestion risks in real time and dynamically adjusting transaction paths to improve the efficiency and security of power transactions.
[0003] Current research has proposed congestion management methods based on centralized optimization algorithms. These methods involve real-time collection of line load data by the power grid dispatch center, combined with linear programming or dynamic power flow calculations, to generate optimal transmission path schemes, which are then pushed to the trading platform for execution. This approach relies on a central server to process network-wide data, utilizes mathematical optimization models to calculate available transmission capacity, and prioritizes the allocation of non-blocking paths during transaction matching.
[0004] The computational process of this scheme heavily relies on centralized servers, posing a single point of failure risk. Furthermore, the computational complexity of the optimization algorithm is high, making it difficult to meet the real-time requirements of high-frequency trading. In addition, the lack of a decentralized trust mechanism may lead to disputes among trading parties regarding the path scheme provided by the scheduling center, affecting the fairness and transparency of transaction execution. Summary of the Invention
[0005] This application provides a smart contract-based method and system for matching electricity transactions, which addresses the problems of poor matching efficiency and low security in existing electricity transactions under transmission congestion scenarios.
[0006] Firstly, this application provides a method for matching electricity transactions based on smart contracts, including:
[0007] Collect power grid topology data, historical congestion records, and line temperature distribution data;
[0008] Based on the power grid topology data and the historical congestion records, and combined with the load rate prediction model, line load rate data is generated. Based on the line load rate data and the line temperature distribution data, a fused heat map is generated.
[0009] The fused heatmap is input into a pre-trained graph neural network. The graph neural network identifies potential overload risk nodes in the power grid from the fused heatmap and predicts congestion paths in the power grid based on the potential overload risk nodes, generating congestion path prediction results.
[0010] Based on the predicted congestion path, the tradable capacity margin is calculated, and a congestion surcharge item is generated in the smart contract according to the tradable capacity margin.
[0011] The aforementioned congestion surcharge guides both parties in a power transaction to select a non-congested path in the power grid in order to complete the power transaction matching.
[0012] Optionally, the step of identifying potential overload risk nodes in the power grid from the fused heatmap using a graph neural network, and predicting congestion paths in the power grid based on the potential overload risk nodes, and generating congestion path prediction results, includes:
[0013] Each temperature monitoring point in the fused thermal map is used as a graph node;
[0014] Based on the line connection relationships in the power grid topology data, an adjacency matrix representing the connection relationships between graph nodes is constructed;
[0015] The temperature value, line load rate data, and spatial coordinates of each graph node are encoded into a feature vector for the graph node.
[0016] Based on the adjacency matrix, the feature vector is updated through the neighborhood aggregation operation of the graph neural network. When the updated feature vector meets the preset overload judgment condition, the corresponding graph node is marked as a potential overload risk node.
[0017] Based on the spatial distribution characteristics of all potential overload risk nodes, the congestion paths in the power grid are predicted, and the congestion path prediction results are generated.
[0018] Optionally, the step of updating the feature vector based on the adjacency matrix through neighborhood aggregation operation of a graph neural network, and marking the corresponding graph node as a potential overload risk node when the updated feature vector satisfies a preset overload judgment condition, includes:
[0019] For each graph node, it is sequentially designated as the current graph node, and the following process is executed: extract the adjacent graph nodes directly connected to the current graph node from the adjacency matrix to form an adjacent graph node set;
[0020] Obtain the temperature values and line load rate data of all adjacent graph nodes in the adjacent graph node set, so as to filter out the corresponding data of the adjacent graph node set;
[0021] The temperature value and line load rate data of the current graph node are weighted and averaged with the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features.
[0022] The polymerization temperature feature and the polymerization loading rate feature are fused into the feature vector of the graph node to form the updated feature vector;
[0023] When the updated feature vector simultaneously satisfies that the aggregation temperature feature is greater than a preset temperature threshold and the aggregation load rate feature is greater than a preset load rate threshold, the current graph node is marked as a potential overload risk node.
[0024] Optionally, the step of calculating a weighted average of the temperature value and line load rate data of the current graph node with the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features includes:
[0025] Obtain the line impedance parameters between the current graph node and each adjacent graph node, and the rated transmission capacity of the line where each adjacent graph node is located;
[0026] Based on the line impedance parameters, calculate the temperature weight value of each adjacent graph node;
[0027] The temperature value of the current graph node is weighted and summed with the temperature values of all adjacent graph nodes according to the temperature weight value. The first weighted summation result is divided by the first weight summation to generate the aggregated temperature feature.
[0028] Based on the rated transmission capacity, calculate the load weight value of each adjacent graph node;
[0029] The line load rate data of the current graph node is weighted and summed with the line load rate data of all adjacent graph nodes according to the load weight value. The second weighted summation result is divided by the second weight summation to generate the aggregated load rate feature.
[0030] Optionally, the step of generating line load rate data based on the power grid topology data and the historical congestion records, combined with a load rate prediction model, and generating a fused heat map based on the line load rate data and the line temperature distribution data, includes:
[0031] Map the line connection relationships in the power grid topology data to spatial coordinates;
[0032] Input the load peak data from the historical congestion records into the load rate prediction model, and output the line load rate data for each line segment.
[0033] The line load rate data is correlated with the spatial coordinates to form a load rate distribution map;
[0034] Extract the location and temperature value of the temperature monitoring point from the temperature distribution data of the line;
[0035] The load rate distribution map is spatially superimposed with the location of the temperature monitoring point;
[0036] In the spatial distribution map formed by overlay, the line load rate data at the same location is weighted and fused with the temperature value to generate a fused heat map.
[0037] Optionally, the step of calculating the tradable capacity margin based on the congestion path prediction result, and generating a congestion surcharge item in the smart contract according to the tradable capacity margin, includes:
[0038] Locate the blocked line segment in the blocked path prediction results;
[0039] Obtain the rated transmission capacity and actual load data of the blocked line segment;
[0040] Based on the rated transmission capacity and the actual load data, calculate the remaining available capacity of the blocked line segment, and use the remaining available capacity as the tradable capacity margin;
[0041] The surcharge coefficient is determined based on the comparison between the tradable capacity margin and the preset capacity threshold;
[0042] In the smart contract, a blocking surcharge item containing the aforementioned surcharge coefficient is created.
[0043] Optionally, guiding both parties in a power transaction to select a non-congested path in the power grid through the congestion surcharge to complete the power transaction matching includes:
[0044] In the smart contract's transaction interface, a first transaction option that allows the selection of a blocking path and a second transaction option that allows the selection of a non-blocking path are displayed side by side, wherein the first transaction option uses a premium quote and the second transaction option uses a base electricity price quote;
[0045] When it is detected that both parties to the power transaction have selected the second transaction option, the corresponding non-blocking power transaction contract is executed immediately;
[0046] When it is detected that both parties in the power transaction have selected the first transaction option, the path optimization rules of the smart contract are automatically triggered to generate an optimized transaction plan that includes a non-blocking path and the corresponding benchmark electricity price.
[0047] Based on the confirmation instructions from both parties to the power transaction regarding the optimized transaction plan, the power transaction is matched.
[0048] Secondly, this application provides a smart contract-based power trading matching system, comprising:
[0049] Data acquisition templates are used to collect power grid topology data, historical congestion records, and line temperature distribution data.
[0050] The generation module is used to generate line load rate data based on the power grid topology data and the historical congestion records, combined with the load rate prediction model, and to generate a fused heat map based on the line load rate data and the line temperature distribution data.
[0051] The input module is used to input the fused heat map into a pre-trained graph neural network, identify potential overload risk nodes in the power grid from the fused heat map through the graph neural network, predict congestion paths in the power grid based on the potential overload risk nodes, and generate congestion path prediction results.
[0052] The calculation module is used to calculate the tradable capacity margin based on the blocked path prediction results, and generate a blocking surcharge item in the smart contract according to the tradable capacity margin.
[0053] The selection module is used to guide both parties in a power transaction to choose a non-blocking path in the power grid through the congestion surcharge item in order to complete the power transaction matching.
[0054] Thirdly, this application provides a computing device including a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a smart contract-based power trading matching method as described in any of the first aspects.
[0055] Fourthly, this application provides a computer storage medium storing computer program instructions thereon, which, when executed by a processor, implement a smart contract-based power trading matching method as described in any one of the first aspects.
[0056] This application provides a smart contract-based method for matching electricity transactions. The method includes: collecting grid topology data, historical congestion records, and line temperature distribution data; generating line load rate data based on the grid topology data and the historical congestion records, combined with a load rate prediction model; generating a fused heatmap based on the line load rate data and the line temperature distribution data; inputting the fused heatmap into a pre-trained graph neural network, identifying potential overload risk nodes in the grid from the fused heatmap using the graph neural network, and predicting congestion paths in the grid based on the potential overload risk nodes, generating congestion path prediction results; calculating tradable capacity margin based on the congestion path prediction results, and generating a congestion surcharge in the smart contract based on the tradable capacity margin; and guiding both parties in the electricity transaction to select non-congestion paths in the grid through the congestion surcharge to complete the electricity transaction matching.
[0057] The technical solution provided in this application has the following beneficial effects:
[0058] This application acquires power grid structure, historical operating status, and real-time temperature monitoring data to provide a complete data foundation for subsequent analysis, ensuring comprehensive and accurate input information for the prediction model. Historical data is used to train the model to predict current line load conditions, identifying potential high-load risk areas in advance and providing a basis for congestion early warning. Combining load factor and temperature data for analysis provides a clear picture of the operating status of different areas of the power grid, facilitating the identification of the correlation between overload and temperature anomalies. Graph neural network analysis of power grid topology and heat map data accurately locates overload risk points and predicts transmission paths that may experience congestion. Transaction fees are dynamically adjusted based on remaining available capacity, using economic means to guide trading behavior and optimize power resource allocation. Intelligent optimization of trading paths is achieved, reducing transaction failures caused by congestion and improving the operational efficiency and security of the electricity market.
[0059] Furthermore, this application also constructs an adjacency matrix based on the power grid topology by using temperature monitoring points in the fused heat map as graph nodes, and encodes the temperature, load rate and spatial coordinates of each node as feature vectors; updates the feature vectors using the neighborhood aggregation operation of the graph neural network, marks nodes that meet the overload conditions as risk nodes, and finally predicts the congestion path in the power grid based on the distribution of risk nodes.
[0060] Furthermore, this solution combines graph neural networks with power grid topology analysis to accurately identify overload risk areas and predict congestion paths, providing reliable congestion early warning information for power trading. At the same time, intelligent data processing improves the accuracy and real-time performance of predictions, effectively supporting trading decisions.
[0061] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 A flowchart illustrating a smart contract-based power trading matching method provided for embodiments of this application;
[0064] Figure 2 A schematic diagram of the structure of a smart contract-based power trading matching system provided in this application embodiment;
[0065] Figure 3 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0066] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0067] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.
[0068] In current power trading systems, existing congestion management methods primarily rely on centralized optimization algorithms, with the dispatch center uniformly calculating and allocating transmission paths. This approach suffers from two key problems: first, all data is processed centrally on a server, meaning the entire trading process is interrupted if the system malfunctions; second, the computational process is complex and time-consuming, making it difficult to respond promptly to rapid changes in electricity demand, thus reducing trading efficiency. More critically, because path allocation is entirely determined by the central institution, the parties involved in the transaction cannot verify the fairness of the calculation results, easily leading to trust issues.
[0069] To address these issues, this application proposes a smart contract-based electricity trading matching method. This method automatically collects power grid topology data through a blockchain network, utilizes intelligent algorithms to analyze line load and temperature changes, and predicts potential congestion problems in advance. When an impending overload is detected on a line, the system automatically adjusts the transaction fee for that line, guiding buyers and sellers to choose a more efficient transmission path. This method completely avoids the risk of failure of a single central node; all calculation processes and data are open and transparent, and both parties can verify them in real time. Simultaneously, the rapid response capability of the intelligent algorithm ensures timely transaction decisions, solving the computational delay problem of existing solutions and achieving optimized allocation of transmission resources through a fee adjustment mechanism.
[0070] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0071] Figure 1 A flowchart of a smart contract-based power trading matching method provided for embodiments of this application is shown below. Figure 1 As shown, the method includes:
[0072] Step 101: Collect power grid topology data, historical blockage records, and line temperature distribution data.
[0073] In step 101, a line is the basic transmission unit constituting a power grid. In this method, it specifically refers to the power transmission channel connecting various nodes (such as power plants, substations, and power-consuming facilities) in the power grid. Its physical form is an overhead conductor or cable, with clearly defined start and end points, rated transmission capacity, and impedance parameters. A "power grid" is a complete power transmission network formed by interconnecting multiple such lines according to a specific topology, encompassing the set of all lines and their connection relationships. Specifically, in this scheme, the temperature distribution data and load rate data of a line, as a component of the power grid, form the basis for generating a fused heatmap. The connection relationships of multiple lines constitute the power grid topology data, and the grid congestion problem ultimately manifests as the overload risk of specific line segments. Power grid topology data refers to the connection relationship data between various power equipment (such as substations and transmission lines) in the power grid, including structural information such as the start and end points of the lines and connection methods. In this application, it is used to construct the physical connection model of the power grid. Historical congestion records refer to line overload events and related data that occurred during the past operation of the power grid, including overload time, line location, and load peak value. They are used to analyze congestion patterns. Line temperature distribution data refers to the temperature values at various monitoring points along a power transmission line, collected in real time by temperature sensors. It is used to assess the line's operational status.
[0074] In this embodiment, topological data describing the power grid structure, including the connection relationships and electrical parameters of all transmission lines, is first obtained from the power grid management system. Simultaneously, data on line overload events recorded in the historical database, including the time, location, and severity of occurrence, are retrieved. Finally, a network of temperature sensors deployed along the lines is used to collect real-time temperature readings from each monitoring point. These three types of data collectively form the input basis for subsequent analysis.
[0075] For example, a regional power grid includes three main transmission lines: line AB connects substations A and B, line AC connects substations A and C, and line BC connects substations B and C. The system first obtains a topology diagram of the connections between these three lines. Then, it retrieves 12 overload records of these three lines during the summer peak electricity consumption period over the past year. Simultaneously, it collects real-time temperature data using six temperature sensors installed on each line. The current temperature at the monitoring point in the middle of line AB is 85 degrees Celsius, and the temperature at the monitoring point at the end of line BC is 83 degrees Celsius. This data will be used for subsequent processing.
[0076] Step 102: Based on the power grid topology data and the historical congestion records, and combined with the load rate prediction model, generate line load rate data. Based on the line load rate data and the line temperature distribution data, generate a fused heat map.
[0077] In step 102, the load rate prediction model specifically refers to a machine learning model that predicts line load rates based on peak load data from historical congestion records. The model type is not specifically limited; it can be any prediction model capable of predicting current or future line load rates based on historical load data, including but not limited to time series prediction models, regression models, or deep learning models. This model learns historical load variation patterns through training to output predicted load rate data for each line segment. Line load rate data represents the ratio of the current actual load to the maximum carrying capacity of the line. The fused heatmap represents a visual chart formed by spatially overlaying line load rate and temperature data, using color intensity to indicate the degree of risk.
[0078] In this embodiment, peak load data from historical congestion records are input into a pre-trained load rate prediction model, which outputs predicted load rate values for each line segment. Simultaneously, the line connection relationships in the power grid topology data are mapped to location information in a planar coordinate system. The predicted load rate values are then labeled onto the corresponding line locations to form a load rate distribution map. The location coordinates and temperature readings of each monitoring point are extracted from temperature monitoring data. The load rate distribution map is spatially matched with the temperature monitoring point locations, and the load rate and temperature data at the same location are merged and calculated according to a set weight, ultimately generating a fused heatmap that uses color gradients to represent the degree of risk.
[0079] For example, taking the aforementioned regional power grid as an example, the load rate prediction model predicts that the current load rate for line AB is 95%, line AC is 90%, and line BC is 93% based on historical data. These values are then marked on the corresponding line locations. Simultaneously, the locations and readings of six temperature monitoring points are acquired, with the temperature at the monitoring point in the middle section of line AB being 85 degrees Celsius. The load rate of 95% and the temperature of 85 degrees Celsius are combined with a weighted average of 6:4 to calculate a risk value of 91 for this point. After performing the same processing on all monitoring points, a complete fused heat map is generated, with the middle section of line AB displayed in red to indicate high risk.
[0080] Step 103: Input the fused heat map into a pre-trained graph neural network, identify potential overload risk nodes in the power grid from the fused heat map through the graph neural network, predict congestion paths in the power grid based on the potential overload risk nodes, and generate congestion path prediction results.
[0081] In step 103, the graph neural network represents a deep learning model specifically designed for processing graph-structured data, capable of analyzing the relationships between nodes. Potential overload risk nodes represent monitoring point locations identified by the model as potentially prone to overload. The congestion path prediction result refers to the transmission line segments in the power grid that may experience overload, along with their locations, output after graph neural network analysis. Specifically, it represents the line segments connected by temperature monitoring points marked as potential overload risk nodes. This result includes features such as the location and severity of congested lines, used to guide subsequent capacity margin calculations and transaction path selection.
[0082] In this embodiment, each temperature monitoring point in the fused heatmap is used as a node in a graph neural network. An adjacency matrix is constructed based on the power grid topology data, where the matrix position corresponding to the monitoring points of connected lines is set to 1. The temperature value, load rate data, and spatial coordinates of each node are combined into a feature vector. Through the neighborhood aggregation operation of the graph neural network, each node absorbs the feature information of its neighboring nodes to update its own features. When the updated features of a node simultaneously exceed both the temperature and load rate thresholds, it is marked as a risk node. Finally, based on the spatial distribution of all risk nodes, a predicted congestion path is formed.
[0083] For example, taking the aforementioned heatmap as an example, six monitoring points are set as graph nodes. A 6×6 adjacency matrix is constructed based on the line connection relationships, where monitoring point 1 (the starting point of line AB) is connected to monitoring point 2 (the ending point of line AB) and monitoring point 3 (the starting point of line AC). The feature vector of node 1 is [85,95,0,0], representing temperature, load rate, and coordinates. After calculation by the graph neural network, nodes 1, 2, and 5 are marked as risk nodes because their features exceed the threshold, and the intersection of lines AB and BC is predicted to be a congested path.
[0084] Step 104: Based on the blocked path prediction results, calculate the tradable capacity margin, and generate a blocking surcharge item in the smart contract according to the tradable capacity margin.
[0085] In step 104, the tradable capacity margin represents the remaining tradable power capacity of the line, which is equal to the rated capacity minus the current actual load. The congestion surcharge represents an additional fee clause set in the smart contract to regulate trading behavior on congested lines.
[0086] In this embodiment, specific line segments are located within the predicted congestion path, and the rated transmission capacity and current actual load data of these lines are obtained. The remaining available capacity of the lines is calculated as the tradable capacity margin. An additional fee coefficient is determined based on a comparison between the margin and a preset threshold; the coefficient increases as the margin decreases. Finally, an additional fee clause containing this coefficient is created in the smart contract.
[0087] For example, the predicted congestion path involves lines AB and BC. Line AB has a rated capacity of 500 MW, a current load of 480 MW, and a remaining capacity of 20 MW. When the preset threshold is 30 MW, the calculated surcharge factor is (30-20) / 30=0.33. The smart contract automatically generates the following terms: transactions through this path will incur a 33% surcharge.
[0088] Step 105: Through the aforementioned congestion surcharge, guide both parties in the power transaction to select a non-congested path in the power grid to complete the power transaction matching.
[0089] In step 105, the parties to the electricity transaction refer to the electricity supplier (such as power plants, renewable energy power plants, and other electricity producers) and the electricity demander (such as distribution network companies, large industrial users, and other electricity purchasers). They agree to trade electricity in a grid environment with transmission congestion risk through the aforementioned smart contract terms. A non-blocking path refers to a transmission line that is not predicted to be congested. Transaction matching refers to the process by which the electricity buyer and seller reach a transaction agreement.
[0090] In this embodiment, the trading interface displays both blocked and non-blocking path options simultaneously. The former includes surcharges, while the latter maintains the benchmark electricity price. When a trading party selects a blocked path, the smart contract automatically recommends an optimized non-blocking path. After confirmation by the trading party, the transaction is completed at the benchmark electricity price.
[0091] For example, when a power plant transacts with a user, the system displays: route ABC is quoted at 0.665 yuan / kWh (including surcharges), and route AC is quoted at 0.5 yuan / kWh. When the user selects route ABC, the contract recommends changing to route AC, and after the user confirms, the transaction is completed at 0.5 yuan / kWh.
[0092] This method collects real-time power grid operation data, intelligently predicts congestion risks, and uses price mechanisms to automatically guide trading parties to choose the optimal path. It avoids the response lag problem of traditional centralized management and ensures fair and transparent transactions through blockchain technology, effectively improving the execution efficiency and security of power transactions.
[0093] To address the accuracy issue in predicting power grid congestion paths, in some embodiments, step 103—identifying potential overload risk nodes in the power grid from the fused heatmap using a graph neural network, and predicting congestion paths in the power grid based on these potential overload risk nodes, generating congestion path prediction results—includes:
[0094] Step 201: Use each temperature monitoring point in the fused thermogram as a graph node.
[0095] In step 201, the temperature monitoring points in the fused heat map specifically refer to the set of monitoring point data that has been mapped to spatial coordinates and fused with the load rate data. At this time, each monitoring point contains both the original temperature value and the spatial coordinates and load rate data.
[0096] In this embodiment of the application, data from all monitoring points are extracted from the fused heat map, and each monitoring point is transformed into a node in the graph structure. These nodes carry key features of the line's operating status.
[0097] Step 202: Based on the line connection relationships in the power grid topology data, construct an adjacency matrix representing the connection relationships between graph nodes.
[0098] In step 202, the adjacency matrix in this method refers to a two-dimensional matrix that represents the physical connection relationship between each graph node (temperature monitoring point) in the power grid. The adjacency judgment criterion is: when the transmission lines where two temperature monitoring points are located are directly connected in the power grid topology, the corresponding matrix element value is 1 (indicating adjacency), otherwise it is 0 (indicating non-adjacency). This matrix contains the connection status information between all monitoring points in the power grid, and its data comes from the line connection relationship mapped by the collected power grid topology data.
[0099] In this embodiment of the application, the monitoring points located on the same line or at the line connection are determined based on the power grid topology data, and a complete node connection relationship matrix is constructed to provide a structural basis for subsequent graph neural network analysis.
[0100] Step 203: Encode the temperature value, line load rate data, and spatial coordinates of each graph node into a feature vector for the graph node.
[0101] In step 203, the feature vector is a mathematical expression that combines the multi-dimensional feature data of the node, including temperature value, load rate data and spatial coordinates.
[0102] In this embodiment of the application, the three types of data at each monitoring point are standardized and combined into a feature vector, so that the graph neural network can simultaneously consider the line operation status and spatial location relationship.
[0103] Step 204: Based on the adjacency matrix, update the feature vector through the neighborhood aggregation operation of the graph neural network. When the updated feature vector meets the preset overload judgment condition, mark the corresponding graph node as a potential overload risk node.
[0104] In step 204, the neighborhood aggregation operation is the core computational process of the graph neural network, which updates its own features by allowing nodes to absorb feature information from neighboring nodes. The preset overload judgment criteria refer to the dual standards used to determine whether a graph node is in an overload state, specifically including temperature judgment criteria and load rate judgment criteria. The temperature judgment criteria require that the aggregated temperature characteristic of the node exceeds the maximum allowable operating temperature of the line material, and the load rate judgment criteria require that the aggregated load rate characteristic of the node exceeds the upper limit of the load rate stipulated for safe operation of the power grid. Only nodes that simultaneously meet both conditions will be marked as potentially overloaded risk nodes.
[0105] In this embodiment, each node finds its connected nodes based on the adjacency matrix, and the features of these nodes are weighted and fused according to the relationship between line impedance and capacity to generate a new feature vector. When the temperature and load rate in the new features exceed the safety threshold, the node is marked as a risk node.
[0106] Step 205: Based on the spatial distribution characteristics of all potential overload risk nodes, predict the congestion paths in the power grid and generate congestion path prediction results.
[0107] In step 205, the spatial distribution feature is the location relationship data of risk nodes in the power grid obtained through graph neural network analysis. It originates from the spatial coordinate information of the marked nodes and the line connection relationship. This feature reflects the aggregation and distribution pattern of overload risk points in the power grid and is used to identify continuous line segments that may form blockages. Specifically, it manifests as a potential blockage area composed of multiple risk nodes that are spatially adjacent or located on the same line.
[0108] In this embodiment of the application, the location relationship of all marked risk nodes in the power grid is analyzed, and risk nodes that are spatially adjacent or located on the same line are connected to form a complete blockage path prediction.
[0109] Here is a specific example:
[0110] In a regional power grid, the system first acquires the connection relationships of lines AB, AC, and BC, and sets up 6 monitoring points on each line to collect temperature data. The temperature at the monitoring point in the middle section of line AB is 85 degrees Celsius, and the temperature at the end of line BC is 83 degrees Celsius. Based on historical data, the current load rate of line AB is predicted to be 95%, line AC 90%, and line BC 93%. The load rate and temperature data are combined and calculated with a weight of 6:4. For example, the risk value of the monitoring point in the middle section of line AB is 95 × 0.6 + 85 × 0.4 = 91, generating a fused heat map showing the middle section of line AB as a red high-risk area. The 6 monitoring points are set as graph nodes, and a 6 × 6 adjacency matrix is constructed to represent the connection relationships. Monitoring point 1 (the starting point of line AB, coordinates 0, 0) is connected to monitoring point 2 (the ending point of line AB) and monitoring point 3 (the starting point of line AC). The feature vector of node 1 is [85, 95, 0, 0], representing temperature, load rate, and coordinates. Graph neural network calculations show that the feature update values of nodes 1, 2, and 5 exceed a preset threshold (temperature greater than 80 degrees Celsius and load rate greater than 85%), and they are marked as risk nodes. These nodes are located on lines AB and BC, therefore the intersection of these two lines is predicted to be a congested path.
[0111] In this embodiment of the application, the method uses graph neural networks to intelligently analyze power grid operation data, accurately identify potential overload risks and predict congestion paths, providing a reliable basis for power trading decisions and effectively improving the security and execution efficiency of the transactions.
[0112] To address the accuracy issue in identifying power grid overload risk nodes, in some embodiments, step 204: updating the feature vector based on the adjacency matrix using neighborhood aggregation operations of a graph neural network; when the updated feature vector satisfies a preset overload determination condition, marking the corresponding graph node as a potential overload risk node includes:
[0113] Step 301: For each graph node, take it as the current graph node and execute the following process: extract the adjacent graph nodes directly connected to the current graph node from the adjacency matrix to form an adjacent graph node set.
[0114] In step 301, direct connection refers to the node relationship in the power grid topology that is directly connected by physical transmission lines. That is, there is a single line connection between two nodes that does not need to go through other intermediate nodes. This connection relationship is clearly defined by the adjacency matrix in the power grid topology data. The set of adjacent graph nodes refers to the combination of other monitoring points that are directly connected to the currently processed monitoring point. These monitoring points are physically connected through transmission lines.
[0115] In this embodiment of the application, the system searches for all other monitoring points connected to the current monitoring point in the adjacency matrix and groups these points into the same set for subsequent analysis.
[0116] Step 302: Obtain the temperature values and line load rate data of all adjacent graph nodes in the adjacent graph node set, so as to filter out the corresponding data of the adjacent graph node set.
[0117] In step 302, the temperature value refers to the conductor surface temperature data measured in real time by temperature sensors installed on the transmission line. This directly reflects the heat generation of the line under its current operating condition and is one of the important indicators for determining whether the line is overloaded. The line load rate data refers to the ratio of the actual power load currently transmitted by the line to its maximum carrying capacity, representing the line's utilization level. This data is calculated based on historical operating data using a load rate prediction model. Corresponding data refers to the specific parameters required for aggregation calculations with the current node. Specifically, this includes the temperature monitoring values and line load rate data of each adjacent node. These data are comparable parameters of the same type and dimension as the temperature and load rate data of the current node.
[0118] In this embodiment of the application, the latest temperature measurement value and predicted load rate data of each monitoring point in the set are retrieved from the real-time power grid database to provide input for subsequent calculations.
[0119] Step 303: Perform a weighted average calculation on the temperature value and line load rate data of the current graph node and the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features.
[0120] In step 303, the weighted average calculation refers to a differentiated data processing method that considers the physical characteristics of the line. The temperature weight uses the reciprocal of the line impedance, and the load rate weight uses the line capacity ratio. The aggregated temperature characteristic is a representative regional temperature value calculated by comprehensively considering the temperature data of the current node and its adjacent nodes. It is obtained through weighted average calculation and reflects the overall temperature status of the line segment where the node is located. The aggregated load rate characteristic is a regional load level index calculated by integrating the load rate data of the current node and its adjacent nodes. It is calculated using capacity ratio weighting and characterizes the comprehensive load situation of the line segment where the node is located.
[0121] In this embodiment of the application, the temperature and load rate of the current monitoring point and the adjacent monitoring points are calculated by weighting, wherein the temperature weight is equal to 1 divided by the line impedance value, and the load rate weight is equal to the line capacity divided by the total capacity of the adjacent lines. The aggregated feature is obtained by weighted summation and then divided by the total weight.
[0122] Step 304: Fuse the polymerization temperature feature and the polymerization loading rate feature into the feature vector of the graph node to form an updated feature vector.
[0123] In step 304, the updated feature vector refers to new feature data that incorporates information from neighboring nodes, including aggregated temperature features and aggregated load rate features.
[0124] In this embodiment of the application, the calculated polymerization temperature value and polymerization loading rate value are used to replace the corresponding values in the original feature vector to form a new feature that reflects the overall state of the region.
[0125] Step 305: When the updated feature vector simultaneously satisfies that the aggregation temperature feature is greater than a preset temperature threshold and the aggregation load rate feature is greater than a preset load rate threshold, mark the current graph node as a potential overload risk node.
[0126] In step 305, the preset temperature threshold and the preset load rate threshold are critical values set according to power grid safety standards, used to determine whether a node is in a dangerous state.
[0127] In this embodiment of the application, when the polymerization temperature in the updated feature vector exceeds the upper limit of the material's temperature resistance and the polymerization load rate exceeds the upper limit of the line's load capacity, the monitoring point is marked as a potential overload risk point.
[0128] Here is a specific example:
[0129] In a certain regional power grid, when the system performs an overload risk assessment on monitoring point 1 of line AB, it first extracts monitoring points 2 and 3 directly connected to it from the adjacency matrix to form an adjacent node set. The temperature value of monitoring point 2 is 82 degrees Celsius and its load rate is 88%, while the temperature value of monitoring point 3 is 78 degrees Celsius and its load rate is 85%. In the temperature-weighted calculation, the weight of monitoring point 2 is taken as the reciprocal of the line AB impedance (1 / 0.3 = 3.33), and the weight of monitoring point 3 is taken as the reciprocal of the line AC impedance (1 / 0.2 = 5). The current node weight is 1, and the aggregated temperature characteristic is calculated as 85 × 1 + 82 × 3.33 + 78 × 5 divided by 1 + 3.33 + 5, which equals 81.4 degrees Celsius. When calculating the load rate weighted average, the weight of monitoring point 2 is taken as the capacity ratio of line AB (500 / 800 = 0.625), and the weight of monitoring point 3 is taken as the capacity ratio of line AC (300 / 800 = 0.375). The current node's weight is 1. The aggregated load rate feature is calculated as 95×1 + 88×0.625 + 85×0.375 divided by 1 + 0.625 + 0.375, which equals 90.2%. 81.4 degrees and 90.2% are updated in the feature vector of node 1. When the preset temperature threshold is 80 degrees and the load rate threshold is 85%, since 81.4 is greater than 80 and 90.2 is greater than 85, monitoring point 1 is marked as a potential overload risk node. After processing other nodes in the same way, monitoring points 1, 2, and 5 are all marked as risk nodes. Based on the location distribution of these nodes, the intersection of lines AB and BC is ultimately determined to be a congestion path.
[0130] In this embodiment of the application, the method accurately identifies overload risk areas in the power grid by considering the weighted calculation of the physical characteristics of the line and the fusion of neighborhood information, providing a reliable basis for congestion path prediction and effectively improving the power grid safety early warning capability.
[0131] To address the accuracy issue in aggregating features of power grid risk nodes, in some embodiments, step 303—calculating a weighted average of the temperature value and line load rate data of the current graph node with the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features—includes:
[0132] Step 401: Obtain the line impedance parameters between the current graph node and each adjacent graph node, and the rated transmission capacity of the line where each adjacent graph node is located.
[0133] In step 401, the line impedance parameter refers to the resistance encountered by current flowing through the line, which is numerically equal to the resistance per unit length of the line and reflects the electrical characteristics of the line. The rated transmission capacity of the line where each adjacent node is located refers to the maximum safe transmission power allowed by the line design.
[0134] In this embodiment of the application, impedance data and capacity data of the lines between the current node and adjacent nodes are retrieved from the power grid basic parameter library to provide a basis for subsequent weight calculation.
[0135] Step 402: Based on the line impedance parameters, calculate the temperature weight value of each adjacent graph node.
[0136] In step 402, the temperature weight value is a weighting coefficient calculated based on the line impedance parameter; the higher the impedance of the line, the smaller its weight.
[0137] In this embodiment of the application, for each adjacent node, the impedance parameter of its line is taken, and the reciprocal of the impedance value is calculated as the temperature weight. The line with the smaller impedance has a greater impact on the temperature and therefore has a higher weight.
[0138] Step 403: The temperature value of the current graph node and the temperature values of all adjacent graph nodes are weighted and summed according to the temperature weight value. The first weighted summation result is divided by the first weight summation to generate the aggregated temperature feature.
[0139] In step 403, the first weighted summation result refers to the sum of the temperature value of the current graph node and the temperature values of all its adjacent graph nodes, weighted according to their respective temperature weights. The current node's temperature value is multiplied by a default weight of 1, and the temperature values of adjacent nodes are multiplied by their corresponding line impedance reciprocal weights, reflecting the total regional temperature after considering the influence of line impedance. The first weighted summation refers to the sum of all weight values involved in the temperature weighting calculation, including the current node's default weight of 1 and the temperature weights (reciprocals of line impedance) of each adjacent node. This summation is used to normalize the weighted summation result to obtain the aggregated temperature characteristics.
[0140] In this embodiment, the temperature value of the current node is multiplied by the default weight 1, and the temperature values of each adjacent node are multiplied by their corresponding temperature weights. The sum is then divided by the sum of all weights to obtain the representative temperature value of the region considering the influence of line impedance.
[0141] Step 404: Based on the rated transmission capacity, calculate the load weight value of each adjacent graph node.
[0142] In step 404, the load weight value is a weighting coefficient calculated based on the line's rated capacity; the larger the capacity of the line, the higher the weight.
[0143] In this embodiment of the application, the proportion of the capacity of the line where each adjacent node is located to the total capacity of all adjacent lines is calculated as the load weight of that node. Lines with larger capacity have a greater impact on the load.
[0144] Step 405: The line load rate data of the current graph node and the line load rate data of all adjacent graph nodes are weighted and summed according to the load weight value. The second weighted summation result is divided by the second weight summation to generate the aggregated load rate feature.
[0145] In step 405, the second weighted summation result refers to the sum of the load rate data of the current graph node and the load rate data of all its adjacent graph nodes, weighted according to their load weight values. The current node's load rate is multiplied by a default weight of 1, and the load rates of adjacent nodes are multiplied by their corresponding line capacity percentage weights, reflecting the total regional load rate after considering line capacity differences. The second weighted summation refers to the sum of all weight values involved in the load rate weighted calculation, including the current node's default weight of 1 and the load weights (line capacity percentages) of each adjacent node. This weighted summation result is used to normalize the weighted summation result to obtain the aggregated load rate feature.
[0146] In this embodiment of the application, the load rate of the current node is multiplied by the default weight 1, and the load rates of each adjacent node are multiplied by their corresponding load weights. The sum is then divided by the sum of all weights to obtain the regional representative load rate considering the differences in line capacity.
[0147] Here is a specific example:
[0148] In a certain regional power grid, when the system processes monitoring point 5 of line BC, it first obtains the line parameters between this node and its neighboring nodes 4 and 6. The AC impedance of line 4 is 0.2 ohms with a rated capacity of 300 MW. The BC impedance of line 6, which belongs to the same line as node 5, is 0.25 ohms with a rated capacity of 400 MW. When calculating the temperature weight value, the weight of node 4 is 1 divided by 0.2, which equals 5; the weight of node 6 is 1 divided by 0.25, which equals 4; the weight of the current node 5 is 1 by default. The sum of the first weights is 1 + 5 + 4 = 10. The weighted summation of temperatures is 83 multiplied by 1 + 80 multiplied by 5 + 81 multiplied by 4 = 83 + 400 + 324 = 807. The aggregated temperature characteristic is 807 divided by 10, which equals 80.7 degrees Celsius. When calculating the load weight value, the weight of node 4 is 300 divided by 700, which equals 0.4286; the weight of node 6 is 400 divided by 700, which equals 0.5714; the weight of the current node 5 is 1 by default; and the sum of the second weight is 1 plus 0.4286 plus 0.5714, which equals 2. The weighted summation of the load rate is 87 multiplied by 1 plus 82 multiplied by 0.4286 plus 86 multiplied by 0.5714, which equals 87 plus 35.1052 plus 49.1404, which equals 171.2456. The aggregated load rate characteristic is 171.2456 divided by 2, which equals 85.6228%.
[0149] In this embodiment of the application, the method uses differentiated weighted calculations that take into account the physical characteristics of the lines to make the generated aggregated features more accurately reflect the actual operating status of the power grid area, providing a reliable data foundation for overload risk identification and effectively improving the accuracy of congestion prediction.
[0150] To address the need for visual analysis of power grid operation status, in some embodiments, step 102: generating line load rate data based on the power grid topology data and the historical congestion records, combined with a load rate prediction model, and generating a fused heat map based on the line load rate data and the line temperature distribution data, includes:
[0151] Step 501: Map the line connection relationships in the power grid topology data into spatial coordinates.
[0152] In step 501, the line connection relationship refers to the physical connection method and network structure relationship between various transmission lines, substations, and generation nodes in the power grid. This data comes from the power grid architecture design drawings or the digital topology information of the power grid operation and management system. Spatial coordinates refer to the conversion of the connection relationship of each line in the power grid into position information in a plane coordinate system, using numerical values to represent the specific location of the line in the power grid.
[0153] In this embodiment of the application, the entire power grid structure is mapped to a two-dimensional coordinate system based on the starting and ending point information of the line, so that each line has a corresponding coordinate range.
[0154] Step 502: Input the load peak data from the historical congestion records into the load rate prediction model and output the line load rate data for each line segment.
[0155] In step 502, the peak load data refers to the highest load rate data of the transmission lines when congestion occurs, which is recorded in the past operation of the power grid. These data come from the historical database of line load monitoring accumulated by the power grid dispatching system over a long period of time.
[0156] In this embodiment of the application, the maximum load data in the historical records is input into the trained prediction model. After analyzing the historical change patterns, the model outputs the current load rate prediction value for each line segment.
[0157] Step 503: Associate the line load rate data with the spatial coordinates to form a load rate distribution map.
[0158] In step 503, the load rate distribution map refers to a visual chart formed by marking the load rate values of each line to the corresponding spatial location.
[0159] In this embodiment of the application, the load rate value obtained in step 502 is filled into the corresponding position according to the position range of the line in the coordinate system, forming a distribution map in which the color depth represents the load level.
[0160] Step 504: Extract the location and temperature value of the temperature monitoring point from the temperature distribution data of the line.
[0161] In step 504, the temperature monitoring point refers to the specific physical location of the temperature sensor actually installed on the power grid line. These monitoring points continuously collect line temperature data to form the line temperature distribution data. The location of the temperature monitoring point refers to the specific coordinates of each sensor installed on the transmission line, and the temperature value is the real-time reading of the conductor surface temperature measured by these sensors.
[0162] In this embodiment of the application, the installation location information of all sensors and the latest temperature measurement data are extracted from the temperature monitoring system.
[0163] Step 505: Spatially overlay the load rate distribution map with the location of the temperature monitoring point.
[0164] In step 505, spatial overlay processing refers to the process of matching and aligning the load rate distribution map with the temperature monitoring point location information in the same coordinate system.
[0165] In this embodiment of the application, the coordinate information of the temperature monitoring point is superimposed on the load rate distribution map to ensure that the spatial positions of the two correspond accurately.
[0166] Step 506: In the spatial distribution map formed by overlay, the line load rate data at the same location and the temperature value are weighted and fused to generate a fused heat map.
[0167] In step 506, weighted fusion refers to a method of merging and calculating load rate and temperature data at the same location according to a set ratio.
[0168] In this embodiment of the application, the load rate value and temperature value at the location of each temperature monitoring point are calculated with a weight ratio of 6:4 to obtain a characteristic value that comprehensively reflects the line's operating status.
[0169] Here is a specific example:
[0170] In a certain regional power grid, the system first obtains the connection relationships of lines AB, AC, and BC. The starting point of line AB is set as the origin (0,0), and the ending point is set as (150,0); the ending point of line AC is set as (100,100); and line BC connects point B (150,0) and point C (100,100). Twelve overload records from the past year's summer peak electricity consumption period are retrieved. Through load rate prediction model analysis, the current load rate of line AB is determined to be 95%, lines A-C 90%, and lines B-C 93%. These values are then marked on the corresponding line coordinates to form a load rate distribution map. Simultaneously, real-time data from six temperature monitoring points are acquired. The temperature at the monitoring point in the middle section of line AB, located at coordinates (75,0), is 85 degrees Celsius, and the temperature at the end monitoring point of line BC, located at coordinates (125,50), is 83 degrees Celsius. After overlaying the load rate distribution map with the temperature monitoring point locations, the risk value for location (75,0) with a load rate of 95% and a temperature of 85 degrees Celsius is calculated using a 6:4 weighting: 95 × 0.6 + 85 × 0.4 = 91. Similarly, the risk value for location (125,50) with a load rate of 93% and a temperature of 83 degrees Celsius is calculated as 93 × 0.6 + 83 × 0.4 = 89. After processing all monitoring points sequentially, a complete fused heat map is generated. In this map, the middle section of line AB is displayed in dark red, while the end of line BC is displayed in light red, visually demonstrating the risk levels of different line segments.
[0171] In this embodiment of the application, the method uses spatial mapping and data fusion technology to organically combine the power grid load status with temperature information, generating a heat map that intuitively reflects the risk of line operation, providing a reliable visualization basis for subsequent congestion analysis, and effectively improving the comprehensiveness and accuracy of power grid status monitoring.
[0172] To address the pricing issue of congested paths in electricity trading, in some embodiments, step 104: calculating the tradable capacity margin based on the congestion path prediction results, and generating a congestion surcharge item in the smart contract according to the tradable capacity margin, includes:
[0173] Step 601: Locate the blocked line segment in the blocked path prediction results.
[0174] In step 601, the blocked line segment refers to the transmission line section that is predicted to be overloaded through the aforementioned analysis, specifically manifested as a continuous line segment marked as high risk.
[0175] In this embodiment of the application, based on the distribution of risk nodes, line segments connecting multiple high-risk nodes in the power grid are identified as blocked line segments.
[0176] Step 602: Obtain the rated transmission capacity and actual load data of the blocked line segment.
[0177] In step 602, the rated transmission capacity refers to the maximum safe transmission power allowed by the line design. The actual load data refers to the actual electrical load currently carried by the line.
[0178] In this embodiment of the application, the upper limit of the capacity of the blocked line is queried from the power grid basic parameter database, and the current load data provided by the real-time monitoring system is obtained at the same time.
[0179] Step 603: Based on the rated transmission capacity and the actual load data, calculate the remaining available capacity of the blocked line segment, and use the remaining available capacity as the tradable capacity margin.
[0180] In step 603, the remaining available capacity refers to the additional electrical load that the line can still carry, which is equal to the rated capacity minus the actual load.
[0181] In this embodiment of the application, for each blocked line segment, the current actual load value is subtracted from its rated capacity value to obtain how much additional power transaction the line segment can still carry.
[0182] Step 604: Determine the surcharge coefficient based on the comparison between the tradable capacity margin and the preset capacity threshold.
[0183] In step 604, the comparison relationship refers to comparing the remaining available capacity of the line (tradable capacity margin) with the minimum allowable remaining capacity value set for safe operation of the power grid (preset capacity threshold). When the margin is lower than the threshold, an additional fee is triggered. Specifically, the closer the margin is to the threshold, the larger the generated additional fee coefficient, forming a reverse correlation. The additional fee coefficient is a fee adjustment ratio calculated based on the difference between the remaining capacity of the line and the safety threshold.
[0184] In this embodiment, the remaining capacity of the line is compared with a preset safety threshold. The larger the difference, the higher the coefficient. The specific coefficient value is calculated by the formula (threshold - remaining capacity) / threshold.
[0185] Step 605: In the smart contract, create a blocking surcharge item that includes the surcharge coefficient.
[0186] In this embodiment, contract terms containing information such as line identifier, surcharge coefficient, and effective time are created on the blockchain and automatically pushed to relevant trading parties. The specific implementation process is as follows: a blocking surcharge structure (containing line ID, surcharge coefficient, and effective timestamp) is defined in the Ethereum smart contract. After the capacity margin calculation is completed, the contract's addCongestionFee function is called to write the line segment identifier, the real-time calculated surcharge coefficient, and the block time into the structure, and broadcast it to all trading nodes through the event log. For example, if the tradable capacity margin of line AB in a certain regional power grid drops to 30% of a preset threshold, the system calculates a surcharge coefficient of 0.5. The smart contract automatically generates a blocking surcharge item containing this coefficient, causing the trading price of the AB path to increase by 50%, while the adjacent ACB path maintains the benchmark price due to sufficient margin, prompting trading parties to switch to non-blocking paths to complete the matching.
[0187] Here is a specific example:
[0188] In a certain regional power grid, the system, based on the aforementioned analysis, predicts that the intersection of lines AB and BC is a congested area. First, the middle section of line AB is identified as the specific congested line segment. The rated transmission capacity of this line segment is found to be 500 MW in the power grid parameter database, while the current actual load is 480 MW from the real-time monitoring system. The remaining available capacity is calculated as rated capacity minus actual load, i.e., 500 minus 480 equals 20 MW, which is taken as the tradable capacity margin. The system's preset safety capacity threshold is 30 MW. Using the formula (threshold minus margin) divided by the threshold, i.e., (30 minus 20) divided by 30 equals 0.33, the surcharge coefficient is calculated to be 33%. The smart contract platform automatically creates transaction terms stipulating that any electricity transaction passing through this congested line segment must be subject to a 33% surcharge on top of the base price. For example, when a power plant transacts with a user, the system displays two optional routes: the ABC route, which passes through a congested area, has a base price of 0.5 yuan / kWh plus an additional fee of 0.165 yuan / kWh, totaling 0.665 yuan / kWh; while the AC route, which bypasses the congestion, maintains the base price of 0.5 yuan / kWh. When the user selects the ABC route, the smart contract automatically suggests a better option. After the user confirms, the transaction is completed at a price of 0.5 yuan / kWh via the AC route.
[0189] In this embodiment of the application, the method achieves intelligent adjustment of transaction fees for congested sections by quantitatively analyzing the remaining capacity of the line. This not only ensures the safe operation of the power grid, but also optimizes the allocation of power resources through the price mechanism, effectively improving the fairness and economy of power trading.
[0190] To address the optimization problem of electricity trading path selection, in some embodiments, step 105: guiding both parties in the electricity trading transaction to select a non-blocking path in the power grid through the congestion surcharge to complete the electricity trading matchmaking, includes:
[0191] Step 701: In the smart contract's transaction interface, a first transaction option that allows the selection of a blocking path and a second transaction option that allows the selection of a non-blocking path are displayed side by side, wherein the first transaction option uses a premium quote and the second transaction option uses a base electricity price quote.
[0192] In step 701, the first trading option refers to a trading scheme that allows selection of a congested path, with its price including an additional fee calculated based on the degree of congestion. The second trading option refers to a trading scheme that allows selection of a non-congested path, maintaining the grid benchmark price without additional pricing.
[0193] In this embodiment of the application, two path options and their corresponding quotes are displayed simultaneously on the transaction interface, providing the transacting parties with a clear choice.
[0194] Step 702: When it is detected that both parties to the power transaction have selected the second transaction option, the power transaction contract for the corresponding non-blocking path is executed immediately.
[0195] In step 702, "immediate execution" means that when both parties to the transaction directly select a non-blocking path, the system automatically and quickly completes the contract signing and transaction confirmation process according to the benchmark electricity price.
[0196] In this embodiment of the application, the automatic execution function of the smart contract generates a legally binding electronic contract immediately after the transacting parties select the second option, without the need for manual intervention.
[0197] Step 703: When it is detected that both parties in the power transaction have selected the first transaction option, the path optimization rules of the smart contract are automatically triggered to generate an optimized transaction scheme that includes a non-blocking path and the corresponding benchmark electricity price.
[0198] In step 703, the path optimization rule refers to the intelligent algorithm that automatically finds and recommends a better alternative path when the trading party chooses a blocking path.
[0199] In this embodiment of the application, by analyzing the real-time status of the power grid, the optimal path that meets the transaction requirements is selected from all available non-blocking paths, and a new transaction plan is automatically generated for user confirmation.
[0200] Step 704: Based on the confirmation instructions from both parties to the power transaction regarding the optimized transaction plan, complete the power transaction matching.
[0201] In step 704, the confirmation instruction refers to the final confirmation operation by both parties to the transaction regarding the system's recommended optimization plan.
[0202] In this embodiment of the application, the optimized transaction plan is pushed to both parties to the transaction. After both parties confirm and agree, the system completes the final contract signing and transaction execution according to the new plan.
[0203] Here is a specific example:
[0204] In a power trading scenario within a regional power grid, when power plant A and user B transact through a smart contract platform, the system interface displays two optional route options: the first route passes through the predicted congestion area ABC, which includes a congested line segment requiring an additional 33% fee, resulting in a base price of 0.5 yuan / kWh plus an additional fee of 0.165 yuan / kWh, totaling 0.665 yuan / kWh; the second route detours through the non-congestion line AC, maintaining the base price of 0.5 yuan / kWh. When user B directly selects the second non-congestion route, the system immediately generates and executes the transaction contract at a price of 0.5 yuan / kWh. If user B selects the first congestion route, the smart contract automatically triggers a route optimization process: first, it detects that line AC currently has a 90% load rate and a remaining capacity of 30 MW, sufficient to meet the transaction requirements; then, it generates an optimized solution suggesting rerouting through line AC while maintaining the base price of 0.5 yuan / kWh; after user B confirms acceptance of the optimized solution, the system ultimately completes the transaction matching through the AC route at a price of 0.5 yuan / kWh.
[0205] In this embodiment of the application, the method, through dual path selection and intelligent optimization mechanism, respects the choice rights of both parties in the transaction while ensuring the safe operation of the power grid, and guides the optimal allocation of resources through price leverage and intelligent recommendation, thereby achieving a dual improvement in the efficiency and security of power transactions.
[0206] Figure 2 A schematic diagram of a smart contract-based power trading matching system provided in this application embodiment is shown below. Figure 2 As shown, the system includes:
[0207] Template 21 is used to collect power grid topology data, historical blockage records, and line temperature distribution data.
[0208] The generation module 22 is used to generate line load rate data based on the power grid topology data and the historical congestion records, combined with the load rate prediction model, and to generate a fused heat map based on the line load rate data and the line temperature distribution data.
[0209] The input module 23 is used to input the fused heat map into a pre-trained graph neural network, identify potential overload risk nodes in the power grid from the fused heat map through the graph neural network, predict congestion paths in the power grid based on the potential overload risk nodes, and generate congestion path prediction results.
[0210] The calculation module 24 is used to calculate the tradable capacity margin based on the blocked path prediction result, and generate a blocking surcharge item in the smart contract according to the tradable capacity margin.
[0211] Selection module 25 is used to guide both parties in a power transaction to select a non-blocking path in the power grid through the congestion surcharge item in order to complete the power transaction matching.
[0212] Figure 2 The aforementioned smart contract-based power trading matching system can execute... Figure 1 The implementation principle and technical effects of the smart contract-based power trading matching method described in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the smart contract-based power trading matching system in the above embodiments perform operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0213] In one possible design, Figure 2 The power trading matching system based on smart contracts shown in the embodiment can be implemented as a computing device, such as... Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;
[0214] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processing component 32.
[0215] The processing component 32 is used to perform the above. Figure 1 The above embodiment describes a method for matching electricity transactions based on smart contracts.
[0216] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above-described method. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-described method.
[0217] Storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented from 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.
[0218] Of course, computing devices may also include other components, such as input / output interfaces, display components, communication components, etc.
[0219] Input / output interfaces provide interfaces between processing components and peripheral interface modules, which can be output devices, input devices, etc.
[0220] The communication components are configured to facilitate wired or wireless communication between computing devices and other devices.
[0221] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform. In this case, the computing device can refer to a cloud server, and the aforementioned processing components, storage components, etc., can be basic server resources rented or purchased from the cloud computing platform.
[0222] This application also provides a computer storage medium storing a computer program, which, when executed by a computer, can perform the above-described functions. Figure 1 The illustrated embodiment presents a smart contract-based method for matching electricity transactions.
[0223] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0224] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0225] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for matching electricity transactions based on smart contracts, characterized in that, include: Collect power grid topology data, historical congestion records, and line temperature distribution data; Based on the power grid topology data and the historical congestion records, and combined with the load rate prediction model, line load rate data is generated. Based on the line load rate data and the line temperature distribution data, a fused heat map is generated. The load rate prediction model is a machine learning model that predicts line load rate based on load peak data in the historical congestion records. The fused heatmap is input into a pre-trained graph neural network. The graph neural network identifies potential overload risk nodes in the power grid from the fused heatmap and predicts congestion paths in the power grid based on the potential overload risk nodes, generating congestion path prediction results. Based on the predicted congestion path, the tradable capacity margin is calculated, and a congestion surcharge item is generated in the smart contract according to the tradable capacity margin. The aforementioned congestion surcharge guides both parties in a power transaction to select a non-congested path in the power grid in order to complete the power transaction matching. The process of guiding both parties in a power transaction to select a non-congested path in the power grid through the congestion surcharge to complete the power transaction matching includes: In the smart contract's transaction interface, a first transaction option that allows the selection of a blocking path and a second transaction option that allows the selection of a non-blocking path are displayed side by side, wherein the first transaction option uses a premium quote and the second transaction option uses a base electricity price quote; When it is detected that both parties to the power transaction have selected the second transaction option, the corresponding non-blocking power transaction contract is executed immediately; When it is detected that both parties in the power transaction have selected the first transaction option, the path optimization rules of the smart contract are automatically triggered to generate an optimized transaction plan that includes a non-blocking path and the corresponding benchmark electricity price. Based on the confirmation instructions from both parties to the power transaction regarding the optimized transaction plan, the power transaction is matched.
2. The power trading matching method based on smart contracts according to claim 1, characterized in that, The step of identifying potential overload risk nodes in the power grid from the fused heatmap using a graph neural network, and predicting congestion paths in the power grid based on the potential overload risk nodes, and generating congestion path prediction results, includes: Each temperature monitoring point in the fused thermal map is used as a graph node; Based on the line connection relationships in the power grid topology data, an adjacency matrix representing the connection relationships between graph nodes is constructed; The temperature value, line load rate data, and spatial coordinates of each graph node are encoded into a feature vector for the graph node. Based on the adjacency matrix, the feature vector is updated through the neighborhood aggregation operation of the graph neural network. When the updated feature vector meets the preset overload judgment condition, the corresponding graph node is marked as a potential overload risk node. Based on the spatial distribution characteristics of all potential overload risk nodes, the congestion paths in the power grid are predicted, and the congestion path prediction results are generated.
3. The power trading matching method based on smart contracts according to claim 2, characterized in that, The process of updating the feature vector based on the adjacency matrix through neighborhood aggregation operation of a graph neural network, and marking the corresponding graph node as a potential overload risk node when the updated feature vector satisfies a preset overload judgment condition, includes: For each graph node, it is sequentially designated as the current graph node, and the following process is executed: extract the adjacent graph nodes directly connected to the current graph node from the adjacency matrix to form an adjacent graph node set; Obtain the temperature values and line load rate data of all adjacent graph nodes in the adjacent graph node set, so as to filter out the corresponding data of the adjacent graph node set; The temperature value and line load rate data of the current graph node are weighted and averaged with the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features. The polymerization temperature feature and the polymerization loading rate feature are fused into the feature vector of the graph node to form the updated feature vector; When the updated feature vector simultaneously satisfies that the aggregation temperature feature is greater than a preset temperature threshold and the aggregation load rate feature is greater than a preset load rate threshold, the current graph node is marked as a potential overload risk node.
4. The power trading matching method based on smart contracts according to claim 3, characterized in that, The step of calculating a weighted average of the temperature value and line load rate data of the current graph node with the corresponding data of the adjacent graph node set to generate aggregated temperature features and aggregated load rate features includes: Obtain the line impedance parameters between the current graph node and each adjacent graph node, and the rated transmission capacity of the line where each adjacent graph node is located; Based on the line impedance parameters, calculate the temperature weight value of each adjacent graph node; The temperature value of the current graph node is weighted and summed with the temperature values of all adjacent graph nodes according to the temperature weight value. The first weighted summation result is divided by the first weight summation to generate the aggregated temperature feature. Based on the rated transmission capacity, calculate the load weight value of each adjacent graph node; The line load rate data of the current graph node is weighted and summed with the line load rate data of all adjacent graph nodes according to the load weight value. The second weighted summation result is divided by the second weight summation to generate the aggregated load rate feature.
5. The power trading matching method based on smart contracts according to claim 1, characterized in that, The process of generating line load rate data based on the power grid topology data and historical congestion records, combined with a load rate prediction model, and generating a fused heat map based on the line load rate data and the line temperature distribution data includes: Map the line connection relationships in the power grid topology data to spatial coordinates; Input the load peak data from the historical congestion records into the load rate prediction model, and output the line load rate data for each line segment. The line load rate data is correlated with the spatial coordinates to form a load rate distribution map; Extract the location and temperature value of the temperature monitoring point from the temperature distribution data of the line; The load rate distribution map is spatially superimposed with the location of the temperature monitoring point; In the spatial distribution map formed by overlay, the line load rate data at the same location is weighted and fused with the temperature value to generate a fused heat map.
6. The power trading matching method based on smart contracts according to claim 1, characterized in that, The step of calculating the tradable capacity margin based on the congestion path prediction results, and generating a congestion surcharge item in the smart contract according to the tradable capacity margin, includes: Locate the blocked line segment in the blocked path prediction results; Obtain the rated transmission capacity and actual load data of the blocked line segment; Based on the rated transmission capacity and the actual load data, calculate the remaining available capacity of the blocked line segment, and use the remaining available capacity as the tradable capacity margin; The surcharge coefficient is determined based on the comparison between the tradable capacity margin and the preset capacity threshold; In the smart contract, a blocking surcharge item containing the aforementioned surcharge coefficient is created.
7. A power trading matching system based on smart contracts, characterized in that, include: Data acquisition templates are used to collect power grid topology data, historical congestion records, and line temperature distribution data. The generation module is used to generate line load rate data based on the power grid topology data and the historical congestion records, combined with the load rate prediction model, and to generate a fused heat map based on the line load rate data and the line temperature distribution data. The load rate prediction model is a machine learning model that predicts line load rate based on load peak data in the historical congestion records. The input module is used to input the fused heat map into a pre-trained graph neural network, identify potential overload risk nodes in the power grid from the fused heat map through the graph neural network, predict congestion paths in the power grid based on the potential overload risk nodes, and generate congestion path prediction results. The calculation module is used to calculate the tradable capacity margin based on the blocked path prediction results, and generate a blocking surcharge item in the smart contract according to the tradable capacity margin. The selection module is used to guide both parties in a power transaction to select a non-blocking path in the power grid through the congestion surcharge item in order to complete the power transaction matching. The process of guiding both parties in a power transaction to select a non-congested path in the power grid through the congestion surcharge to complete the power transaction matching includes: In the smart contract's transaction interface, a first transaction option that allows the selection of a blocking path and a second transaction option that allows the selection of a non-blocking path are displayed side by side, wherein the first transaction option uses a premium quote and the second transaction option uses a base electricity price quote; When it is detected that both parties to the power transaction have selected the second transaction option, the corresponding non-blocking power transaction contract is executed immediately; When it is detected that both parties in the power transaction have selected the first transaction option, the path optimization rules of the smart contract are automatically triggered to generate an optimized transaction plan that includes a non-blocking path and the corresponding benchmark electricity price. Based on the confirmation instructions from both parties to the power transaction regarding the optimized transaction plan, the power transaction is matched.
8. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a smart contract-based power trading matching method as described in any one of claims 1 to 6.
9. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a computer, implements a smart contract-based power trading matching method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for searching and determining trading channel in three-class power market
CN101751645A
Distributed energy P2P transaction system and method based on blockchain
CN111833184A