CN117034179A - Abnormal electric quantity identification and tracing method and system based on graph neural network - Google Patents

Abnormal electric quantity identification and tracing method and system based on graph neural network Download PDF

Info

Publication number
CN117034179A
CN117034179A CN202311300228.8A CN202311300228A CN117034179A CN 117034179 A CN117034179 A CN 117034179A CN 202311300228 A CN202311300228 A CN 202311300228A CN 117034179 A CN117034179 A CN 117034179A
Authority
CN
China
Prior art keywords
user
data
electricity
abnormal
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311300228.8A
Other languages
Chinese (zh)
Other versions
CN117034179B (en
Inventor
张海静
王鑫
夏晓东
解磊
郭红霞
杨洋
王鹏
邝静
陆媛
于泓
***
尹全磊
梁波
郭珂
鲁毅
代燕杰
杨琳琳
张浩芳
孙玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Marketing Service Center of State Grid Shandong Electric Power Co Ltd
Original Assignee
Marketing Service Center of State Grid Shandong Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Marketing Service Center of State Grid Shandong Electric Power Co Ltd filed Critical Marketing Service Center of State Grid Shandong Electric Power Co Ltd
Priority to CN202311300228.8A priority Critical patent/CN117034179B/en
Publication of CN117034179A publication Critical patent/CN117034179A/en
Application granted granted Critical
Publication of CN117034179B publication Critical patent/CN117034179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Economics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Strategic Management (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a system for identifying and tracing abnormal electric quantity based on a graph neural network, which relate to the technical field of abnormal electric quantity detection, and comprise the following steps: acquiring a plurality of user electricity data, preprocessing the user electricity data, and acquiring electricity time sequence data of each user; inputting the user electricity time sequence data into a graph neural network model based on an attention mechanism, extracting implicit characteristics of the user electricity time sequence data, and outputting a data dimension-reducing vector; clustering and dividing all the data dimension reduction vectors by using K-means clustering, and identifying abnormal user electricity utilization data and abnormal electricity utilization types; and tracing the abnormal electricity utilization user, the power supply station type and the industry type corresponding to the abnormal user electricity utilization data through a probability map model and a random walk algorithm according to the identified abnormal electricity utilization type. The method and the device can accurately identify the abnormal user electricity consumption data and rapidly trace the abnormal user.

Description

Abnormal electric quantity identification and tracing method and system based on graph neural network
Technical Field
The invention relates to the technical field of abnormal electric quantity detection, in particular to a method and a system for identifying and tracing abnormal electric quantity based on a graph neural network.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
Abnormal electricity is an important factor causing abnormal line loss, and hidden danger can be brought to electricity consumption and power grid safety. At present, machine learning is widely used in various fields such as data analysis and classification, and has excellent effects in various fields; in addition, the excellent performance of the K-means clustering (K-means clustering) method in the clustering field is considered, so that the K-means clustering method is widely applied to the fields of electric power data analysis and the like. Machine learning and K-means clustering are applied to abnormal electric quantity detection and identification, and are currently common methods. For example, data dimension reduction can be performed by utilizing principal component analysis (Principal Component Analysis, PCA) and priori knowledge, new characteristics of electricity consumption of a user are extracted, and a K-means clustering method is combined to realize user electricity load pattern analysis based on mixed characteristic K-means clustering; constructing a base class through historical electricity utilization data, and judging whether the electric quantity data is abnormal or not by combining K-mean cluster analysis; the abnormal electricity consumption analysis algorithm based on the density clustering technology is characterized in that the method constructs association rules and gives the support degree of the association rules by combining the density clustering technology and local outliers, and meanwhile obtains abnormal electricity consumption conditions according to comprehensive analysis of the current electricity consumption; by using the K nearest neighbor (K-Nearest Neighbors, KNN) idea, an abnormal electricity detection method based on an improved rapid density peak clustering algorithm and the like.
However, in the conventional methods for identifying abnormal electric quantity by using the K-means cluster analysis method, the non-euclidean topology of the power network itself (i.e., the topology in the non-euclidean space, the topology in the form of data such as the power network and the social network is called a graph or a network, and the power network and the like show that the number of neighbors of each node is not fixed, so that the graph cannot be described by using the mesh topology in the euclidean space, and therefore, the graph is a topology in the non-euclidean space). The existing methods are all based on original features in linear space or features after linear processing for data analysis, however, the power network has an obvious network structure, for example, for power users of factories or merchants of the same type and power users in similar areas, the power habits of the power users are similar internally but different from those of the power users in the similar areas. Under the condition that the information is not utilized, a large amount of interference noise is generated by simply and blindly clustering, and better abnormal electricity utilization detection accuracy cannot be obtained.
On the basis of identifying unusual electricity usage data, how to locate users who are causing unusual data or identify potentially risky users is also a problem that is currently of great concern. At present, the method for positioning the abnormal data users mainly comprises two modes of manual analysis and data analysis, wherein on the manual analysis level, an intelligent switch is additionally added to each ammeter, the ammeter is returned to a remote master station, and map software is utilized to generate a display picture of specific position information for positioning; on the data analysis level, linear regression is mainly adopted, and the influence of each user is judged by establishing a multiple linear regression model between the lost electric quantity and the electricity utilization time sequence of each user, so that abnormal users are positioned. However, manual analysis, although being able to accurately locate the individual user, consumes a lot of manpower and material resources and is not efficient; most of the existing linear regression model modes are used for establishing corresponding regression models aiming at single conditions, and for different abnormal conditions, different models are required to be established respectively, so that the calculation is complex and the efficiency is low.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides an abnormal electric quantity identification and tracing method and system based on a graph neural network, which are used for carrying out dimension reduction processing on high-dimensional electricity utilization data by using the graph attention neural network, extracting low-dimensional characteristics of the electricity utilization data, identifying abnormal electricity utilization data by using a K-mean clustering algorithm based on the low-dimensional characteristics, improving the accuracy of abnormal identification, and realizing the rapid positioning of abnormal electricity utilization users based on a probability graph structure and a random walk algorithm.
In a first aspect, the present disclosure provides a method for identifying and tracing abnormal electric quantity based on a graph neural network.
An abnormal electric quantity identification and tracing method based on a graph neural network comprises the following steps:
acquiring a plurality of user electricity data, preprocessing the user electricity data, and acquiring electricity time sequence data of each user;
inputting the user electricity time sequence data into a graph neural network model based on an attention mechanism, extracting implicit characteristics of the user electricity time sequence data, and outputting a data dimension-reducing vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
based on the data dimension reduction vector of each user, carrying out cluster division on all the data dimension reduction vectors by utilizing K-means clusters, and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
In a second aspect, the present disclosure provides an abnormal power identification and tracing system based on a graph neural network.
An abnormal electric quantity identification and tracing system based on a graph neural network comprises:
the data acquisition and preprocessing module is used for acquiring a plurality of user power consumption data, preprocessing the user power consumption data and acquiring power consumption time sequence data of each user;
the power utilization data feature extraction module is used for inputting the power utilization time series data of the user into a graph neural network model based on an attention mechanism, extracting implicit features of the power utilization time series data of the user and outputting a data dimension reduction vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
the abnormal identification module is used for carrying out clustering division on all the data dimension reduction vectors by utilizing K-means clustering based on the data dimension reduction vectors of each user and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
the abnormal user positioning module is used for tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
The one or more of the above technical solutions have the following beneficial effects:
1. the invention provides an abnormal electricity quantity identification and tracing method and system based on a graph neural network.
2. According to the method and the device, under the condition that the information of the power utilization user corresponding to the power utilization data of the user is unknown or lost, the abnormal power utilization user is rapidly traced based on the probability graph model and the random walk algorithm according to the identified abnormal power utilization data and the abnormal type, so that the abnormal power utilization of the user is rapidly positioned and prevented.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a flowchart of an abnormal electricity quantity identification and tracing method based on a graph neural network according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a probability map model according to an embodiment of the present invention.
Detailed Description
It should be noted that the following detailed description is exemplary only for the purpose of describing particular embodiments and is intended to provide further explanation of the invention and is not intended to limit exemplary embodiments according to the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Furthermore, it will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, steps, operations, devices, components, and/or groups thereof.
Example 1
The embodiment provides an abnormal electric quantity identification and tracing method based on a graph neural network, which is shown in fig. 1 and comprises the following steps:
step S1, acquiring a plurality of user electricity data, preprocessing the user electricity data, and acquiring electricity time sequence data of each user;
s2, inputting the user electricity time series data into a graph neural network model based on an attention mechanism, extracting implicit characteristics of the user electricity time series data, and outputting a data dimension reduction vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
step S3, based on the data dimension reduction vectors of each user, carrying out clustering division on all the data dimension reduction vectors by utilizing K-means clustering, and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
s4, tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability graph model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
The abnormal electric quantity identification and tracing method based on the graph neural network provided by the embodiment is described in more detail through the following.
Step S1, acquiring a plurality of user electricity utilization data, preprocessing the electricity utilization data, and acquiring electricity utilization time sequence data of each user. In the present embodiment, acquisitionTThe number of sampling points of each user isNForm user electricity data setX={,/>,.../>,.../>}, wherein->={/>,/>,.../>,.../>[ N ] represents ]>The individual users use the electricity data. Normalizing the power consumption data of each user to obtain normalized data +.>={/>,/>,.../>,...}。
And S2, inputting the user electricity time series data into a graph neural network model based on an attention mechanism, extracting implicit characteristics of the user electricity time series data, and outputting a data dimension reduction vector. The graphic neural network model based on the attention mechanism is constructed according to the electricity consumption basic information of the user, wherein the electricity consumption basic information of the user comprises an electricity consumption user, a power supply station type and an industry type.
In this embodiment, a graph neural network model based on the attention mechanism is constructed based on the electricity consumption basic information of the user. Firstly, taking electricity users as nodes, connecting nodes of users (such as users with the same industry type or users with similar areas) with the same value in the electricity basic information, namely connecting the nodes of two users with the same value in the electricity basic information, so as to construct a network model comprising a plurality of user nodes. In the network model, each node represents not only electricity consumption data of a certain user but also basic information of the user. Because the information source and the power sequence of the graph network structure are not intersected, the overfitting problem caused by over-dependence on certain data does not occur.
Secondly, the network model is attentive between users, and the attentiveness between users is obtained through the learning process of the model itself. The graph neural network model based on the attention mechanism can simultaneously learn embedded features and attention through feature learning, and further perform non-Euclidean aggregation. In terms of model interpretation, for a certain node, the model interpretation layer generates higher attention to neighbor nodes with similar node attributes, which leads the embedding mode of the node to be converged with the node with high attention, thereby achieving the effect of optimizing a clustering result by attribute information (namely basic information).
Specifically, the automatic learning section using the graphic neural networkPoint characteristics and information contained in the network structure. The constructed network model includes an encoder that maps high-dimensional features into low-dimensional hidden layer features and a decoder that restores the hidden layer features to the original features. In the present embodiment, the input is performed through the graph neural networkNAnd mapping the power utilization time series data of the user into low-dimensional implicit characteristics, and realizing dimension reduction of the power utilization time series data.
First, input dataSelf as supervision to guide the network to learn a mapping relation to obtain self reconstruction output +.>If the obtained reconstruction error is smaller, the hidden layer is considered to complete the encoding of the original data.
For input dataxEncoding, the encoder may be represented as:
wherein,、/>representing a learnable weight matrix and bias, the encoder representing the encoder,/for>The resulting hidden layer features are encoded.
The hidden layer characteristics obtained by encoding the encoder are input to a decoder for decoding, and the decoder can be expressed as:
wherein,、/>representing a weight matrix and bias that can be learned,decoderrepresenting decoder->Representing the decoded output data.
The objective function of the training graph attention network needs to satisfy:
loss
wherein,representing a binary norm.
The attention self-encoder is then applied to the attention network to obtain the attention self-encoder (i.e., the attention mechanism-based neural network model proposed in this embodiment). The input characteristics of the graph-drawing meaning force neural network are thatDimension vector (i.e.)>Maintaining user electricity data), the output characteristics are +.>Dimension vector, let-><<N. The graph-note-force neural network serves as an encoder to encode the input features and extract low-dimensional implicit features, which can be expressed as:
wherein,node representing input +.>User power consumption data of->={/>,/>,.../>,.../>},/>Representing the node encoded by the encoder +.>Low-dimensional implicit features of the user electricity data.
In the process of extracting the low-dimensional implicit features, the input features are converted into high-level features by linear transformation, and the matrix is parameterizedApplied to each node and executing the attention mechanism, the node is calculatediSum nodejThe attention coefficients between are:
the calculated attention coefficient indicates the nodeiIs characterized by the nodejThe importance of the features of (a) i.e. any two different node usersiAndjimportance between electrical features, whereina(-) representative vectorA parameterized single layer feedforward neural network layer. The graph attention neural network model learns and calculates the attention between any two nodes in the graph, wherein the attention value between two unconnected nodes is generally set to 0 according to the hyper-parametric design.
Further, the attention coefficient is calculated as:
wherein,and a is a nonlinear activation function, and α is a built-in parameter of the LeakyReLU function, and α=0.2 in this embodiment is taken. Is in accordance with->Similarly, is->Is->Is also a learnable parameter. In practice, the number of the cells to be processed,representing a linear layer of a neural network, wherein +.>The effect of (a) is to map the spliced embedded vector to a real number.
Then for the nodeiNormalizing all neighbor node pairs for the nodeiIs normalized using a softmax function, as:
wherein,representing nodesiIs a set of all neighbor nodes of the network.
Then, a linear combination of the neighbor features is calculated and used as the output feature of each node through a nonlinear function, namely:
wherein,(.) is a sigmoid activation function, < >>Representing nodesiIs a set of neighbor nodes of the network.
Finally, decoding the implicit features with a decoder can be expressed as:
wherein,brepresenting a learnable bias.
The objective function for training the graph self-attention network needs to satisfy:
and finally, inputting the user electricity time series data obtained by preprocessing in the step S1 into the trained graph neural network model based on the attention mechanism, and outputting implicit characteristics of the user electricity time series data, wherein the implicit characteristics are characteristics of the data after dimension reduction.
The existing principal component analysis method is a linear rather than European embedding mode in nature, and extracts the principal component with higher density through linear transformation so as to reduce the dimension. However, the clustering is directly performed by using the principal component analysis method, which results in poor abnormality detection accuracy, so that in order to solve the problem, the neural network is considered to be capable of fitting any nonlinear transformation, and the neural network can be flexibly and nonlinearly embedded to extract a better principal component in manifold space, so that the neural network is adopted to perform dimension reduction, and the actual situation of the power network can be more attached. Furthermore, the embodiment also builds a graph structure integrating node attribute information, the graph model can be attached to the network relation among users on the basis of nonlinear embedding, user information, namely priori knowledge, is reasonably integrated, nonlinear aggregation iteration processing is carried out on data sets with network topology aiming at user electricity consumption, attribute label relation among the data can be better absorbed and utilized, therefore, more accurate data processing is obtained, more real clustering results are restored, and the method has better advantages compared with the traditional neural network.
And step S3, based on the data dimension reduction vectors of each user, carrying out clustering division on all the data dimension reduction vectors by utilizing K-means clustering, and identifying abnormal electricity utilization users and abnormal electricity utilization types.
And on the basis of acquiring the low-dimensional characteristics of the user power consumption data through the step S2, clustering and dividing all the data dimension reduction vectors by using K-means clustering. First, the K-means clustering method essentially refers to: is assumed to be inDimensional space has->Setting super parameters of sample points to be clustered>Indicating that this can be taken->The individual points are clustered as +.>The clusters (i.e. divided into +.>Class). For this purposeMFor each point, each point may have a category of +.>Thus all clusters are possible +.>Seed, this is all possible cluster allocation functions +.>. Calculating to obtain the distribution function according to the cluster>The sum of the distances of sample points of the same class to the center of their own cluster after classification, e.g. for +.>Class, all pass->The result after clustering is +.>Sample points of->The sum of the distances to their centers is +.>
The sum of the center distances of all sample points to their own clusters isThe optimization objective of K-means clustering is to find the cluster allocation function that minimizes the sum function among all cluster allocation functionsNamely, a clustering mode that each sample point reaches the cluster center of the sample point as close as possible is found, so that the clustering purpose is achieved. The combined optimization problem of the K-means clustering algorithm can be expressed as:
wherein,is->The sample points, in this embodiment the +.th of the embedded topology information>Implicit feature of the individual user power consumption time series data, < >>Is a cluster allocation function of samples, +.>Indicate->Individual cluster category->Representing the total number of cluster categories. The above-mentioned optimization problem is to find the nearest cluster mode (i.e. cluster allocation function +.>). Since the optimization problem is an NP-hard problem, an iterative method is used to solve, the solving step includes:
calculating the minimum distance between each sample point and all the cluster centers, and dividing each sample point into clusters where the cluster centers with the minimum distance are located;
after all sample points are divided, updating the clustering center of each cluster to be the average value of all sample points in the cluster;
and continuously iterating the steps until the updated cluster center value of each cluster is minimum, and completing the iterative solution.
Through the steps, all sample points are clustered, abnormal electricity utilization data are identified according to the clustering identification result, and abnormal electricity utilization users and abnormal electricity utilization types are determined. Specifically, the electricity consumption data with the known abnormal type is also used as a sample point to be put into a sample population for clustering, the same abnormal type is obtained in the clustering result when the electricity consumption data with the known abnormal type belongs to the same cluster, the abnormal electricity consumption data is determined, and then the abnormal electricity consumption user is determined; if the outlier still exists, the power utilization data corresponding to the outlier is novel abnormal type data, and can be further identified by manual work of an expert.
Step S4, tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user. After the abnormal type of a group of abnormal data is given, the user of the abnormal electricity utilization data most likely to occur is traced and determined in the probability graph model, so that the abnormal electricity utilization user, the power supply station type and the industry type can be positioned.
Specifically, a probability graph model between a power utilization user and an abnormal power utilization category is built according to the power utilization basic information of the userG(Y,P,C,U). As shown in fig. 2, classifying the probability map model nodes into 4 classes includes: abnormal type or abnormal electric quantity typeY) Type of industryP) Type of power supply stationC) And the electricity utilization userU),Representing exception type node->Representing industry type node->Representing the power supply type node->Representing a user node.
Wherein the exception typeAnd the industry type links according to the abnormal types which can occur in each industry, and the weight is the abnormal typeIn industry->Probability of occurrence->=/>
The nodes of industry type and power supply station type are connected according to the industry type of the electric quantity supplied by each power supply station, and the weight is the power supply stationSupplying electric quantity to industry>Proportion of->=/>
The type of the power supply station and the type of the user are determined according to the supply relation between the user and the power supply station, and the weight is that the power supply station belongs toIs->Occurrence of the abnormality type->Proportion of->=/>
And secondly, tracing the region and industry where the abnormal electricity utilization user is located according to the identified abnormal electricity utilization user and abnormal electricity utilization type based on a random walk algorithm and a probability map model. Taking into account the node type and the connection relationship of the power relationship network, a random walk is assumedRWThe algorithm starts with an anomaly type node with probability (1-)/>Select industry type node->Or with probabilityc(1-/>) Selecting other industry type nodes connected with the node; thereafter, the next power supply station type node and user node continue to be selected in the same manner. Wherein (1)>For parameters in the random walk algorithm, the probability of the edges used for further regulating and controlling the walk is between 0 and 1, the probability of various abnormal conditions occurring in different industries at different times can be different, and the probability is improved by adjusting +.>The user can be more accurately located according to different times.
Then, from the exception type nodeJump to industry type node->The probability of (2) satisfies:
wherein the parameters areRepresenting the number of power supplies that generated such anomalies.
Calculating the probability from the user to the abnormal electric quantity type as 3-level multiplication to finally obtain each userCause abnormal electric quantity->The probability of (2) is +.>
As another implementation mode, through locating the probability map model of the abnormal user, the probability of occurrence of the abnormality and the probability of which abnormal situation each user belongs to can be determined, and the abnormal occurrence probability and the probability of abnormal types of different users can be referred to in sequence, so that corresponding preventive measures are adopted to prevent abnormal electricity consumption.
Example two
The embodiment provides an abnormal electric quantity identification and tracing system based on a graph neural network, which comprises the following steps:
the data acquisition and preprocessing module is used for acquiring a plurality of user power consumption data, preprocessing the user power consumption data and acquiring power consumption time sequence data of each user;
the power utilization data feature extraction module is used for inputting the power utilization time series data of the user into a graph neural network model based on an attention mechanism, extracting implicit features of the power utilization time series data of the user and outputting a data dimension reduction vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
the abnormal identification module is used for carrying out clustering division on all the data dimension reduction vectors by utilizing K-means clustering based on the data dimension reduction vectors of each user and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
the abnormal user positioning module is used for tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
The steps involved in the second embodiment correspond to those of the first embodiment of the method, and the detailed description of the second embodiment can be found in the related description section of the first embodiment.
While the present invention has been described in connection with the preferred embodiments, it should be understood that the present invention is not limited to the specific embodiments, but is set forth in the following claims.

