Power communication network fault detection method and system based on attention mechanism
By adopting an attention mechanism-based detection method in power communication network fault detection, a network model is built and a fault detection algorithm combined with a multi-head attention mechanism and a multi-layer perception machine is designed, the problem of low fault detection accuracy in the existing technology is solved, and a higher fault detection accuracy and lower false alarm rate are achieved.
Patent Information
- Application Number
- CN202411741592.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art has low accuracy in power communication network fault detection, which makes it difficult to quickly detect fault locations when business abnormalities occur, affecting service quality.
The power communication network fault detection method based on attention mechanism is adopted, and by building a network model of network connection relationship, network resource and service fault relationship, a fault detection algorithm combined with multi-head attention mechanism (MHA) and multi-layer perceptron (MLP) is designed to extract network resource status and fault correlation characteristics, and fault prediction is carried out.
It improves the performance of fault location algorithms for service abnormalities, can quickly discover power communication network resources that cause abnormalities in services, reduce negative impacts on services, and achieve higher fault detection accuracy and lower false alarm rates.
Smart Images

Figure CN119583300A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fault management of power communication networks, and in particular to a method and system for fault detection of power communication networks based on an attention mechanism. Background Art
[0002] With the rapid development of new power systems, power communication networks, as an important part of power systems, are crucial to the reliable operation of power systems in terms of safety and stability. In order to provide sufficient and reliable power communication network support for various power services, existing research has achieved a lot of research results in resource allocation. In order to avoid power business or service unavailability caused by power communication network resource failure, fault detection of power communication networks has become an important research topic in recent years. When power communication network equipment fails, if the fault location can be quickly found, dynamic migration technology can be used to quickly migrate related services, thereby improving service quality. When a single node or network link fails, the network management system usually receives multiple alarms, which brings great challenges to fault detection. This is because when a single node or link fails, it is easy to cause multiple associated devices or services to fail. Therefore, there are great challenges in fault diagnosis of power communication networks.
[0003] Prior Art 1 - The paper "Reflective fiber fault detection and characterization using long short-term memory" (Journal of Optical Communication and Networking, Abdelli K, et al, 2021, 13 (10): 32-41) uses a long short-term memory network to analyze network data, which improves the performance of the fault location algorithm compared to traditional machine learning algorithms. Prior Art 2 - The paper "A Service Routing Optimization Algorithm for Power Communication Optical Transport Network Based on Knowledge Graph and Reinforcement Learning" (ICAUS2021: Proceedings of 2021 International Conference on Autonomous Unmanned Systems Zhang, G, Ding, H, Wang, Y, Wang, L, Han, X, Singapore: Springer, 2021: 1337-1346) combines knowledge graphs and deep reinforcement learning technology to design a dynamic optimization algorithm for service routing. Prior Art 3 - The paper "An automated fault detection system for communication networks and distributed systems" (Applied Intelligence, Nguyen SV, Tran HM 2021, 5405-5419) uses artificial intelligence technology to design an intelligent fault location system for event filtering, fault association, and fault prediction. Prior Art 4 - The paper "Automatic alarm prioritization by data mining for fault management in cellular networks" (Expert Systems with Applications, García AJ, Toril M, Oliver P, et al, 2020, 158: 113526) uses a supervised learning model to implement alarm priority sorting and fault association from the perspective of alarm association analysis.Prior art 5 - The paper "Fault detection and identification using Bayesian recurrent neural networks" (Computers & Chemical Engineering, Sun W, Paiva AR C, Xu P, et al, 2020, 141: 106991) uses Bayesian neural network technology to detect faults. Prior art 6 - The paper "Machinery Fault Diagnosis Based on Deep Learning for Time Series Analysis and Knowledge Graphs" (Journal of Signal Processing Systems, Liu, H, Ma, R, Li, D, et al, 2021, 93: 1433-1455) uses a deep learning algorithm to analyze the time series related features of alarm information, thereby improving the performance of the fault diagnosis algorithm. Prior art 6-The paper "Performance analysis of machine learning based fault detection for cloud infrastructure" (2021InternationalConference on Information Networking (ICOIN).IEEE, 2021, 877-880.H.Won andY.Kim) proposed a FDoDNN (Fault Detection Algorithm based on Deep NeuralNetwork) algorithm, which uses a deep neural network as the network model for fault detection.
[0004] Existing technologies mainly use machine learning and deep learning technologies to analyze the log data and alarm information of network nodes and links, which improves the performance of fault location algorithms. However, existing technologies still have shortcomings in monitoring and collecting the operation status of power network services, with low fault detection accuracy and a significant negative impact on services. Summary of the invention
[0005] In order to solve the deficiencies in the prior art, the present invention provides a power communication network fault detection method and system based on an attention mechanism to solve the problem of low fault detection accuracy in the power communication network.
[0006] The present invention adopts the following technical solution.
[0007] The first aspect of the present invention provides a method for fault detection in a power communication network based on an attention mechanism, comprising the following contents:
[0008] Construct a network model of the power monitoring system network connection relationship, network resources and service fault relationship;
[0009] Build a fault detection model;
[0010] Design a power communication network fault detection algorithm based on attention mechanism in the fault detection model;
[0011] The network model of the power monitoring system network connection relationship, network resources and service fault relationship is input into the fault detection model. The fault detection model predicts whether a node in the power communication network has a fault based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of node failure.
[0012] Optionally, a network model of network connection relationships, network resources, and service failure relationships of the power monitoring system is constructed, including:
[0013] According to the relationship between the equipment nodes and communication links of the power communication network, a connection relationship diagram of the power communication network is constructed;
[0014] Construct a time series of power communication network resource characteristics, the time series includes T time periods, and the tth time period is recorded as I t The network resource status of this time period uses x t In other words, each node in the power communication network connection diagram contains fe V Features, each link contains fe L Features
[0015] Based on the time series of the power communication network connection relationship diagram and the power communication network resource characteristics, a time series model of the association between network resources and service anomalies is constructed, and based on the time series model of the association between network resources and service anomalies, a network resource and service failure relationship diagram is generated.
[0016] Optionally, the resource characteristics of the power communication network include resource characteristics related to node failures and characteristics related to link failures; the resource characteristics related to node failures include at least one of the following: CPU utilization, memory utilization, hard disk utilization and I / O utilization; the characteristics related to link failures include at least one of the following: link bandwidth utilization, link delay and link packet loss rate.
[0017] Optionally, building a fault detection model includes:
[0018] Feature extraction is performed on the power communication network connection relationship diagram and the network resource and service fault relationship diagram respectively to obtain resource connection features and resource fault features;
[0019] The resource connection features and resource fault features are concatenated to obtain a network resource fault relationship feature vector;
[0020] The network resource fault relationship feature vector is input into the MHA module for attention analysis to obtain the network resource fault correlation feature;
[0021] The network resource fault correlation features are input into the MLP fault detection module for fault prediction, completing the construction of the fault detection module.
[0022] Optionally, feature extraction is performed on the power communication network connection relationship diagram and the network resource and service fault relationship diagram to obtain resource connection features and resource fault features, including:
[0023] The CAT model is used to extract the correlation of network resource connections in the power communication network connection relationship diagram, and the correlation of network resource connections is encoded as the connection relationship between network resources and other network resources to obtain source connection characteristics;
[0024] The CAT model is used to extract the fault correlation of network resources and services in the network resource and service fault relationship graph, and the fault correlation of network resources and services is encoded into network resources and abnormal services caused by the network resources to obtain resource fault characteristics.
[0025] Optionally, the network resource fault relationship feature vector is input into the MHA module for attention analysis to obtain network resource fault correlation features, including:
[0026] Linearly transform the network resource failure relationship feature vector into three vectors: Q, K, and V;
[0027] The three vectors Q, K, and V are input into the MLP module. MHA divides the three vectors Q, K, and V into H heads respectively, and independently calculates the weighted sum of the attention weights on each head to obtain the output result of each head. The attention calculation is performed according to the following formula:
[0028] MultiHeadAtt(Q,K,V)=Concat(H1,...,H h )
[0029] H i =Attention(Q i ,K i ,V i )
[0030] Among them, Q, K, and V are vectors obtained by linearly transforming the fault relationship characteristics of the spliced network resources, and H1,...,H h The multi-head attention mechanism divides the Q, K, and V vectors into h heads respectively. Attention(Q i ,K i ,V i ) is the proportional dot product attention operation;
[0031] The output results of each header are concatenated to obtain the network resource failure correlation features.
[0032] Optionally, in the MLP module, the nodes of the input layer are set to the characteristic number of the power communication network nodes, and the MLP module includes a first hidden layer, a second hidden layer and an output layer, wherein the first hidden layer includes 50 power communication network nodes, the second hidden layer includes 30 power communication network nodes, and the number of nodes in the output layer is determined according to the number of fault categories.
[0033] Optionally, a power communication network fault detection algorithm based on an attention mechanism is designed in the fault detection model, including:
[0034] In the initialization phase, the fault detection model parameters are set to obtain the power communication network connection relationship diagram, the network resource and service fault relationship diagram, and the parameters include learning rate, batch size, training rounds and model weights;
[0035] In the loop training phase, in each iteration, the power communication network connection relationship graph, network resource and service fault relationship graph are input into the fault detection model for forward propagation;
[0036] Calculate the loss function of the fault detection model, and then update the fault detection model parameters through back propagation; stop the fault detection model training when the stopping condition is met.
[0037] Optionally, use the Sigmoid function as the activation function of the fault detection model and calculate the loss function based on the output of the Sigmoid function and the true fault label:
[0038]
[0039] Among them, y i Represents the fault prediction result of the output of the Sigmoid function, y i =1 indicates that the node is faulty, y i =0 means that there is no fault in the node; N is the number of samples, t i is the true label of the i-th sample, which is a binary variable indicating whether sample i has a fault.
[0040] Optionally, the stopping condition includes the accuracy remaining unchanged for 5 consecutive iterations.
[0041] Optionally, update the learning rate as follows:
[0042] 1. i+1 =lr i *0.5
[0043] Among them, lr i+1 is the learning rate for the next iteration training, lr i is the learning rate for the current iteration training.
[0044] A second aspect of the present invention provides a power communication network fault detection system, comprising:
[0045] The first building module is used to build a network model of the network connection relationship, network resources and service fault relationship of the power monitoring system;
[0046] A second building module is used to build a fault detection model;
[0047] Design module for designing power communication network fault detection algorithm based on attention mechanism in fault detection model;
[0048] The fault prediction module is used to input the network model of the power monitoring system network connection relationship, network resources and service fault relationship into the fault detection model. The fault detection model predicts whether a node in the power communication network has a fault based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of node failure.
[0049] The third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is loaded into the processor, the above-mentioned power communication network fault detection method based on the attention mechanism is implemented.
[0050] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned power communication network fault detection method based on the attention mechanism.
[0051] Compared with the prior art, the beneficial effects of the present invention include at least:
[0052] The present invention uses the attention mechanism to extract features from data such as network resource status, network resources and service faults, and improves the performance of the fault location algorithm for service anomalies from the perspective of service fault detection. At the same time, it helps to quickly discover the power communication network resources that cause business anomalies and quickly migrate the business on these resources, which can minimize the negative impact on the business. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0054] Figure 1 A schematic diagram of a flow chart of a power communication network fault detection algorithm based on an attention mechanism provided in an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of a fault detection model provided by an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of a fault detection accuracy comparison result provided by an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of a comparison result of a fault detection false alarm rate provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.
[0059] Combination Figure 1 As shown, embodiment 1 of the present invention provides a method for detecting faults in a power communication network based on an attention mechanism, comprising the following steps:
[0060] S1. Construct a network model of power communication network connection relationship, network resources and service fault relationship;
[0061] S1 specifically includes:
[0062] S101. Construct a connection relationship diagram of the power communication network according to the relationship between the device nodes and the communication links of the power communication network.
[0063] Specifically, according to the physical connection relationship between the network element equipment and the transmission medium in the power communication network, the connection relationship of the power communication network is abstracted into an undirected graph G = (V, L) of the physical connection of the device nodes, where V represents the device set, and the n node elements contained in the set V are represented as V = (v1, v2, ..., vn ); L represents the power communication network link set, and the m link elements contained in the set L are expressed as L = (l1, l2, ..., l m ).
[0064] S102: construct a time series of power communication network resource characteristics, wherein the time series includes T time periods, and the tth time period is recorded as I t The network resource status of this time period uses x t In other words, each node in the power communication network connection diagram contains fe V Features, each link contains fe L Features.
[0065] Specifically, the power communication network resource characteristics include resource characteristics related to node failure and characteristics related to link failure. The resource characteristics related to node failure include at least one of the following: CPU utilization, memory utilization, hard disk utilization and I / O utilization; the characteristics related to link failure include at least one of the following: link bandwidth utilization, link delay and link packet loss rate.
[0066] S103. Based on the time series of the power communication network connection relationship diagram and the power communication network resource characteristics, a time series model of the association between network resources and service anomalies is constructed, and based on the time series model of the association between network resources and service anomalies, a network resource and service fault relationship diagram is generated.
[0067] Specifically, before constructing a time series model about the association between network resources and service anomalies, it is necessary to first define the definitions of components and services. Components, as the basic building blocks of the power communication network, cover two major elements: nodes and links. Service refers to a specific function carried by the power communication network to meet the specific needs of end users. The present invention focuses on end-to-end network services. Symptoms refer to the information monitored by the network management system during service operation, which are divided into normal states (i.e. positive symptoms) and abnormal states (i.e. negative symptoms). When a component is abnormal, it will trigger one or more services to experience negative symptoms.
[0068] Specifically, a bipartite Bayesian network is used to model the relationship between services and components. In this network, the parent node represents the component (F), the child node represents the service (S), and the weight of the edge connecting the parent node and the child node reflects the probability of causing an abnormality in the child node (service) when the parent node (component) fails.
[0069] It should be noted that, in order to simplify the model diagram, the present invention mainly studies the fault detection of network nodes. Specifically, for the input time series {x1,...,x t}, with yt ∈{0,1,...,c} m The form of I t The fault label of each network resource characteristic in . t,i Represents component F i The output status of
[0070] S2. Build a fault detection model.
[0071] The overall model of fault detection is as follows Figure 2 As shown in the figure, the model consists of two parts: feature extraction and fault detection. The operation of the model includes the following five steps:
[0072] S201. Use the GAT (Graph Attention Networks) model to extract features from the power communication network connection relationship graph to obtain resource connection features.
[0073] S202: Generate a fault relationship graph of network resources and services using the time series of abnormal associations between network resources and services, and extract features of the fault relationship graph using GAT to obtain resource fault features.
[0074] S203: Concatenate the resource link features and resource fault features output by S201 and S202 to obtain a network resource fault relationship feature vector.
[0075] S204: Input the network resource failure relationship feature vector of S203 to the MHA (Multi-Head Attention) module for attention analysis.
[0076] S205. Design a fault detection MLP (Multilayer Perceptron) to perform fault detection on the output result of S204, wherein sigmoid is used as an activation function. Figure 2 The C stands for Concatenate, which can concatenate multiple features to enrich the data input of the network model.
[0077] Optionally, in S202, the GAT model is used to extract features from the power communication network connection relationship diagram and the fault relationship diagram of network resources and services. The fault correlation of network resources and services is extracted from the fault relationship diagram of network resources and services, and encoded as network resources and abnormal services caused by the network resources. The fault relationship diagram operation of network resources and services is expressed as follows:
[0078]
[0079] Among them, θ r-sis the weight matrix of the GAT network, p r-s Indicates the number of network resources, q r-s represents the number of features of each network resource, F i is the characteristic data of the network resource that caused the abnormal service. For the past T time steps, the dimension of the feature vector generated at each time step is h.
[0080] Optionally, in S201, for the power communication network connection relationship diagram, the correlation of resource connections is extracted and encoded as the connection relationship between the network resources and other network resources. The power communication network connection relationship diagram operation is expressed by the following formula:
[0081]
[0082] Among them, θ n-n is the weight matrix of the GAT network, p n-n Indicates the number of network resources, q n-n Indicates the number of connections for each network resource, F j is the connection relationship data of the jth network resource. For each network resource, the dimension of the generated feature vector is d.
[0083] In this embodiment, in order to meet the input requirements of the multi-head attention mechanism, a linear transformation strategy is adopted to transform the fused feature vector into three vectors Q, K, and V, which are input into the multi-head attention mechanism for calculation. In this way, combining resource features of multiple dimensions can more effectively detect network resources with a higher probability of failure.
[0084] The multi-head attention mechanism will split the Q, K, and V vectors into H heads respectively, and obtain Q i∈{1,...,h} i , K i and V i , and then calculate the weighted sum of attention weights independently on each head, and finally concatenate the outputs of each head and obtain the final output representation through a linear transformation. The calculation process is as follows:
[0085] O=MultiHeadAtt([O1;O2],O3,O3) (3)
[0086] MultiHeadAtt(Q,K,V)=Concat(H1,...,H h ) (4)
[0087] H i =Attention(Q i ,K i ,V i ) (5)
[0088] Among them, Q, K, and V are vectors obtained by linearly transforming the fault relationship characteristics of the spliced network resources, and H1,...,H h For the multi-head attention mechanism, the Q, K, and V vectors are divided into h heads respectively.
[0089] Attention(Q i ,K i ,V i ) is the proportional dot product attention operation.
[0090] Further, in order to improve the performance of MLP, the number of nodes in the input layer is set to the number of features of the nodes. The number of hidden layers and the number of nodes in each layer are adjusted according to the results of the model. The embodiment of the present invention designs two hidden layers, the first hidden layer has 50 nodes, and the second hidden layer has 30 nodes. The number of nodes in the output layer is determined by the number of fault categories. The present invention determines whether each network resource is faulty and classifies it into two categories, then the output layer has 2 nodes. The output value of each node represents the probability of the fault of that category.
[0091] Specifically, the loss function is used to evaluate the consistency between the actual output value and the expected output value of the neural network model. The present invention uses cross entropy loss to evaluate fault detection. Assume that the output of the model for the i-th sample is a scalar y i , which is processed by the sigmoid function and represents the probability of predicting the positive class. The loss function is shown in formula (6).
[0092]
[0093] Among them, y i represents the fault prediction result, y i =1 indicates that the node is faulty, y i =0 means that there is no fault in the node; N is the number of samples, t i is the true label of the i-th sample, which is a binary variable (0 or 1) indicating whether sample i belongs to the positive class (i.e., whether there is a fault).
[0094] S3. A power communication network fault detection algorithm based on attention mechanism was designed.
[0095] The Fault Detection Algorithm for Power Communication Network based on Attention Mechanism (FDoAM) proposed in the embodiment of the present invention is shown in Table 1. The algorithm mainly includes two processes: initialization and cyclic training. S3 specifically includes:
[0096] S301, in the initialization step, the starting conditions for ensuring model training are achieved, including necessary hyperparameter settings and data preparation. In terms of necessary hyperparameter settings, learning rate, batch size, training rounds, model weights, etc. In terms of data preparation, it is necessary to prepare data such as the time series of the abnormal relationship between network resources and services, the connection relationship diagram of the power communication network, and build a fault relationship diagram of network resources and services based on these data. In order to build a fault relationship diagram of network resources and services, first extract the time point when the fault occurs from the time series of the abnormal relationship between network resources and services. Secondly, the time series data of historical features is normalized or standardized.
[0097] S302, in the cyclic training step, the network model is trained using T training rounds. This step is the core step of the model, and the model parameters are continuously optimized through multiple iterations. In each iteration, the data is preprocessed and sent to the model for forward propagation, and then the loss is calculated and the model parameters are updated through back propagation. The termination training condition ensures that the model training stops at the appropriate time to avoid overtraining.
[0098] Table 1
[0099]
[0100]
[0101] S4. The network model of the power monitoring system network connection relationship, network resources and service fault relationship is input into the fault detection model. The fault detection model predicts whether a node in the power communication network fails based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of node failure.
[0102] Embodiment 2 of the present invention provides a power communication network fault detection system, which runs the method for power communication network fault detection based on the attention mechanism as described in Embodiment 1, and the system includes: a first construction module, which is used to construct a network model of the network connection relationship, network resources and service fault relationship of the power monitoring system; a second construction module, which is used to construct a fault detection model; a design module, which is used to design a power communication network fault detection algorithm based on the attention mechanism in the fault detection model; a fault prediction module, which is used to input the network model of the network connection relationship, network resources and service fault relationship of the power monitoring system into the fault detection model, and the fault detection model predicts whether a node in the power communication network has a fault based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of the node failing.
[0103] Embodiment 3 of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is loaded into the processor, the method for detecting faults in a power communication network based on the attention mechanism described in Embodiment 1 is implemented.
[0104] Embodiment 4 of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting faults in a power communication network based on the attention mechanism according to Embodiment 1 is implemented.
[0105] Embodiment 5 of the present invention provides a verification embodiment of a method for detecting faults in a power communication network based on an attention mechanism. The details are as follows:
[0106] In order to verify the performance of the algorithm of the present invention, an experimental platform was built to realize fault prediction. The experimental network topology design includes network nodes and links. In terms of network node design, 20 switches are designed as network nodes. In terms of network links, 40 links are designed to connect network nodes. In terms of network service simulation, the shortest path is used to simulate end-to-end network services. In terms of fault simulation, network nodes on the shortest path of each service are randomly selected to generate network faults. In order to make the simulation environment consistent with the actual operation and maintenance environment, the embodiment of the present invention randomly selects 1-3 network nodes with the highest packet loss rate as fault nodes.
[0107] In order to verify the performance of the algorithm FDoAM of the present invention, the algorithm FDoDNN designed in the prior art 6 is used for comparison. Among them, the algorithm FDoDNN uses a deep neural network as a network model for fault detection to perform fault detection. In terms of algorithm performance analysis indicators, the accuracy and false alarm rate of fault diagnosis are used for analysis.
[0108] The comparison results of the fault detection accuracy of the two algorithms are shown in Figure 3 As shown. Figure 3 It can be seen that with the increase in the number of algorithm iterations, the detection accuracy of the algorithm FDoAM of the present invention and the comparison algorithm FDoDNN are gradually increasing. From the analysis of the specific accuracy results, it can be seen that the fault detection accuracy of the algorithm FDoAM of the present invention is significantly higher than the detection accuracy of the comparison algorithm FDoDNN. Therefore, from the experimental results, it can be seen that the fault detection accuracy of the algorithm of the present invention is higher.
[0109] The comparison results of the fault detection false alarm rate of the two algorithms are as follows: Figure 4 As shown. Figure 4It can be seen that with the increase in the number of algorithm iterations, the detection false alarm rates of the algorithm FDoAM of the present invention and the comparison algorithm FDoDNN are gradually decreasing. From the analysis of the specific false alarm rate results, it can be seen that the fault detection false alarm rate under the algorithm FDoAM of the present invention is significantly lower than the detection false alarm rate of the comparison algorithm FDoDNN. Therefore, from the experimental results, it can be seen that the fault detection false alarm rate under the algorithm of the present invention is low.
[0110] Compared with the prior art, the beneficial effects of the present invention include at least:
[0111] The present invention uses the attention mechanism to extract features from data such as network resource status, network resources and service faults, and improves the performance of the fault location algorithm for service anomalies from the perspective of service fault detection. At the same time, it helps to quickly discover the power communication network resources that cause business anomalies and quickly migrate the business on these resources, which can minimize the negative impact on the business.
[0112] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0113] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0114] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0115] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0116] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A power communication network fault detection method based on attention mechanism, characterized in that: Includes the following: Construct a network model of the power monitoring system network connection relationship, network resources and service fault relationship; Build a fault detection model; Design a power communication network fault detection algorithm based on attention mechanism in the fault detection model; The network model of the power monitoring system network connection relationship, network resources and service fault relationship is input into the fault detection model. The fault detection model predicts whether a node in the power communication network has a fault based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of node failure.
2. The power communication network fault detection method based on the attention mechanism according to claim 1 is characterized in that: Construct a network model of the power monitoring system network connection relationship, network resources and service fault relationship, including: According to the relationship between the equipment nodes and communication links of the power communication network, a connection relationship diagram of the power communication network is constructed; Construct a time series of power communication network resource characteristics, the time series includes T time periods, and the tth time period is recorded as I t The network resource status of this time period uses x t In other words, each node in the power communication network connection diagram contains fe V Features, each link contains fe L Features Based on the time series of the power communication network connection relationship diagram and the power communication network resource characteristics, a time series model of the association between network resources and service anomalies is constructed, and based on the time series model of the association between network resources and service anomalies, a network resource and service failure relationship diagram is generated.
3. The power communication network fault detection method based on the attention mechanism according to claim 2 is characterized in that: The resource characteristics of the electric power communication network include resource characteristics related to node failures and characteristics related to link failures; the resource characteristics related to node failures include at least one of the following: CPU utilization, memory utilization, hard disk utilization and I / O utilization; the characteristics related to link failures include at least one of the following: link bandwidth utilization, link delay and link packet loss rate.
4. The power communication network fault detection method based on the attention mechanism according to claim 3 is characterized in that: Building a fault detection model includes: Feature extraction is performed on the power communication network connection relationship diagram and the network resource and service fault relationship diagram respectively to obtain resource connection features and resource fault features; The resource connection features and resource fault features are concatenated to obtain a network resource fault relationship feature vector; The network resource fault relationship feature vector is input into the MHA module for attention analysis to obtain the network resource fault correlation feature; The network resource fault correlation features are input into the MLP fault detection module for fault prediction, completing the construction of the fault detection module.
5. The power communication network fault detection method based on the attention mechanism according to claim 4 is characterized in that: The power communication network connection relationship diagram, network resource and service fault relationship diagram are used for feature extraction to obtain resource connection features and resource fault features, including: The CAT model is used to extract the correlation of network resource connections in the power communication network connection relationship diagram, and the correlation of network resource connections is encoded as the connection relationship between network resources and other network resources to obtain source connection characteristics; The CAT model is used to extract the fault correlation of network resources and services in the network resource and service fault relationship graph, and the fault correlation of network resources and services is encoded into network resources and abnormal services caused by the network resources to obtain resource fault characteristics.
6. The power communication network fault detection method based on the attention mechanism according to claim 4 is characterized in that: The network resource fault relationship feature vector is input into the MHA module for attention analysis to obtain the network resource fault correlation features, including: Linearly transform the network resource failure relationship feature vector into three vectors: Q, K, and V; The three vectors Q, K, and V are input into the MLP module. MHA divides the three vectors Q, K, and V into H heads respectively, and independently calculates the weighted sum of the attention weights on each head to obtain the output result of each head. The attention calculation is performed according to the following formula: MultiHeadAtt(Q,K,V)=Concat(H1,...,H h ) H i =Attention(Q i ,K i ,V i ) Among them, Q, K, and V are vectors obtained by linearly transforming the fault relationship characteristics of the spliced network resources, and H1,...,H h For the multi-head attention mechanism, the Q, K, and V vectors are divided into h heads respectively. Attention(Q i ,K i ,V i ) is the proportional dot product attention operation; The output results of each header are concatenated to obtain the network resource failure correlation features.
7. The power communication network fault detection method based on the attention mechanism according to claim 5 is characterized in that: In the MLP module, the nodes of the input layer are set to the characteristic number of the power communication network nodes. The MLP module includes a first hidden layer, a second hidden layer and an output layer, wherein the first hidden layer includes 50 power communication network nodes, the second hidden layer includes 30 power communication network nodes, and the number of nodes in the output layer is determined according to the number of fault categories.
8. The power communication network fault detection method based on the attention mechanism according to claim 1 is characterized in that: Design a power communication network fault detection algorithm based on attention mechanism in the fault detection model, including: In the initialization phase, the fault detection model parameters are set to obtain the power communication network connection relationship diagram, the network resource and service fault relationship diagram, and the parameters include learning rate, batch size, training rounds and model weights; In the loop training phase, in each iteration, the power communication network connection relationship graph, network resource and service fault relationship graph are input into the fault detection model for forward propagation; Calculate the loss function of the fault detection model, and then update the fault detection model parameters through back propagation; stop the fault detection model training when the stopping condition is met.
9. The power communication network fault detection method based on the attention mechanism according to claim 8 is characterized in that: The Sigmoid function is used as the activation function of the fault detection model, and the loss function is calculated based on the output of the Sigmoid function and the true fault label: Among them, y i Represents the fault prediction result of the output of the Sigmoid function, y i =1 indicates that the node is faulty, y i =0 means that there is no fault in the node; N is the number of samples, t i is the true label of the i-th sample, which is a binary variable indicating whether sample i has a fault.
10. The power communication network fault detection method based on the attention mechanism according to claim 8, characterized in that: The stopping condition includes the accuracy remaining unchanged for 5 consecutive iterations.
11. The power communication network fault detection method based on the attention mechanism according to claim 8, characterized in that: Update the learning rate according to the following formula: lr i+1 =lr i *0.5 Among them, lr i+1 is the learning rate for the next iteration training, lr i is the learning rate for the current iteration training.
12. A power communication network fault detection system according to any one of claims 1 to 11, characterized in that: include: The first building module is used to build a network model of the network connection relationship, network resources and service fault relationship of the power monitoring system; A second building module is used to build a fault detection model; Design module for designing power communication network fault detection algorithm based on attention mechanism in fault detection model; The fault prediction module is used to input the network model of the power monitoring system network connection relationship, network resources and service fault relationship into the fault detection model. The fault detection model predicts whether a node in the power communication network has a fault based on the power communication network fault detection algorithm of the attention mechanism, and outputs the probability of node failure.
13. An electronic device, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the power communication network fault detection method based on the attention mechanism according to any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the power communication network fault detection method based on the attention mechanism described in any one of claims 1-11 are implemented.
Citation Information
Cited By
Network operation and maintenance automatic monitoring real-time response method
CN120856589A
A network operation automation monitoring real-time response method
CN120856589B