A method, device, equipment and medium for detecting abnormality of a power monitoring system

Through deep learning methods and graph neural networks, combined with LSTM and graph convolution networks, the shortcomings of traditional power monitoring system subject anomaly detection methods in complex environments and equipment status changes are solved, and efficient and accurate anomaly detection is achieved.

CN117640342BActive Publication Date: 2024-09-06STATE GRID HENAN ELECTRIC POWER ELECTRIC POWER SCI RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311660918.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-09-06
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

Traditional power monitoring system main body anomaly detection methods cannot effectively cope with the complex and diverse industrial environment and the frequent changes in equipment status. They also rely on manual experience to adjust parameters and thresholds, making it difficult to achieve efficient, accurate, and intelligent anomaly detection.

Method used

Using the deep learning method, we conduct time series analysis by obtaining the network flow log data of the power monitoring system, establish a graph structure, and use the graph neural network model for training to determine whether the interaction behavior of the access subject is abnormal. We combine LSTM and graph convolution network to conduct data analysis. Preprocessing and feature extraction, calculating edge probabilities to determine abnormal behavior.

Benefits of technology

It achieves accurate and reliable anomaly detection in complex environments and multiple factors, reduces manual intervention, improves detection efficiency and accuracy, and adapts to changes in power system equipment status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640342B
    Figure CN117640342B
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for detecting abnormalities of a subject in an electric power monitoring system. The method comprises: obtaining network flow log data in the electric power monitoring system, performing time series analysis on the network flow log data, and converting it into structured data with time series characteristics; establishing a graph structure based on the structured log data; obtaining a feature matrix X and an adjacency matrix A according to the graph structure; inputting the feature matrix X and the adjacency matrix A into a graph neural network model, and training the graph neural network model; using the trained graph neural network model, according to the interactive behavior that the access subject currently needs to perform, the graph neural network determines its edge probability, and determines whether it is an abnormal behavior according to the edge probability. The present invention converts the log of the electric power monitoring system into structured data through time series analysis, uses a graph convolutional neural network to identify abnormal behaviors in the interaction, and can make accurate and reliable subject abnormality detection for complex environments and multiple factors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a power monitoring system network security access technology, and in particular to a power monitoring system main body abnormality detection method, device, equipment and medium. Background Art

[0002] The power monitoring system main body anomaly detection method is a technical method that can be used to detect the anomalies of the main equipment in the power monitoring system. This method uses a specific algorithm to analyze and process sensor data in an intelligent and automated manner to achieve real-time monitoring of the status of the main equipment of the power monitoring system, and timely discover and identify abnormal situations, thereby improving the safety and reliability of the power system. This method is applicable to various types of power monitoring systems, including substation monitoring systems, distribution system monitoring systems, transmission line monitoring systems, etc. In the power monitoring system, anomaly detection is to detect whether the interaction between devices in the power monitoring system is abnormal behavior.

[0003] Traditional power monitoring system main body anomaly detection methods mainly include the following:

[0004] (1) Threshold-based method: This method sets a set of preset thresholds and issues an alarm when certain variables are detected to be outside the threshold range. This method has advantages in terms of simplicity, ease of understanding and application, but it often relies on manual adjustment of the threshold, is difficult to cope with complex environments and multi-factor influences, and cannot achieve precise anomaly detection.

[0005] (2) Rule-based method: This method requires the establishment of a rule base based on expert experience, and determines whether an abnormality has occurred by performing logical analysis on sensor data. The advantage of this method is that it has high accuracy, but its disadvantage is that the rule base needs to be built manually or semi-automatically, and requires a lot of professional knowledge and experience, and the effect is not good when there are complex factors interfering.

[0006] (3) Model-based method: This method regards the power equipment as a dynamic system, establishes a dynamic mathematical model under the operating state, and judges whether the equipment state is normal by comparing it with the actual observation value. The advantage of this method is that it can automatically adjust the model parameters for prediction according to the actual operating conditions and can achieve long-term fault prediction. However, its disadvantage is that building a model requires a large amount of data and professional knowledge, and when the detection object changes to a certain extent, the model needs to be rebuilt, which is time-consuming and costly.

[0007] The main disadvantage of traditional methods is that they cannot cope with more complex and diverse industrial environments, nor can they adapt to the characteristics of frequent changes in power system equipment status and poor regional demand. In addition, these methods often need to rely on manual experience to adjust and optimize parameters and thresholds, and there is a large amount of data in the power monitoring system, which is difficult to process and analyze effectively, so it is impossible to achieve efficient, accurate and intelligent anomaly detection. Summary of the invention

