A graph learning-based method for identifying abnormal electricity trading behavior
By constructing a graph attention network model, abnormal patterns in the power trading network are dynamically captured, solving the problem of low efficiency and accuracy of traditional methods in identifying complex trading networks, and realizing efficient and interpretable power market supervision.
Patent Information
- Application Number
- CN202511062610.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-07-31
AI Technical Summary
Traditional methods for identifying abnormal electricity transactions struggle to capture potential patterns and dynamic relationships within complex transaction networks, resulting in low efficiency and accuracy, and failing to meet the needs of electricity market regulation.
A graph learning-based approach is adopted to construct a graph attention network (GAT) model. Through a multi-head attention mechanism, the dependency relationship between nodes is adaptively learned, and the node features in abnormal transactions are dynamically captured. End-to-end anomaly classification is achieved through global average pooling and fully connected layers.
It improves the accuracy and generalization ability of anomaly identification, provides traceable and explainable decision-making basis, is suitable for complex power market supervision, avoids overfitting and underfitting, and supports the supervision of power trading in parallel and interactive markets.
Smart Images

Figure CN120561704B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for identifying abnormal electricity trading behavior, specifically a method for identifying abnormal electricity trading behavior based on graph learning. Background Technology
[0002] Against the backdrop of a deepening global energy transition, the large-scale integration of renewable energy, the widespread application of distributed energy, and the emergence of new electricity trading models have led to increasingly complex relationships and closer data connections among electricity market participants. Traditional methods for identifying abnormal transactions rely on simple rules and statistical analysis, which struggle to capture potential patterns and dynamic relationships within complex trading networks. This results in low identification efficiency and accuracy, failing to meet the current regulatory needs of the electricity market.
[0003] Traditional methods analyze only a single data dimension, neglecting the diverse transaction relationships among market participants (such as collusion and price transmission), and are unable to handle high-dimensional, unstructured graph-structured data. As electricity market trading networks become more complex, abnormal behaviors of trading participants (such as price manipulation and joint bidding) become more covert, and the shortcomings of traditional methods in terms of dynamic adaptability and generalization ability become increasingly apparent, urgently requiring more efficient and accurate technical means. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this invention provides a graph learning-based method for identifying abnormal electricity trading behavior. By constructing a graph attention network (GAT) model, this invention dynamically captures abnormal patterns in complex trading networks, effectively improving the accuracy and generalization ability of anomaly identification, and providing traceable and explainable decision-making basis for electricity market supervision.
[0005] A method for identifying abnormal electricity trading behavior based on graph learning, the method comprising the following steps;
[0006] (1) Data acquisition: Daily load curves are used to simulate the corresponding normal and abnormal transaction behaviors;
[0007] (2) Data processing: Identify the corresponding data including the daily load curve, use the average electricity price as the unit price, normalize the remaining transaction electricity prices with the unit price as the benchmark value, and convert the data to be detected into the corresponding graph structure;
[0008] (3) Graph feature extraction: A graph attention network layer is adopted, and the dependencies between nodes are adaptively learned through a multi-head attention mechanism to dynamically capture the node features in abnormal transactions;
[0009] (4) Graph classification: Through global average pooling and fully connected layers, the abnormal edge information in the graph is transformed into recognition results, and the abnormal detection results are output, realizing end-to-end processing from graph structure data to abnormal classification.
[0010] Preferably, the daily load curve comprises three superimposed parts: the base load part, the load part that varies sinusoidally over time, and the random noise part.
[0011] This invention does not require the identified load curve to be expressed in the above form. As long as there is a clear load curve, the load at the corresponding time point can be extracted.
[0012] As a preferred option, any value is taken from the generated daily load curve to obtain the corresponding load value. Based on this load value, load allocation is generated through Dirichlet distribution to form a graph structure for normal trading behavior.
[0013] Abnormal trading behaviors include electricity retailers profiting by changing electricity prices, and electricity retailers profiting by colluding to quote low or high prices.
[0014] As a preferred option, the behavior of electricity sales companies to change electricity prices and profit from it is as follows: randomly select two or more electricity sales companies of the same type, set the electricity price of one of them to 6 or 1 / 6 times the electricity price of the other electricity sales companies, and form a significant price difference. This abnormal behavior is defined as collusion 1.
[0015] The act of electricity retailers colluding to bid low or high prices and profiting from it is specifically defined as follows: Selecting two or more electricity retailers of another type and setting their electricity prices at 20% or 120% of the average price of that type, simulating joint low-price competition. This abnormal behavior is defined as collusion 2.
[0016] Preferably, in constructing the graph structure, a graph dataset including node attributes and edge features is generated. The nodes include electricity sales enterprise nodes and electricity purchase enterprise nodes. The electricity sales enterprise nodes include the generation type code, generation volume, and electricity price of the electricity sold by the electricity sales enterprise, and the electricity purchase enterprise nodes are transaction connection points. The edge features include the transaction volume and transaction price. The graph structure is an undirected graph.
[0017] As a preferred approach, for each node in the graph structure, a feature vector is extracted. The feature vector of the electricity sales enterprise node includes the power generation, electricity price, and the power generation type code of the electricity sold by the electricity sales enterprise. The power generation type code of the electricity sold by the electricity sales enterprise includes wind power, hydropower, thermal power, and solar power. The electricity purchase enterprise node is initialized with a zero vector and learns features from adjacency information by relying on the graph neural network.
[0018] Preferably, the graph attention network layer consists of two attention network layers, as follows:
[0019] First, feature transformation is performed on the initial features of the nodes based on the learnable parameter matrix and its biases, and then attention coefficients are calculated. After obtaining the attention coefficients, the output feature vector of the nodes is obtained by weighted summation. After using a two-layer graph attention network according to the above steps, the node representations are aggregated into graph-level representations through global average pooling. Then, a linear classifier is used to map the graph representations to the classification results according to the classifier's weights and biases. Finally, the negative log-likelihood loss function is used for training.
[0020] As a preferred method, the quantitative indicator for the Collusion 1 detection is: if the maximum electricity price of any electricity sales enterprise of the same generation type exceeds 2.5 times the minimum electricity price, it is considered that there is an abnormal price difference manipulation between the electricity sales enterprise with the highest electricity price and the electricity sales enterprise with the lowest electricity price in that type.
[0021] The quantitative indicator for the Collusion 2 detection is: If at least two electricity sales companies of the same generation type have electricity prices that are lower or higher than the average electricity price of that type by 50%, these electricity sales companies with electricity prices that are lower or higher than the average electricity price of that type are considered to be colluding to report abnormally low or high prices.
[0022] The beneficial effects of this invention are as follows:
[0023] (1) The present invention constructs a graph attention network (GAT) model, which uses a relationship graph to give an intuitive reflection of the flow information between multiple groups. Compared with traditional machine learning and data analysis techniques, it is more suitable for describing the relationship between different subjects and realizes the effective capture of abnormal patterns in complex transaction networks.
[0024] (2) This invention can effectively deal with market participants of different scales, sources and characteristics. By narrowing the line of sight, it can realize the scheduling, management and supervision of different sizes, and provide a traceable and explainable decision-making basis for power market supervision.
[0025] (3) The graph attention model effectively improves the accuracy and generalization ability of anomaly recognition on the basis of the traditional graph learning model, avoids falling into the trap of overfitting and underfitting in the recognition process, and has better model robustness.
[0026] (4) With the transformation and upgrading of low carbon and the deepening of marketization, more different organizations will participate in the electricity market. There may be multiple markets in parallel and interacting. The forms of cooperation, interaction and game will not be limited to a single market. The graph relationship model can be further upgraded to a three-dimensional form, with the ability to upgrade and expand, providing strong support for the regulatory links of a truly unified market pattern. Attached Figure Description
[0027] Figure 1 This is a flowchart of the present invention;
[0028] Figure 2 This is a graph showing the training loss and validation loss of this invention;
[0029] Figure 3 This is a graph showing the accuracy of the verification of this invention. Detailed Implementation
[0030] To better understand the technical solution of the present invention, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Reference Figure 1 A graph learning-based method for identifying abnormal electricity trading behavior includes the following steps;
[0032] (1) Data acquisition (data generation module): The daily load curve is used to simulate the corresponding normal and abnormal trading behaviors (normal trading data generation, abnormal trading data generation).
[0033] (2) Data Processing (Data Processing Module): Identify the corresponding data including the daily load curve, use the average electricity price as the unit price, normalize the remaining transaction prices using the unit price as the benchmark (electricity price data processing), and convert the data to be detected into the corresponding graph structure (graph construction); the input data technical requirement is a JSON file, which must contain 3 core fields (nodes, edges) and 1 optional field (unit_price). Core field descriptions: The optional field unit_price represents the unit price of electricity transactions, and the attribute type must be floating-point number; the required field nodes stores the node information of all transaction entities, with the key being the node ID (integer) and the value being a dictionary of node attributes. Nodes are divided into two categories: electricity purchasing companies and electricity selling companies, and the attribute requirements are as follows:
[0034] Electricity sales enterprise nodes must include the following attributes: node type (seller); type attribute (must be one of wind power, hydropower, thermal power, or solar power); power generation attribute (must be a floating-point number); and electricity price attribute (must be a floating-point number). An example is provided below:
[0035] "nodes": {
[0036] "0": {
[0037] "Node Type": "Seller",
[0038] Type: Wind Power
[0039] Electricity generation: 75.2
[0040] Electricity price: 0.85
[0041] },
[0042] "1": {
[0043] "Node Type": "Seller",
[0044] Type: Hydropower
[0045] Electricity generation: 90.5
[0046] Electricity price: 0.68
[0047] }}
[0048] The electricity purchasing enterprise node must include the node type attribute and the buyer attribute. An example is provided below:
[0049] "nodes": {
[0050] "50": {
[0051] Node Type: "Buyer"
[0052] },
[0053] "51": {
[0054] Node Type: "Buyer"
[0055] }}
[0056] The required field `edges` represents the stored transaction relationships (connections between electricity retailers and buyers), and is in list format, with each element representing a transaction edge. It must include the following attributes: `source` (an integer corresponding to the seller node ID in `nodes`); `target` (an integer corresponding to the buyer node ID in `nodes`); `transaction volume` (a floating-point number representing the transaction volume); and `transaction price` (a floating-point number representing the unit price of the transaction).
[0057] The following is an example of complete data for a single transaction:
[0058] {
[0059] "unit_price": 0.7,
[0060] "nodes": {
[0061] "0": {
[0062] "Node Type": "Seller",
[0063] Type: Wind Power
[0064] "Electricity generation": 65.0
[0065] Electricity price: 0.8
[0066] },
[0067] "1": {
[0068] "Node Type": "Seller",
[0069] Type: Hydropower
[0070] Electricity generation: 80.0
[0071] Electricity price: 0.6
[0072] },
[0073] "50": {
[0074] Node Type: "Buyer"
[0075] },
[0076] "51": {
[0077] Node Type: "Buyer"
[0078] }
[0079] },
[0080] "edges": [
[0081] {
[0082] "source": 0,
[0083] "target": 50,
[0084] Trading volume: 20.5
[0085] Transaction Price: 0.8
[0086] },
[0087] {
[0088] "source": 1,
[0089] "target": 51,
[0090] Trading volume: 25.2
[0091] Transaction Price: 0.6
[0092] }
[0093] ]}
[0094] (3) Graph feature extraction (graph feature extraction module): A two-layer graph attention network (GAT1 attention layer and GAT2 attention layer) is used to adaptively learn the dependencies between nodes through a multi-head attention mechanism and dynamically capture the node features in abnormal transactions;
[0095] (4) Graph classification (graph classification module): Through global average pooling and fully connected layers, the abnormal edge information in the graph is transformed into recognition results, and the abnormal detection results (abnormal recognition results) are output, realizing end-to-end processing from graph structure data to abnormal classification.
[0096] Specifically, the data generation module:
[0097] The simulated daily load curve is superimposed from three parts: the base load, the load that varies sinusoidally over time, and random noise.
[0098] It should be noted that the random sampling and allocation of simulated transaction load should conform to the daily load curve, but the model does not require the daily load curve to conform to the above function form for the identification of abnormal transaction behavior. That is, the data detected only needs to have a clear daily load curve.
[0099] Then, any value is taken from the generated daily load curve to obtain a certain load value. Based on this load value, load allocation is generated through Dirichlet distribution to ensure reasonable allocation of transaction volume and form a graph structure for normal transactions.
[0100] Based on the normal transaction simulation, an abnormal behavior is added: electricity sales companies profit by changing electricity prices. Specifically, the simulation involves randomly selecting two or more electricity sales companies of the same type and setting the electricity price of one of them to 6 or 1 / 6 times that of the other companies, thus creating a significant price difference. This abnormal behavior is collectively referred to as collusion 1.
[0101] Adding abnormal behavior: Electricity retailers collude to offer low or high prices and profit from it. Specifically, this is simulated by selecting two or more electricity retailers of another type and setting their electricity prices to 20% or 120% of the average price of that type, simulating collusion to compete on low prices. This abnormal behavior is collectively referred to as collusion 2.
[0102] Data processing module
[0103] Electricity price data processing is primarily used for the data to be tested. The arithmetic average of all tested data electricity prices is calculated to obtain the unit price, or the unit price is directly provided by the data testing side. The transaction electricity prices of the data to be tested are then expressed as unit prices to facilitate subsequent identification of abnormal electricity price behavior. The generated data used for training, however, is expressed as unit prices and therefore does not require electricity price data processing.
[0104] Graph construction generates a graph dataset containing node attributes (such as the type of electricity generation, the amount of electricity generated, and the price of electricity sold by the electricity sales company) and edge features (such as the amount of electricity traded and the price of electricity traded).
[0105] The node definition is as follows: electricity sales companies and electricity purchase companies are defined as nodes. Electricity sales company nodes include 6-dimensional features such as type code (wind power, thermal power, hydropower, solar power), power generation, and electricity price; electricity purchase company nodes are transaction connection points, and their features are all-zero vectors.
[0106] The following nodes are generated for electricity sales companies: , No. n Individual electricity sales enterprise nodes s n Includes electricity price attributes;
[0107] The following nodes are generated for electricity purchasing companies: , b m Indicates the first m Individual electricity purchasing enterprise nodes;
[0108] Edge definition: Edges are defined using transaction relationships as their basis. Edge characteristics include transaction volume and transaction price, characterizing the resource flow and price transmission relationships among market participants. The graph structure is an undirected graph. ,in For a set of nodes, It is an edge set.
[0109] The process for building a power transaction scenario is as follows:
[0110] Based on the Dirichlet distribution, the required load of the power purchaser is allocated, and then the power sales company is randomly selected as the trading partner for the power purchaser according to the Randoms Sample function.
[0111] For each transaction between the corresponding electricity purchaser and the electricity seller, a corresponding node edge is generated. The edge attributes include the transaction volume and the transaction price, which is the electricity selling price of the corresponding electricity seller.
[0112] Under the premise of constructing normal trading scenarios, an abnormal trading behavior is constructed by adding a collusion function 1 and a collusion function 2, which are the abnormal electricity trading scenarios.
[0113] Feature extraction module
[0114] The node features are extracted as follows:
[0115] For the graph Each node in Extracting feature vectors x iThe node characteristics of electricity sales enterprises include power generation, electricity price, and the power generation type code of the electricity sales enterprise (the unique heat code of the electricity sales enterprise type). The unique heat code of the electricity sales enterprise type currently includes four types of power generation: wind power, hydropower, thermal power, and solar power. If new energy power generation enterprises need to be added in the future, the code can be added again.
[0116] The nodes of the land-purchasing power companies are initialized as zero vectors, and the graph neural network learns features from adjacency information.
[0117] Edge feature extraction includes transaction volume and transaction price.
[0118] Image classification module
[0119] GAT uses a multi-head attention mechanism to calculate the weights between a node and its neighboring nodes, thereby achieving adaptive feature aggregation of the local graph structure. The specific calculation process of the l-th attention layer is shown below.
[0120] First, feature transformation is performed on the initial features of the nodes based on the learnable parameter matrix and its biases, and then attention coefficients are calculated: Where || denotes vector concatenation; l This indicates the number of layers in the graph attention network, used to distinguish different attention layers in the network; i,j This represents the node index in the graph. i Refers to the current node. j Referencing nodes i Neighboring nodes (including nodes) i (Itself), used to distinguish attention relationships between different nodes; e ij (l) This represents the raw attention score (unnormalized) of node i to node j in the l-th graph attention layer, used to measure the initial importance of the association between the two nodes. LeakyReLU is an activation function for neural networks designed to address the "dead neuron" problem that can occur with the traditional ReLU function. The traditional ReLU function outputs zero when the input is negative, which can cause some neurons to never be activated during training, thus failing to update their parameters. LeakyReLU alleviates this problem by introducing a small slope in the negative region. This represents the transpose operation of a vector, used here to transpose the attention weight vector. a (l) After transposing, perform the inner product calculation with the concatenated vector; hi (l) ,hj (l) These represent the nodes in this layer. i and nodes jThe feature vector after feature transformation contains the node's attribute information (such as the power generation and electricity price of the electricity sales company). α ij (l) This indicates that in this layer, the node i For nodes j The normalized attention coefficients are obtained by adjusting the original attention score e. ij (l) The result is obtained by performing softmax normalization, which is used to measure the relationship between node j and node j. i The feature aggregation contribution; exp represents the exponential function used to convert the original attention score into the feature aggregation contribution; e ij (l) Convert to non-negative values to prepare for subsequent normalization (softmax); N(i) Represents a node i The set of neighboring nodes (including nodes) i (Itself), used to limit the scope of attention computation (considering only nodes). i (local neighborhood). k Represents the set of neighboring nodes N(i) The index in the table is used to traverse nodes. i Calculate the sum of the denominators for all neighbors of , when normalizing.
[0121] After obtaining the attention coefficients, the nodes can be obtained by applying a weighted summation method. vi The output feature vector.
[0122] After using a two-layer graph attention network following the steps above, the node representations are aggregated into a graph-level representation through global average pooling; then, a linear classifier is used to map the graph representation to the classification result based on the classifier's weights and biases; finally, the negative log-likelihood loss function is used for training; the abnormal edge information in the graph is transformed into the recognition result, and the anomaly detection result is output.
[0123] Quantify abnormal indicators:
[0124] According to the quantitative indicator of the collusion detection, if the maximum electricity price of any electricity sales company of the same generation type exceeds 2.5 times the minimum electricity price, it is considered that there is an abnormal price difference manipulation between the electricity sales company with the highest electricity price and the electricity sales company with the lowest electricity price in that type.
[0125] The quantitative indicator for the Collusion 2 detection is that if at least two electricity sales companies of the same power generation type have electricity sales prices that are lower (higher) than 50% of the average electricity sales price of that type, these electricity sales companies with electricity sales prices that are lower (higher) than 50% of the average electricity sales price of that type are considered to be colluding to report abnormal low (high) prices.
[0126] The electricity sold does not match the daily load curve, meaning the transaction volume does not meet the corresponding time period of the given daily load curve.
[0127] This invention generates electricity transactions through GAT testing. The results obtained from the input data serve as the model's output. The information involved includes sellers, buyers, and identified abnormal transactions. Abnormal transactions include node numbers, electricity sales company types, and unit prices of the electricity sales nodes. If the price ratio between electricity sales company A (hydropower) and electricity sales company B (hydropower) is more than 2.5 times (price A / price B), then collusion 1 is triggered. Similarly, if the price ratio between electricity sales company C (solar power) and electricity sales company D (solar power) is more than 2.5 times (price C / price D), also meeting the collusion 1 characteristic, then collusion 1 is triggered. If the electricity prices of electricity sales companies E and F (e.g., both hydropower) deviate from the average price of this type by more than 50%, then collusion 2 (jointly bidding up prices) is triggered. This invention's model has the ability to accurately capture complex abnormal patterns.
[0128] The training loss and validation loss results of this invention are as follows: Figure 2 As shown, from Figure 2 The training process of the GAT model is stable; that is, the training loss and validation loss gradually converge with the number of iterations (Epoch), and tend to stabilize after 300 epochs (training loss ≈ 0.007, validation loss ≈ 0.017); the difference between the two is small (always less than 0.01), indicating that the model has not overfitted, thanks to the effective constraints of Dropout and L2 regularization mechanisms; the loss curve decreases smoothly without drastic fluctuations, proving that the model training process is stable and its ability to learn abnormal patterns gradually increases.
[0129] The accuracy results of this invention are as follows: Figure 3 ,from Figure 3 It can be seen that the classification performance of the GAT model is improved; that is, the validation accuracy continues to rise with the increase of training rounds, reaching 99.0% after 400 rounds and remaining stable; the accuracy curve and the loss curve have the same trend, indicating that the model optimizes the classification accuracy and loss function at the same time during the learning process; the high accuracy (close to 100%) verifies the GAT model's ability to identify abnormal transactions, especially the detection recall rate of 99.67% for Conspiracy 1 and Conspiracy 2.
[0130] The method of this invention (Graph Attention Model (GAT)) was compared with Graph Convolutional Network (GCN), Random Forest (RF), and Decision Tree (DT) respectively (using the same dataset as input and observing the output results). The comparison results are shown in Table 1:
[0131] Table 1
[0132] ;
[0133] Compare Graphical Convolutional Networks (GCNs)
[0134] Dynamic Adaptability: GCN relies on a global Laplace matrix, which needs to be recalculated when new entities are added to the electricity market, increasing inference time by 3 hours. GAT, through a node-by-node attention mechanism, can adapt to the addition of 20% of nodes with only 10 minutes of fine-tuning.
[0135] Implicit Relationship Modeling: GCN cannot identify collusion of the same type without direct edges, while GAT achieves a 100% detection rate in simulation tests through cross-attention of type labels and transaction frequency.
[0136] Overfitting control: GCN's accuracy drops to 72% when the training set exceeds 1000 samples, while GAT, through multi-head attention + Dropout, still maintains 98% accuracy with 2000 samples.
[0137] Comparison with Random Forest (RF)
[0138] Graph structure preservation: Random forests require converting graph data into 32-dimensional tabular features, resulting in the loss of edge features and topological structure, and a 10.4% decrease in anomaly detection accuracy. GAT directly inputs the graph structure, preserving complete transaction relationships.
[0139] Robustness in dynamic scenarios: In the simulated new energy fluctuation test, the recall rate of Random Forest dropped to 72% because the feature engineering did not include the "power generation type-electricity price linkage" relationship, while GAT captured the association through dynamic attention and the recall rate remained at 98.7%.
[0140] Comparative Decision Tree (DT)
[0141] Complex Association Capture: Decision trees can only identify anomalies through single-node rules and cannot capture collusion among multiple parties. GAT learns the dynamic weights between nodes through a graph attention mechanism to accurately locate collusion links.
[0142] Explainability depth: The decision tree rule "wind power company A's electricity price > 0.8 yuan → abnormal" is easily circumvented. GAT uses graph visualization to show the composite evidence chain of "wind power company A and B's price difference of 6 times + centralized transactions of 3 electricity purchasing companies", which meets the regulatory requirement of "multi-dimensional verification".
[0143] As shown in Table 1, the GAT model significantly outperforms other models in the task of identifying anomalies in electricity trading, specifically as follows:
[0144] In terms of accuracy, the validation set accuracy of 99.60% far surpasses that of GCN (84.20%), Random Forest (89.20%) and Decision Tree (82.50%), demonstrating the model's ability to capture complex patterns;
[0145] In terms of generalization ability, dynamic scene adaptation is achieved through a multi-head attention mechanism. When adding a new node, only 10 minutes of fine-tuning is required, while GCN needs to recalculate the Laplacian matrix. In other words, after adding a new node, it can be put into use quickly.
[0146] In terms of anomaly localization, it supports edge-level localization and can directly mark abnormal transaction links, while GCN can only achieve node-level localization. Traditional localization methods have lower accuracy due to their inherent nature.
[0147] In terms of graph structure processing, it natively supports the fusion of node and edge features without converting to tabular data (such as random forest), retains complete transaction topology information, and achieves a 100% recognition rate for implicit relationships such as collusion.
[0148] This invention establishes the relationships between power trading entities, such as transaction flow, into a graph relationship, overcoming the shortcomings of traditional structured data analysis in mining relationship-related information. It also effectively improves the accuracy and generalization ability of anomaly identification by using a graph attention model, avoiding overfitting and underfitting traps during the identification process. This invention can effectively support the supervision methods and technical challenges that are particularly critical in the construction of the power market.
[0149] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to 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 the present invention.
Claims
1. A method for identifying abnormal electricity trading behavior based on graph learning, characterized in that, The method includes the following steps; (1) Data acquisition: Daily load curves are used to simulate the corresponding normal and abnormal transaction behaviors; (2) Data processing: Identify the corresponding data including the daily load curve, use the average electricity price as the unit price, normalize the remaining transaction electricity prices with the unit price as the benchmark value, and convert the data to be detected into the corresponding graph structure; (3) Graph feature extraction: A graph attention network layer is adopted, and the dependencies between nodes are adaptively learned through a multi-head attention mechanism to dynamically capture the node features in abnormal transactions; (4) Graph classification: Through global average pooling and fully connected layers, the abnormal edge information in the graph is transformed into recognition results, and the abnormal detection results are output; In constructing the graph structure, a graph dataset is generated that includes node attributes and edge features. The nodes include electricity sales enterprise nodes and electricity purchase enterprise nodes. The electricity sales enterprise nodes include the generation type code, generation amount, and electricity price of the electricity sold by the electricity sales enterprise, while the electricity purchase enterprise nodes are transaction connection points. The edge features include the transaction amount and transaction price. The graph structure is an undirected graph. For each node in the graph structure, feature vectors are extracted. The feature vector of the electricity sales enterprise node includes the power generation, electricity price, and the power generation type code of the electricity sold by the electricity sales enterprise. The power generation type code of the electricity sales enterprise includes wind power, hydropower, thermal power, and solar power. The electricity purchase enterprise node is initialized with a zero vector and learns features from adjacency information by relying on the graph neural network.
2. The abnormal power trading behavior identification method based on graph learning according to claim 1, characterized in that, The daily load curve consists of three superimposed parts: the base load part, the load part that varies sinusoidally over time, and the random noise part.
3. The abnormal power trading behavior identification method based on graph learning according to claim 1, characterized in that, By taking any value from the generated daily load curve, the corresponding transaction volume load value is obtained. Based on this load value, the transaction volume load distribution is generated through Dirichlet distribution, forming a graph structure of normal transaction behavior. Abnormal trading behaviors include electricity retailers profiting by changing electricity prices, and electricity retailers profiting by colluding to quote low or high prices.
4. The abnormal power trading behavior identification method based on graph learning according to claim 3, characterized in that, Electricity retailers profit by changing electricity prices. Specifically, the simulation shows that: when two or more electricity retailers of the same type are randomly selected, the electricity price of one of them is set to 6 or 1 / 6 times the electricity price of the other electricity retailers, resulting in a significant price difference. This abnormal behavior is defined as collusion 1. Electricity retailers profit by colluding to quote low or high prices. The specific simulation is as follows: Select two or more electricity retailers of another type and set their electricity prices to 20% or 120% of the average price of that type, simulating collusion to compete on low prices. This abnormal behavior is defined as collusion 2.
5. The abnormal power trading behavior identification method based on graph learning according to claim 1, characterized in that, The graph attention network layer consists of two attention network layers, and the specific process is as follows: First, feature transformation is performed on the initial features of the node based on the learnable parameter matrix and its bias, and then attention coefficients are calculated. After obtaining the attention coefficients, the output feature vector of the node is obtained by weighted summation. After using a two-layer graph attention network following the steps above, the node representations are aggregated into a graph-level representation through global average pooling; then, a linear classifier is used to map the graph representation to the classification result based on the classifier's weights and biases; finally, the negative log-likelihood loss function is used for training.
6. The abnormal power trading behavior identification method based on graph learning according to claim 4, characterized in that, The quantitative indicator for the collusion detection is: if the maximum electricity price of any electricity sales company of the same generation type exceeds 2.5 times the minimum electricity price, it is considered that there is an abnormal price difference manipulation between the electricity sales company with the highest electricity price and the electricity sales company with the lowest electricity price in that type. The quantitative indicator for the Collusion 2 detection is: If at least two electricity sales companies of the same generation type have electricity prices that are lower or higher than the average electricity price of that type by 50%, these electricity sales companies with electricity prices that are lower or higher than the average electricity price of that type are considered to be colluding to report abnormally low or high prices.
Citation Information
Patent Citations
Domain data governance method and system based on artificial intelligence platform
CN119862283A
Intelligent electricity price matching and checking method based on graph neural network and related device
CN119904330A