A power stealing detection method based on a multi-scale graph calculation model
By constructing a multi-scale graph computation model and combining temporal graph convolutional networks, graph attention networks, and graph convolutional networks, we have achieved multi-scale network correlation feature extraction and feature fusion in power systems. This solves the problems of insufficient accuracy and recognition capability of existing electricity theft detection technologies and enables efficient and accurate electricity theft detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SOUTHERN POWER GRID DIGITAL GRID GRP CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-24
AI Technical Summary
Existing electricity theft detection technologies cannot effectively capture the multi-scale network correlation characteristics of power systems, resulting in low detection accuracy, high false negative and false positive rates, difficulty in identifying coordinated electricity theft and tampering with local power distribution structures, and weak ability to identify covert electricity theft.
A multi-scale graph computation model is constructed, including micro, meso, and macro-scale graph structures. Temporal graph convolutional networks, graph attention networks, and graph convolutional networks are used to extract features. Electricity theft detection is performed through multi-scale feature fusion and attention mechanisms. The model parameters are optimized by combining a multilayer perceptron binary classification model and a cross-entropy loss function.
It achieves high-precision and low-cost detection of electricity theft, can identify multiple electricity theft patterns, reduce the false detection rate and the missed detection rate, provide highly discriminative spatiotemporal features and macroscopic perspective, and improve the comprehensive discrimination ability and response speed of the detection model.
Smart Images