[0008] Purpose of the invention: The purpose of the present invention is to provide a method, device, equipment and medium for detecting anomalies in a power monitoring system, which uses a deep learning method for anomaly detection and can make accurate and reliable judgments for complex environments and multiple factors.

[0009] Technical solution: In order to achieve the above invention objectives, the present invention adopts the following technical solution:

[0010] A method for detecting abnormality of a power monitoring system, comprising the following steps:

[0011] Obtain network flow log data in the power monitoring system, perform time series analysis on the network flow log data, and convert it into structured data with time series characteristics;

[0012] A graph structure is established based on structured log data, in which the access subjects in the power monitoring system constitute nodes and the interaction behaviors between the access subjects constitute edges;

[0013] Obtain the feature matrix X and adjacency matrix A according to the graph structure. For a graph structure with N nodes and each node having D-dimensional features, its feature matrix X is an N×D-dimensional matrix, and the relationship between nodes forms an N×N-dimensional adjacency matrix A;

[0014] The feature matrix X and the adjacency matrix A are input into the graph neural network model, and the graph neural network model is trained to obtain a graph neural network model that can predict the access subject behavior in the power monitoring scenario;

[0015] Using the trained graph neural network model, the graph neural network determines the edge probability based on the interactive behavior that the access subject currently needs to perform, and determines whether it is abnormal behavior based on the edge probability.

[0016] Furthermore, time series analysis is performed on network flow log data and converted into structured data with time series characteristics, including:

[0017] By cleaning up duplicate and erroneous data, parsing the time format, and standardizing timestamp operations to form time series data points, each data point corresponds to the log information in a time window, and each time window is corresponded to each time step of the long short-term memory network LSTM. LSTM is used to learn the timing information and pattern of the data, and the timing features of each time window are output.

[0018] Furthermore, the graph neural network model includes an encoder and a decoder, wherein the encoder uses a graph convolutional network to map the information of two nodes in the graph to node embeddings, and the decoder uses a multi-layer perceptron to convert the node embeddings into relevant information of the edge between the two nodes;

[0019] Training the graph neural network model includes: using the encoder to obtain the feature map of the nodes of the interacting parties as node embeddings, using the decoder to convert the node embeddings into variable probabilities between the two nodes, and after obtaining the edge probability, comparing it with the actual connection situation between the two nodes, calculating the loss function, and then performing back propagation to optimize the relevant parameters of the encoder and decoder, and repeating this cycle until the loss function value is less than the specified threshold or reaches a predetermined number of cycles.

[0020] Furthermore, the propagation mode between the information propagation layers of the graph convolutional network is as follows:

[0021]

[0022] Where: H (l) is the input feature of the l-th layer network, f(H (l) ,A) is the output of the lth layer and is also the input of the next layer. represents the adjacency matrix that aggregates the node's own messages, Among them I N is the N×N dimensional identity matrix, is a diagonal matrix, and the element value on the diagonal is the degree of the node + 1. is the symmetric normalized Laplacian matrix, W (l) It represents the parameter matrix of the l-th layer network graph convolution formed by the combination of parameter vectors of all nodes in the graph, and σ(·) is the nonlinear activation function.

[0023] Furthermore, the loss function adopts a binary cross entropy loss function.

[0024] Furthermore, training the graph neural network model also includes: using the mean aggregation method to aggregate the information of neighboring nodes of the two nodes participating in the interaction and update their own information.

[0025] Furthermore, based on the interactive behavior that the access subject currently needs to perform, the graph neural network determines its edge probability, including: using LSTM to perform structured analysis on the access subject's interaction log data to obtain time series features, inputting the time series features into the trained graph neural network model, calculating the embedding of each of the two nodes through the encoder, and then obtaining the edge probability between the two nodes through the decoder.

[0026] The present invention also provides a power monitoring system main body abnormality detection device, comprising:

[0027] The data acquisition and preprocessing module acquires the network flow log data in the power monitoring system, performs time series analysis on the network flow log data, and converts it into structured data with time series characteristics;

[0028] A graph construction module builds a graph structure based on structured log data, where the access subjects in the power monitoring system constitute nodes and the interaction behaviors between the access subjects constitute edges;

