A power stealing type detection method and system based on multi-label co-occurrence network discrimination
By constructing a power theft type detection model based on a multi-label co-occurrence network, utilizing GRU and graph convolutional networks to mine electricity consumption features, and combining an attention mechanism, the problem of low accuracy in power theft type identification in traditional power theft detection methods is solved, thereby improving the accuracy of power theft type detection and the efficiency of on-site evidence collection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
- Filing Date
- 2022-09-27
- Publication Date
- 2026-07-24
AI Technical Summary
Traditional methods for detecting electricity theft are insufficient for accurately identifying different types of theft, leading to difficulties in on-site investigation and evidence collection, and resulting in low efficiency.
A method based on multi-label co-occurrence network discrimination is adopted. The user's electricity consumption process features are mined through GRU network, and a co-occurrence relationship network graph of electricity theft labels is constructed. The association structure information between electricity consumption features is mined by graph convolutional network, and the feature weighting is combined with attention mechanism to output the electricity theft behavior type.
It improves the accuracy of electricity theft detection and the efficiency of on-site staff in collecting evidence, enhances the focus on characteristic mutation information, deeply explores the correlation of electricity theft characteristics, and characterizes the differences between different types of electricity theft.
Smart Images

Figure CN116226748B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent electricity anti-theft technology, and more specifically, to a method and system for detecting electricity theft types based on multi-tag co-occurrence network discrimination. Background Technology
[0002] Against the backdrop of new power system construction, the proportion of electricity substitution will gradually increase. Especially with the integration of new energy sources, the difficulty of grid load regulation will continue to rise, thus placing higher demands on the stable supply of grid load. However, electricity theft often leads to load imbalance, seriously affecting electricity consumption order and stability. Especially with technological advancements, electricity theft types are becoming more diversified and concealed. Traditional electricity theft detection methods often only classify the presence of theft into two categories, lacking specific identification and detection of theft types, leading to difficulties and low efficiency in on-site investigation and evidence collection. Therefore, there is an urgent need for effective methods for detecting electricity theft types. When electricity theft occurs, the type of theft can be identified promptly and accurately, and based on this, a specific and feasible classification and investigation process can be provided to on-site personnel, improving the efficiency of frontline staff.
[0003] The current power system has accumulated massive amounts of user electricity consumption data, providing data support for anti-theft and illegal activity detection, and making it possible to identify electricity theft categories with precision. However, how to conduct precise identification of electricity theft categories is an urgent problem to be solved.
[0004] Therefore, a method for detecting electricity theft types based on multi-label co-occurrence networks is needed. Summary of the Invention
[0005] This invention proposes a method and system for detecting electricity theft types based on multi-label co-occurrence networks, in order to solve the problem of how to efficiently identify electricity theft types.
[0006] To address the aforementioned problems, according to one aspect of the present invention, a method for detecting electricity theft types based on multi-tag co-occurrence networks is provided, the method comprising:
[0007] Acquire historical electricity theft sample data; among which, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information;
[0008] By using GRU network modeling to mine the characteristics of user electricity consumption process, the hidden state representation of the current time step is output as the evolution characteristics of user electricity consumption process;
[0009] A co-occurrence relationship network diagram of electricity theft tags was established based on the aforementioned historical electricity theft sample data;
[0010] Based on the co-occurrence relationship network diagram of the electricity theft tags, the correlation structure information between electricity consumption characteristics is mined to obtain the relationship characteristics between the electricity theft tags.
[0011] Attention scores are weighted to determine the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags, and the user attribute characteristics. After processing through a linear network layer, a comprehensive feature of the user's electricity theft is obtained. The comprehensive feature of the user's electricity theft is then converted into a probability value based on the softmax activation function, so as to determine the type of electricity theft behavior based on the probability value.
[0012] Preferably, the method further includes:
[0013] After obtaining historical electricity theft sample data, the electricity theft sample data is cleaned, completed, verified, and normalized.
[0014] Preferably, the step of using a GRU network to model and mine user electricity consumption process features, and outputting the hidden state representation of the current time step as the user electricity consumption process evolution feature, includes:
[0015] The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
[0016] Preferably, the establishment of a co-occurrence relationship network diagram of electricity theft tags based on the historical electricity theft sample data includes:
[0017] Based on the historical electricity theft sample data, and based on the correlation between features and electricity theft categories, f-types reflecting electricity consumption behavior are selected. n The associated features are divided into n intervals by numerical distribution;
[0018] Through statistical analysis, we set the interval with the minimum change as 0, and added the interval with the maximum change to obtain f. n ×(n+1) feature parameter interval labels, which are uniformly defined as electricity theft labels;
[0019] Based on the co-occurrence relationship of tags, a correlation matrix of electricity theft tags is established using conditional probability statistics, and a co-occurrence relationship network diagram of electricity theft tags is constructed.
[0020] Preferably, the step of mining the correlation structure information between electricity consumption characteristics and obtaining the relationship features between electricity theft tags based on the co-occurrence relationship network diagram of the electricity theft tags includes:
[0021] For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located.
[0022] The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves;
[0023] After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features;
[0024] After passing through the fully connected layer, a comprehensive feature representation of the batch of nodes is obtained;
[0025] The comprehensive features of the nodes in this batch obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
[0026] According to another aspect of the present invention, a system for detecting electricity theft types based on multi-tag co-occurrence network discrimination is provided, the system comprising:
[0027] The electricity theft sample data acquisition unit is used to acquire historical electricity theft sample data; wherein, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information;
[0028] The user electricity consumption process evolution feature determination unit is used to model and mine user electricity consumption process features using GRU network, and output the hidden state representation of the current time step as the user electricity consumption process evolution feature.
[0029] A co-occurrence relationship network diagram determination unit for electricity theft tags is used to establish a co-occurrence relationship network diagram for electricity theft tags based on the historical electricity theft sample data.
[0030] The electricity theft tag relationship feature determination unit is used to mine the association structure information between electricity consumption features and obtain the relationship features between electricity theft tags based on the co-occurrence relationship network diagram of the electricity theft tags.
[0031] The electricity theft behavior type determination unit is used to determine the attention score weighting of the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags, and the user attribute characteristics. After processing by a linear network layer, the comprehensive characteristics of the user's electricity theft are obtained. Based on the softmax activation function, the comprehensive characteristics of the user's electricity theft are converted into probability values to determine the electricity theft behavior type based on the probability values.
[0032] Preferably, the system further includes:
[0033] The data preprocessing unit is used to perform data cleaning, data completion, data verification, and normalization on the historical electricity theft sample data after acquiring it.
[0034] Preferably, the user electricity consumption process evolution feature determination unit utilizes a GRU network to model and mine user electricity consumption process features, and outputs the hidden state representation of the current time step as the user electricity consumption process evolution feature, including:
[0035] The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
[0036] Preferably, the electricity theft tag co-occurrence relationship network diagram determination unit establishes an electricity theft tag co-occurrence relationship network diagram based on the historical electricity theft sample data, including:
[0037] Based on the historical electricity theft sample data, and based on the correlation between features and electricity theft categories, f-types reflecting electricity consumption behavior are selected. n The associated features are divided into n intervals by numerical distribution;
[0038] Through statistical analysis, we set the interval with the minimum change as 0, and added the interval with the maximum change to obtain f. n ×(n+1) feature parameter interval labels, which are uniformly defined as electricity theft labels;
[0039] Based on the co-occurrence relationship of tags, a correlation matrix of electricity theft tags is established using conditional probability statistics, and a co-occurrence relationship network diagram of electricity theft tags is constructed.
[0040] Preferably, the relationship feature determination unit between electricity theft tags, based on the co-occurrence relationship network diagram of the electricity theft tags, mines the association structure information between electricity consumption features to obtain the relationship features between the electricity theft tags, including:
[0041] For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located.
[0042] The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves;
[0043] After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features;
[0044] After passing through the fully connected layer, a comprehensive feature representation of the batch of nodes is obtained;
[0045] The comprehensive features of the nodes in this batch obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
[0046] According to another aspect of the present invention, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the steps of a method for detecting electricity theft type based on multi-tag co-occurrence network discrimination.
[0047] According to another aspect of the present invention, the present invention provides an electronic device, comprising:
[0048] The aforementioned computer-readable storage medium; and
[0049] One or more processors for executing a program in the computer-readable storage medium.
[0050] This invention provides a method and system for detecting electricity theft types based on a multi-label co-occurrence network, comprising: acquiring historical electricity theft sample data; using a GRU network to model and mine user electricity consumption process features, outputting the implicit state representation of the current time step as the user electricity consumption process evolution feature; establishing an electricity theft label co-occurrence relationship network graph based on the historical electricity theft sample data; mining the correlation structure information between electricity consumption features based on the electricity theft label co-occurrence relationship network graph, and obtaining the relationship features between electricity theft labels; determining the attention score weights of the user electricity consumption process evolution features, the relationship features between electricity theft labels, and the user attribute features, and processing them through a linear network layer to obtain the comprehensive features of user electricity theft; and converting the comprehensive features of user electricity theft into probability values based on the softmax activation function, so as to determine the type of electricity theft behavior based on the probability values. This invention constructs an electricity theft type detection model based on a multi-label graph convolutional network. Through an attention mechanism, it effectively integrates the comprehensive characteristics of user electricity theft, thereby enhancing the focus on feature mutation information and deeply exploring the correlation between electricity theft features, thus improving the accuracy of electricity theft type detection. By constructing a co-occurrence relationship network graph of electricity theft labels, it mines the linkage relationship of changes in electricity consumption parameters based on different electricity theft categories, characterizing the differences between different electricity theft categories, thereby effectively mining the relationship between electricity consumption parameters at the same time in the electricity consumption data, increasing the breadth of feature learning, and improving the comprehensiveness of feature representation. Considering the influencing factors of electricity user attribute characteristics, it combines the evolutionary features of the electricity consumption process obtained through the GRU module and the electricity theft label relationship features obtained through the GCN module, and uses an attention mechanism to calculate the weights, obtaining a weighted attention score of the three, effectively expressing the feature distribution of electricity theft behavior types, thereby further improving the accuracy of identifying electricity theft behavior. This invention can help build a complete anti-theft investigation and evidence collection system, effectively improving the efficiency and quality of evidence collection by on-site personnel, and providing support for the anti-electricity theft work of power supply companies. Attached Figure Description
[0051] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures:
[0052] Figure 1 This is a flowchart of a method 100 for detecting electricity theft type based on multi-tag co-occurrence network according to an embodiment of the present invention;
[0053] Figure 2 This is a diagram illustrating the overall architecture of a multi-label graph convolutional network-based electricity theft detection model according to an embodiment of the present invention.
[0054] Figure 3 This is a flowchart illustrating the construction of a co-occurrence relationship network diagram of electricity theft tags according to an embodiment of the present invention;
[0055] Figure 4This is a flowchart illustrating the feature learning process based on the co-occurrence relationship network graph of electricity theft tags according to an embodiment of the present invention.
[0056] Figure 5 This is an example diagram illustrating the calculation of tag co-occurrence relationships according to an embodiment of the present invention;
[0057] Figure 6 This is an example diagram of a local network illustrating the co-occurrence relationship of electricity theft tags according to an embodiment of the present invention;
[0058] Figure 7 This is a schematic diagram of the structure of an electricity theft type detection system 700 based on a multi-tag co-occurrence network according to an embodiment of the present invention. Detailed Implementation
[0059] Exemplary embodiments of the invention will now be described with reference to the accompanying drawings. However, the invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to fully and completely disclose the invention and to fully convey its scope to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the drawings is not intended to limit the invention. In the drawings, the same units / elements are referred to by the same reference numerals.
[0060] Unless otherwise stated, the terms used herein (including technical terms) have their common meaning as understood by one of ordinary skill in the art. Furthermore, it is understood that terms defined in commonly used dictionaries should be understood to have a meaning consistent with the context of their relevant field, and not to be interpreted as having an idealized or overly formal meaning.
[0061] The purpose of this invention is to address the low accuracy of traditional electricity theft detection methods, particularly their difficulty in distinguishing it from faults such as line loss. This patent constructs an electricity theft detection model based on a multi-label graph convolutional network. It extracts longitudinal temporal abrupt change features using a GRU and incorporates lateral abrupt change features and overall correlation features using a GCN. Furthermore, by combining the user's own attribute characteristics and employing an attention mechanism, it effectively integrates the user's comprehensive electricity theft characteristics, enhancing the focus on feature abrupt change information and deeply exploring the correlations between electricity theft features, thereby improving the accuracy of electricity theft detection and further enhancing the efficiency of anti-theft and illegal operation.
[0062] Figure 1 This is a flowchart of a method 100 for detecting electricity theft types based on multi-tag co-occurrence networks according to an embodiment of the present invention. Figure 1As shown in the embodiments of the present invention, the method for detecting electricity theft types based on multi-label co-occurrence networks constructs an electricity theft type detection model based on multi-label graph convolutional networks. Through an attention mechanism, it effectively integrates the comprehensive characteristics of users' electricity theft, thereby enhancing the focus on feature mutation information and deeply mining the correlation relationships of electricity theft features, thus improving the accuracy of electricity theft type detection. By constructing a co-occurrence relationship network graph of electricity theft labels, it mines the linkage relationship of changes in electricity consumption parameters based on different electricity theft categories, characterizing the differences between different electricity theft categories, thereby effectively mining the relationship between electricity consumption parameters at the same time in the electricity consumption data, increasing the breadth of feature learning, and improving the comprehensiveness of feature representation. Considering the influencing factors of electricity user attribute characteristics, by combining the evolutionary features of the electricity consumption process obtained through the GRU module and the electricity theft label relationship features obtained through the GCN module, it uses an attention mechanism to calculate the weights, obtaining a weighted attention score of the three, effectively expressing the feature distribution of electricity theft behavior types, thereby further improving the accuracy of identifying electricity theft behavior. The present invention can help build a complete anti-theft investigation and evidence collection system, effectively improving the efficiency and quality of evidence collection by on-site personnel, and providing support for the anti-electricity theft work of power supply companies. The electricity theft type detection method 100 based on multi-label co-occurrence network discrimination provided by the present invention starts from step 101, in which historical electricity theft sample data is acquired; wherein, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information.
[0063] Preferably, the method further includes:
[0064] After obtaining historical electricity theft sample data, the electricity theft sample data is cleaned, completed, verified, and normalized.
[0065] In this invention, historical electricity theft sample data is extracted from the power system database to obtain time series electricity consumption data for each electricity theft sample, including basic attributes and electricity consumption parameter information of the electricity theft sample.
[0066] The implementation platform is based on the electricity consumption information collection system of a State Grid power company. Figure 2 As shown, historical electricity theft sample data are extracted from the electricity information collection system to obtain time series electricity consumption data for each electricity theft sample, including basic attributes and electricity consumption parameter information of the electricity theft sample.
[0067] The self-use electricity information collection system obtained more than 12,000 cases of electricity theft by users in a certain region from January 2020 to December 2020. At the same time, it obtained the basic attribute characteristics of the relevant users. Some feature data after initial selection are shown in Table 1.
[0068] Table 1 Data Information Table
[0069]
[0070] In this invention, the above data can also undergo data preprocessing, including data cleaning, data completion, data verification, and normalization, to obtain a standardized electricity consumption data representation X = {x1, x2, ..., x...} t}, x t This represents the electricity consumption data at time t. An electricity theft classification label 'y' is set based on historical electricity theft categories. After encoding, the electricity theft type can be obtained. All the above data uses one-hot encoding. Since there are various methods of electricity theft in actual use, based on historically collected electricity theft examples, they are divided into different categories, such as undervoltage theft, undercurrent theft, phase shifting theft, differential expansion theft, and theft by changing meter needles and wiring methods, etc.
[0071] In step 102, the user's electricity consumption process features are mined by modeling using a GRU network, and the implicit state representation of the current time step is output as the evolution feature of the user's electricity consumption process.
[0072] Preferably, the step of using a GRU network to model and mine user electricity consumption process features, and outputting the hidden state representation of the current time step as the user electricity consumption process evolution feature, includes:
[0073] The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
[0074] Combination Figure 2 As shown, in this invention, a GRU network is used to model and mine the characteristics of user electricity consumption processes. Specifically, based on parameters such as current, voltage, power, and electricity consumption in the electricity consumption sequence data, the evolutionary characteristics of the electricity consumption data are learned, and the hidden state representation of the current time step is output, i.e., the evolutionary characteristics of the user's electricity consumption process. The general generation process is as follows: the preprocessed electricity consumption sequence data is input into the GRU network sequentially according to the time steps. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, information is filtered through reset gate and update gate functions. The reset gate determines how to combine the new input information with the previous memory, and the update gate defines the amount of previous memory to be saved to the current time step; the GRU network outputs the hidden state representation of the current time step, characterizing the evolutionary characteristics of the user's electricity consumption process.
[0075] Specifically, the preprocessed power consumption sequence data is input into the GRU network sequentially according to time steps; after initialization, the hidden layer h t The state is determined by the state h of the previous hidden layer.t-1 The calculation, along with the current time step information, is as follows:
[0076]
[0077] Where z t The update gate in the GRU network is calculated as follows:
[0078] z t =σ(W z [x t ,h t-1 ]),(2)
[0079] W z Let be a learnable weight matrix, and σ be a non-linear activation function using tanh. Candidate hidden states. The calculation is as follows:
[0080]
[0081] W is a learnable weight matrix, r t This represents the reset gate in the GRU network, calculated as follows:
[0082] r t =σ(W r [x t ,h t-1 ]),(4)
[0083] W r This is a learnable weight matrix.
[0084] The GRU network outputs the implicit state representation of the current time step, which characterizes the evolution of the user's electricity consumption process.
[0085] In step 103, a co-occurrence relationship network diagram of electricity theft tags is established based on the historical electricity theft sample data.
[0086] Preferably, the establishment of a co-occurrence relationship network diagram of electricity theft tags based on the historical electricity theft sample data includes:
[0087] Based on the historical electricity theft sample data, and based on the correlation between features and electricity theft categories, f-types reflecting electricity consumption behavior are selected. n The associated features are divided into n intervals by numerical distribution;
[0088] Through statistical analysis, we set the interval with the minimum change as 0, and added the interval with the maximum change to obtain f. n ×(n+1) feature parameter interval labels, which are uniformly defined as electricity theft labels;
[0089] Based on the co-occurrence relationship of tags, a correlation matrix of electricity theft tags is established using conditional probability statistics, and a co-occurrence relationship network diagram of electricity theft tags is constructed.
[0090] Combination Figure 2 and Figure 3 As shown, in this invention, a co-occurrence relationship network diagram of electricity theft tags is established using conditional probability statistics for a historical electricity theft sample set. The graph structure is used to characterize the differences between different electricity theft categories. Specifically, the process of determining the co-occurrence relationship network diagram of electricity theft tags includes:
[0091] 1. Based on the acquired electricity theft sample set, and based on the correlation between features and electricity theft categories, filter for f-types that reflect electricity consumption behavior. n The associated features are divided into intervals based on numerical distribution. Taking voltage as an example, the difference in voltage fluctuations within a fixed time period is statistically analyzed to obtain the maximum change, v. max and minimum change v min According to the size of the interval Divide into n intervals.
[0092] 2. Based on statistical analysis, v is set. min =0, plus greater than v max The interval is given by f. n ×(n+1) feature parameter interval labels are uniformly defined as electricity theft labels. The co-occurrence relationship between labels is calculated based on their co-occurrence conditional probabilities, such as... Figure 6 As shown, the association between tag A and tag B is derived based on the conditional probability of all tags across all categories of electricity theft, which can be calculated using Bayes' theorem: If the value of P(A|B) is greater than the set probability value τ, for example, τ = 0.5, it means that if label B exists in the network graph, then there is also a relatively high probability that label A exists. Similarly, if the value of P(C|B) is less than the set probability value τ, it means that if label B exists in the network graph, then there is a relatively low probability that label C exists. Therefore, the dependency between labels is weak, and there is no B→C association.
[0093] 3. Based on the co-occurrence relationship of tags, a correlation matrix of electricity theft tags is established using conditional probability statistics. That is, the correlation between them is defined by mining the co-occurrence relationship of electricity theft-related tags in historical electricity theft-related data, and then a co-occurrence relationship network diagram of electricity theft tags is constructed.
[0094] In step 104, based on the co-occurrence relationship network diagram of the electricity theft tags, the correlation structure information between electricity consumption characteristics is mined to obtain the relationship characteristics between the electricity theft tags.
[0095] Preferably, the step of mining the correlation structure information between electricity consumption characteristics and obtaining the relationship features between electricity theft tags based on the co-occurrence relationship network diagram of the electricity theft tags includes:
[0096] For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located.
[0097] The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves;
[0098] After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features;
[0099] After passing through the fully connected layer, a comprehensive feature representation of the batch of nodes is obtained;
[0100] The comprehensive features of the nodes in this batch obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
[0101] Combination Figure 2 and Figure 4 As shown, in this invention, based on the co-occurrence relationship network graph of electricity theft tags, the GCN network is used to mine the correlation structure information between electricity consumption characteristics, and the transmission of neighbor node information is achieved through layer convolution processing. Each convolutional layer processes the first-order neighborhood information of its layer nodes, and the information transmission of multi-order neighborhood tags is achieved by stacking convolutional layers, outputting the relationship features between electricity theft tags. Specifically, the process of outputting the relationship features between electricity theft tags is as follows:
[0102] E1. For the electricity consumption information at each time step in the electricity consumption sequence, map it sequentially to the nodes in the co-occurrence relationship network graph of electricity theft tags, and locate the position in the graph;
[0103] E2. The feature representation of the nodes is updated through graph convolutional layers, while also considering the information of the nodes themselves. Specifically, for each electricity theft tag node, each convolutional operation is updated using the following formula:
[0104] H L+1 =f(H L ,M). (5)
[0105] H L Let M represent the feature representation of the label nodes in the graph, M represent the node adjacency matrix, and L represent the number of layers in the network. The convolution operation can be further represented as:
[0106]
[0107] In the formula, f(·) represents a nonlinear function, such as LeakyRelu, W L This represents the learnable weight matrix. Let M represent the adjacency matrix with self-connections after regularization.
[0108] E3. After two convolutional layers, the feature relationships between nodes in the local neighborhood are mined, and the feature representations of the corresponding nodes can be obtained. N n This indicates the number of network nodes involved in electricity theft;
[0109] E4. After passing through the fully connected layer, the comprehensive feature representation of this batch of nodes is obtained.
[0110] E5. Input the comprehensive features of this batch of nodes obtained from the fully connected layer above into the random pooling layer. The random pooling layer randomly selects the electricity theft tag relationship features according to their probability values (i.e., the element with the larger value is more likely to be selected), and outputs the lateral correlation representation F between the features of each time step of the electricity theft sample. w .
[0111] In step 105, attention scores are weighted based on the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags, and the user attribute characteristics. After processing through a linear network layer, a comprehensive feature of the user's electricity theft is obtained. The comprehensive feature of the user's electricity theft is then converted into a probability value based on the softmax activation function, so as to determine the type of electricity theft behavior based on the probability value.
[0112] In this invention, after obtaining the electricity consumption process evolution features through the GRU module and the electricity theft tag relationship feature representations through the GCN module, user attribute features are combined, and an attention mechanism is used to calculate the weights, resulting in a weighted attention score for each of the three. Subsequently, after processing through a linear network layer, a feature representation of the user's electricity theft based on the above three factors is obtained. Finally, the feature vector output is converted into probability values using a softmax activation function, thereby outputting the electricity theft behavior type.
[0113] Among them, the power consumption process evolution characteristics F are obtained through the GRU module. s The feature representation of the electricity theft tag relationship obtained by the GCN module is F. w Then, by combining user attribute characteristics Factors such as user type, user address, and user occupation are weighted using an attention mechanism. The attention scores of the three factors are weighted and obtained. Then, after processing by a linear network layer, a feature representation of the user's electricity theft is obtained, combining the above three factors. The feature vector output is then converted into probability values through a softmax activation function layer, thereby outputting the type of electricity theft behavior.
[0114] This invention uses the Cross Entropy Loss function as the loss function for the entire network model, and softmax as the activation function σ in the last layer to identify the type of electricity theft by the user.
[0115]
[0116] The loss function is defined as follows:
[0117]
[0118] Where y represents the actual label.
[0119] Once the loss function falls below a threshold, the GRU, GCN, attention score weights, and softmax parameters are fixed, and the electricity theft detection model is output.
[0120] Since the task of detecting electricity theft type is a multi-classification task, we selected commonly used type detection models in the field of electricity theft and other traditional multi-classification algorithms for comparison and analysis. We also used commonly used evaluation metrics, accuracy and F1 score, for performance evaluation. The results are shown in Table 2 below.
[0121] Table 2 Performance results of detection models for different types of electricity theft
[0122]
[0123] (1) Outlier detection algorithm: By assuming a distribution or probability model for a given dataset, outliers are identified by inconsistencies based on the assumed model.
[0124] (2) KNN: K-Nearest Neighbor algorithm, which classifies the K nearest points of the point to be predicted by using their categories.
[0125] (3) MC-CNN: that is, multi-channel CNN. Multi-channel CNN learns through multiple feature extraction channels to obtain multi-channel features for classification tasks.
[0126] (4) LSTM+FCN: Long Short-Term Memory Network combined with Fully Connected Layers is used for classification tasks.
[0127] (5) BiGRU+FCN: A bidirectional gated neural network combined with a fully connected layer is used for classification tasks.
[0128] As shown in Table 2, the MLGCN-SETD model proposed in this paper significantly improves upon other traditional models in multiple evaluation metrics. Furthermore, it can be observed that LSTM+FCN and BiGRU+FCN perform better than traditional classification algorithms represented by (1) and (2) in time series data classification tasks, indicating that models based on recurrent neural networks can effectively mine user electricity consumption time-series information, thereby better identifying the corresponding electricity theft categories. In addition, the performance of the MLGCN-SETD model proposed in this paper is improved compared to models based on recurrent neural networks, indicating that the constructed co-occurrence relationship network graph of electricity theft labels effectively represents the correlation between electricity theft features, thereby further improving the accuracy of electricity theft category identification.
[0129] Table 3 Performance results of detection models for different types of electricity theft (evaluation metric: accuracy)
[0130]
[0131] Because the sample size and actual detection results differ among different types of electricity theft, the identification effectiveness was further evaluated based on specific types of electricity theft. The experimental results are detailed in Table 3. As shown in the table, the MLGCN-SETD model proposed in this paper improved the accuracy by more than 16% in specific electricity theft detection tasks. However, the detection capabilities of the same model also varied for different types of electricity theft. For example, the KNN model achieved an accuracy of 51% for undercurrent theft but only 38% for reverse high current theft, indicating significant differences in feature distribution among different types of electricity theft. For all types of electricity theft, undervoltage and undercurrent theft were relatively easy to detect, while methods such as creating a neutral point displacement were more difficult to identify.
[0132] Table 4. Sample Detection Results and Verification Status
[0133] User 301 Undervoltage method Undervoltage method User 489 undercurrent method undercurrent method User 776 undercurrent method undercurrent method User 1097 Undervoltage method Undervoltage method User 1336 Undervoltage method Undervoltage method User 1860 Phase shifting method Phase shifting method User 1971 Undervoltage method Undervoltage method User 2154 Undervoltage method Undervoltage method User 2460 Expansion method Change the wiring method of the electricity meter User 3582 Phase shifting method Phase shifting method
[0134] By analyzing selected electricity theft sample instances from the test dataset, the model's role can be summarized from specific cases. The results of the selected instances are shown in Table 4. The table shows that the proposed model performs well in overall electricity theft sample detection, accurately identifying the type of electricity theft. However, an error occurred in the detection of user 2460; the model detected the user's electricity theft method as the differential method, while the actual theft type was the alteration of the electricity meter wiring. This indicates that the model performs well in detecting common types of electricity theft, but only moderately in detecting a few types. However, as the electricity theft sample database is continuously enriched, the model's generalization ability will continue to improve.
[0135] The advantages of this invention are:
[0136] 1. To address the low accuracy of traditional electricity theft detection methods, particularly their difficulty in distinguishing it from faults such as line loss, this patent constructs an electricity theft detection model based on a multi-label graph convolutional network. It extracts vertical temporal abrupt change features using a GRU and incorporates horizontal abrupt change features and overall correlation features using a GCN. Combined with the user's own attribute characteristics, an attention mechanism effectively integrates the user's comprehensive electricity theft features, thereby enhancing the focus on feature abrupt change information and deeply exploring the correlations between electricity theft features, thus improving the accuracy of electricity theft detection.
[0137] 2. Since the jump relationships between electrical parameters such as current and voltage in the electricity consumption sequence are complex and difficult to intuitively represent the correspondence between them and the types of electricity theft, this patent constructs a co-occurrence relationship network diagram of electricity theft tags. Based on different types of electricity theft, it mines the linkage relationship between changes in electricity consumption parameters, represents the differences between different types of electricity theft, and thus effectively mines the relationship between electricity consumption parameters at the same time in the electricity consumption data, increases the breadth of feature learning, and improves the comprehensiveness of feature representation.
[0138] 3. In response to the problem of similarity among groups in the distribution of electricity theft behavior types under the big data environment of electricity, this patent considers the influencing factors of electricity user attribute characteristics. By combining the evolution characteristics of electricity consumption process obtained by the GRU module and the electricity theft tag relationship characteristics obtained by the GCN module, the attention mechanism is used to calculate the weights and obtain the attention scores of the three, which effectively expresses the feature distribution of electricity theft behavior types, thereby further improving the accuracy of electricity theft behavior identification.
[0139] Figure 7 This is a schematic diagram of the structure of a multi-tag co-occurrence network-based electricity theft type detection system 700 according to an embodiment of the present invention. Figure 7 As shown, the electricity theft type detection system 700 based on multi-label co-occurrence network discrimination provided by the present invention includes: an electricity theft sample data acquisition unit 701, a user electricity consumption process evolution feature determination unit 702, an electricity theft label co-occurrence relationship network diagram determination unit 703, an electricity theft label relationship feature determination unit 704, and an electricity theft behavior type determination unit 705.
[0140] Preferably, the electricity theft sample data acquisition unit 701 is used to acquire historical electricity theft sample data; wherein, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information.
[0141] Preferably, the system further includes:
[0142] The data preprocessing unit is used to perform data cleaning, data completion, data verification, and normalization on the historical electricity theft sample data after acquiring it.
[0143] Preferably, the user electricity consumption process evolution feature determination unit 702 is used to model and mine user electricity consumption process features using GRU network, and output the implicit state representation of the current time step as the user electricity consumption process evolution feature.
[0144] Preferably, the user electricity consumption process evolution feature determination unit 702 uses a GRU network to model and mine user electricity consumption process features, and outputs the hidden state representation of the current time step as the user electricity consumption process evolution feature, including:
[0145] The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
[0146] Preferably, the co-occurrence relationship network diagram determination unit 703 is used to establish a co-occurrence relationship network diagram of electricity theft tags based on the historical electricity theft sample data.
[0147] Preferably, the co-occurrence relationship network diagram determination unit 703 for electricity theft tags establishes a co-occurrence relationship network diagram for electricity theft tags based on the historical electricity theft sample data, including:
[0148] Based on the historical electricity theft sample data, and based on the correlation between features and electricity theft categories, f-types reflecting electricity consumption behavior are selected. n The associated features are divided into n intervals by numerical distribution;
[0149] Through statistical analysis, we set the interval with the minimum change as 0, and added the interval with the maximum change to obtain f. n ×(n+1) feature parameter interval labels, which are uniformly defined as electricity theft labels;
[0150] Based on the co-occurrence relationship of tags, a correlation matrix of electricity theft tags is established using conditional probability statistics, and a co-occurrence relationship network diagram of electricity theft tags is constructed.
[0151] Preferably, the relationship feature determination unit 704 between electricity theft tags is used to mine the correlation structure information between electricity consumption features based on the co-occurrence relationship network diagram of the electricity theft tags, and obtain the relationship features between the electricity theft tags.
[0152] Preferably, the relationship feature determination unit 704 between electricity theft tags, based on the co-occurrence relationship network diagram of the electricity theft tags, mines the association structure information between electricity consumption features to obtain the relationship features between the electricity theft tags, including:
[0153] For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located.
[0154] The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves;
[0155] After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features;
[0156] After passing through the fully connected layer, a comprehensive feature representation of the batch of nodes is obtained;
[0157] The comprehensive features of the nodes in this batch obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
[0158] Preferably, the electricity theft behavior type determination unit 705 is used to determine the attention score weighting of the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags and the user attribute characteristics, and process them through a linear network layer to obtain the comprehensive characteristics of the user's electricity theft. Based on the softmax activation function, the comprehensive characteristics of the user's electricity theft are output as probability values to determine the electricity theft behavior type based on the probability values.
[0159] The electricity theft type detection system 700 based on multi-label co-occurrence network discrimination of the present invention corresponds to the electricity theft type detection method 100 based on multi-label co-occurrence network discrimination of the present invention, and will not be described again here.
[0160] According to another aspect of the present invention, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the steps of a method for detecting electricity theft type based on multi-tag co-occurrence network discrimination.
[0161] According to another aspect of the present invention, the present invention provides an electronic device, comprising:
[0162] The aforementioned computer-readable storage medium; and
[0163] One or more processors for executing a program in the computer-readable storage medium.
[0164] The invention has been described with reference to a few embodiments. However, as will be known to those skilled in the art, and as defined in the appended claims, other embodiments besides those disclosed above fall equivalently within the scope of the invention.
[0165] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the art, unless otherwise expressly defined herein. All references to “a / the / the [device, component, etc.]” are openly interpreted as at least one instance of said device, component, etc., unless otherwise expressly stated. The steps of any method disclosed herein need not be performed in the exact order disclosed unless explicitly stated otherwise.
[0166] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0168] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0169] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting electricity theft types based on multi-label co-occurrence networks, characterized in that, The method includes: Obtain historical electricity theft sample data; among which, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information; By using GRU network modeling to mine the characteristics of user electricity consumption process, the hidden state representation of the current time step is output as the evolution characteristics of user electricity consumption process; A co-occurrence relationship network diagram of electricity theft tags was established based on the aforementioned historical electricity theft sample data; Based on the co-occurrence relationship network diagram of the electricity theft tags, the correlation structure information between electricity consumption characteristics is mined to obtain the relationship characteristics between the electricity theft tags. The attention scores of the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags, and the user attribute characteristics are weighted and processed through a linear network layer to obtain the comprehensive characteristics of the user's electricity theft. The comprehensive characteristics of the user's electricity theft are then converted into probability values based on the softmax activation function, so as to determine the type of electricity theft behavior based on the probability values. The step of mining the correlation structure information between electricity consumption characteristics and obtaining the relationship features between electricity theft tags based on the co-occurrence relationship network graph of the electricity theft tags includes: For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located. The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves; After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features; After passing through a fully connected layer, a comprehensive feature representation is obtained; The comprehensive features obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
2. The method according to claim 1, characterized in that, The method further includes: After obtaining historical electricity theft sample data, the historical electricity theft sample data is cleaned, completed, verified and normalized.
3. The method according to claim 1, characterized in that, The method of using GRU networks to model and mine user electricity consumption process features, and outputting the hidden state representation of the current time step as the evolution feature of user electricity consumption process, includes: The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
4. The method according to claim 1, characterized in that, The step of establishing a co-occurrence relationship network diagram for electricity theft tags based on the historical electricity theft sample data includes: according to the historical electricity theft sample data, based on the correlation between features and electricity theft categories, selecting a number of associated features reflecting electricity consumption behavior, and dividing them into n intervals through numerical distribution; after statistical analysis, setting the interval with a minimum change of 0, and adding the interval with a change greater than the maximum change, to obtain a total of feature parameter interval labels, which are uniformly defined as electricity theft tags; based on the co-occurrence relationship of the tags, using the conditional probability statistical method to establish an electricity theft tag correlation matrix, and constructing a co-occurrence relationship network diagram for electricity theft tags.
5. A system for detecting electricity theft types based on multi-tag co-occurrence networks, characterized in that, The system includes: The electricity theft sample data acquisition unit is used to acquire historical electricity theft sample data; wherein, the time series electricity consumption data of each historical electricity theft sample includes: basic attribute information of the electricity theft sample and electricity consumption parameter information; The user electricity consumption process evolution feature determination unit is used to model and mine user electricity consumption process features using GRU network, and output the hidden state representation of the current time step as the user electricity consumption process evolution feature. A co-occurrence relationship network diagram determination unit for electricity theft tags is used to establish a co-occurrence relationship network diagram for electricity theft tags based on the historical electricity theft sample data. The electricity theft tag relationship feature determination unit is used to mine the association structure information between electricity consumption features and obtain the relationship features between electricity theft tags based on the co-occurrence relationship network diagram of the electricity theft tags. The electricity theft behavior type determination unit is used to determine the attention score weighting of the user's electricity consumption process evolution characteristics, the relationship characteristics between electricity theft tags, and the user attribute characteristics, and then process them through a linear network layer to obtain the comprehensive characteristics of the user's electricity theft. Based on the softmax activation function, the comprehensive characteristics of the user's electricity theft are converted into probability values to determine the type of electricity theft behavior based on the probability values. The relationship feature determination unit between electricity theft tags, based on the co-occurrence relationship network diagram of the electricity theft tags, mines the correlation structure information between electricity consumption features to obtain the relationship features between the electricity theft tags, including: For each time step in the electricity consumption sequence, the electricity consumption information is sequentially mapped to a node in the co-occurrence relationship network diagram of electricity theft tags, and the position in the co-occurrence relationship network diagram of electricity theft tags is located. The feature representation of nodes is updated through graph convolutional layers, while also taking into account the information of the nodes themselves; After two layers of convolution operations, the feature relationships between nodes in the local neighborhood are mined to obtain the final representation of the corresponding node features; After passing through a fully connected layer, a comprehensive feature representation is obtained; The comprehensive features obtained from the fully connected layer are input into the random pooling layer. The random pooling layer randomly selects the relationship features of the electricity theft tags according to their probability values and outputs the horizontal correlation feature representation between each time step of the electricity theft samples to obtain the relationship features between the electricity theft tags.
6. The system according to claim 5, characterized in that, The system also includes: The data preprocessing unit is used to perform data cleaning, data completion, data verification, and normalization on the historical electricity theft sample data after acquiring it.
7. The system according to claim 5, characterized in that, The user electricity consumption process evolution feature determination unit utilizes a GRU network to model and mine user electricity consumption process features, outputting the hidden state representation of the current time step as the user electricity consumption process evolution feature, including: The time-series electricity consumption data from historical electricity theft sample data is input into the GRU network step by step. After initialization, the state of the hidden layer is represented by the state of the previous hidden layer and the information of the current time step. Specifically, the information is filtered through the reset gate and update gate functions to learn the evolution characteristics in the electricity consumption data and output the hidden state representation of the current time step as the evolution characteristics of the user's electricity consumption process.
8. The system according to claim 5, characterized in that, The electricity theft tag co-occurrence relationship network diagram determination unit establishes an electricity theft tag co-occurrence relationship network diagram based on the historical electricity theft sample data, including: according to the historical electricity theft sample data, based on the correlation degree between features and electricity theft categories, screening several related features reflecting electricity consumption behavior, and dividing them into n intervals through numerical distribution; after statistical analysis, setting the interval with the minimum change of 0, and adding the interval with the maximum change, a total of n feature parameter interval labels are obtained, and uniformly defined as electricity theft tags; based on the co-occurrence relationship of the tags, using a conditional probability statistical system to establish an electricity theft tag correlation matrix, and constructing an electricity theft tag co-occurrence relationship network diagram.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-4.
10. An electronic device, characterized in that, include: The computer-readable storage medium as described in claim 9; as well as One or more processors for executing a program in the computer-readable storage medium.