Power dual-mode communication network fault diagnosis method based on GCN-MGAT and KG
Through the combination of GCN-MGAT and KG, the fault diagnosis efficiency and accuracy of the power dual-mode communication network in large-scale and complex scenarios are solved, rapid fault location and root cause analysis are achieved, and the efficiency and stability of network operation and maintenance are improved.
Patent Information
- Application Number
- CN202510619968.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-07-18
AI Technical Summary
In large-scale and complex network scenarios, the existing power dual-mode communication network has difficulty meeting the requirements, and faces challenges such as complex communication network environment, diverse equipment access forms, high network load and throughput pressure, and strict real-time requirements.
Using fault diagnosis methods based on GCN-MGAT and KG, we use simulation data sets, feature dimensionality reduction, build fault diagnosis models, use Neo4j graph data storage and visual knowledge graph to design multi-domain loss functions for training, and combine GCN model and MGAT model for node classification and fault diagnosis.
It improves the efficiency and accuracy of fault diagnosis, can quickly locate and resolve network failures, supports the stable operation of the power dual-mode communication network, and improves the efficiency of operation and maintenance work.
Smart Images

Figure CN120342832A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power dual-mode communication networks, and particularly relates to a power dual-mode communication network fault diagnosis method based on GCN-MGAT and KG. Background Technique
[0002] With the deep integration of the global power industry and the smart grid, the distribution network has become the main battlefield for the transformation of the energy Internet and the power Internet of Things due to its characteristic of directly connecting to end users. The distribution communication network includes two major parts: a remote communication network and a local communication network. The remote communication uses various communication network methods such as the 4th Generation Mobile Communication Technology (4G), 5G, wireless private networks, optical fibers, and Ethernet; the local communication uses communication methods such as Power Line Carrier (PLC) and Radio Frequency (RF) links. The fusion terminal is the hub connecting the local communication and the wide-area backhaul network. A local communication module and a remote communication module are equipped on the fusion terminal, which is connected to the wide-area backhaul network through the remote communication module and communicates remotely with the distribution Internet of Things cloud platform to achieve distribution automation and remote automation, thereby realizing multi-functional network services. The local communication network is composed of a backbone network and a low-power sub-network. The backbone network is a multi-mode perception communication network centered on a Master Node (MN) composed of a central master control node and multiple Route and Aggregate Nodes (RNs), including communication modes such as PLC and RF links, and can realize the full-scale and convenient access of AC-powered, DC-powered and other normal-powered Internet of Things devices in both IP and non-IP ways. The low-power sub-network uses low-power wireless communication technology to achieve multi-hop transmission through the backbone network and transmit information to the MN. A star network is formed between the End Sensing Node (EN) and the MN or RN, and various wireless sensors such as battery-powered and inductive power-taking can be accessed. The MN and RN have an external communication module with a standard structure, and users can choose to add corresponding communication modules according to the characteristics of Internet of Things equipment and business requirements to realize the access of existing devices with standard communications such as WiFi, ZigBee, and LoRa.
[0003] With the booming development of new businesses, the primary and secondary equipment in the distribution network has increased, the scale of the power grid has expanded, and the amount of information transmitted between the field and the equipment has increased significantly. Against this background, the Field Area Network (power dual-mode communication network) studied in this paper, as the core backbone of the distribution communication network, has the characteristics of strong coverage, multiple device access methods, large network throughput, and good transmission real-time performance, and undertakes the important responsibility of connecting users on the low-voltage side of the distribution network and providing them with diversified application services (such as distributed power sources, electric vehicle charging piles, etc.). However, with the expansion of the power grid scale, the fault problems faced by the power dual-mode communication network have become increasingly prominent, mainly manifested in four aspects:
[0004] (1) Complex communication network environment: The power dual-mode communication network environment may include cable trenches, metal cabinets, basements, etc. These environments often have signal shielding phenomena, which seriously affect the transmission of communication signals, and then problems such as data loss, transmission delay, and even communication interruption occur.
[0005] (2) Diverse device access forms: Due to the variety of distribution equipment and sensors, the communication access methods are also different, which increases the challenges of device compatibility and stability. If the compatibility between devices is poor or the access method is unreasonable, communication failures may be caused.
[0006] (3) Network load and throughput pressure: With the increase in the amount of information, the amount of data that the power dual-mode communication network needs to process has increased sharply, the network load and throughput pressure have increased, which may lead to network congestion, a decrease in processing speed, and even system crashes.
[0007] (4) Real-time requirements and fault response: The power dual-mode communication network has strict requirements for transmission real-time performance, but when network faults occur, if they cannot be responded to and processed in a timely manner, it will have a serious impact on user services and the operation of the entire distribution network.
[0008] Traditional distribution communication network fault diagnosis methods, such as manual inspections, expert experience, and mathematical model analysis, are no longer able to meet the needs of large-scale and complex network fault diagnosis.
[0009] Therefore, how to use artificial intelligence to automatically learn and identify fault characteristics to solve the problems of fault diagnosis efficiency and accuracy in large-scale and complex network scenarios is the technical problem that this invention aims to solve. Summary of the Invention
[0010] The purpose of this invention is to provide a power dual-mode communication network fault diagnosis method based on GCN-MGAT and KG to solve the problems raised in the above background technology.
[0011] The object of the present invention is achieved as follows: A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG, characterized in that: the method comprises the following steps:
[0012] Step S1: Collect the simulation data set on the NetLogo platform and organize the collected data into a standardized CSV format file;
[0013] Step S2: Use the HistGradientBoosting algorithm to perform feature dimensionality reduction on the original data set;
[0014] Step S3: Build a fault diagnosis model to diagnose faults in the fault data;
[0015] Step S4: Use Neo4j graph data storage and visualization of the operation and maintenance knowledge graph of the power dual-mode communication network to complete the fault diagnosis of the power dual-mode communication network;
[0016] Step S5: Design a multi-domain loss function to train the fault diagnosis model, obtain the fault diagnosis result of the power dual-mode communication network, and perform intelligent management on the network.
[0017] Preferably, in step S2, the HistGradientBoosting algorithm is used to perform feature dimensionality reduction on the original data set, specifically:
[0018] Step S2-1: Construct a feature matrix Z ∈ R n×k :
[0019]
[0020] where k represents the number of key performance indicators of the data set, and n represents the number of samples in the data set;
[0021] Step S2-2: Histogram binning preprocessing:
[0022] Binning boundary definition: Divide the value space of the feature KPIj into boundaries {b1(j), b2(j), …, bB-1(j)};
[0023] Binning index calculation: The binning index of the sample xi on the feature j is:
[0024]
[0025] Construct M gradient boosting trees, and each tree is generated by minimizing the following regularized loss function:
[0026]
[0027] where T is the number of leaf nodes; is the weight of the leaf node; γ is the penalty coefficient for the number of leaf nodes; λ is the regularization coefficient for the weight of the leaf node;
[0028] Step S2-3: Calculate the information gain based on the histogram statistic and select the optimal splitting point:
[0029] First-order gradient:
[0030] Second-order gradient:
[0031] Information gain formula:
[0032] Evaluate the feature importance by accumulating the information gain and define the importance weight matrix:
[0033]
[0034] where is the set of nodes using feature j for splitting in the m-th tree, and Gain s is the information gain value when splitting at point s;
[0035] Step S2-4: Select 5 key features according to the importance weights and generate the reduced-dimensional feature matrix Z′:
[0036]
[0037] Preferably, the fault diagnosis model includes two graph convolutional layers and a multi-head attention layer. The two graph convolutional layers include the first graph convolutional layer and the second graph convolutional layer;
[0038] The first graph convolutional layer maps the input 10-dimensional KPI features to a 64-dimensional hidden space, introducing non-linearity through the ReLU activation function. The second graph convolutional layer compresses the 64-dimensional features to a 5-dimensional output space;
[0039] The first graph convolutional layer uses the ReLU function, and the second graph convolutional layer uses the Softmax function. The predicted label of the sample node x i is as follows:
[0040]
[0041] where Z ∈ R n×c represents the node feature matrix, and c represents the number of fault types in the dataset;
[0042] The multi-head attention layer calculates the weights between the central node and its neighbor nodes through the attention mechanism, and the number of attention heads adopted by the multi-head attention layer is 5.
[0043] Preferably, in step S3, the operation of constructing the fault diagnosis model is specifically as follows:
[0044] Step S3-1: Construct an adjacency matrix to represent the edge connection relationship between nodes, specifically as follows:
[0045] Calculate the similarity s between any two sample nodes i,j (0 ≤ s i,j ≤ 1). Select to use the Gaussian function, and the formula is as follows:
[0046]
[0047] where δ = 1 is the bandwidth of the Gaussian function. When the Euclidean distance between nodes x i and x j is closer, the nodes are more similar, and s i,j is larger; Initialize and set a threshold α to obtain the required adjacency matrix A:
[0048]
[0049] where τ is a learnable threshold parameter, ∈ is the control sampling temperature; σ is the Sigmoid function;
[0050] Step S3-2: Input the feature matrix and the adjacency matrix into the first graph convolution to update the central node features;
[0051] Step S3-3: Input the node feature information into the multi-head attention layer, and calculate the weights between the central node and its neighbor nodes through the attention mechanism;
[0052] Step S3-4: Transmit the output result of the multi-head attention layer to the second graph convolution layer, and combine the node information of the graph convolution layer and the multi-head attention layer.
[0053] Preferably, in step S3-2, inputting the feature matrix and the adjacency matrix into the first graph convolution to update the central node features is specifically as follows:
[0054] The feature matrix H (l) is the input node feature matrix of the l-th convolutional layer, and residual connections and skip connections are introduced:
[0055]
[0056] where A refers to the adjacency matrix, I N is the identity matrix, is the degree matrix of the matrix , σ is the non-linear activation function; H (l) is the input node feature matrix of the l-th convolutional layer, and W (l) refers to the trainable weight matrix in the l-th layer;
[0057] Obtain each node feature through the processing of the first graph convolution. The node feature representation is:
[0058]
[0059] Among them, d(l) represents the length of the node feature vector of the l-th layer;
[0060] Use error backpropagation and gradient descent methods to update the weight matrix W (l) , minimize the loss function and optimize the model performance.
[0061] Preferably, in step S3-3, the node feature information is input into the multi-head attention layer, and the weights between the central node and its neighbor nodes are calculated through the attention mechanism. Specifically:
[0062] Step S3-3-1: Calculate the attention weight coefficient of the node:
[0063] Define the node attention coefficient e ij as:
[0064]
[0065] Among them, e ij represents the attention weight between two nodes, and d(l) represents the length of the node feature vector of the l-th layer; is the node feature vector, is the node feature vector of the first-order neighbor node feature vector; W ∈ R d(l)×d(l+1) , is the node dimension transformation matrix from the l-th layer to the l + 1-th layer, and a(·) is the function for calculating the relevance between two nodes;
[0066] Perform a normalization operation on e ij , adopt a sparse attention mechanism, and limit each node to only focus on the Top-G important neighbors. The calculation formula is as follows:
[0067]
[0068] Among them, is the coefficient of each node, that is, the weight ratio of each node, the I indicator function, only retains the first G edges of the similarity; W q is the Query weight matrix; W k is the Key weight matrix; T is the transpose matrix; h i is the node; h j is the node h i of the first-order neighbor node;
[0069] Step S3-3-2: In the middle layer, use the splicing method, and the calculation process formula is as follows:
[0070]
[0071] Step S3-3-3: The average method is used for the last layer, and the calculation process formula is as follows:
[0072]
[0073] Wherein, is the output weight of each node, is the number of adjacent nodes of node i, is the attention mechanism weight, and σ is the non-linear activation function.
[0074] Preferably, the knowledge graph includes four dimensions: installation and commissioning stage, network maintenance stage, security event type, and network-level fault, and a power dual-mode communication network operation and maintenance knowledge graph is constructed using the four dimensions;
[0075] Using Neo4j graph data storage and visualization of the power dual-mode communication network operation and maintenance knowledge graph, specifically:
[0076] According to the knowledge in the field of power dual-mode communication network fault diagnosis, standardize entities into different fault occurrence stages and types, including installation and commissioning stage, network maintenance stage, security event type, and network-level fault type;
[0077] Convert the sorted structured knowledge into triples: the input end of the knowledge graph receives the dual-mode multi-hop network fault cause transmitted by the GCN-MGAT model, search for the fault cause in the knowledge graph to obtain triples;
[0078] Input the diagnosis result of the GCN-MGAT model into the knowledge graph for query, and finally an interpretable output can be obtained;
[0079] The knowledge graph contains various relationship types, including fault, sub-fault, cause, event consequence, category, solution, and level. With the help of the Neo4j platform, query specific faults and obtain an easy-to-understand output.
[0080] Preferably, in step S5, a multi-domain loss function is designed to train the fault diagnosis model, specifically:
[0081] Two graph convolutional layers in the fault diagnosis model need to be trained using a loss function, and the loss function formula is as follows:
[0082]
[0083] Wherein, L is the graph Laplacian matrix, P is the set of similar node pairs, λ1 is the balance coefficient of graph regularization, λ2 is the balance coefficient of contrast loss; Z is the feature matrix of nodes;
[0084] The graph Laplacian matrix is based on the adjacency matrix A and the degree matrix D and is expressed as:
[0085] L=ID -1 / 2 AD -1 / 2 ;
[0086] The set of similar node pairs is based on the node similarity s i,j , select s i,j Node pairs ≥β:
[0087] P={(i,j)|s i,j ≥β};
[0088] Among them, β is the similarity threshold.
[0089] Compared with the prior art, the present invention has the following improvements and advantages:
[0090] 1. By organically combining the GCN model and the MGAT model, nodes can be accurately classified and faults diagnosed. At the same time, the GCN-MGAT model is combined with the knowledge graph of power dual-mode communication network operation and maintenance to accurately locate the fault scenario and conduct root cause analysis, thereby improving the efficiency and accuracy of fault diagnosis.
[0091] 2. By using the Neo4j platform to easily query specific faults and obtain easy-to-understand output, it is helpful for subsequent knowledge updates and network operation and maintenance operations. The construction of the knowledge graph makes the operation and maintenance work more efficient, helps to quickly locate and solve various network faults, and shows significant advantages in the stability of actual power dual-mode communication network operation and maintenance, providing technical support for ensuring the efficient and stable operation of the network system. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 This is a structural diagram of the power dual-mode communication network fault diagnosis system based on GCN-MGAT and KG.
[0093] Figure 2 Schematic diagram of the GCN-MGAT model structure.
[0094] Figure 3 This is a schematic diagram of the network-level fault knowledge graph for power dual-mode communication.
[0095] Figure 4 A diagram of feature importance.
[0096] Figure 5 The following is a schematic diagram of the performance comparison of HistGradientBoosting under different numbers of features.
[0097] Figure 6 Schematic diagram of the performance curve of the GCN-MGAT model with 1 attention head.
[0098] Figure 7 Schematic diagram of the performance curve of the GCN-MGAT model with 2 attention heads.
[0099] Figure 8 Schematic diagram of the performance curve of the GCN-MGAT model with 3 attention heads.
[0100] Figure 9 Schematic diagram of the performance curve of the GCN-MGAT model with 4 attention heads.
[0101] Figure 10 Schematic diagram of the performance curve of the GCN-MGAT model with 5 attention heads.
[0102] Figure 11 Schematic diagram of the performance curve of the GCN-MGAT model with 6 attention heads.
[0103] Figure 12 Schematic diagram of the result comparison between the GCN-MGAT model and the GCN model. Detailed implementation manner
[0104] The following further summarizes the present invention in conjunction with the accompanying drawings.
[0105] As Figure 1 shown, a power dual-mode communication network fault diagnosis method based on GCN-MGAT and KG is characterized in that the method includes the following steps:
[0106] Step S1: Collect the simulated data set on the NetLogo platform, and organize the collected data into a standardized CSV format file;
[0107] The fault data set is derived from the simulated data set on the NetLogo platform, and 7 different fault types are set, including: normal state, node offline fault 30%, link fault 30%, node signal fault 30%, node offline fault 50%, link fault 50%, and node signal fault 50%;
[0108] Through the combination of these fault situations, rich and diverse data samples are provided for the training and verification of the model to better evaluate its performance and robustness. The total data set has a total of 1000 samples, among which 400 are normal data, and the remaining 600 are samples of various fault situations.
[0109] In step S2, the HistGradientBoosting algorithm is used to perform feature dimensionality reduction on the original data set. The specific operation is as follows:
[0110] Step S2-1: Construct a feature matrix Z ∈ R according to the original data set n×k ;
[0111]
[0112] Among them, k represents the number of key performance indicators of the data set, and n represents the number of samples in the data set;
[0113] Step S2-2: Histogram binning preprocessing:
[0114] Binning boundary definition: Divide the value space of feature KPIj into boundaries {b1(j), b2(j), …, bB-1(j)};
[0115] Binning index calculation: For sample x i The binning index on feature j is:
[0116]
[0117] Construct M gradient boosting trees, and each tree is generated by minimizing the following regularized loss function:
[0118]
[0119] Among them, T is the number of leaf nodes; is the weight of the leaf node; γ is the penalty coefficient for the number of leaf nodes; λ is the regularization coefficient of the leaf node weight;
[0120] Step S2-3: Calculate the information gain based on the histogram statistics and select the optimal splitting point:
[0121] First-order gradient:
[0122] Second-order gradient:
[0123] Information gain formula:
[0124] Evaluate the feature importance by accumulating the information gain and define the importance weight matrix:
[0125]
[0126] Among them, is the set of nodes that use feature j for splitting in the m-th tree, and Gain s is the information gain value when splitting at point s;
[0127] Such as Figure 4As shown in the figure, the features in the figure include: NN is the number of nodes in the network, PD is the average packet loss rate of the network, NT is the network throughput, ND is the average network delay, NMV is the variance of node betweenness, RSSI is the received signal strength indicator of the reference signal, NR is the network redundancy, SINR is the average signal-to-noise ratio, AH is the average number of hops, and NL is the number of links in the network;
[0128] Step S2-4: Select 5 key features according to the importance weights to generate the dimensionality-reduced feature matrix Z':
[0129]
[0130] As Figure 5 shown, in the experiment, the dataset is divided into a training set and a test set, where the training set accounts for 75% and the test set accounts for 25%. When no feature selection is performed, that is, when the number of features is 10, the accuracy of the model is 98.00% and the Macro-F1 score is 97.51%. When the number of features is 5, the model accuracy reaches the highest accuracy of 98.8%. Therefore, consider comparing the Macro-F1 scores to select the best feature set. When the number of features is 5, the Macro-F1 score of the model also reaches the highest, which is 98.41%. Therefore, the optimal number of feature combinations is 5. Calculate the accuracy and Macro-F1 scores of model classification under different feature sets using the HistGradientBoosting algorithm.
[0131] Step S3: Construct a fault diagnosis model, specifically:
[0132] As Figure 2 shown, the fault diagnosis model GCN-MGAT includes a GCN model and an MGAT model. The GCN model is a graph convolutional layer, and the MGAT model is a multi-head attention layer;
[0133] The fault diagnosis model includes two graph convolutional layers and a multi-head attention layer. The two graph convolutional layers include a first graph convolutional layer and a second graph convolutional layer;
[0134] The first graph convolutional layer maps the input 10-dimensional KPI features to a 64-dimensional hidden space, introducing non-linearity through the ReLU activation function. The second graph convolutional layer compresses the 64-dimensional features to a 5-dimensional output space;
[0135] The first graph convolutional layer uses the ReLU function, and the second graph convolutional layer uses the Softmax function. The predicted label of the sample node x i of the graph convolutional layer is as follows:
[0136]
[0137] Among them, Z ∈ R n×cDenote the node feature matrix, and c represents the number of fault types in the dataset.
[0138] The size of the hidden layer is set to 32, the learning rate of the Adam optimizer is 0.001, and the dropout is 0.25.
[0139] The multi-head attention layer calculates the weights between the central node and its neighbor nodes through the attention mechanism. The number of attention heads in the multi-head attention layer is 5. The multi-head attention layer is used as a key component, involving multi-head attention; the appropriate number of attention heads needs to be carefully selected. By comparing the performance of the GCN-MGAT model under different numbers of heads, the optimal number of attention heads is determined; as Figures 6 to 11 can be seen, when the number of attention heads increases from 1 to 6, the model accuracies are 93.5%, 97%, 87%, 97%, 99.5% and 96% respectively. A smaller number of attention heads may limit the model's ability to integrate global information, thus hindering the model from achieving the best performance. Therefore, when the number of attention heads is selected as 5, the test accuracy of the model reaches the highest level, reaching 99.5%. However, a larger number of heads may increase the training difficulty of the model, resulting in a decline in model performance, such as the case when the number of heads increases to 6. Therefore, the multi-head graph attention mechanism with 5 heads is introduced into the GCN model to improve the model's performance, and the GCN-MGAT model mentioned later defaults to selecting 5 heads.
[0140] Step S3-1: Construct an adjacency matrix to represent the connection relationship between nodes, specifically:
[0141] Calculate the similarity s between any two sample nodes i,j (0 ≤ s i,j ≤ 1), choose to use the Gaussian function, and the formula is as follows:
[0142]
[0143] where δ = 1 is the Gaussian function bandwidth. When the Euclidean distance between nodes x i and x j is closer, the nodes are more similar, and s i,j is larger; initialize and set a threshold α to obtain the required adjacency matrix A:
[0144]
[0145] where τ is a learnable threshold parameter, ∈ is the control sampling temperature; σ is a non-linear activation function;
[0146] Step S3-2: Input the feature matrix and the adjacency matrix into the first graph convolution to update the central node features;
[0147] Feature matrix H(l) is the input node feature matrix of the l-th convolutional layer:
[0148]
[0149] where A refers to the adjacency matrix, I N is the identity matrix, is the degree matrix of the matrix , σ is the non-linear activation function; H (l) is the input node feature matrix of the l-th convolutional layer, W (l) refers to the trainable weight matrix in the l-th layer;
[0150] Obtain each node feature through the processing of the first graph convolution, and the node feature representation:
[0151]
[0152] where d(l) represents the length of the node feature vector in the l-th layer;
[0153] Use error backpropagation and gradient descent method to update the weight matrix W (l) , minimize the loss function and optimize the model performance;
[0154] Step S3-3: Input the node feature information into the multi-head attention layer, and calculate the weights between the central node and its neighbor nodes through the attention mechanism;
[0155] Step S3-3-1: Calculate the attention weight coefficient of the node:
[0156] Define the node attention coefficient e ij as:
[0157]
[0158] where e ij represents the attention weight between two nodes, and d(l) represents the length of the node feature vector in the l-th layer; is the node, is the node 's first-order neighbor node; W ∈ R d(l)×d(l+1) , is the node dimension transformation matrix from the l-th layer to the l+1-th layer, and a(·) is the function to calculate the relevance between two nodes;
[0159] Normalize e ij , adopt the sparse attention mechanism, and limit each node to only focus on the Top-G important neighbors. The calculation formula is as follows:
[0160]
[0161] where, is the coefficient of each node, that is, the weight ratio of each node. The I indicates function, and only the edges with the top G similarities are retained; W q is the Query weight matrix; W k is the Key weight matrix; T is the transpose matrix; h i is the node; h j is the node h i of the first-order neighbor nodes;
[0162] Step S3-3-2: The intermediate layer uses the splicing method, and the calculation process formula is as follows:
[0163]
[0164] Step S3-3-3: The last layer uses the average method, and the calculation process formula is as follows:
[0165]
[0166] Among them, is the output weight of each node, is the number of adjacent nodes of node i, is the attention mechanism weight, and σ is the non-linear activation function.
[0167] Step S3-4: Transmit the output result of the multi-head attention layer to the second graph convolutional layer to combine the node information of the graph convolutional layer and the multi-head attention layer.
[0168] In order to further improve the output interpretability of the model and improve the network diagnosis efficiency, a knowledge graph is introduced to assist in fault diagnosis, and an operation and maintenance knowledge graph of the power dual-mode communication network is constructed from four dimensions: installation and commissioning stage, network maintenance stage, security event type, and network-level fault.
[0169] Step S4: Use Neo4j graph data storage and visualization for the operation and maintenance knowledge graph of the power dual-mode communication network to complete the fault diagnosis of the power dual-mode communication network;
[0170] As Figure 3 shown, the knowledge graph includes four dimensions: installation and commissioning stage, network maintenance stage, security event type, and network-level fault. An operation and maintenance knowledge graph of the power dual-mode communication network is constructed using the four dimensions;
[0171] According to the knowledge in the field of power dual-mode communication network fault diagnosis, the standardized entities are divided into different fault occurrence stages and types, including installation and commissioning stage, network maintenance stage, security event type, and network-level fault types;
[0172] Convert the organized structured knowledge into triples: The input end of the knowledge graph receives the dual-mode multi-hop network fault causes transmitted by the GCN-MGAT model, searches for the fault causes in the knowledge graph, and obtains triples. The triples are head entity, relationship, and tail entity;
[0173] Input the diagnostic results of the GCN-MGAT model into the knowledge graph for query, and finally an interpretable output can be obtained;
[0174] The knowledge graph contains various relationship types, including faults, sub-faults, causes, event consequences, categories, solutions, and levels. With the help of the Neo4j platform, specific faults can be queried and an easy-to-understand output can be obtained.
[0175] During the installation and debugging phase, a common defect is that the end nodes cannot form a network. This manifestation is caused by various factors, such as head-end faults, terminal faults, and equipment faults, as shown in Table 1 below:
[0176] Table 1 Fault library during the installation and debugging phase
[0177]
[0178]
[0179] During the network maintenance phase, several common defects are many communication isolated points and increased transmission delay, as shown in Table 2 below:
[0180] Table 2 Fault library during the network maintenance phase
[0181]
[0182] The types of network security events are organized. According to the security risk assessment elements of the power distribution Internet of Things, the security event types of each link of the power distribution Internet of Things, namely "cloud, pipe, edge, and end", are sorted out, as shown in Table 3 below:
[0183] Table 3 Security event type library
[0184]
[0185] Since the data volume of the currently summarized power dual-mode communication network fault library is insufficient, and network operation and maintenance knowledge shows a trend of scale and diversification, some semi-structured data is selected, and corresponding extraction rules are written according to the structure of the web pages to extract relevant tag contents, such as fault names, fault causes, and fault solutions. And the extracted entities are imported into the structured data set. The finally obtained network-level fault library is shown in Table 4 below:
[0186] Table 4 Power dual-mode communication network-level fault library
[0187]
[0188] According to the previously mentioned installation and commissioning stage, network maintenance stage, security event types, and network-level fault library, an operation and maintenance knowledge graph of the power dual-mode communication network is constructed. The knowledge graph contains various relationship types, including faults, sub-faults, causes, event consequences, categories, solutions, and levels. Through this knowledge graph, the operation and maintenance documents can be presented in a structured manner. With the help of the Neo4j platform, specific faults can be easily queried and an easy-to-understand output can be obtained, which is helpful for subsequent knowledge updates and network operation and maintenance operations. The construction of the knowledge graph makes the operation and maintenance work more efficient and helps to quickly locate and solve various network faults.
[0189] Step S5: Design a multi-domain loss function to train the fault diagnosis model, specifically:
[0190] The two graph convolutional layers in the fault diagnosis model need to be trained using a loss function. The formula of the loss function is as follows:
[0191]
[0192] where L is the graph Laplacian matrix, P is the set of similar node pairs, λ1 is the balance coefficient of graph regularization, λ2 is the balance coefficient of contrastive loss; Z is the feature matrix of nodes;
[0193] The graph Laplacian matrix is based on the adjacency matrix A and the degree matrix D and is expressed as:
[0194] L = I - D -1 / 2 AD -1 / 2 ;
[0195] The set of similar node pairs is based on the node similarity s i,j , and the node pairs with s i,j ≥β are selected:
[0196] P = {(i, j) ∣ s i,j ≥β};
[0197] where β is the similarity threshold.
[0198] The method of the present invention includes three modules: network scenario, GCN-MGAT model (fault diagnosis model), and KG (knowledge graph). First, by integrating the multi-head graph attention mechanism into the GCN model (graph convolutional neural network model), the GCN-MGAT algorithm is obtained. Then, the GCN-MGAT model is used to train the fault data set, and an efficient and accurate fault diagnosis model for the power dual-mode communication network is constructed. Then, the text knowledge in the field of the power dual-mode communication network is structured from four dimensions: installation and commissioning stage, network maintenance stage, security event type, and network-level fault, forming an operation and maintenance knowledge graph of the power dual-mode communication network containing rich domain knowledge. The operation and maintenance knowledge graph of the power dual-mode communication network is stored and structurally displayed through the Neo4j graph database, providing rich domain knowledge support for the model. Finally, by combining the fault diagnosis model of the power dual-mode communication network and the operation and maintenance knowledge graph of the power dual-mode communication network, the fault scenario can be accurately located and root cause analysis can be carried out. This method shows significant advantages in the stability of the actual operation and maintenance of the power dual-mode communication network, providing technical support for ensuring the efficient and stable operation of the network system.
[0199] The method of the present invention evaluates the performance of the fault diagnosis model through accuracy and Micro-F1 score. Accuracy refers to the proportion of samples correctly classified by the model in the total samples, and the calculation formula is:
[0200]
[0201] where TP represents true positive, TN represents true negative, FP represents false positive, and FN represents false negative;
[0202] The Macro-F1 value is calculated based on the overall Precision and Recall, and the calculation formula is:
[0203]
[0204] where Precision mi and Recall mi are calculated as follows:
[0205]
[0206] where TP i represents the number of true positives in the i-th category, TN i represents the number of true negatives in the i-th category, FP i represents the number of false positives in the i-th category, and FN i represents the number of false negatives in the i-th category.
[0207] Compare with the original GCN model and the GCN-MGAT model, and the comparison results are as follows Figure 12 As shown, the accuracy of the GCN-MGAT model is higher than that of the GCN model.
[0208] The above are only the embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
Claims
1. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG, characterized in that: The method includes the following steps: Step S1: Collect the simulation data set on the NetLogo platform and organize the collected data into a standardized CSV format file; Step S2: Use the HistGradientBoosting algorithm to perform feature dimensionality reduction on the original data set; Step S3: Build a fault diagnosis model to perform fault diagnosis on the fault data; Step S4: Use Neo4j graph data storage and visualization of the operation and maintenance knowledge graph of the power dual-mode communication network to complete the fault diagnosis of the power dual-mode communication network; Step S5: Design a multi-domain loss function to train the fault diagnosis model, obtain the fault diagnosis results of the power dual-mode communication network, and perform intelligent management on the network.
2. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 1, characterized in that: In step S2, the HistGradientBoosting algorithm is used to perform feature dimensionality reduction on the original data set, specifically: Step S2-1: Construct a feature matrix Z ∈ R based on the original dataset n×k : where k represents the number of key performance indicators of the data set, and n represents the number of samples in the data set; Step S2-2: Histogram binning preprocessing: Binning boundary definition: Divide the value space of the feature KPIj into boundaries {b1(j), b2(j), …, bB-1(j)}; Bin Index Calculation: Sample x i The bin index on feature j is: Build M gradient boosting trees, and each tree is generated by minimizing the following regularized loss function: where T is the number of leaf nodes; is the weight of the leaf node; γ is the penalty coefficient for the number of leaf nodes; λ is the regularization coefficient for the weight of the leaf node; Step S2-3: Calculate the information gain based on the histogram statistics and select the optimal splitting point: First gradient: Second-order gradient: Information gain formula: Evaluate the feature importance by accumulating the information gain and define the importance weight matrix: Among them, is the set of nodes that use feature j for splitting in the m-th tree, and Gain s is the information gain value when splitting point s; Step S2-4: Select 5 key features according to the importance weights to generate the reduced-dimensional feature matrix Z′:
3. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 1, characterized in that: The fault diagnosis model includes two graph convolutional layers and a multi-head attention layer. The two graph convolutional layers include a first graph convolutional layer and a second graph convolutional layer; The first graph convolutional layer maps the input 10-dimensional KPI features to a 64-dimensional hidden space, introduces non-linearity through the ReLU activation function, and the second graph convolutional layer compresses the 64-dimensional features to a 5-dimensional output space; The first graph convolutional layer uses the ReLU function, and the second graph convolutional layer uses the Softmax function. The predicted labels of the sample nodes x of the graph convolutional layer are as follows: i are as follows: where Z ∈ R n×c represents the node feature matrix, and c represents the number of fault types in the dataset; The multi-head attention layer calculates the weights between the central node and its neighbor nodes through the attention mechanism, and the multi-head attention layer uses 5 attention heads.
4. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 3, characterized in that: In step S3, the specific operation of building the fault diagnosis model is as follows: Step S3-1: Build an adjacency matrix to represent the connection relationship between nodes, specifically: Calculate the similarity s between any two sample nodes i,j (0 ≤ s i,j ≤ 1), and choose to use the Gaussian function. The formula is as follows: Among them, δ = 1 is the bandwidth of the Gaussian function. When the Euclidean distance between nodes x i and x j is closer, the nodes are more similar, and s i,j is larger; Initialize a threshold α to obtain the required adjacency matrix A: where τ is a learnable threshold parameter, ∈ is the control sampling temperature; σ is the Sigmoid function; Step S3-2: Input the feature matrix and the adjacency matrix into the first graph convolution to update the central node features; Step S3-3: Input the node feature information into the multi-head attention layer, and calculate the weights between the central node and its neighbor nodes through the attention mechanism; Step S3-4: Pass the output result of the multi-head attention layer to the second graph convolutional layer to combine the node information of the graph convolutional layer and the multi-head attention layer.
5. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 4, characterized in that: In step S3-2, inputting the feature matrix and the adjacency matrix into the first graph convolution to update the central node features, specifically: The feature matrix H (l) is the input node feature matrix of the l-th convolutional layer, and residual connections and skip connections are introduced: Among them, A refers to the adjacency matrix, and I N is the identity matrix, is the matrix of the degree matrix, and σ is the non-linear activation function; H (l) is the input node feature matrix of the l-th convolutional layer, and W (l) refers to the trainable weight matrix in the l-th layer; Obtain each node feature through the processing of the first graph convolution, and the node feature is represented as: where d(l) represents the length of the node feature vector of the l-th layer; Use backpropagation of errors and gradient descent method to update the weight matrix W (l) , minimize the loss function and optimize the model performance.
6. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 4, characterized in that: In step S3-3, the node feature information is input into the multi-head attention layer, and the weights between the central node and its neighbor nodes are calculated through the attention mechanism. Specifically: Step S3-3-1: Calculate the attention weight coefficient of the node: Define the node attention coefficient e ij as follows: Among them, e ij represents the attention weight between two nodes, and d(l) represents the length of the node feature vector at the l-th layer; is the node feature vector, is the node feature vector of the first-order neighbor node feature vector; W ∈ R d(l)×d(l+1) , is the node dimension transformation matrix from the l-th layer to the l + 1-th layer, and a(·) is a function for calculating the correlation degree between two nodes; Normalize e ij Perform a normalization operation and adopt a sparse attention mechanism, restricting each node to only focus on the Top-G important neighbors. The calculation formula is as follows: Among them, is the coefficient of each node, that is, the weight ratio of each node. The I indicator function only retains the top G edges with similarity; W q is the Query weight matrix; W k is the Key weight matrix; T is the transpose matrix; h i is the node; h j is the node h i is the first-order neighbor node of Step S3-3-2: In the middle layer, the splicing method is used, and the calculation process formula is as follows: Step S3-3-3: In the last layer, the average method is used, and the calculation process formula is as follows: Among them, is the output weight of each node, is the number of adjacent nodes of node i, is the attention mechanism weight, and σ is the non-linear activation function.
7. A power dual-mode communication network fault diagnosis method based on GCN-MGAT and KG according to claim 1, characterized in that: The knowledge graph includes four dimensions: installation and commissioning phase, network maintenance phase, security event type, and network-level fault. A power dual-mode communication network operation and maintenance knowledge graph is constructed using the four dimensions; Use Neo4j graph data storage and visualization for the power dual-mode communication network operation and maintenance knowledge graph. Specifically: According to the knowledge in the field of power dual-mode communication network fault diagnosis, standardize entities into different fault occurrence stages and types, including installation and commissioning phase, network maintenance phase, security event type, and network-level fault type; Convert the sorted structured knowledge into triples: The input end of the knowledge graph receives the dual-mode multi-hop network fault cause transmitted by the GCN-MGAT model, searches for the fault cause in the knowledge graph, and obtains triples. The triples are head entity, relation, and tail entity; Input the diagnostic result of the GCN-MGAT model into the knowledge graph for query, and finally an interpretable output can be obtained; The knowledge graph contains various relationship types, including fault, sub-fault, cause, event consequence, category, solution, and level. With the help of the Neo4j platform, query specific faults and obtain an easy-to-understand output.
8. A fault diagnosis method for a power dual-mode communication network based on GCN-MGAT and KG according to claim 1, characterized in that: In step S5, a multi-domain loss function is designed to train the fault diagnosis model. Specifically: Two graph convolutional layers in the fault diagnosis model need to be trained using a loss function. The loss function formula is as follows: Among them, L is the graph Laplacian matrix, P is the set of similar node pairs, λ1 is the balance coefficient of graph regularization, λ2 is the balance coefficient of contrast loss; Z is the feature matrix of the node; The graph Laplacian matrix is based on the adjacency matrix A and the degree matrix D and is expressed as: L = I - D -1 / 2 AD -1 / 2 ; The set of similar node pairs is based on the node similarity s i,j , select s i,j ≥β node pairs: P = {(i, j) | s i,j ≥ β}; Among them, β is the similarity threshold.
Citation Information
Cited By
Communication network operation and maintenance method based on knowledge graph and related device
CN121309380A
Knowledge graph-based communication network operation and maintenance method and related device
CN121309380B