[0029] The feature extraction module obtains the feature matrix X and the adjacency matrix A according to the graph structure. For a graph structure with N nodes and each node having D-dimensional features, its feature matrix X is an N×D-dimensional matrix, and the relationship between the nodes forms an N×N-dimensional adjacency matrix A;

[0030] The model training module inputs the feature matrix X and the adjacency matrix A into the graph neural network model, trains the graph neural network model, and obtains a graph neural network model that can predict the access subject behavior in the power monitoring scenario;

[0031] The anomaly detection module uses the trained graph neural network model to determine the edge probability based on the interactive behavior that the access subject currently needs to perform, and determines whether it is an abnormal behavior based on the edge probability.

[0032] The present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the power monitoring system main body abnormality detection method as described above are implemented.

[0033] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for detecting abnormality of a main body of an electric power monitoring system as described above are implemented.

[0034] Beneficial effects: In view of the fact that the log data in the power monitoring scenario is unstructured data, the present invention uses LSTM to perform time series analysis on the log data to obtain structured data, and uses this data to train the graph embedding model. A graph convolutional neural network is used as the graph embedding model encoder to generate time-related embeddings for each node of the graph from the structured data, and then the probability of the occurrence of abnormal interaction behavior corresponding to the subject is obtained through the decoder, so that it can evaluate future subject interaction tasks, thereby determining whether the subject behavior is abnormal. At the same time, the mean aggregation method is used to aggregate the device neighbor information and update the device status. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of the method for detecting abnormality of the main body of the power monitoring system of the present invention;

[0036] Figure 2 is an example diagram of a dynamic diagram constructed according to interactive behaviors in an embodiment of the present invention;

[0037] Figure 3 is a schematic diagram of the time graph network principle in an embodiment of the present invention;

[0038] Figure 4 Schematic diagram of a graph convolutional network in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0040] Example 1

[0041] Using deep learning algorithms for power anomaly detection can fully explore the potential value of data and solve many problems existing in traditional methods. Although deep learning algorithms require certain computing resources and model tuning experience, their reliability and efficiency are much higher than traditional methods. In addition, in the power monitoring system, anomaly detection is to detect whether the interaction between devices in the power monitoring system is abnormal behavior.

[0042] The method based on Graph Convolutional Network (GCN) is expected to show excellent performance in this task, and can accurately predict the probability of abnormality for the interaction of any power monitoring equipment. At the same time, this method is highly scalable. When a new device is added to the scene, the node only needs to use its own device information to calculate the similarity with the existing nodes in the scene, select the node with the highest similarity, and use its corresponding graph embedding parameters to form its own graph embedding and then integrate it into the scene. The overall anomaly detection method is still effective for it.

[0043] When training GCN to generate edge probabilities, since the input of GCN is structured data with time series characteristics, and in the power monitoring scenario, the data obtained is usually unstructured structured data, this data has the following disadvantages: 1) Lack of a well-defined structure: There are usually no well-defined fields and structures, and the format of log entries may vary depending on the application or system that records the event; 2) Difficult to interpret: Analyzing unstructured log data may require more data preprocessing and text analysis techniques to extract useful information and patterns. Therefore, more appropriate preprocessing operations are required to ensure that the input for graph embedding is log data with time series characteristics. However, power monitoring scenarios generally adopt extraction methods based on expert experience or prior knowledge, and the cost of switching scenarios is high. The present invention extracts time series information and patterns in the data through a long short-term memory (LSTM) network to form serialized log data, which is then used as the input of the graph embedding encoder to detect the abnormal probability of the interaction.

[0044] Reference Figure 1 ,This embodiment proposes a method for detecting abnormalities in a power monitoring system, which is divided into two steps, an offline training phase and an online detection phase. In the offline training phase, the unstructured log data is converted into structured time series data through LSTM for training GCN, generating edge probabilities, and obtaining a GCN model that can predict the access subject behavior in the power monitoring scenario. In the online detection phase, when interaction occurs between devices, the interactive log data is analyzed through LSTM to obtain time series structured data, and then the input is converted into edge probabilities through the codec, and then it is judged whether it is an abnormal behavior based on the edge probability.

[0045] In step S1, network flow log data in the power monitoring system is obtained and converted into structured data with time series characteristics.

[0046] The network flow log data contains the power monitoring system equipment and the interaction information between the equipment. The present invention uses the equipment as the point and the interaction between the equipment as the edge (related to time) to form a continuous dynamic time series graph. The unstructured log data is analyzed using LSTM to obtain structured data with time series characteristics.

