Power backbone transmission network fault diagnosis method and system based on knowledge graph
By building a fault and alarm knowledge graph and combining a graph neural network, using a gated graph neural network and attention mechanism, the application efficiency and accuracy problems of traditional graph neural networks in knowledge graph scenarios are solved, efficient fault diagnosis is achieved, and improved Fault identification capability of power backbone transmission network.
Patent Information
- Application Number
- CN202411197869.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
AI Technical Summary
Traditional graph neural networks cannot effectively distinguish different types of edges when processing knowledge graphs, resulting in the inability to fully extract and discover complex features in graph structure data, and cannot meet the high-precision and high-efficiency fault identification requirements.
Build a fault and alarm knowledge graph, combine the graph neural network, and build a fault inference model through alarm vectorization, gated graph neural network and attention mechanism to optimize the model to achieve efficient fault diagnosis.
It significantly improves the accuracy and efficiency of fault diagnosis, can quickly locate the root cause of faults, reduce the burden on operation and maintenance personnel, reduce the risks of misjudgment and misjudgment, and improve the intelligence level of operation and maintenance processes.
Smart Images

Figure CN119172221A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power communication fault diagnosis, and relates to a power backbone transmission network fault diagnosis method and system based on knowledge graph. Background Art
[0002] With the rapid development of information technology, the scale and complexity of network systems are increasing, and network fault diagnosis has become an important task to ensure the stable operation of the system. The main goal of network fault diagnosis is to determine the root cause of the error by examining the relationship between network alarm data. However, with the expansion of network scale and the exponential growth of alarm data, traditional fault identification methods have been unable to meet actual needs. In particular, the complexity of alarm correlation information, including the relationship between various alarms and defects and the relationship between alarms themselves, has brought great challenges to current fault identification solutions.
[0003] Existing network fault diagnosis methods mainly include rule reasoning, neural networks, fuzzy logic, and association rule mining. These methods have their own advantages and disadvantages, but when dealing with fault identification of large-scale and complex networks, they often have problems such as low efficiency, low accuracy, or limited interpretability. For example, the rule reasoning method relies on expert experience, but the maintenance cost of the rule base is high and it is difficult to adapt to the rapid changes of large-scale networks; although the neural network method can learn fault modes from historical data, it requires a large amount of data and long-term training, and the interpretability of fault processing is insufficient.
[0004] In order to overcome these challenges, knowledge graphs, as a structured representation method, have gradually attracted attention because they can support graph-based reasoning and adapt to the complexity of network alarm associations. Knowledge graphs are designed to describe concepts, entities, events, and the relationships between them in the objective world, and are the core foundation for building the next generation of intelligent search engines. It effectively integrates and manages knowledge in various fields in the form of a graphical knowledge base, allowing machines to better understand and process complex information.
[0005] However, traditional graph neural networks (GNNs) face some limitations when processing knowledge graphs. Due to the diverse types of relationships (edges) in knowledge graphs, traditional GNNs cannot effectively distinguish different types of edges, and thus cannot fully extract and explore the complex features in graph structured data. This limits the application of GNNs in knowledge graph scenarios and cannot meet the needs of high-precision and high-efficiency fault identification. Summary of the invention
[0006] The purpose of the present invention is to solve the problem that the application of graph neural networks in the knowledge graph scenario in the prior art cannot meet the needs of high-precision and high-efficiency fault identification, and to provide a power backbone transmission network fault diagnosis method and system based on knowledge graph.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] A method for fault diagnosis of a power backbone transmission network based on a knowledge graph comprises the following steps:
[0009] Construct a fault and alarm knowledge graph, collect historical fault data, alarm information and network topology data of the power backbone transmission network, and construct a fault and alarm knowledge graph through entity recognition, relationship extraction and attribute filling technology;
[0010] Model construction: through alarm vectorization, model construction combining knowledge graph and graph neural network, construction and optimization of fault reasoning model, a fault diagnosis algorithm model based on knowledge graph is constructed and network fault diagnosis is performed;
[0011] Simulation environment construction and experiments: According to the actual operation of the power backbone transmission network, a corresponding simulation environment is built. In the simulation environment, alarm inputs under different scenarios are simulated, and fault reasoning is performed using the built model;
[0012] Result Verification and Analysis,Based on the results of simulation experiments, the effectiveness and,accuracy of the model in fault diagnosis are verified.
[0013] The construction of the fault and alarm knowledge graph is specifically carried out through the following steps:
[0014] Data collection: Data is collected in three ways, including obtaining historical alarm information from the network management database, obtaining detailed information on equipment maintenance, troubleshooting, and repair processes from equipment commercial manual maintenance data, and obtaining key information on network equipment relationships from the network topology and operation and maintenance platform;
[0015] Data preprocessing: preprocessing operations on the collected data;
[0016] Ontology construction: Based on the preprocessed data, the correlation between faults and alarms is analyzed to build the ontology of the knowledge graph. The ontology defines two nodes, alarm and fault, as well as the cause and derivative relationships between them, to form a complete knowledge graph structure framework.
[0017] Knowledge extraction: extracting the correlation information between alarms and faults from the preprocessed data, including alarm type, fault type, and the causal relationship between alarms and faults;
[0018] Knowledge fusion: integrate and verify the extracted knowledge information, eliminate redundancy and contradictions, and form a knowledge system;
[0019] Data storage and representation,Neo4j graph database is selected as the storage medium, and the constructed fault and alarm knowledge graph is stored in the Neo4j database.
[0020] The model is constructed by the following steps:
[0021] Alarm vectorization and feature representation, collect alarm data from various platforms to determine the initial state h of each node in the knowledge graph v , and perform redundancy preprocessing, vectorize each alarm node in the knowledge graph, and use one-hot encoding to generate the input feature x of the reported alarm node v , nodes that do not report alarms are represented by n-dimensional zero vectors;
[0022] The GGNN model is used to learn the representation of the feature vector of the alarm set on the knowledge graph. The knowledge graph and the graph neural network model are combined to build a model. The gated graph neural network model is used to learn the representation of the feature vector of the alarm set on the knowledge graph in combination with the fault and alarm knowledge graph. In the gated graph neural network model, the information transmission between nodes is processed according to the different relationship types in the knowledge graph, and the gating mechanism is used to control the flow and screening of information. The attention mechanism is introduced in the model output processing. The attention coefficients of the root cause node and the alarm node are calculated, and the weighted splicing is performed to form the final output tensor.
[0023] Construction and optimization of the fault reasoning model. Based on the output of the gated graph neural network model, a classifier is set to infer the output tensor and calculate the probability of each fault node to determine the possible fault nodes. The cross entropy loss function is used as the optimization target to train the model to minimize the difference between the predicted output and the true label. The optimal model parameters during the training process are saved.
[0024] The input feature x of the alarm node v , the specific initialization is shown in formula (1):
[0025]
[0026] Where n is the number of nodes.
[0027] The GGNN model is used to learn the representation of the feature vector of the alarm set on the knowledge graph, specifically:
[0028] Construct a knowledge graph G = (V, E) containing fault and alarm nodes and their relationships, where V is a node set, E is an edge set, each node v∈V stores a D-dimensional vector, and each edge e∈E stores a D×D-dimensional matrix;
[0029] The GGNN model is used to perform representation learning on the knowledge graph. Through the message passing mechanism and gating mechanism of the GGNN model, in each iteration, the feature information of the neighbor nodes and the edge information are aggregated to the current node according to the type and direction of the edge to update the hidden state of the node; specifically:
[0030] In the node initialization step, the node annotation is copied to the first part of the hidden state and the rest is filled with zeros, as shown in Equation (2):
[0031] h v =[x v ,0] T (2)
[0032]
[0033] in, are the two columns of the corresponding nodes in the adjacency matrix A of the fault and alarm knowledge graph, It is the vector formed by fusing all node features at time t-1; considering the bidirectional transmission of information, the final information propagation result of node v in the knowledge graph is obtained
[0034] The calculation process of the GRU unit:
[0035]
[0036] in, Control whether to forget the information. Controls whether new information is generated. is the hidden state at the next moment, is the final hidden state. By updating the gate and resetting the gate, the node obtains the final state.
[0037] The output o of each node v :
[0038]
[0039] in, To process the final state and input features of the node, the output of each node is obtained;
[0040] In the output processing of the GGNN model, the attention mechanism is introduced to extract the representation of the root cause node and the alarm node from the hidden state, and the attention coefficients of the root cause node and the alarm node are calculated through at least two linear layers; the attention coefficient is multiplied by the mask to filter and retain the relevant information of the alarm node and ignore the information of the non-alarm node; the output of the root cause node and the output of the alarm node weighted by the attention mechanism are spliced together to form the final output tensor.
[0041] The classifier performs reasoning on the output tensor, and the specific implementation of the classifier is:
[0042] Random dropout layer Dropout1:
[0043] D(x)=x⊙Bernoulli(p)(9)
[0044] Where x is the input vector, Bernoulli(p) is a random vector of the same dimension as x, whose elements are independently drawn from a Bernoulli distribution parameterized by probability p;
[0045] The first linear transformation layer Linear1:
[0046] L1(x)=Wx+b(10)
[0047] Among them, x is the output of the inactivation layer, W is the weight matrix, and b is the bias matrix;
[0048] ReLU activation function layer:
[0049] R(x)=max(0,x)(11)
[0050] The random dropout layer Dropout2 is used again, using formula (9);
[0051] The second linear transformation layer Linear2:
[0052] L2(x)=Wx+b(12)
[0053] Combining these levels, the resulting classifier is formulated as follows:
[0054] C(x)=L2(D2(R(L1(D1(x))))))(13)
[0055] The cross entropy loss function of formula (14) is used to optimize the model:
[0056]
[0057] Among them, y i is the true label, x i is the output label.
[0058] The simulation environment construction and experiment are specifically as follows:
[0059] Virtual environment setup, configure and run the model in the conda virtual environment;
[0060] Knowledge graph construction: construct a knowledge graph containing several nodes. The knowledge graph is used to represent and store entities and their relationships related to fault location.
[0061] Dataset preparation:
[0062] Data collection: collecting fault-related data from historical alarm data of the network topology;
[0063] Data processing: pre-processing the collected alarm data;
[0064] Data set partitioning: divide the preprocessed data into training set and test set;
[0065] Data set format definition: The data set is stored in a text file in a specific format. Each line of data represents a fault scenario, including a fault node code and multiple alarm data codes.
[0066] Data vectorization uses one-hot encoding method to vectorize the alarm data for easy model input and calculation.
[0067] A knowledge graph-based power backbone transmission network fault diagnosis system includes the following modules:
[0068] The knowledge graph construction module is used to collect historical fault data, alarm information and network topology data of the power backbone transmission network, and build a knowledge graph containing fault and alarm information through entity recognition, relationship extraction and attribute filling technology;
[0069] A model building module, which further comprises:
[0070] Alarm vectorization unit, used to convert alarm data into feature vectors of nodes in the knowledge graph;
[0071] The graph neural network processing unit combines the knowledge graph with the graph neural network to learn the representation of the feature vector of the alarm set, processes the multilateral relations in the knowledge graph through the message passing mechanism and the gating mechanism, and updates the hidden state of the node;
[0072] The fault reasoning model construction and optimization unit builds a fault reasoning model based on the output of the graph neural network, uses the attention mechanism to extract key node information, and classifies or predicts faults through classifiers or regressors, while supporting hyperparameter tuning and verification of the model;
[0073] The simulation environment construction and experiment module is used to build a simulation environment according to the actual operation of the power backbone transmission network, simulate alarm inputs in different scenarios, and use the built model to conduct fault reasoning experiments;
[0074] The result verification and analysis module is used to collect the results of simulation experiments and evaluate the effectiveness and accuracy of the model in fault diagnosis.
[0075] A device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method as described in any one of the preceding items when executing the computer program.
[0076] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the preceding items.
[0077] Compared with the prior art, the present invention has the following beneficial effects:
[0078] The knowledge graph-based power backbone transmission network fault diagnosis method of the present invention can systematically integrate the historical fault data, alarm information and network topology data of the power backbone transmission network by constructing a fault and alarm knowledge graph to form a rich knowledge base. Combined with the powerful information aggregation and representation learning capabilities of the graph neural network, the model can more accurately capture the correlation between alarms and the propagation path of the fault, thereby quickly locating the root cause of the fault and significantly improving the accuracy and efficiency of fault diagnosis.
[0079] By using advanced machine learning technology, especially graph neural networks, the automatic reasoning process from alarm to fault is realized. This not only reduces the burden on operation and maintenance personnel, but also reduces the risk of misjudgment and missed judgment caused by human factors, and improves the intelligence level of the entire operation and maintenance process.
[0080] The power backbone transmission network usually has a complex topology and diverse equipment types. By constructing a knowledge graph, these complex relationships can be flexibly represented, and combined with the characteristics of graph neural networks, large-scale, multi-level graph data can be effectively processed, providing strong support for fault diagnosis in complex network environments.
[0081] Through timely fault diagnosis and location, it is possible to quickly respond to abnormal conditions in the network and reduce the impact of faults on power transmission. At the same time, based on the analysis and learning of historical data, the model can also predict potential fault risks, provide decision-making basis for preventive maintenance, and further improve the reliability and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0083] Figure 1 Constructing a flow chart for the knowledge graph of the present invention;
[0084] Figure 2 This is a network topology diagram of an educational network;
[0085] Figure 3 This is an example diagram of fault and alarm data of the present invention;
[0086] Figure 4 It is a schematic diagram of the knowledge graph ontology;
[0087] Figure 5 It is a schematic diagram of the knowledge graph database;
[0088] Figure 6 This is a schematic diagram of knowledge graph adjacency matrix processing;
[0089] Figure 7 This is a diagram of the data set format;
[0090] Figure 8 The results of running the model;
[0091] Fig. 9 It is a line chart of model accuracy;
[0092] Fig.10 It is a line chart of model loss value;
[0093] Fig.11 This is a graph showing how model performance changes with node size. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0095] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0096] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0097] A method for diagnosing faults in a power backbone transmission network based on a knowledge graph in the present invention comprises the following steps:
[0098] S1, build a fault and alarm knowledge graph, collect historical fault data, alarm information and network topology data of the power backbone transmission network, and build a fault and alarm knowledge graph through entity recognition, relationship extraction and attribute filling technology.
[0099] S1.1, data collection, collects data in three ways, including obtaining historical alarm information from the network management database, obtaining detailed information on equipment maintenance, troubleshooting, and repair processes from equipment commercial manual maintenance data, and obtaining key information on network equipment relationships from the network topology and operation and maintenance platform;
[0100] S1.2, data preprocessing, preprocessing operations on the collected data;
[0101] S1.3, ontology construction, based on the preprocessed data, analyze the correlation between faults and alarms, and build the ontology of the knowledge graph. The ontology defines two nodes, alarm and fault, as well as the two relationships between them, causing and deriving, to form a complete knowledge graph structure framework;
[0102] S1.4, knowledge extraction, extracts the correlation information between alarms and faults from the preprocessed data, including alarm type, fault type, and causal relationship between alarms and faults;
[0103] S1.5, knowledge fusion, integrates and verifies the extracted knowledge information, eliminates redundancy and contradictions, and forms a knowledge system;
[0104] S1.6, data storage and representation, select Neo4j graph database as the storage medium, and store the constructed fault and alarm knowledge graph in the Neo4j database.
[0105] S2, model construction, through alarm vectorization, model construction combining knowledge graph and graph neural network, construction and optimization of fault reasoning model, build a fault diagnosis algorithm model based on knowledge graph and perform network fault diagnosis.
[0106] S2.1, Alarm vectorization and feature representation, collect alarm data from various platforms to determine the initial state h of each node in the knowledge graph v , and perform redundancy preprocessing, vectorize each alarm node in the knowledge graph, and use one-hot encoding to generate the input feature x of the reported alarm node v , nodes that do not report alarms are represented by n-dimensional zero vectors;
[0107] The input features of the alarm node are specifically initialized as shown in formula (1):
[0108]
[0109] Where n is the number of nodes.
[0110] S2.2, the GGNN model is used to learn the representation of the feature vector of the alarm set on the knowledge graph, and the model of the knowledge graph and the graph neural network is built. The gated graph neural network model is used to learn the representation of the feature vector of the alarm set on the knowledge graph in combination with the fault and alarm knowledge graph; in the gated graph neural network model, according to the different relationship types in the knowledge graph, the information transmission between nodes is processed, and the gating mechanism is used to control the flow and screening of information; the attention mechanism is introduced in the model output processing, and the attention coefficients of the root cause nodes and the alarm nodes are calculated, and the weighted concatenation is performed to form the final output tensor.
[0111] Construct a knowledge graph G = (V, E) containing fault and alarm nodes and their relationships, where V is a node set, E is an edge set, each node v∈V stores a D-dimensional vector, and each edge e∈E stores a D×D-dimensional matrix;
[0112] The GGNN model is used to perform representation learning on the knowledge graph. Through the message passing mechanism and gating mechanism of the GGNN model, in each iteration, the feature information of the neighbor nodes and the edge information are aggregated to the current node according to the type and direction of the edge to update the hidden state of the node; specifically:
[0113] In the node initialization step, the node annotation is copied to the first part of the hidden state and the rest is filled with zeros, as shown in Equation (2):
[0114] h v =[x v ,0] T (2)
[0115]
[0116] in, are the two columns of the corresponding nodes in the adjacency matrix A of the fault and alarm knowledge graph, It is the vector formed by fusing all node features at time t-1; considering the bidirectional transmission of information, the final information propagation result of node v in the knowledge graph is obtained
[0117] The calculation process of the GRU unit:
[0118]
[0119] in, Control whether to forget the information. Controls whether new information is generated. is the hidden state at the next moment, is the final hidden state. By updating the gate and resetting the gate, the node obtains the final state.
[0120] The output o of each node v :
[0121]
[0122] in, To process the final state and input features of the node, the output of each node is obtained;
[0123] In the output processing of the GGNN model, the attention mechanism is introduced to extract the representation of the root cause node and the alarm node from the hidden state, and the attention coefficients of the root cause node and the alarm node are calculated through at least two linear layers; the attention coefficient is multiplied by the mask to filter and retain the relevant information of the alarm node and ignore the information of the non-alarm node; the output of the root cause node and the output of the alarm node weighted by the attention mechanism are spliced together to form the final output tensor.
[0124] S2.3, construction and optimization of the fault reasoning model. Based on the output of the gated graph neural network model, a classifier is set to infer the output tensor and calculate the probability of each fault node to determine the possible fault nodes. The cross entropy loss function is used as the optimization target to train the model to minimize the difference between the predicted output and the true label. The optimal model parameters during the training process are saved.
[0125] The classifier performs reasoning on the output tensor, and the specific implementation of the classifier is:
[0126] Random dropout layer Dropout1:
[0127] D(x)=x⊙Bernoulli(p)(9)
[0128] Where x is the input vector, Bernoulli(p) is a random vector of the same dimension as x, whose elements are independently drawn from a Bernoulli distribution parameterized by probability p;
[0129] The first linear transformation layer Linear1:
[0130] L1(x)=Wx+b(10)
[0131] Among them, x is the output of the inactivation layer, W is the weight matrix, and b is the bias matrix;
[0132] ReLU activation function layer:
[0133] R(x)=max(0,x)(11)
[0134] The random dropout layer Dropout2 is used again, using formula (9);
[0135] The second linear transformation layer Linear2:
[0136] L2(x)=Wx+b(12)
[0137] Combining these levels, the resulting classifier is formulated as follows:
[0138] C(x)=L2(D2(R(L1(D1(x))))))(13)
[0139] The cross entropy loss function of formula (14) is used to optimize the model:
[0140]
[0141] Among them, y i is the true label, x i is the output label.
[0142] S3, simulation environment construction and experiments, build the corresponding simulation environment according to the actual operation of the power backbone transmission network. In the simulation environment, simulate the alarm input under different scenarios and use the constructed model to perform fault reasoning.
[0143] S3.1, virtual environment setup, configure and run the model in the conda virtual environment;
[0144] S3.2, knowledge graph construction, constructing a knowledge graph containing several nodes, the knowledge graph is used to represent and store entities and their relationships related to fault location;
[0145] S3.3, Dataset preparation:
[0146] Data collection: collecting fault-related data from historical alarm data of the network topology;
[0147] Data processing: pre-processing the collected alarm data;
[0148] Data set partitioning: divide the preprocessed data into training set and test set;
[0149] Data set format definition: The data set is stored in a text file in a specific format. Each line of data represents a fault scenario, including a fault node code and multiple alarm data codes.
[0150] S3.4, data vectorization, uses one-hot encoding method to vectorize the alarm data to facilitate model input and calculation.
[0151] S4, result verification and analysis, based on the results of the simulation experiment, verify the effectiveness and accuracy of the model in fault diagnosis.
[0152] Example
[0153] The power backbone transmission network fault diagnosis method of the present invention comprises the following specific steps: obtaining a fault and alarm knowledge graph according to (1), constructing a model in (2) using Python, performing reasoning based on the model, implementing a simulation environment in (3) to complete the model experiment, and obtaining the result in (4).
[0154] (1) Construction of fault and alarm knowledge graph
[0155] In order to analyze the historical network alarm information, the relationship between faults and alarms, the relationship between alarms and alarms, etc. is obtained through data preprocessing, ontology construction, knowledge extraction, and knowledge fusion. The Neo4j database is selected to store the fault and alarm knowledge graph and represent the knowledge graph to obtain the fault and alarm knowledge graph. The construction flow chart is as follows: Figure 1 shown.
[0156] First of all, there are three main ways to collect alarm data. The first is to obtain a large amount of historical alarm information from the network management database NMDB. This information is an important basis for building a fault and alarm knowledge graph. The second is to collect equipment commercial manual maintenance data. The operator's commercial manual usually contains detailed information such as equipment maintenance, troubleshooting, and maintenance procedures. The manual can be obtained by visiting the operator's official website. On the official website, you can also get more network equipment information from communities, forums, manufacturer documents, etc., such as router configuration and status data, system maintenance data, etc. These data are the basis for subsequent knowledge graph construction. The third is to obtain historical alarm information from the network topology. Here, the network topology of a certain education network is used to obtain important information such as network equipment relationships from the operation and maintenance platform. Examples of network topology and collected and preprocessed data are as follows: Figure 2 and Figure 3 shown.
[0157] Secondly, after collecting and analyzing the data, it was found that the correlation between faults and alarm information was very obvious. Considering the accuracy of the knowledge graph, the ontology of the knowledge graph was directly constructed by analyzing the correlation between alarm information and faults, ensuring that the subsequent construction of the knowledge graph can be more efficient and accurate. Figure 4As shown in the figure, it contains two nodes (entities) of alarm and fault, as well as two relationships of cause and derive. Alarm nodes are divided into two types: root alarm node r-alarm and derived alarm node d-alarm. Fault nodes will cause the generation of root alarm information, and the root alarm information will derive more derived alarm information, and derived alarm information can also derive other derived alarm information.
[0158] Finally, after simple knowledge extraction and fusion of the data, the data needs to be stored and represented. The Neo4j database is selected to store the fault and alarm knowledge graph and represent the knowledge graph. As a type of graph database, the Neo4j database can handle large-scale graph data, easily store and query large amounts of nodes and relationships, and in the graph database, the relationship itself is part of the data structure, so there is no need to maintain the relationship through complex intermediate tables. In addition, Neo4j is an open source project with rich community documentation and a complete system. Knowledge graph databases such as Figure 5 shown.
[0159] (2) Fault diagnosis model construction
[0160] Based on the knowledge graph that has been constructed, a fault diagnosis solution combining knowledge graph and graph neural network is proposed. The fault diagnosis algorithm model based on knowledge graph is constructed and network fault diagnosis is performed mainly through three steps: alarm vectorization, model construction combining knowledge graph and graph neural network, and construction and optimization of fault reasoning model:
[0161] (2.1) Alarm vectorization and feature representation
[0162] In the initial alarm presentation stage, the initial state h of each node in the knowledge graph needs to be determined based on the alarm data collected from various platforms. v After preprocessing the alarm data such as deduplication, the next step is to vectorize the features of each node. The input features of each alarm node are generated using one-hot encoding. For the unreported alarm nodes, n-dimensional vectors are used to represent them, where n is the number of nodes. The specific initialization formula is shown in formula (1).
[0163] (2.2) Model construction combining knowledge graph and graph neural network
[0164] In the knowledge graph representation learning stage, since the knowledge graph has more than one relationship (edge), the traditional GNN cannot distinguish different edges and cannot perform representation learning on multi-edge graph data, so it cannot be directly applied to the knowledge graph scenario. The gating mechanism of GGNN borrowed from GRU can solve this problem. Therefore, the GGNN model is used to perform representation learning of the feature vector of the alarm set on the knowledge graph.
[0165] The first thing to achieve is the combination of GGNN and knowledge graph. As mentioned above, there are two types of relationships in the fault and alarm knowledge graph: cause and derivative. So, for the knowledge graph G = (V, E), the node v∈V stores a D-dimensional vector, and the edge e∈E stores a D×D-dimensional matrix. The specific processing is as follows: Figure 6 The left side of the figure is a legend. The solid line and the dotted line are two different edges, corresponding to B and C respectively. The B' and C' on the right side correspond to the reverse edges of B and C. The matrix A concatenates the out matrix and the in matrix, and is a D|v|×2D|v|-dimensional matrix. The matrix A is what the subsequent GGNN model needs to process.
[0166] Representation learning is performed through the message passing mechanism of GGNN. In each iteration, each node receives messages from its neighbor nodes (feature information of neighbor nodes and edge information) and aggregates these messages. In the aggregation process, GGNN uses a gating mechanism to control the flow and screening of information. The specific representation learning is shown in formulas (2)-(3). Formula (2) is the node initialization step, which copies the node annotation to the first part of the hidden state and fills the rest with zeros. In formula (3), are the two columns of the corresponding nodes in the adjacency matrix A of the fault and alarm knowledge graph, and the following It is a vector formed by fusing all node features at time t-1. It depends on the incoming and outgoing edges of the parameters of the edge type and direction, and transmits information between different nodes. Here, bidirectional information transmission is considered, and finally the information propagation result of node v in the knowledge graph is obtained.
[0167] Formulas (4)-(7) are the calculation process of the GRU unit. Control whether to forget the information. Control whether to generate new information, in formula (6) is the hidden state at the next moment, in formula (7) is the final hidden state. Through the update gate and reset gate, the node obtains the final state, including the newly generated information and the information retained in the previous time step. Formula (8) is the output of each node, l(h v (t) ,x v) is to process the final state and input features of the node to obtain the output of each node.
[0168] An attention mechanism is added to the output processing of the GGNN of the model. The representation of the root cause node and the alarm node are extracted from the hidden state. The attention coefficients of the root cause node and the alarm node are then calculated through two linear layers (reason_fc_x and reason_fc_y). Next, the attention coefficients are multiplied by the mask to ensure that only the alarm node is considered. Finally, the output of the root cause node and the output of the weighted alarm node are spliced together to form the final output tensor.
[0169] (2.3) Construction and optimization of fault reasoning model
[0170] After learning the representation of the alarm knowledge graph, the model obtains the final output tensor. The next stage is the inference stage. In the inference stage, the output of the GGNN is inferred by setting a classifier, and the shaping probability of each fault node is finally obtained, so as to determine the possible fault node. The specific implementation of the classifier in the inference module is shown in formulas (9)-(13). Regarding the optimization of the model, the model adopts the cross entropy loss function of formula (14) to achieve the optimization of the model. Finally, the optimal model parameters are saved for the application of the model in network fault diagnosis. Compared with the quadratic cost function (square difference loss function), the cross entropy function makes the larger the error, the larger the amplitude of parameter adjustment, thereby accelerating the training convergence and promoting the training of neural networks more effectively.
[0171] (3) Simulation environment
[0172] The simulation experiment environment of the model is set up as follows. The model runs in the conda virtual environment, the torch version used is Pytorch1.13, the Python version is 3.9, the number of nodes in the knowledge graph is 74, and the training data is mainly collected from the historical alarm data of a certain education network topology. By processing the alarm data, it is converted into the corresponding format and stored in a text file for model training and testing. A total of 3,000 data sets are set up, including 2,000 training sets and 1,000 test sets. The specific format of the data set is as follows Figure 7 As shown in the figure, the first column is the code corresponding to the fault node, followed by the code corresponding to the alarm data appearing in each fault scenario. The vectorization of the alarm data is achieved through one-hot encoding.
[0173] (4) Model results
[0174] Through steps such as alarm vectorization, knowledge graph representation, and fault reasoning, the model operation results are as follows Figure 8 By collecting the accuracy and loss values after each iteration, the loss and accuracy graph is plotted as follows Fig. 9 and Fig.10 As shown in the figure, it can be seen that after 100 iterations, the loss value stabilizes at around 0.14, and the model accuracy stabilizes at more than 96%, with a maximum of 99%, which can accurately infer the cause of the failure. The performance of the model under different knowledge graph scales is shown in the figure. Fig.11 ,It is not difficult to see that after the introduction of the GGNN model, the larger ,the scale of knowledge graph data is ,the lower the accuracy of this model will be ,but the accuracy will not be lower than 96%, and the running time of the ,results obtained by the simulation experiment is within the ,allowable range.
[0175] An embodiment of the present invention is a power backbone transmission network fault diagnosis system based on knowledge graph, which includes the following modules:
[0176] The knowledge graph construction module is used to collect historical fault data, alarm information and network topology data of the power backbone transmission network, and build a knowledge graph containing fault and alarm information through entity recognition, relationship extraction and attribute filling technology;
[0177] A model building module, which further comprises:
[0178] Alarm vectorization unit, used to convert alarm data into feature vectors of nodes in the knowledge graph;
[0179] The graph neural network processing unit combines the knowledge graph with the graph neural network to learn the representation of the feature vector of the alarm set, processes the multilateral relations in the knowledge graph through the message passing mechanism and the gating mechanism, and updates the hidden state of the node;
[0180] The fault reasoning model construction and optimization unit builds a fault reasoning model based on the output of the graph neural network, uses the attention mechanism to extract key node information, and classifies or predicts faults through classifiers or regressors, while supporting hyperparameter tuning and verification of the model;
[0181] The simulation environment construction and experiment module is used to build a simulation environment according to the actual operation of the power backbone transmission network, simulate alarm inputs in different scenarios, and use the built model to conduct fault reasoning experiments;
[0182] The result verification and analysis module is used to collect the results of simulation experiments and evaluate the effectiveness and accuracy of the model in fault diagnosis.
[0183] An embodiment of the present invention provides a terminal device. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0184] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.
[0185] The device / terminal equipment may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The device / terminal equipment may include, but is not limited to, a processor and a memory.
[0186] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0187] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the apparatus / terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0188] If the module / unit integrated in the device / terminal equipment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0189] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for fault diagnosis of power backbone transmission network based on knowledge graph, characterized in that: The following steps are involved: Construct a fault and alarm knowledge graph, collect historical fault data, alarm information and network topology data of the power backbone transmission network, and construct a fault and alarm knowledge graph through entity recognition, relationship extraction and attribute filling technology; Model construction: through alarm vectorization, model construction combining knowledge graph and graph neural network, construction and optimization of fault reasoning model, a fault diagnosis algorithm model based on knowledge graph is constructed and network fault diagnosis is performed; Simulation environment construction and experiments: According to the actual operation of the power backbone transmission network, a corresponding simulation environment is built. In the simulation environment, alarm inputs under different scenarios are simulated, and fault reasoning is performed using the built model; Result Verification and Analysis,Based on the results of simulation experiments, the effectiveness and,accuracy of the model in fault diagnosis are verified.
2. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 1, characterized in that: The construction of the fault and alarm knowledge graph is specifically carried out through the following steps: Data collection: Data is collected in three ways, including obtaining historical alarm information from the network management database, obtaining detailed information on equipment maintenance, troubleshooting, and repair processes from equipment commercial manual maintenance data, and obtaining key information on network equipment relationships from the network topology and operation and maintenance platform; Data preprocessing: preprocessing operations on the collected data; Ontology construction: Based on the preprocessed data, the correlation between faults and alarms is analyzed to build the ontology of the knowledge graph. The ontology defines two nodes, alarm and fault, as well as the cause and derivative relationships between them, to form a complete knowledge graph structure framework. Knowledge extraction: extracting the correlation information between alarms and faults from the preprocessed data, including alarm type, fault type, and the causal relationship between alarms and faults; Knowledge fusion: integrate and verify the extracted knowledge information, eliminate redundancy and contradictions, and form a knowledge system; Data storage and representation,Neo4j graph database is selected as the storage medium, and the constructed fault and alarm knowledge graph is stored in the Neo4j database.
3. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 1, characterized in that: The model is constructed by the following steps: Alarm vectorization and feature representation, collect alarm data from various platforms to determine the initial state h of each node in the knowledge graph v , and perform redundancy preprocessing, vectorize each alarm node in the knowledge graph, and use one-hot encoding to generate the input feature x of the reported alarm node v , nodes that do not report alarms are represented by n-dimensional zero vectors; The GGNN model is used to learn the representation of the feature vector of the alarm set on the knowledge graph. The knowledge graph and the graph neural network model are combined to build a gated graph neural network model. The fault and alarm knowledge graphs are combined to learn the representation of the feature vector of the alarm set on the knowledge graph. In the gated graph neural network model, information transfer between nodes is processed according to different relationship types in the knowledge graph, and the gating mechanism is used to control the flow and screening of information. The attention mechanism is introduced in the model output processing, and the attention coefficients of the root cause node and the alarm node are calculated, and weighted concatenation is performed to form the final output tensor. Construction and optimization of the fault reasoning model. Based on the output of the gated graph neural network model, a classifier is set to infer the output tensor and calculate the probability of each fault node to determine the possible fault nodes. The cross entropy loss function is used as the optimization target to train the model to minimize the difference between the predicted output and the true label. The optimal model parameters during the training process are saved.
4. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 3, characterized in that: The input feature x of the alarm node v , the specific initialization is shown in formula (1): Where n is the number of nodes.
5. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 3, characterized in that: The GGNN model is used to learn the representation of the feature vector of the alarm set on the knowledge graph, specifically: Construct a knowledge graph G = (V, E) containing fault and alarm nodes and their relationships, where V is a node set, E is an edge set, each node v∈V stores a D-dimensional vector, and each edge e∈E stores a D×D-dimensional matrix; The GGNN model is used to perform representation learning on the knowledge graph. Through the message passing mechanism and gating mechanism of the GGNN model, in each iteration, the feature information of the neighbor nodes and the edge information are aggregated to the current node according to the type and direction of the edge to update the hidden state of the node; specifically: In the node initialization step, the node annotation is copied to the first part of the hidden state and the rest is filled with zeros, as shown in Equation (2): h v =[x v ,0] T (2) in, are the two columns of the corresponding nodes in the adjacency matrix A of the fault and alarm knowledge graph, It is the vector formed by fusing all node features at time t-1; considering the bidirectional transmission of information, the final information propagation result of node v in the knowledge graph is obtained The calculation process of the GRU unit: in, Control whether to forget the information. Controls whether new information is generated. is the hidden state at the next moment, is the final hidden state. By updating the gate and resetting the gate, the node obtains the final state. The output o of each node v : in, To process the final state and input features of the node, the output of each node is obtained; In the output processing of the GGNN model, the attention mechanism is introduced to extract the representation of the root cause node and the alarm node from the hidden state, and the attention coefficients of the root cause node and the alarm node are calculated through at least two linear layers; the attention coefficient is multiplied by the mask to filter and retain the relevant information of the alarm node and ignore the information of the non-alarm node; the output of the root cause node and the output of the alarm node weighted by the attention mechanism are spliced together to form the final output tensor.
6. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 3, characterized in that: The classifier performs reasoning on the output tensor, and the specific implementation of the classifier is: Random dropout layer Dropout1: D(x)=x⊙Bernoulli(p)(9)where, x is the input vector, Bernoulli(p) is a random vector of the same dimension as x, whose elements are independently drawn from a Bernoulli distribution parameterized by probability p; The first linear transformation layer Linear1: L1(x)=Wx+b(10)where x is the output of the deactivation layer, W is the weight matrix, and b is the bias matrix; ReLU activation function layer: R(x)=max(0,x)(11) Randomly dropout layer Dropout2 again, using formula (9); The second linear transformation layer Linear2: L2(x)=Wx+b(12) Combining these levels, the formula of the obtained classifier is as follows: C(x)=L2(D2(R(L1(D1(x)))))(13)The cross entropy loss function of formula (14) is used to optimize the model: Among them, y i is the true label, x i is the output label.
7. A method for diagnosing faults in a power backbone transmission network based on a knowledge graph as claimed in claim 1, characterized in that: The simulation environment construction and experiment are specifically as follows: Virtual environment setup, configure and run the model in the conda virtual environment; Knowledge graph construction: construct a knowledge graph containing several nodes. The knowledge graph is used to represent and store entities and their relationships related to fault location. Dataset preparation: Data collection: collecting fault-related data from historical alarm data of the network topology; Data processing: pre-processing the collected alarm data; Data set partitioning: divide the preprocessed data into training set and test set; Data set format definition: The data set is stored in a text file in a specific format. Each line of data represents a fault scenario, including a fault node code and multiple alarm data codes. Data vectorization uses one-hot encoding method to vectorize the alarm data for easy model input and calculation.
8. A knowledge graph-based power backbone transmission network fault diagnosis system, characterized in that: Includes the following modules: The knowledge graph construction module is used to collect historical fault data, alarm information and network topology data of the power backbone transmission network, and build a knowledge graph containing fault and alarm information through entity recognition, relationship extraction and attribute filling technology; A model building module, which further comprises: Alarm vectorization unit, used to convert alarm data into feature vectors of nodes in the knowledge graph; The graph neural network processing unit combines the knowledge graph with the graph neural network to learn the representation of the feature vector of the alarm set, processes the multilateral relations in the knowledge graph through the message passing mechanism and the gating mechanism, and updates the hidden state of the node; The fault reasoning model construction and optimization unit builds a fault reasoning model based on the output of the graph neural network, uses the attention mechanism to extract key node information, and classifies or predicts faults through classifiers or regressors, while supporting hyperparameter tuning and verification of the model; The simulation environment construction and experiment module is used to build a simulation environment according to the actual operation of the power backbone transmission network, simulate alarm inputs in different scenarios, and use the built model to conduct fault reasoning experiments; The result verification and analysis module is used to collect the results of simulation experiments and evaluate the effectiveness and accuracy of the model in fault diagnosis.
9. A device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Alarm processing method, device and equipment based on graph deep learning, medium and program product
CN119743309A
Alarm handling method and device based on graph deep learning, equipment, medium and program product
CN119743309B
Low-voltage topology analysis method, system, equipment and medium
CN120219106A
Road surface collapse risk monitoring method and system
CN120339962A
Maintenance path reasoning method based on graph neural network
CN121168787A