Claims (10)

1. The abnormal electric quantity identification and tracing method based on the graph neural network is characterized by comprising the following steps of:
acquiring a plurality of user electricity data, preprocessing the user electricity data, and acquiring electricity time sequence data of each user;
inputting the user electricity time sequence data into a graph neural network model based on an attention mechanism, extracting implicit characteristics of the user electricity time sequence data, and outputting a data dimension-reducing vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
based on the data dimension reduction vector of each user, carrying out cluster division on all the data dimension reduction vectors by utilizing K-means clusters, and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
2. The abnormal electricity quantity identifying and tracing method based on the graph neural network as claimed in claim 1, wherein the constructing the graph neural network model based on the attention mechanism based on the electricity consumption basic information of the user comprises the following steps:
and taking the electricity utilization user as a node, connecting edges of the user nodes with the same value in the electricity utilization basic information, and constructing a network model comprising a plurality of user nodes.
3. The abnormal electricity quantity identification and tracing method based on the graph neural network as claimed in claim 1, wherein the steps of inputting the user electricity time series data into the graph neural network model based on the attention mechanism, extracting implicit characteristics of the user electricity time series data, and outputting the data dimension reduction vector comprise:
converting input data to high level features using linear transformation, parameterizing a transformation matrixApplied to each node and executing the attention mechanism, calculating the user node +.>And the attention coefficients between its neighbors;
based on the linear combination of the attention coefficient and the neighbor node characteristics, the output characteristics of each node are output through a nonlinear function, and the output characteristics are namely data dimension-reducing vectors.
4. The abnormal electric quantity identification and tracing method based on the graph neural network as claimed in claim 1, wherein the clustering division is carried out on all data dimension reduction vectors by using K-means clusters, namely, a combination optimization problem of the K-means clusters is solved, and the combination optimization problem is as follows:
wherein,is->Sample points, which are the first +.>Implicit feature of the individual user power consumption time series data, < >>Is a cluster allocation function of samples, +.>Indicate->Individual cluster category->Representing the total number of clustering categories>Representing the optimal cluster allocation function.
5. The abnormal electric quantity identification and tracing method based on the graph neural network as claimed in claim 4, wherein solving the combined optimization problem by using an iterative method comprises:
calculating the minimum distance between each sample point and all the cluster centers, and dividing each sample point into clusters where the cluster centers with the minimum distance are located;
after all sample points are divided, updating the clustering center of each cluster to be the average value of all sample points in the cluster;
and continuously cycling iteration until the updated cluster center value of each cluster is minimum, obtaining a cluster allocation function corresponding to the minimum, wherein the cluster allocation function is the optimal cluster allocation function, and completing iteration solution.
6. An abnormal electric quantity identification and tracing system based on a graph neural network is characterized by comprising the following components:
the data acquisition and preprocessing module is used for acquiring a plurality of user power consumption data, preprocessing the user power consumption data and acquiring power consumption time sequence data of each user;
the power utilization data feature extraction module is used for inputting the power utilization time series data of the user into a graph neural network model based on an attention mechanism, extracting implicit features of the power utilization time series data of the user and outputting a data dimension reduction vector; the graph neural network model based on the attention mechanism is constructed according to basic electricity consumption information of a user, wherein the basic electricity consumption information of the user comprises an electricity consumption user, a power supply station type and an industry type;
the abnormal identification module is used for carrying out clustering division on all the data dimension reduction vectors by utilizing K-means clustering based on the data dimension reduction vectors of each user and identifying abnormal user electricity utilization data and abnormal electricity utilization types;
the abnormal user positioning module is used for tracing abnormal electricity users, power supply station types and industry types corresponding to the abnormal user electricity data through a probability map model and a random walk algorithm according to the identified abnormal electricity types; and constructing a probability map model based on the basic power consumption information of the user.
7. The abnormal electricity quantity identifying and tracing system based on the graph neural network according to claim 6, wherein the building of the graph neural network model based on the attention mechanism based on the electricity consumption basic information of the user comprises the following steps:
and taking the electricity utilization user as a node, connecting edges of the user nodes with the same value in the electricity utilization basic information, and constructing a network model comprising a plurality of user nodes.
8. The abnormal electricity quantity identifying and tracing system based on the graph neural network according to claim 6, wherein the steps of inputting the user electricity time series data into the graph neural network model based on the attention mechanism, extracting implicit characteristics of the user electricity time series data, and outputting the data dimension-reducing vector comprise:
converting input data to high level features using linear transformation, parameterizing a transformation matrixApplied to each node and executing the attention mechanism, calculating the user node +.>And the attention coefficients between its neighbors;
based on the linear combination of the attention coefficient and the neighbor node characteristics, the output characteristics of each node are output through a nonlinear function, and the output characteristics are namely data dimension-reducing vectors.
9. The abnormal electric quantity identification and tracing system based on the graph neural network as claimed in claim 6, wherein the clustering division is performed on all data dimension reduction vectors by using K-means clusters, namely, a combined optimization problem of the K-means clusters is solved, and the combined optimization problem is as follows:
wherein,is->Sample points, which are the first +.>Implicit feature of the individual user power consumption time series data, < >>Is a cluster allocation function of samples, +.>Indicate->Individual cluster category->Representing the total number of clustering categories>Representing the optimal cluster allocation function.
10. The abnormal electric quantity identifying and tracing system based on the graph neural network of claim 9, wherein solving the combined optimization problem by using an iterative method comprises:
calculating the minimum distance between each sample point and all the cluster centers, and dividing each sample point into clusters where the cluster centers with the minimum distance are located;
after all sample points are divided, updating the clustering center of each cluster to be the average value of all sample points in the cluster;
and continuously cycling iteration until the updated cluster center value of each cluster is minimum, obtaining a cluster allocation function corresponding to the minimum, wherein the cluster allocation function is the optimal cluster allocation function, and completing iteration solution.
CN202311300228.8A 2023-10-10 2023-10-10 Abnormal electric quantity identification and tracing method and system based on graph neural network Active CN117034179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311300228.8A CN117034179B (en) 2023-10-10 2023-10-10 Abnormal electric quantity identification and tracing method and system based on graph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311300228.8A CN117034179B (en) 2023-10-10 2023-10-10 Abnormal electric quantity identification and tracing method and system based on graph neural network