[0047] First, use LSTM to process unstructured log data. First, through operations such as cleaning, parsing, and standardizing timestamps, time series data points are formed. Each data point corresponds to log information within a time window. Each time window corresponds to each time step of LSTM. Specifically, in the power monitoring system, power consumption data is recorded in the power company database in the form of logs. First, perform time series analysis on historical power load data to clean up duplicate and erroneous data. Then perform preprocessing to convert string format data into date and time objects. Finally, convert data with inconsistent time zones to a unified time zone. After the data is prepared, the load per hour is organized into a time series, where the time step represents the hour. This time series will be the input of the LSTM model. The LSTM model is used to learn the time series information and patterns of the data, and then output the time series features of each time window.

[0048] In step S2, according to the structured log data obtained by the operation in step S1, a dynamic graph construction method based on the interactive behavior of the network system is designed.

[0049] A dynamic graph can be represented as an ordered list or asynchronous "stream" of timed events, such as the addition or deletion of nodes and edges. In a network system, when an access subject registers a system account, a new node is created. When a subject accesses a service at a certain moment, an "interaction" edge is created at that moment. When the access subject changes its own information or interactive behavior, the node or edge will be updated. In the power monitoring system, the access subject refers to the equipment, people, operating system, application subject, etc. in the system, and the subject accessing the service means that an interaction has occurred between the subjects. The design idea of ​​the present invention is to extract interaction information from the log data of the device to generate a dynamic graph network. Since it is in the scenario of access control in the power monitoring scenario, the interaction information refers to whether there is interaction between node i and node j at time t. If there is interaction, an interaction edge is established. Figure 2 An example of a dynamic graph with 5 nodes and 7 interaction edges is shown.

[0050] In step S3, a graph embedding model is constructed and trained.

[0051] The graph embedding model includes an encoder and a decoder. The role of the encoder is to map the information of two nodes in the graph to node embeddings (low-dimensional vector representation), and the role of the decoder is to convert the node embeddings into relevant information about the edge between the two nodes (such as edge probability). In the present invention, GCN is selected as the encoder and the MLP function is used as the decoder. GCN aggregates the information of neighboring nodes to update its own representation, which is consistent with the power monitoring scenario (the credibility of power equipment, network data flow communication, memory overhead, etc. are all related to neighboring nodes); MLP connects the embeddings together and finally converts them into edge probabilities.

[0052] According to the above method of constructing dynamic graphs, the interaction-related information is extracted from the equipment log data and placed into the encoder of the GCN structure to generate time-related graph embedding to construct the dynamic graph, and then this embedding is fed into the decoder. The access subject and interactive service of the power monitoring system are evaluated in the following form: at time t, what is the probability that there is an abnormal edge between nodes i and j.

[0053] After the decoder obtains the edge probability, it calculates the loss (binary cross entropy loss function) by comparing it with the actual link status between the two nodes (if there is a link edge, it is represented as 1, otherwise it is 0) and then performs back propagation to optimize the encoder and decoder related parameters (weights, biases). This cycle is repeated until the loss is less than the threshold and converges, and the final graph embedding model is obtained.

[0054] While training the graph embedding model, a method for aggregating neighbor node information for updating the status of two interacting devices is also required. The present invention adopts a mean aggregation method to aggregate the neighbor node information of the two devices participating in the interaction and update their own information.

[0055] Reference Figure 3 , for a dynamic graph with seven visible edges (timestamps t1 to t7), the goal is to predict the future abnormal interaction between node 2 and node 4 at time t8 (gray edge t8). To this end, the temporal graph network calculates the embeddings of nodes 2 and 4 at time t8. These embeddings are then concatenated and fed into the multi-layer perceptron MLP to output the probability of the interaction occurring. The temporal graph network adjusts the edges of the GCN to time-related edges, that is, each edge carries time information. The temporal graph network encoder creates a compressed representation of the node based on its interaction, and uses the mean aggregation method to collect neighbor node information and update its own information when each event occurs.

[0056] Reference Figure 3 , GCN network usually contains graph information propagation layer and MLP. Suppose there is a graph structure with N nodes (node), and each node has its own features. Suppose the features of these nodes form an N×D-dimensional matrix X, and the relationship between each node will form an N×N-dimensional matrix A, called the adjacency matrix. X and A are the inputs of the model. In the power monitoring scenario, the feature is a feature matrix composed of device status or network flow size analyzed from log data, where each row corresponds to a node and each column corresponds to a feature. GCN is also a neural network layer, and the propagation method between its layers is:

[0057]

[0058] Among them: the input of the l-th layer network is H (l) (The initial input is H(0) =X), N is the number of nodes in the graph, and each node is represented by a D-dimensional feature vector. Figure 4 , the yellow part in the figure is the current layer l, and the blue part is the next layer l+1 after the GCN graph convolution network: In the process of feature propagation, each node in the graph needs to aggregate its own and neighbor information (taking node A as an example, it needs to aggregate itself and neighbor nodes BCDE, that is, the dotted line connection part), and then update it through an adjustable parameter w (the parameter vectors of all nodes in the figure are combined to form the parameter matrix W of the graph convolution of this layer), and finally generate the feature vector of the node in the next layer.

[0059] The parameters are described as follows:

[0060] A is the adjacency matrix of the graph, which contains only 1 or 0, and its diagonal elements are all 0; I is the identity matrix, It is equivalent to the adjacency matrix of the undirected graph G plus self-connection (that is, each vertex adds an edge to itself). The advantage of this processing is that the graph convolutional network layer can not only aggregate messages from other nodes when aggregating messages, but also aggregate messages from the node itself.

[0061] D is the degree (out-degree / in-degree) matrix. In an undirected graph, the degree of a node is the number of edges connecting the node. It is a diagonal matrix, and the element value on the diagonal is the degree of the node + 1.

[0062] H (l) is the feature of each layer, that is, the feature representation of the node.

[0063] W (l) is the weight matrix of the lth layer, with dimension F i ×F i+1 , that is, the size of the second dimension of the weight matrix determines the number of features of the next layer.

[0064] σ(·) is a nonlinear activation function, such as Sigmoid, ReLu, etc.

[0065] f(H (l) ,A) is the output of this layer and is also the input of the next layer in multi-layer GCN.

[0066] It is called: symmetric normalized Laplace matrix. The Laplace matrix is ​​a symmetric matrix that can be characterized by decomposition (spectral decomposition). The specific formula is as follows:

[0067]

[0068] Taking a two-layer GCN for class edge probability generation as an example, the activation functions are ReLU and Softmax respectively. The specific training process is as follows:

[0069] First, obtain the feature representation X of the node and calculate the symmetric normalized Laplacian matrix:

[0070]

[0071] Then, it is input into a two-layer GCN network to obtain the prediction results of each edge probability:

[0072]

[0073] in, is the weight matrix of the first layer, which is used to map the feature representation of the node to the corresponding hidden layer state. is the weight matrix of the second layer, which is used to map the hidden layer representation of the node to the corresponding output (F corresponds to the number of node labels). Finally, the representation of each node is passed through a softmax function to obtain the prediction result of each label.

[0074] For edge probability generation problems, the expected cross entropy on all labeled nodes can be used as the loss function for back propagation to update model parameters. The cross entropy loss function is defined as follows:

[0075]

[0076] Among them, y L Represents a labeled node-set.

[0077] In step S4, abnormal behavior detection is performed using the trained model.

[0078] When two devices in the power monitoring system interact, LSTM is first used to perform structured analysis on the interaction log data to obtain time series features, which are then placed into the trained graph embedding model. The encoder first calculates the embedding of each of the two nodes, and then the decoder obtains the edge probability between the two devices. If this edge probability is less than the set threshold, the interaction is considered abnormal behavior, otherwise it is normal behavior. At the same time, the two parties in the interaction use the mean aggregation method to update their own information.

[0079] Example 2

[0080] Based on the same technical concept as the method embodiment, this embodiment provides a power monitoring system main body abnormality detection device, including:

[0081] The data acquisition and preprocessing module acquires the network flow log data in the power monitoring system, performs time series analysis on the network flow log data, and converts it into structured data with time series characteristics;

[0082] A graph construction module builds a graph structure based on structured log data, where the access subjects in the power monitoring system constitute nodes and the interaction behaviors between the access subjects constitute edges;

[0083] The feature extraction module obtains the feature matrix X and the adjacency matrix A according to the graph structure. For a graph structure with N nodes and each node having D-dimensional features, its feature matrix X is an N×D-dimensional matrix, and the relationship between the nodes forms an N×N-dimensional adjacency matrix A;

[0084] The model training module inputs the feature matrix X and the adjacency matrix A into the graph neural network model, trains the graph neural network model, and obtains a graph neural network model that can predict the access subject behavior in the power monitoring scenario;

[0085] The anomaly detection module uses the trained graph neural network model to determine the edge probability based on the interactive behavior that the access subject currently needs to perform, and determines whether it is an abnormal behavior based on the edge probability.

[0086] Among them, time series analysis of network flow log data and conversion of it into structured data with time series characteristics include:

[0087] By cleaning up duplicate and erroneous data, parsing the time format, and standardizing timestamp operations to form time series data points, each data point corresponds to the log information in a time window, and each time window is corresponded to each time step of the long short-term memory network LSTM. LSTM is used to learn the timing information and pattern of the data, and the timing features of each time window are output.

[0088] Furthermore, the graph neural network model includes an encoder and a decoder, wherein the encoder uses a graph convolutional network to map the information of two nodes in the graph to node embeddings, and the decoder uses a multi-layer perceptron to convert the node embeddings into relevant information of the edge between the two nodes;

[0089] Training the graph neural network model includes: using the encoder to obtain the feature map of the nodes of the two interacting parties as node embeddings, using the decoder to convert the node embeddings into variable probabilities between the two nodes, and after obtaining the edge probability, comparing it with the actual connection situation between the two nodes, calculating the loss function, and then performing back propagation to optimize the relevant parameters of the encoder and decoder, and repeating this cycle until the loss function value is less than the specified threshold or reaches the predetermined number of cycles.

[0090] Furthermore, the propagation mode between the information propagation layers of the graph convolutional network is as follows:

[0091]

[0092] Where: H (l) is the input feature of the l-th layer network, f(H (l) ,A) is the output of the lth layer and is also the input of the next layer. represents the adjacency matrix that aggregates the node's own messages, Among them I N is the N×N dimensional identity matrix, is a diagonal matrix, and the element value on the diagonal is the degree of the node + 1. is the symmetric normalized Laplacian matrix, W (l) It represents the parameter matrix of the l-th layer network graph convolution formed by the combination of parameter vectors of all nodes in the graph, and σ(·) is the nonlinear activation function.

[0093] Furthermore, the loss function adopts a binary cross entropy loss function.

[0094] Furthermore, training the graph neural network model also includes: using the mean aggregation method to aggregate the information of neighboring nodes of the two nodes participating in the interaction and update their own information.

[0095] Furthermore, based on the interactive behavior that the access subject currently needs to perform, the graph neural network determines its edge probability, including: using LSTM to perform structured analysis on the access subject's interaction log data to obtain time series features, inputting the time series features into the trained graph neural network model, calculating the embedding of each of the two nodes through the encoder, and then obtaining the edge probability between the two nodes through the decoder.

[0096] It should be understood that the power monitoring system main body abnormality detection device in the embodiment of the present invention can implement all the technical solutions in the above method embodiment. Some specific implementation processes that are not described in detail can refer to the relevant descriptions in the above embodiments and will not be repeated here.

[0097] Example 3

[0098] This embodiment provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for detecting abnormalities in the main body of the power monitoring system as described in the present invention are implemented.

[0099] Example 4

[0100] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for detecting abnormality of a main body of a power monitoring system as described in the present invention are implemented.

[0101] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices (systems), computer equipment or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0102] The present invention is described with reference to a flowchart of a method according to an embodiment of the present invention. It should be understood that each process in the flowchart and a combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.

[0103] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.

[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

Claims

1. A method for detecting abnormality of a power monitoring system, characterized in that: The following steps are involved: Obtain network flow log data in the power monitoring system, perform time series analysis on the network flow log data, and convert it into structured data with time series characteristics; A graph structure is established based on structured log data, in which the access subjects in the power monitoring system constitute nodes and the interaction behaviors between the access subjects constitute edges; Obtain the feature matrix X and adjacency matrix A according to the graph structure. For a graph structure with N nodes and each node having D-dimensional features, its feature matrix X is an N×D-dimensional matrix, and the relationship between nodes forms an N×N-dimensional adjacency matrix A; Input the feature matrix X and the adjacency matrix A into the graph neural network model, train the graph neural network model, and obtain a graph neural network model that can predict the access subject behavior in the power monitoring scenario. The graph neural network model includes an encoder and a decoder. The encoder is used to map the information of two nodes in the graph to node embeddings, and the decoder is used to convert the node embeddings into relevant information of the edge between the two nodes. Using the trained graph neural network model, the graph neural network determines the edge probability according to the interactive behavior that the access subject currently needs to perform, and judges whether it is an abnormal behavior based on the edge probability. Specifically, the encoder first calculates the embedding of each of the two nodes, and then the decoder obtains the edge probability between the two devices. If this edge probability is less than the set threshold, the interaction is considered to be abnormal behavior, otherwise it is normal behavior.

2. The method according to claim 1, characterized in that: Time series analysis of network flow log data and conversion of it into structured data with time series characteristics include: By cleaning up duplicate and erroneous data, parsing the time format, and standardizing timestamp operations to form time series data points, each data point corresponds to the log information in a time window, and each time window is corresponded to each time step of the long short-term memory network LSTM. LSTM is used to learn the timing information and pattern of the data, and the timing features of each time window are output.

3. The method according to claim 1, characterized in that The encoder adopts a graph convolutional network, and the decoder adopts a multi-layer perceptron; Training the graph neural network model includes: using the encoder to obtain the feature map of the nodes of the interacting parties as node embeddings, using the decoder to convert the node embeddings into variable probabilities between the two nodes, and after obtaining the edge probability, comparing it with the actual connection situation between the two nodes, calculating the loss function, and then performing back propagation to optimize the relevant parameters of the encoder and decoder, and repeating this cycle until the loss function value is less than the specified threshold or reaches a predetermined number of cycles.

4. The method according to claim 3, characterized in that: The information propagation mode between the information propagation layers of the graph convolutional network is as follows: Where: H (l) is the input feature of the l-th layer network, f(H (l) ,A) is the output of the lth layer and is also the input of the next layer. represents the adjacency matrix that aggregates the node's own messages, Among them I N is the N×N dimensional identity matrix, is a diagonal matrix, and the element value on the diagonal is the degree of the node + 1. is the symmetric normalized Laplacian matrix, W (l) It represents the parameter matrix of the l-th layer network graph convolution formed by the combination of parameter vectors of all nodes in the graph, and σ(·) is the nonlinear activation function.

5. The method according to claim 3, characterized in that: The loss function adopts a binary cross entropy loss function.

6. The method according to claim 5, characterized in that Training the graph neural network model also includes: using the mean aggregation method to aggregate the information of neighboring nodes of the two nodes participating in the interaction and update their own information.

7. The method according to claim 6, characterized in that According to the interactive behavior that the access subject currently needs to perform, the graph neural network determines its edge probability, including: using LSTM to perform structured analysis on the access subject's interaction log data to obtain time series features, inputting the time series features into the trained graph neural network model, calculating the embedding of each of the two nodes through the encoder, and then obtaining the edge probability between the two nodes through the decoder.

8. A device for detecting abnormality of a main body of an electric power monitoring system, characterized in that: include: The data acquisition and preprocessing module acquires the network flow log data in the power monitoring system, performs time series analysis on the network flow log data, and converts it into structured data with time series characteristics; A graph construction module builds a graph structure based on structured log data, where the access subjects in the power monitoring system constitute nodes and the interaction behaviors between the access subjects constitute edges; The feature extraction module obtains the feature matrix X and the adjacency matrix A according to the graph structure. For a graph structure with N nodes and each node having D-dimensional features, its feature matrix X is an N×D-dimensional matrix, and the relationship between the nodes forms an N×N-dimensional adjacency matrix A; The model training module inputs the feature matrix X and the adjacency matrix A into the graph neural network model, trains the graph neural network model, and obtains a graph neural network model that can predict the access subject behavior in the power monitoring scenario. The graph neural network model includes an encoder and a decoder. The encoder is used to map the information of two nodes in the graph to node embeddings, and the decoder is used to convert the node embeddings into the relevant information of the edge between the two nodes. The anomaly detection module uses the trained graph neural network model to determine the edge probability based on the interactive behavior that the access subject currently needs to perform, and then determines whether it is an abnormal behavior based on the edge probability. Specifically, the encoder first calculates the embedding of each of the two nodes, and then the decoder obtains the edge probability between the two devices. If this edge probability is less than the set threshold, the interaction is considered to be an abnormal behavior, otherwise it is a normal behavior.

9. A computer device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for detecting abnormalities in the main body of the power monitoring system as described in any one of claims 1-7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting abnormality of a main body of an electric power monitoring system as described in any one of claims 1 to 7 are implemented.