Figure CN122451771A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart grid technology, specifically relating to a method for detecting electricity theft based on a multi-scale graph computation model. Background Technology
[0002] In the power sector, electricity theft is extremely harmful. It not only causes huge economic losses to power companies but also disrupts the normal operation of the power system, leading to numerous safety hazards such as voltage instability and line overload. In extreme cases, it can even cause catastrophic accidents like fires and power grid collapses. With the efficient construction and rapid development of smart grids, the ability to collect power data has been greatly improved. However, electricity theft methods have become increasingly covert and diverse, including altering wiring, tampering with meter data, and exploiting abnormal load fluctuations to evade detection. This poses a significant challenge to electricity theft detection efforts.
[0003] Currently, existing electricity theft detection technologies mainly fall into three categories: The first is the traditional threshold detection method. This method sets fixed thresholds for electrical parameters such as electricity consumption, voltage, and current; exceeding these thresholds is considered an abnormality. While simple and easy to implement, this method suffers from high false positive and false negative rates due to its inability to adapt to the varying electricity consumption characteristics of different users. The second is the single-dimensional machine learning method. This method builds classification models based on users' historical electricity consumption data, such as logistic regression, support vector machines, or single neural networks, to identify abnormal patterns in the electricity consumption data. This type of method only focuses on isolated data from a single user and struggles to capture the relationships between users, between users and power distribution equipment, and between different power distribution equipment. It is also ineffective in identifying coordinated electricity theft and theft activities achieved by altering local power distribution structures. The third is the simple graph model detection method. Although this method attempts to construct a graph structure of the power system, it only uses a single-scale graph structure for feature learning, failing to consider electricity theft association patterns at different scales and granularities. Specifically, if the map scale is too small, it will miss global anomaly correlations at the distribution station area and regional level; if the scale is too large, it will cause local electricity theft characteristics to be averaged, reducing detection sensitivity.
[0004] Studies show that power systems are typical complex network systems, and electricity theft usually leaves clues in network relationships at different scales. These include abnormal electricity consumption parameters of a single user (microscale), abnormal electricity consumption by multiple users in a certain distribution area (mesoscale), and load imbalance of distribution lines within a region (macroscale). Therefore, constructing a multi-scale graph computing model that integrates network relationship features at different scales is key to improving the accuracy of electricity theft detection and reducing the rate of missed detections and false detections.
[0005] The core technical problem facing existing electricity theft detection technologies is their inability to effectively capture the multi-scale network correlation characteristics of power systems, resulting in low detection accuracy and high false positive and false negative rates. Their specific shortcomings are as follows: 1. Traditional thresholding and single-dimensional machine learning methods ignore the network interconnectivity of the power system and rely solely on isolated data from individual users for detection. This makes it difficult to detect coordinated electricity theft and electricity theft committed by tampering with the local power distribution structure, resulting in a high rate of missed detections.
[0006] 2. Existing simple graph model detection methods have difficulty balancing local and global features due to the use of a single-scale graph structure. Small-scale graphs cannot capture global anomaly correlations at the transformer substation or regional level, while large-scale graphs will average out local electricity theft features, both of which weaken the detection sensitivity.
[0007] 3. Existing methods have weak ability to identify covert electricity theft. Such behavior does not show obvious abnormal features on a single scale and is easily misjudged as normal electricity fluctuations. Summary of the Invention
[0008] To address the problems existing in the prior art, this invention provides a method for detecting electricity theft based on a multi-scale graph calculation model. This method is simple to implement, has low implementation cost, and high detection accuracy, enabling efficient and accurate detection of various electricity theft behaviors.
[0009] To achieve the above objectives, the present invention provides a method for detecting electricity theft based on a multi-scale graph calculation model, comprising the following steps; S1: Construct a multi-scale graph structure for the power system; S11: Construct a microscale graph; using users and their smart meters as core nodes, construct a microscale graph through attribution relationships and load-related edges. ; S12: Construct a mesoscale map; using key equipment within the distribution area as core nodes, construct a mesoscale map through physical connection edges and power transmission edges. ; S13: Construct a macro-scale graph; using the core nodes of the power grid within the administrative region as the main body, construct a macro-scale graph through connection edges and scheduling edges. ; S2: Cross-scale feature extraction; S21: Microscale graph feature extraction; a temporal graph convolutional network is used to extract microscale features. By fusing graph convolutional layers and gated recurrent units, the spatial correlation features between users and the temporal variation features of electricity load are captured simultaneously. S22: Mesoscale map feature extraction; an attention network is used to extract mesoscale map features, and the weights of different device nodes are adaptively allocated through the attention mechanism, focusing on capturing the power balance features of transformer-main meter-branch switch and the correlation of equipment operating status; S23: Macro-scale graph feature extraction; Graph convolutional networks combined with global pooling are used to extract features. Multi-layer graph convolution captures the topological correlation features of the regional power grid, which are then aggregated into regional-level global features through global average pooling. S3: Multi-scale feature fusion and electricity theft detection based on detection model; S31: Feature Alignment and Fusion; Through a two-level attention aggregation mechanism, features at the micro, meso, and macro scales are aligned and weighted across granularities to generate a globally fused feature of a unified dimension. ; S32: Detection Model Training and Inference; Using a multilayer perceptron binary classification model as the base model, the model parameters are optimized through cross-entropy loss function and L2 regularization to train an electricity theft detection model; global feature fusion is then implemented. Input the electricity theft detection model for inference, output the probability of electricity theft, and trigger an alarm based on a set threshold.
[0010] Furthermore, in order to provide dual data support for identifying isolated and coordinated electricity theft, the process of constructing the microscale map in S11 is as follows: S11-1: Node definition; taking a single user and its corresponding smart meter as the core node, the node attributes include user type, historical electricity load curve, meter model, and rated voltage / current; S11-2: Edge definition; The connection between users and electricity meters is the affiliation edge, and the weight of the affiliation edge is 1; The connection between users with high similarity in electricity consumption time periods within the same transformer area is the load association edge, and the weight of the load association edge is calculated using the Pearson correlation coefficient; S11-3: Construction Method; Extract user-meter binding data and electricity load data collected every 15 minutes from the electricity marketing system and electricity consumption information collection system. Calculate the similarity of load curves for users in the same transformer area using the sliding window method. If the similarity is higher than a set threshold, establish load association edges to form a microscale graph. ,in, For user-meter node set, This is the set of edges associated with attribution and load.
[0011] In this technical solution, the electricity consumption behavior of an individual user and the load correlation of users in the same transformer area are incorporated into the same graph structure. This not only preserves the independence of the electricity consumption characteristics of an individual user, but also establishes a collaborative correlation between users, providing a dual data support foundation for identifying isolated electricity theft and collaborative electricity theft in the same transformer area.
[0012] Furthermore, in order to provide a basis for capturing power balance anomalies and the correlation between equipment operating status, the process of constructing the mesoscale map in S12 is as follows: S12-1: Node definition; Taking the distribution substation as the core unit, the node includes the distribution transformer, the substation master meter, and the key branch switchgear within the substation. The node attributes include transformer capacity, rated power, total load of the substation, rated current of the switch, and historical fault records. S12-2: Edge definition; The electrical topology relationship between connected devices is used as the physical connection edge, and the weight of the physical connection edge is the power transmission ratio; Based on real-time power monitoring data, the device nodes with power flow relationship are used as power transmission edges, and the weight of the power transmission edge is dynamically calculated according to the actual transmission power. S12-3: Construction Method: Extract equipment ledgers and line topology data from the distribution automation system, combine them with total load data of the distribution area from the electricity consumption information collection system, determine equipment connection relationships, calculate the power transmission ratio of each connected line, and form a mesoscale map. ,in, For the set of equipment nodes in the distribution area, It is a set of physical connection and power transmission edges.
[0013] This technical solution integrates the electrical topology and power flow relationships between devices such as transformers, main meters, and branch switches into a unified graph structure, which can effectively capture power balance anomalies and equipment operation status correlation anomalies caused by electricity theft, providing a device-level correlation analysis basis for substation-level electricity theft identification.
[0014] Furthermore, in order to accurately provide a macroscopic perspective for capturing regional load distribution anomalies and scheduling imbalances, the process of constructing a macroscopic scale map in S13 is as follows: S13-1: Node definition; taking administrative regions as units, nodes include regional substations, main lines, and regional total load monitoring points. Node attributes include substation capacity, main line cross-sectional area, regional total load peak value, and voltage level. S13-2: The physical topology relationship connecting the substation and the main line is used as the connection edge, and the weight of the connection edge is determined based on the line's rated capacity or actual transmission power; the power dispatch relationship between the connection sections is used as the dispatch edge, and the weight of the dispatch edge is determined based on the dispatch plan power or based on the real-time dispatch data of the power grid dispatch system. S13-3: Construction Method; Extract regional power grid topology data from the power grid GIS system, combine it with power transmission data from the dispatch center, determine the connectivity and dispatch relationships between regions, and form a macro-scale map. ,in, For the set of regional power grid nodes, This is a set of connection and scheduling edges.
[0015] This technical solution incorporates regional substations, main lines, and load monitoring points into a unified graph structure, which can effectively capture the power dispatching relationships and load distribution characteristics between regions. This provides a macro perspective for identifying regional load anomalies and dispatching imbalances, and solves the problem that traditional methods struggle to detect regional electricity theft.
[0016] Furthermore, in order to accurately provide highly discriminative spatiotemporal features for identifying single-user electricity theft and coordinated electricity theft within the same distribution area, the microscale map feature extraction process in S21 is as follows: S21-1: Data preprocessing; Z-score standardization of user electricity load data to eliminate differences in electricity consumption levels among different users; S21-2: Time-series graph convolutional network model processing; The preprocessed user load data is input into the time-series graph convolutional network model. In the graph convolutional layer, based on the adjacency relationship of the microscale graph, the load characteristics of adjacent users are aggregated to capture the load association pattern between users in the same transformer area. In the gated cyclic unit, the temporal dependency relationship of the load sequence is extracted along the time dimension to model the temporal evolution law of electricity consumption behavior. S21-3: Output features; Output feature matrix ,in, The number of micro-nodes is 64, and the feature dimension is 64; feature matrix This includes user load timing anomaly scores, user load coordination deviation in the same distribution area, and meter operating status characteristics.
[0017] In this technical solution, a temporal graph convolutional network model is used to simultaneously process the spatial correlation between users (graph convolution) and the temporal variation of electricity load (GRU), overcoming the limitations of traditional methods that can only process spatial or temporal dimensions separately. It effectively captures abnormal electricity consumption of single users and signs of coordinated abnormality among users in the same transformer area, providing highly distinguishable spatiotemporal features for identifying covert electricity theft.
[0018] Furthermore, in order to accurately provide core features for identifying substation-level electricity theft, the process of extracting features from the mesoscale map in S22 is as follows: S22-1: Data preprocessing; normalize the attributes of equipment nodes, including transformer capacity, rated power, total load of the distribution area, and rated current of the switch, in order to eliminate the differences in the dimensions of different equipment. S22-2: Graph Attention Network Model Processing; The preprocessed data is input into the graph attention network model, and the weight coefficients between adjacent device nodes are calculated through multi-head attention. The weights of different device nodes are adaptively allocated, with a focus on transformers, main meters, and branch switches. Based on the attention weights, the features of neighboring nodes are aggregated to extract the correlation of operating status between devices and abnormal power transmission patterns. S22-3: Output features; Output feature matrix ,in, The number of mesoscopic nodes is 64, and the feature dimension is 64; feature matrix This includes characteristics of power balance deviation rate in transformer areas, characteristics of abnormal values associated with equipment operating parameters, and characteristics of load distribution uniformity in branch lines.
[0019] In this technical solution, the entire process does not require manual setting of equipment importance. The graph attention network model can automatically learn the contribution of key equipment such as transformers, main meters, and branch switches in electricity theft detection, and can focus on capturing the correlation between power balance characteristics and equipment operating status, effectively identifying substation-level electricity theft behavior and avoiding the subjective bias of manual weighting.
[0020] Furthermore, in order to accurately provide core features for identifying regional load distribution anomalies and scheduling imbalances, the macro-scale map feature extraction process in S23 is as follows: S23-1: Data preprocessing; normalize the node attributes of the macro-scale map, including substation capacity, main line cross-sectional area, regional total load peak, and voltage level, to eliminate the differences in dimensions between different intervals; S23-2: Graph Convolutional Network Model Processing; The preprocessed data is input into the graph convolutional network model. In the graph convolutional layer, the topological features of the regional power grid are extracted through a two-layer graph convolutional network. The attribute information of adjacent regional nodes is aggregated using the adjacency matrix to capture the electrical correlation and scheduling dependency between regions. In the global average pooling layer, the features of each node are averaged along the node dimension, and the node-level features are aggregated into regional-level global features to eliminate differences in node granularity. S23-3: Output features; Output feature matrix ,in, The number of macroscopic nodes is 32, and the feature dimension is 32; feature matrix This includes the characteristics of the regional total load fluctuation coefficient, the characteristics of the power supply load rate of the substation, and the characteristics of the dispatch power deviation between regions.
[0021] In this technical solution, the graph convolutional network model not only preserves the topological relationship information between regions, but also achieves dimensionality reduction and aggregation of node-level features to region-level features through global pooling. This can effectively capture the regional load distribution balance and scheduling anomalies, providing macroscopic perspective features for identifying large-scale, regional electricity theft.
[0022] Furthermore, in order to provide a comprehensive multi-scale collaborative representation for the electricity theft detection model and ensure accurate and efficient identification of electricity theft, the feature alignment and fusion process in S31 is as follows: S31-1: Alignment of micro and meso features; Through the user-station mapping relationship, attention weighting is used to aggregate micro-scale user node features to the station dimension; S31-2: Alignment of meso- and macro-level features; Through the mapping relationship between the substation area and the region, attention weighting is used to aggregate the features of the substation nodes at the meso-scale to the region dimension; S31-3: Multi-scale attention fusion; aligning micro-features Mesoscopic characteristics Macro characteristics After unifying to 64 dimensions through linear projection, weighted fusion is performed using learnable attention weights, and the global fusion feature matrix is obtained according to formula (1). ,in, The final number of detection units is 128, and the feature dimension after fusion is 128. (1); In the formula, , , These are attention weights for micro, meso, and macro features, respectively, obtained through adaptive learning in a fully connected layer, satisfying... .
[0023] In this technical solution, an attention mechanism is used to adaptively learn the importance weights of features at different scales, which solves the fusion problem caused by inconsistent granularity of nodes at different scales. This enables the fused global features to dynamically highlight the scale information that contributes more to the current scene, providing a comprehensive representation of multi-scale collaboration for the detection model.
[0024] Furthermore, in order to achieve high-precision detection and rapid response to electricity theft, the detection model training and inference process in S32 is as follows: S32-1: Constructing the detection model; a multilayer perceptron binary classification model is used as the detection model. The multilayer perceptron contains multiple fully connected layers, with ReLU activation function in the intermediate layers and Sigmoid activation function in the output layer, outputting the probability of electricity theft. ; S32-2: Construct a sample dataset; use labeled historical data as the sample dataset, which includes normal electricity consumption samples and verified electricity theft samples, and divide the sample dataset into training set and validation set in an 8:2 ratio; S32-3: Construct the loss function; construct the loss function according to formula (2). ; (2); In the formula, This refers to the batch sample size. For the first The true label of each sample; This represents the probability of electricity theft predicted by the model. The L2 regularization coefficient; The set of learnable parameters for the model; S32-4: Model training; Optimize model parameters using the backpropagation algorithm, adaptively adjust the learning rate using the Adam optimizer, monitor loss changes on the validation set, and save the optimal model weights; S32-5: Online detection; input the real-time constructed multi-scale graph structure and extracted features, the model outputs the probability of electricity theft. When the probability is higher than the set threshold If the activity is suspected to be electricity theft, an alarm will be triggered and the user / distributor / area identifier will be output, allowing power maintenance personnel to verify and handle the situation.
[0025] In this technical solution, an end-to-end training method is adopted, which enables the detection model to learn the discrimination boundary of electricity theft behavior directly from multi-scale fusion features. The introduction of L2 regularization effectively prevents overfitting and improves the model's generalization ability. The threshold alarm mechanism takes into account both detection sensitivity and accuracy, making it easy for maintenance personnel to respond quickly to suspected electricity theft.
[0026] Furthermore, in order to effectively address the dynamic changes in electricity theft methods and to achieve dynamic model updates through online learning mechanisms, the following measures are also included: S4: Model Adaptive Update and Optimization; Regularly collect new electricity consumption data and electricity theft verification results, update the multi-scale graph structure, and use incremental training to update the detection model parameters to ensure the model's adaptability and detection accuracy. At the same time, establish a feature importance evaluation mechanism to screen features that contribute highly to electricity theft detection in real time, eliminate redundant features, and improve the model's running efficiency.
[0027] In this technical solution, an online learning mechanism is introduced to regularly collect new data and dynamically update the multi-scale graph structure. Combined with incremental training, the detection model parameters are continuously optimized, enabling the model to adapt to the dynamic evolution of electricity theft methods and ensuring detection accuracy and timeliness. At the same time, a feature importance evaluation mechanism is established to screen high-contribution features and remove redundancies in real time, effectively improving the model's running efficiency and interpretability, and providing the electricity theft detection system with good self-evolution capabilities.
[0028] This invention provides a method for detecting electricity theft based on a multi-scale graph computation model. First, the entities and relationships in the power system are transformed into a multi-level graph structure. Then, targeted features are extracted for graphs at different scales. Finally, an attention fusion mechanism is used to aggregate the multi-scale features and construct a detection model to identify electricity theft behavior. Specifically: First, by sorting out the core entities and relationships in the power system, a three-level graph structure of micro, meso, and macro levels is constructed, transforming the power system from isolated data points into a network of relationships. This lays the foundation for subsequent multi-scale feature extraction. This process breaks through the limitations of traditional methods that only focus on a single data dimension, comprehensively depicting the hierarchical relationship characteristics of the power system from a network perspective. It achieves accurate modeling of network relationships at different granularities, enabling the subsequent detection process to simultaneously capture electricity theft clues at the user level, transformer area level, and regional level, providing a complete graph structure foundation for multi-scale collaborative detection. Next, adaptive computational models were designed for the three-level graph structure: temporal graph convolutional networks at the micro scale, attention networks at the meso scale, and graph convolutional networks at the macro scale. This allows for the accurate extraction of core features related to electricity theft at each scale. This process employs a layer-specific feature extraction strategy, emphasizing spatiotemporal correlation at the micro scale, device weight allocation at the meso scale, and global topology aggregation at the macro scale. This achieves hierarchical capture of local, correlated, and global features, ensuring accurate matching between feature extraction and detection targets at each scale. This significantly improves the effectiveness of feature representation and comprehensively captures micro-level user-level local features, meso-level substation-level correlated features, and macro-level regional-level global features. This overcomes the shortcomings of existing technologies that ignore network correlation or capture features only at a single scale, thereby accurately obtaining features that are conducive to the precise identification of complex electricity theft behaviors such as coordinated electricity theft and tampering with local power distribution structures. Subsequently, multi-scale features were aggregated through an attention fusion mechanism, achieving a complete closed loop from multi-scale feature extraction to unified detection decision-making. This enabled micro, meso, and macroscopic clues of electricity theft to work synergistically. This process, through the combination of cross-scale extraction and the attention mechanism, strengthened the correlation of abnormal electricity theft features at different scales, effectively identifying covert electricity theft behaviors such as minor modifications to electricity parameters and intermittent theft, significantly improving the comprehensive discrimination ability of the detection model. This resulted in a high-precision electricity theft detection model that effectively reduced false positive and false negative rates. Simultaneously, the difference between the classification probability and the true label was directly optimized using the cross-entropy loss function, ensuring that the output of the detection model has clear probabilistic interpretability. L2 regularization, by constraining the parameter norm, effectively prevented overfitting and improved the model's generalization ability to unknown data, ensuring that the detection results remained stable and reliable on both historical and real-time data.This enables the obtained electricity theft detection model to make judgments based on multi-scale fusion features, integrating micro, meso, and macro clues, significantly improving the ability to identify covert electricity theft. The thresholding mechanism balances the sensitivity and accuracy of detection, avoiding the risk of misjudgment caused by single probability output. Finally, the output probability and user / transformer / region identifier can provide power operation and maintenance personnel with accurate verification and location information.
[0029] This method is simple to implement, low in cost, and highly accurate. It achieves precise detection by constructing a multi-scale graph structure of the power system, extracting cross-scale network correlation features, and fusing multi-dimensional features. It can efficiently and accurately detect various electricity theft behaviors, solving the problems of existing technologies being unable to capture multi-scale correlation features and having low detection accuracy. Attached Figure Description
[0030] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0031] The invention will now be further described with reference to the accompanying drawings.
[0032] like Figure 1 As shown, the present invention provides a method for detecting electricity theft based on a multi-scale graph computation model, including the following steps; S1: Construct a multi-scale graph structure for the power system; S11: Construct a microscale graph; using users and their smart meters as core nodes, construct a microscale graph through attribution relationships and load-related edges. This provides a foundation for detecting abnormal electricity consumption by individual users and coordinated electricity theft within the same distribution area; S12: Construct a mesoscale map; using key equipment within the distribution area as core nodes, construct a mesoscale map through physical connection edges and power transmission edges. This provides a foundation for capturing correlations between the operating status of equipment in the distribution area and power transmission anomalies; S13: Construct a macro-scale graph; using the core nodes of the power grid within the administrative region as the main body, construct a macro-scale graph through connection edges and scheduling edges. This provides a basis for capturing the load distribution balance and dispatch anomalies of the regional power grid; S2: Cross-scale feature extraction; S21: Microscale graph feature extraction; a temporal graph convolutional network (T-GCN) is used to extract microscale features. By fusing graph convolutional layers and gated recurrent units, spatial correlation features between users and temporal variation features of electricity load are captured simultaneously. The core focus is on the abnormal electricity consumption patterns of individual users and the signs of collaborative abnormality among users in the same transformer area, providing core features for identifying abnormal electricity consumption of individual users and collaborative electricity theft in the same transformer area. S22: Mesoscale map feature extraction; Attention network (GAT) is used to extract mesoscale map features. The weights of different device nodes are adaptively allocated through the attention mechanism. The focus is on capturing the power balance features of transformer-main meter-branch switch and the correlation of equipment operating status. The core focus is on the correlation of operating status of equipment in the distribution area and power transmission anomalies, providing core features for identifying distribution area-level electricity theft. S23: Macro-scale graph feature extraction; Graph Convolutional Network (GCN) combined with global pooling is used to extract features. Multi-layer graph convolution captures the topological correlation features of the regional power grid, which are then aggregated into regional-level global features through global average pooling. The core focus is on the load distribution balance and scheduling anomalies of the regional power grid, providing core features for identifying regional-level load distribution anomalies and scheduling imbalances. S3: Multi-scale feature fusion and electricity theft detection based on detection model; S31: Feature Alignment and Fusion; Due to the different node granularities of graphs at different scales, feature alignment is required first. To this end, a two-level attention aggregation mechanism is used to perform cross-granularity alignment and weighted fusion of features at the micro, meso, and macro scales, generating a unified-dimensional global fused feature. This provides a comprehensive, multi-scale collaborative representation for electricity theft detection models; S32: Detection Model Training and Inference; Using a multilayer perceptron binary classification model as the base model, the model parameters are optimized through cross-entropy loss function and L2 regularization to train an electricity theft detection model; global feature fusion is then implemented. Input the electricity theft detection model for inference, output the probability of electricity theft, and trigger an alarm based on a set threshold.
[0033] To provide dual data support for identifying isolated and coordinated electricity theft, the process of constructing the microscale map in S11 is as follows: S11-1: Node definition; taking a single user and its corresponding smart meter as the core node, the node attributes include user type (residential / commercial, industrial), historical electricity load curve, meter model, rated voltage / current, etc. S11-2: Edge definition; connecting users and electricity meters is the affiliation edge (solid line), and the weight of the affiliation edge is 1; connecting users with high similarity in electricity consumption time periods within the same transformer area is the load association edge (dashed line), and the weight of the load association edge is calculated using the Pearson correlation coefficient; S11-3: Construction Method; Extract user-meter binding data and electricity load data collected every 15 minutes from the electricity marketing system and electricity consumption information collection system. Calculate the similarity of load curves for users in the same transformer area using the sliding window method. If the similarity is higher than a set threshold (e.g., 0.6), establish load association edges to form a microscale graph. ,in, For user-meter node set, This is the set of edges associated with attribution and load.
[0034] In this technical solution, the electricity consumption behavior of an individual user and the load correlation of users in the same transformer area are incorporated into the same graph structure. This not only preserves the independence of the electricity consumption characteristics of an individual user, but also establishes a collaborative correlation between users, providing a dual data support foundation for identifying isolated electricity theft and collaborative electricity theft in the same transformer area.
[0035] To provide a basis for capturing power balance anomalies and correlating with equipment operating status, the process of constructing a mesoscale map in S12 is as follows: S12-1: Node definition; Taking the distribution substation as the core unit, the nodes include equipment such as distribution transformers, substation master meters, and key branch switches within the substation. Node attributes include transformer capacity, rated power, total load of the substation, rated current of the switch, historical fault records, etc. S12-2: Edge definition; The electrical topology relationship between connected devices is used as a physical connection edge (such as transformer-main meter, main meter-branch switch), and the weight of the physical connection edge is the power transmission ratio; Based on real-time power monitoring data, the device nodes with power flow relationship are used as power transmission edges, and the weight of the power transmission edge is dynamically calculated according to the actual transmission power. S12-3: Construction Method: Extract equipment ledgers and line topology data from the distribution automation system, combine them with total load data of the distribution area from the electricity consumption information collection system, determine equipment connection relationships, calculate the power transmission ratio of each connected line, and form a mesoscale map. ,in, For the set of equipment nodes in the distribution area, It is a set of physical connection and power transmission edges.
[0036] This technical solution integrates the electrical topology and power flow relationships between devices such as transformers, main meters, and branch switches into a unified graph structure, which can effectively capture power balance anomalies and equipment operation status correlation anomalies caused by electricity theft, providing a device-level correlation analysis basis for substation-level electricity theft identification.
[0037] To provide a precise macroscopic perspective for capturing regional load distribution anomalies and scheduling imbalances, the process of constructing a macroscopic scale map in S13 is as follows: S13-1: Node definition; taking administrative regions as units, nodes include regional substations, main lines, regional total load monitoring points, etc. Node attributes include substation capacity, main line cross-sectional area, regional total load peak value, voltage level, etc. S13-2: The physical topology relationship connecting the substation and the main line is used as the connection edge to reflect the electrical connection structure of the regional power grid. The weight of the connection edge is determined based on the rated capacity of the line or the actual transmission power. The power dispatch relationship between the connection sections is used as the dispatch edge. The weight of the dispatch edge is determined based on the dispatch plan power or the real-time dispatch data of the power grid dispatch system. S13-3: Construction Method; Extract regional power grid topology data from the power grid GIS system, combine it with power transmission data from the dispatch center, determine the connectivity and dispatch relationships between regions, and form a macro-scale map. ,in, For the set of regional power grid nodes, This is a set of connection and scheduling edges.
[0038] This technical solution incorporates regional substations, main lines, and load monitoring points into a unified graph structure, which can effectively capture the power dispatching relationships and load distribution characteristics between regions. This provides a macro perspective for identifying regional load anomalies and dispatching imbalances, and solves the problem that traditional methods struggle to detect regional electricity theft.
[0039] In order to accurately provide highly discriminative spatiotemporal features for identifying single-user electricity theft and coordinated electricity theft within the same distribution area, the microscale map feature extraction process in S21 is as follows: S21-1: Data preprocessing; Z-score standardization of user electricity load data to eliminate differences in electricity consumption levels among different users; S21-2: Time-series graph convolutional network model processing; The preprocessed user load data is input into the time-series graph convolutional network model. In the graph convolutional layer, based on the adjacency relationship of the microscale graph, the load characteristics of adjacent users are aggregated to capture the load association pattern between users in the same transformer area. In the gated recurrent unit (GRU), the temporal dependency relationship of the load sequence is extracted along the time dimension to model the temporal evolution law of electricity consumption behavior. S21-3: Output features; Output feature matrix ,in, The number of micro-nodes is 64, and the feature dimension is 64; feature matrix This includes user load timing anomaly score (calculated based on reconstruction error, reflecting whether a single user's electricity consumption curve deviates from the normal pattern), user load coordination deviation degree in the same transformer area (measuring the degree of simultaneous anomalies in user loads within the transformer area, used to detect coordinated electricity theft), and meter operating status characteristics (including voltage fluctuation coefficient and current fluctuation coefficient, reflecting whether the meter has been tampered with or is faulty).
[0040] In this technical solution, a temporal graph convolutional network model is used to simultaneously process the spatial correlation between users (graph convolution) and the temporal variation of electricity load (GRU), overcoming the limitations of traditional methods that can only process spatial or temporal dimensions separately. It effectively captures abnormal electricity consumption of single users and signs of coordinated abnormality among users in the same transformer area, providing highly distinguishable spatiotemporal features for identifying covert electricity theft.
[0041] In order to accurately provide core features for identifying substation-level electricity theft, the process of extracting features from the mesoscale map in S22 is as follows: S22-1: Data preprocessing; normalize the attributes of equipment nodes, including transformer capacity, rated power, total load of the distribution area, rated current of the switch, etc., to eliminate the differences in the dimensions of different equipment. S22-2: Graph Attention Network Model Processing; The preprocessed data is input into the graph attention network model, and the weight coefficients between adjacent device nodes are calculated through multi-head attention. The weights of different device nodes are adaptively allocated, with a focus on key devices such as transformers, main meters, and branch switches. Based on the attention weights, the features of neighboring nodes are aggregated to extract the correlation of operating status and abnormal power transmission patterns between devices. S22-3: Output features; Output feature matrix ,in, The number of mesoscopic nodes is 64, and the feature dimension is 64; feature matrix This includes the characteristics of power balance deviation rate in the distribution area (the percentage difference between the transformer input power and the output power of the main meter, reflecting whether there is abnormal power loss in the distribution area), the characteristics of abnormal values associated with equipment operating parameters (the degree of abnormal correlation between operating parameters such as voltage, current, and power factor, used to identify clues of electricity theft at the equipment level), and the characteristics of load distribution uniformity of branch lines (the degree of balance of load distribution in each branch line, reflecting whether there is electricity theft in the branch lines).
[0042] In this technical solution, the entire process does not require manual setting of equipment importance. The graph attention network model can automatically learn the contribution of key equipment such as transformers, main meters, and branch switches in electricity theft detection, and can focus on capturing the correlation between power balance characteristics and equipment operating status, effectively identifying substation-level electricity theft behavior and avoiding the subjective bias of manual weighting.
[0043] In order to accurately provide core features for identifying regional load distribution anomalies and scheduling imbalances, the macro-scale map feature extraction process in S23 is as follows: S23-1: Data preprocessing; normalize the node attributes of the macro-scale map, including substation capacity, main line cross-sectional area, regional total load peak, voltage level, etc., to eliminate the differences in dimensions between different intervals; S23-2: Graph Convolutional Network Model Processing; The preprocessed data is input into the graph convolutional network model. In the graph convolutional layer, the topological features of the regional power grid are extracted through a two-layer graph convolutional network. The attribute information of adjacent regional nodes is aggregated using the adjacency matrix to capture the electrical correlation and scheduling dependency between regions. In the global average pooling layer, the features of each node are averaged along the node dimension, and the node-level features are aggregated into regional-level global features to eliminate differences in node granularity. S23-3: Output features; Output feature matrix ,in, The number of macroscopic nodes is 32, and the feature dimension is 32; feature matrix This includes the characteristics of the regional total load fluctuation coefficient (reflecting the stability of regional load changes over time; abnormal fluctuations may indicate regional-level electricity theft), the characteristics of the power supply load rate of the distribution station (the ratio of the actual power supply capacity of the distribution station to its rated capacity, reflecting the load status and anomalies of the distribution station), and the characteristics of the inter-regional dispatch power deviation (the deviation between the actual dispatch power and the planned dispatch power between regions, used to identify regional-level dispatch anomalies and electricity theft).
[0044] In this technical solution, the graph convolutional network model not only preserves the topological relationship information between regions, but also achieves dimensionality reduction and aggregation of node-level features to region-level features through global pooling. This can effectively capture the regional load distribution balance and scheduling anomalies, providing macroscopic perspective features for identifying large-scale, regional electricity theft.
[0045] In order to provide a comprehensive multi-scale collaborative representation for the electricity theft detection model and ensure accurate and efficient identification of electricity theft, the feature alignment and fusion process in S31 is as follows: S31-1: Alignment of micro and meso features; Through the user-station mapping relationship (one station corresponds to multiple users), attention weighting is used to aggregate the micro-scale user node features to the station dimension; S31-2: Alignment of meso- and macro-level features; Through the area-region mapping relationship (one region corresponds to multiple areas), attention weighting is used to aggregate the features of meso-scale area nodes to the region dimension; S31-3: Multi-scale attention fusion; aligning micro-features Mesoscopic characteristics Macro characteristics After unifying to 64 dimensions through linear projection, weighted fusion is performed using learnable attention weights, and the global fusion feature matrix is obtained according to formula (1). ,in, The final number of detection units is 128, and the feature dimension after fusion is 128. (1); In the formula, , , These are attention weights for micro, meso, and macro features, respectively, obtained through adaptive learning in a fully connected layer, satisfying... .
[0046] Global fusion feature matrix It integrates micro-scale user electricity consumption anomalies, meso-scale transformer equipment operation characteristics, and macro-scale regional power grid dispatch characteristics to provide a multi-scale collaborative comprehensive characterization for electricity theft detection.
[0047] In this technical solution, an attention mechanism is used to adaptively learn the importance weights of features at different scales, which solves the fusion problem caused by inconsistent granularity of nodes at different scales. This enables the fused global features to dynamically highlight the scale information that contributes more to the current scene, providing a comprehensive representation of multi-scale collaboration for the detection model.
[0048] To achieve high-precision detection and rapid response to electricity theft, the training and inference process of the detection model in S32 is as follows: S32-1: Constructing the detection model; a multilayer perceptron binary classification model is used as the detection model. The multilayer perceptron contains multiple fully connected layers, with ReLU activation function in the intermediate layers and Sigmoid activation function in the output layer, outputting the probability of electricity theft. (0 indicates normal operation, 1 indicates electricity theft); S32-2: Construct a sample dataset; use labeled historical data as the sample dataset, which includes normal electricity consumption samples and verified electricity theft samples, and divide the sample dataset into training set and validation set in an 8:2 ratio; S32-3: Construct the loss function; construct the loss function according to formula (2). Therefore, parameters can be optimized based on the cross-entropy loss function, while L2 regularization is introduced to avoid overfitting. (2); In the formula, This refers to the batch sample size. For the first The true label of each sample; This represents the probability of electricity theft predicted by the model. The L2 regularization coefficient; The set of learnable parameters for the model; S32-4: Model training; Optimize model parameters using the backpropagation algorithm, adaptively adjust the learning rate using the Adam optimizer, monitor loss changes on the validation set, and save the optimal model weights; S32-5: Online detection; input the real-time constructed multi-scale graph structure and extracted features, the model outputs the probability of electricity theft. When the probability is higher than the set threshold When the value is 0.8, it is determined to be a suspected electricity theft, triggering an alarm and outputting the user / distributor / area identifier, so that power operation and maintenance personnel can verify and handle it.
[0049] In this technical solution, an end-to-end training method is adopted, which enables the detection model to learn the discrimination boundary of electricity theft behavior directly from multi-scale fusion features. The introduction of L2 regularization effectively prevents overfitting and improves the model's generalization ability. The threshold alarm mechanism takes into account both detection sensitivity and accuracy, making it easy for maintenance personnel to respond quickly to suspected electricity theft.
[0050] To effectively address the dynamic changes in electricity theft methods, and to achieve dynamic model updates through online learning mechanisms, the following measures are also included: S4: Model Adaptive Update and Optimization; Regularly collect new electricity consumption data and electricity theft verification results, update the multi-scale graph structure (add user / device nodes, update edge weights), and update the detection model parameters using incremental training to ensure the model's adaptability and detection accuracy. At the same time, establish a feature importance evaluation mechanism to filter features that contribute highly to electricity theft detection in real time, eliminate redundant features, and improve the model's running efficiency.
[0051] In this technical solution, an online learning mechanism is introduced to regularly collect new data and dynamically update the multi-scale graph structure. Combined with incremental training, the detection model parameters are continuously optimized, enabling the model to adapt to the dynamic evolution of electricity theft methods and ensuring detection accuracy and timeliness. At the same time, a feature importance evaluation mechanism is established to screen high-contribution features and remove redundancies in real time, effectively improving the model's running efficiency and interpretability, and providing the electricity theft detection system with good self-evolution capabilities.
[0052] This invention provides a method for detecting electricity theft based on a multi-scale graph computation model. First, the entities and relationships in the power system are transformed into a multi-level graph structure. Then, targeted features are extracted for graphs at different scales. Finally, an attention fusion mechanism is used to aggregate the multi-scale features and construct a detection model to identify electricity theft behavior. Specifically: First, by sorting out the core entities and relationships in the power system, a three-level graph structure of micro, meso, and macro levels is constructed, transforming the power system from isolated data points into a network of relationships. This lays the foundation for subsequent multi-scale feature extraction. This process breaks through the limitations of traditional methods that only focus on a single data dimension, comprehensively depicting the hierarchical relationship characteristics of the power system from a network perspective. It achieves accurate modeling of network relationships at different granularities, enabling the subsequent detection process to simultaneously capture electricity theft clues at the user level, transformer area level, and regional level, providing a complete graph structure foundation for multi-scale collaborative detection. Next, adaptive computational models were designed for the three-level graph structure: temporal graph convolutional networks at the micro scale, attention networks at the meso scale, and graph convolutional networks at the macro scale. This allows for the accurate extraction of core features related to electricity theft at each scale. This process employs a layer-specific feature extraction strategy, emphasizing spatiotemporal correlation at the micro scale, device weight allocation at the meso scale, and global topology aggregation at the macro scale. This achieves hierarchical capture of local, correlated, and global features, ensuring accurate matching between feature extraction and detection targets at each scale. This significantly improves the effectiveness of feature representation and comprehensively captures micro-level user-level local features, meso-level substation-level correlated features, and macro-level regional-level global features. This overcomes the shortcomings of existing technologies that ignore network correlation or capture features only at a single scale, thereby accurately obtaining features that are conducive to the precise identification of complex electricity theft behaviors such as coordinated electricity theft and tampering with local power distribution structures. Subsequently, multi-scale features were aggregated through an attention fusion mechanism, achieving a complete closed loop from multi-scale feature extraction to unified detection decision-making. This enabled micro, meso, and macroscopic clues of electricity theft to work synergistically. This process, through the combination of cross-scale extraction and the attention mechanism, strengthened the correlation of abnormal electricity theft features at different scales, effectively identifying covert electricity theft behaviors such as minor modifications to electricity parameters and intermittent theft, significantly improving the comprehensive discrimination ability of the detection model. This resulted in a high-precision electricity theft detection model that effectively reduced false positive and false negative rates. Simultaneously, the difference between the classification probability and the true label was directly optimized using the cross-entropy loss function, ensuring that the output of the detection model has clear probabilistic interpretability. L2 regularization, by constraining the parameter norm, effectively prevented overfitting and improved the model's generalization ability to unknown data, ensuring that the detection results remained stable and reliable on both historical and real-time data.This enables the obtained electricity theft detection model to make judgments based on multi-scale fusion features, integrating micro, meso, and macro clues, significantly improving the ability to identify covert electricity theft. The thresholding mechanism balances the sensitivity and accuracy of detection, avoiding the risk of misjudgment caused by single probability output. Finally, the output probability and user / transformer / region identifier can provide power operation and maintenance personnel with accurate verification and location information.
[0053] This method is simple to implement, low in cost, and highly accurate. It achieves precise detection by constructing a multi-scale graph structure of the power system, extracting cross-scale network correlation features, and fusing multi-dimensional features. It can efficiently and accurately detect various electricity theft behaviors, solving the problems of existing technologies being unable to capture multi-scale correlation features and having low detection accuracy.
Claims
1. A method for detecting electricity theft based on a multi-scale graph computation model, characterized in that, Includes the following steps; S1: Construct a multi-scale graph structure for the power system; S11: Construct a microscale graph; using users and their smart meters as core nodes, construct a microscale graph through attribution relationships and load-related edges. ; S12: Construct a mesoscale map; using key equipment within the distribution area as core nodes, construct a mesoscale map through physical connection edges and power transmission edges. ; S13: Construct a macro-scale graph; using the core nodes of the power grid within the administrative region as the main body, construct a macro-scale graph through connection edges and scheduling edges. ; S2: Cross-scale feature extraction; S21: Microscale graph feature extraction; a temporal graph convolutional network is used to extract microscale features. By fusing graph convolutional layers and gated recurrent units, the spatial correlation features between users and the temporal variation features of electricity load are captured simultaneously. S22: Mesoscale map feature extraction; an attention network is used to extract mesoscale map features, and the weights of different device nodes are adaptively allocated through the attention mechanism, focusing on capturing the power balance features of transformer-main meter-branch switch and the correlation of equipment operating status; S23: Macro-scale graph feature extraction; Graph convolutional networks combined with global pooling are used to extract features. Multi-layer graph convolution captures the topological correlation features of the regional power grid, which are then aggregated into regional-level global features through global average pooling. S3: Multi-scale feature fusion and electricity theft detection based on detection model; S31: Feature Alignment and Fusion; Through a two-level attention aggregation mechanism, features at the micro, meso, and macro scales are aligned and weighted across granularities to generate a globally fused feature of a unified dimension. ; S32: Detection Model Training and Inference; Using a multilayer perceptron binary classification model as the base model, the model parameters are optimized through cross-entropy loss function and L2 regularization to train an electricity theft detection model; global feature fusion is then implemented. Input the electricity theft detection model for inference, output the probability of electricity theft, and trigger an alarm based on a set threshold.
2. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S11, the process of constructing the microscale map is as follows: S11-1: Node definition; taking a single user and its corresponding smart meter as the core node, the node attributes include user type, historical electricity load curve, meter model, and rated voltage / current; S11-2: Edge definition; The connection between users and electricity meters is the affiliation edge, and the weight of the affiliation edge is 1; The connection between users with high similarity in electricity consumption time periods within the same transformer area is the load association edge, and the weight of the load association edge is calculated using the Pearson correlation coefficient; S11-3: Construction method; User-meter binding data and electricity load data collected every 15 minutes are extracted from the electricity marketing system and electricity consumption information collection system. The similarity of the load curves of users in the same transformer area is calculated using the sliding window method. If the similarity is higher than a set threshold, a load association edge is established to form a micro-scale graph. ,in, For user-meter node set, This is the set of edges associated with attribution and load.
3. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S12, the process of constructing the mesoscale map is as follows: S12-1: Node definition; Taking the distribution substation as the core unit, the node includes the distribution transformer, the substation master meter, and the key branch switchgear within the substation. The node attributes include transformer capacity, rated power, total load of the substation, rated current of the switch, and historical fault records. S12-2: Edge definition; The electrical topology relationship between connected devices is used as the physical connection edge, and the weight of the physical connection edge is the power transmission ratio; Based on real-time power monitoring data, the device nodes with power flow relationship are used as power transmission edges, and the weight of the power transmission edge is dynamically calculated according to the actual transmission power. S12-3: Construction Method: Extract equipment ledgers and line topology data from the distribution automation system, combine them with total load data of the distribution area from the electricity consumption information collection system, determine equipment connection relationships, calculate the power transmission ratio of each connected line, and form a mesoscale map. ,in, For the set of equipment nodes in the distribution area, It is a set of physical connection and power transmission edges.
4. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S13, the process of constructing the macroscale map is as follows: S13-1: Node definition; taking administrative regions as units, nodes include regional substations, main lines, and regional total load monitoring points. Node attributes include substation capacity, main line cross-sectional area, regional total load peak value, and voltage level. S13-2: The physical topology relationship connecting the substation and the main line is used as the connection edge, and the weight of the connection edge is determined based on the line's rated capacity or actual transmission power; the power dispatch relationship between the connection sections is used as the dispatch edge, and the weight of the dispatch edge is determined based on the dispatch plan power or based on the real-time dispatch data of the power grid dispatch system. S13-3: Construction Method; Extract regional power grid topology data from the power grid GIS system, combine it with power transmission data from the dispatch center, determine the connectivity and dispatch relationships between regions, and form a macro-scale map. ,in, For the set of regional power grid nodes, This is a set of connection and scheduling edges.
5. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S21, the feature extraction process for the microscale map is as follows: S21-1: Data preprocessing; Z-score standardization of user electricity load data to eliminate differences in electricity consumption levels among different users; S21-2: Time-series graph convolutional network model processing; The preprocessed user load data is input into the time-series graph convolutional network model. In the graph convolutional layer, based on the adjacency relationship of the microscale graph, the load characteristics of adjacent users are aggregated to capture the load association pattern between users in the same transformer area. In the gated cyclic unit, the temporal dependency relationship of the load sequence is extracted along the time dimension to model the temporal evolution law of electricity consumption behavior. S21-3: Output features; Output feature matrix ,in, 64 represents the number of micro-nodes and the feature dimension. Feature matrix This includes user load timing anomaly scores, user load coordination deviation in the same distribution area, and meter operating status characteristics.
6. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S22, the process of extracting features from the mesoscale map is as follows: S22-1: Data preprocessing; normalize the attributes of equipment nodes, including transformer capacity, rated power, total load of the distribution area, and rated current of the switch, in order to eliminate the differences in the dimensions of different equipment. S22-2: Graph Attention Network Model Processing; The preprocessed data is input into the graph attention network model, and the weight coefficients between adjacent device nodes are calculated through multi-head attention. The weights of different device nodes are adaptively allocated, with a focus on transformers, main meters, and branch switches. Based on the attention weights, the features of neighboring nodes are aggregated to extract the correlation of operating status between devices and abnormal power transmission patterns. S22-3: Output features; Output feature matrix ,in, 64 represents the number of meso-level nodes and the feature dimension. Feature matrix This includes characteristics of power balance deviation rate in transformer areas, characteristics of abnormal values associated with equipment operating parameters, and characteristics of load distribution uniformity in branch lines.
7. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S23, the feature extraction process for the macroscopic scale map is as follows: S23-1: Data preprocessing; normalize the node attributes of the macro-scale map, including substation capacity, main line cross-sectional area, regional total load peak, and voltage level, to eliminate the differences in dimensions between different intervals; S23-2: Graph Convolutional Network Model Processing; The preprocessed data is input into the graph convolutional network model. In the graph convolutional layer, the topological features of the regional power grid are extracted through a two-layer graph convolutional network. The attribute information of adjacent regional nodes is aggregated using the adjacency matrix to capture the electrical correlation and scheduling dependency between regions. In the global average pooling layer, the features of each node are averaged along the node dimension, and the node-level features are aggregated into regional-level global features to eliminate differences in node granularity. S23-3: Output features; Output feature matrix ,in, 32 represents the number of macroscopic nodes and 32 represents the feature dimension. Feature matrix This includes the characteristics of the regional total load fluctuation coefficient, the characteristics of the power supply load rate of the substation, and the characteristics of the dispatch power deviation between regions.
8. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S31, the feature alignment and fusion process is as follows: S31-1: Alignment of micro and meso features; Through the user-station mapping relationship, attention weighting is used to aggregate micro-scale user node features to the station dimension; S31-2: Alignment of meso- and macro-level features; Through the mapping relationship between the substation area and the region, attention weighting is used to aggregate the features of the substation nodes at the meso-scale to the region dimension; S31-3: Multi-scale attention fusion; aligning micro-features Mesoscopic characteristics Macro characteristics After unifying to 64 dimensions through linear projection, weighted fusion is performed using learnable attention weights, and the global fusion feature matrix is obtained according to formula (1). ,in, The final number of detection units is 128, and the feature dimension after fusion is 128. (1); In the formula, , , These are attention weights for micro, meso, and macro features, respectively, obtained through adaptive learning in a fully connected layer, satisfying... .
9. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, In S32, the detection model training and inference process is as follows: S32-1: Constructing the detection model; a multilayer perceptron binary classification model is used as the detection model. The multilayer perceptron contains multiple fully connected layers, with ReLU activation function in the intermediate layers and Sigmoid activation function in the output layer, outputting the probability of electricity theft. ; S32-2: Construct a sample dataset; use labeled historical data as the sample dataset, which includes normal electricity consumption samples and verified electricity theft samples, and divide the sample dataset into training set and validation set in an 8:2 ratio; S32-3: Construct the loss function; construct the loss function according to formula (2). ; (2); In the formula, This refers to the batch sample size. For the first The true label of each sample; This represents the probability of electricity theft predicted by the model. The L2 regularization coefficient; The set of learnable parameters for the model; S32-4: Model training; Optimize model parameters using the backpropagation algorithm, adaptively adjust the learning rate using the Adam optimizer, monitor loss changes on the validation set, and save the optimal model weights; S32-5: Online detection; input the multi-scale graph structure constructed in real time and the extracted features, the model outputs the probability of electricity theft. When the probability is higher than the set threshold If the activity is suspected to be electricity theft, an alarm will be triggered and the user / distributor / area identifier will be output, allowing power maintenance personnel to verify and handle the situation.
10. The electricity theft detection method based on a multi-scale graph calculation model according to claim 1, characterized in that, Also includes: S4: Model Adaptive Update and Optimization; Regularly collect new electricity consumption data and electricity theft verification results, update the multi-scale graph structure, and use incremental training to update the detection model parameters to ensure the model's adaptability and detection accuracy. At the same time, establish a feature importance evaluation mechanism to screen features that contribute highly to electricity theft detection in real time, eliminate redundant features, and improve the model's running efficiency.