Publications (2)

Publication Number Publication Date
CN117034179A true CN117034179A (en) 2023-11-10
CN117034179B CN117034179B (en) 2024-02-02

Family

ID=88624872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311300228.8A Active CN117034179B (en) 2023-10-10 2023-10-10 Abnormal electric quantity identification and tracing method and system based on graph neural network

Country Status (1)

Country Link
CN (1) CN117034179B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235465A (en) * 2023-11-15 2023-12-15 国网江西省电力有限公司电力科学研究院 Transformer fault type diagnosis method based on graph neural network wave recording analysis
CN117495109A (en) * 2023-12-29 2024-02-02 国网山东省电力公司禹城市供电公司 Electricity stealing user identification system based on deep well network
CN117556369A (en) * 2024-01-12 2024-02-13 南京信息工程大学 Power theft detection method and system for dynamically generated residual error graph convolution neural network

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451157A (en) * 2016-06-01 2017-12-08 阿里巴巴集团控股有限公司 Disorder data recognition method, apparatus and system, searching method and device
CN114077811A (en) * 2022-01-19 2022-02-22 华东交通大学 Electric power Internet of things equipment abnormality detection method based on graph neural network
CA3132346A1 (en) * 2020-09-29 2022-03-29 10353744 Canada Ltd. User abnormal behavior recognition method and device and computer readable storage medium
CN115587335A (en) * 2022-09-15 2023-01-10 中国电力科学研究院有限公司 Training method of abnormal value detection model, abnormal value detection method and system
US20230025826A1 (en) * 2021-07-12 2023-01-26 Servicenow, Inc. Anomaly Detection Using Graph Neural Networks
CN115688035A (en) * 2022-10-19 2023-02-03 江苏电力信息技术有限公司 Time sequence power data anomaly detection method based on self-supervision learning
CN116204846A (en) * 2023-05-06 2023-06-02 云南星晟电力技术有限公司 Method for rapidly positioning abnormal sensor data of power distribution network based on visible graph
CN116345469A (en) * 2023-04-12 2023-06-27 哈尔滨工业大学 Power grid power flow adjustment method based on graph neural network

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451157A (en) * 2016-06-01 2017-12-08 阿里巴巴集团控股有限公司 Disorder data recognition method, apparatus and system, searching method and device
CA3132346A1 (en) * 2020-09-29 2022-03-29 10353744 Canada Ltd. User abnormal behavior recognition method and device and computer readable storage medium
US20230025826A1 (en) * 2021-07-12 2023-01-26 Servicenow, Inc. Anomaly Detection Using Graph Neural Networks
CN114077811A (en) * 2022-01-19 2022-02-22 华东交通大学 Electric power Internet of things equipment abnormality detection method based on graph neural network
CN115587335A (en) * 2022-09-15 2023-01-10 中国电力科学研究院有限公司 Training method of abnormal value detection model, abnormal value detection method and system
CN115688035A (en) * 2022-10-19 2023-02-03 江苏电力信息技术有限公司 Time sequence power data anomaly detection method based on self-supervision learning
CN116345469A (en) * 2023-04-12 2023-06-27 哈尔滨工业大学 Power grid power flow adjustment method based on graph neural network
CN116204846A (en) * 2023-05-06 2023-06-02 云南星晟电力技术有限公司 Method for rapidly positioning abnormal sensor data of power distribution network based on visible graph

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YU ZHANG: "Research on Anomaly Monitoring Algorithm of Smart Grid Based on Graph Neural Network", 2023 INTERNATIONAL CONFERENCE ON SMART ELECTRICAL GRID AND RENEWABLE ENERGY (SEGRE) *
于天琪 等: "基于边缘计算的物联网监测***中利用自编码神经网络实现的异常检测", 物联网学报, vol. 2, no. 4 *
田硕: "基于图神经网络的智能电网异常监测算法研究", 中国优秀硕士学位论文全文数据库 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235465A (en) * 2023-11-15 2023-12-15 国网江西省电力有限公司电力科学研究院 Transformer fault type diagnosis method based on graph neural network wave recording analysis
CN117235465B (en) * 2023-11-15 2024-03-12 国网江西省电力有限公司电力科学研究院 Transformer fault type diagnosis method based on graph neural network wave recording analysis
CN117495109A (en) * 2023-12-29 2024-02-02 国网山东省电力公司禹城市供电公司 Electricity stealing user identification system based on deep well network
CN117495109B (en) * 2023-12-29 2024-03-22 国网山东省电力公司禹城市供电公司 Power stealing user identification system based on neural network
CN117556369A (en) * 2024-01-12 2024-02-13 南京信息工程大学 Power theft detection method and system for dynamically generated residual error graph convolution neural network
CN117556369B (en) * 2024-01-12 2024-04-19 南京信息工程大学 Power theft detection method and system for dynamically generated residual error graph convolution neural network

Also Published As

Publication number Publication date
CN117034179B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN117034179B (en) Abnormal electric quantity identification and tracing method and system based on graph neural network
Liao et al. Fault diagnosis of power transformers using graph convolutional network
CN116028838B (en) Clustering algorithm-based energy data processing method and device and terminal equipment
CN111008726A (en) Class image conversion method in power load prediction
CN117540908A (en) Agricultural resource integration method and system based on big data
CN115659254A (en) Power quality disturbance analysis method for power distribution network with bimodal feature fusion
CN115545280A (en) Low-voltage distribution network topology generation method and device
CN116245019A (en) Load prediction method, system, device and storage medium based on Bagging sampling and improved random forest algorithm
CN110909786A (en) New user load identification method based on characteristic index and decision tree model
CN113569955A (en) Model training method, user portrait generation method, device and equipment
CN117493922A (en) Power distribution network household transformer relation identification method based on data driving
CN114626426A (en) Industrial equipment behavior detection method based on K-means optimization algorithm
CN115130620B (en) Power equipment power utilization mode identification model generation method and device
Choong et al. Jack and masters of all trades: One-pass learning sets of model sets from large pre-trained models
Rosato et al. A Combined Deep Learning Approach for Time Series Prediction in Energy Environments
CN114841266A (en) Voltage sag identification method based on triple prototype network under small sample
CN112307288A (en) User clustering method for multiple channels
Chen et al. Consumer-transformer relationship identification based on UMAP and mini batch K-means
CN118070134B (en) Method and system for predicting electricity consumption of users in park
CN115330083A (en) Uncertainty-considered power grid operation mode adjusting method and system
CN115481786A (en) Power distribution network user load characteristic classification method based on data acquisition
Liu et al. Generative Adversarial Network and CNN-LSTM Based Short-Term Power Load Forecasting
CN117977676A (en) Micro-grid topology identification method and system based on R-GCN model
CN115496126A (en) Multi-energy microgrid state recognition method based on GRA (generalized grammes) relevance algorithm and SVM (support vector machine)
CN114943312A (en) Informatization data evaluation method for power grid power equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant