Communication network fault detection method based on dynamic routing

By combining a dynamic routing control module and a lightweight feature extraction module, the problem of missed detection and false alarms in traditional network fault detection methods under complex environments is solved, achieving efficient and accurate fault detection while reducing the consumption of computing and storage resources.

CN121907679APending Publication Date: 2026-04-21INNER MONGOLIA ELECTRIC POWER (GROUP) CO LTD COMMUNICATIONS BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INNER MONGOLIA ELECTRIC POWER (GROUP) CO LTD COMMUNICATIONS BRANCH
Filing Date
2025-12-10
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional network fault detection methods are prone to missed detections and false alarms in complex or dynamic network environments. Furthermore, deep learning fault detection technology has high computational requirements and consumes a lot of storage resources, making it difficult to meet the needs of real-time monitoring and rapid response.

Method used

A communication network fault detection method based on dynamic routing is adopted. The dynamic routing control module adaptively selects the feature extraction path and dynamically activates or prunes the network model structure. Combined with a lightweight gated loop module and a spatiotemporal feature reconstruction module, on-demand feature extraction is achieved.

Benefits of technology

While ensuring detection accuracy, it reduces the consumption of computing and storage resources, achieving efficient and accurate fault detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907679A_ABST
    Figure CN121907679A_ABST
Patent Text Reader

Abstract

The invention discloses a communication network fault detection method based on dynamic routing, and belongs to the technical field of fault detection. The method comprises the following steps: acquiring original traffic data of a communication network; performing feature extraction on the original flow data through a first feature extraction module in the fault detection model to obtain a comprehensive feature vector; inputting the comprehensive feature vector into a dynamic routing control module to obtain a path activation vector; according to the path activation vector, determining an activation state of each sub-module in the second feature extraction module; and processing the comprehensive feature vector through a second feature extraction module and a classifier in sequence to obtain a fault detection result of the communication network. According to the scheme, the fault detection model can activate or cut the network path as required according to the original flow data of the communication network, and consumption of calculation and storage resources is reduced while the detection precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fault detection technology, and in particular to a fault detection method for communication networks based on dynamic routing. Background Technology

[0002] In the management and optimization of communication networks, network fault detection is a cutting-edge method for protection and tracing. Traditional signature and rule-based methods struggle to detect unknown or hidden fault types; therefore, machine learning methods are now commonly used for network fault detection. Traditional methods are ill-suited to time-varying distributions or weak fault signals, and are prone to missed detections and false alarms in complex or dynamic network environments, resulting in poor stability of detection results. Furthermore, typical machine learning models usually only focus on time-series features, failing to fully consider the spatial relationships between network nodes and links, leading to incomplete fault identification and insufficient detection accuracy. To improve detection accuracy, deep learning, which excels at capturing complex spatiotemporal features, can be used for fault detection. However, deep learning fault detection techniques generally employ complex network models with fixed structures, resulting in a large number of parameters, high computational cost, slow inference speed, and high detection latency, leading to significant consumption of computational and storage resources. Summary of the Invention

[0003] Therefore, it is necessary to provide a communication network fault detection method based on dynamic routing to address the above problems, which can reduce the consumption of computing and storage resources while ensuring detection accuracy.

[0004] On the one hand, this application provides a communication network fault detection method based on dynamic routing, the method comprising: In one optional implementation, the second feature extraction module includes a plurality of sub-modules connected in sequence; The step of processing the comprehensive feature vector sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network includes: If at least one sub-module in the second feature extraction module is activated, the comprehensive feature vector is processed through the activated sub-module to obtain the deep feature extraction result; The deep feature extraction results are input into the classifier to obtain the fault detection results of the communication network; If no sub-module is activated in the second feature extraction module, the comprehensive feature vector is input into the classifier to obtain the fault detection result of the communication network.

[0005] In one alternative implementation, each submodule includes a multi-head attention module, a feedforward neural network, and a normalization layer connected in sequence, and the input of the submodule is residually connected to the output of the feedforward neural network.

[0006] In one optional implementation, the first feature extraction module includes a gated loop module and a spatiotemporal feature reconstruction module; the gated loop module includes at least one gated loop unit; in the gated loop unit, the target matrix is ​​decomposed into a first matrix and a second matrix; the first matrix is ​​used to weight the input data in the computation flow of the gated loop unit; the second matrix is ​​used to weight the hidden layer data in the computation flow of the gated loop unit; the target matrix is ​​at least one of an update gate weight matrix, a reset gate weight matrix, and a candidate state weight matrix; the spatiotemporal feature reconstruction module includes an encoding unit and a decoding unit; The step of extracting features from the raw traffic data using the first feature extraction module in the fault detection model to obtain a comprehensive feature vector includes: The raw traffic data is input into the gated loop module according to the time sequence to obtain the first feature vector; The first feature vector is input into the spatiotemporal feature reconstruction module to obtain the second feature vector; The first feature vector and the second feature vector are concatenated to obtain the comprehensive feature vector.

[0007] In one optional implementation, the gated loop module further includes a localized sensitive attention unit; The step of inputting the raw traffic data into the gated loop module according to the time sequence to obtain the first feature vector includes: The raw traffic data is processed sequentially through the gated loop unit according to the time sequence to obtain a traffic feature sequence. The first feature vector is obtained by weighted fusion of the traffic features at each time step in the traffic feature sequence with the traffic features of the previous N time steps through the local sensitive attention unit.

[0008] In one optional implementation, the spatiotemporal feature reconstruction module further includes a noise injection layer and a bottleneck layer; the noise injection layer, the encoding unit, the bottleneck layer, and the decoding unit are connected in sequence. The step of inputting the first feature vector into the spatiotemporal feature reconstruction module to obtain the second feature vector includes: The first feature vector is processed through the noise injection layer to obtain noise data; The noise data is input into the coding unit for group coding to obtain latent features; the coding unit includes at least two group coding layers; each group coding layer divides the input channel into multiple groups, and each group is convolved separately before the results are concatenated. The latent features are processed through a bottleneck layer to obtain sparse features; The sparse features are input into the decoding unit for group decoding to obtain the second feature vector; the decoding unit includes at least two group decoding layers; each group decoding layer divides the input channel into multiple groups, and each group is convolved and the results are concatenated.

[0009] In an optional implementation, the method further includes: Obtain sample traffic data of the communication network and fault labels of the communication network; The sample traffic data of the communication network is input into the fault detection model to obtain the prediction results output by the classifier, the number of sub-modules activated in the second feature extraction module, the weight parameters of the bottleneck layer, the first prediction feature output by the gated loop module, and the second prediction feature output by the spatiotemporal feature reconstruction module. Based on the prediction results and fault labels, a predicted loss value is generated; Regularization is performed based on the weight parameters of the bottleneck layer to generate a regularized loss value. Based on the first and second prediction features, the reconstruction loss value of the spatiotemporal feature reconstruction module is generated; Based on the number of activated sub-modules in the second feature extraction module, an activation cost is generated; The fault detection model is updated with parameters based on the predicted loss value, the regularization loss value, the reconstruction loss value, and the activation cost.

[0010] On another front, a communication network fault detection device based on dynamic routing is provided, the device comprising: The data acquisition module is used to acquire raw traffic data from the communication network. The feature extraction module is used to extract features from the original traffic data through the first feature extraction module in the fault detection model to obtain a comprehensive feature vector; the fault detection model also includes a dynamic routing control module, a second feature extraction module, and a classifier; An activation determination module is used to input the comprehensive feature vector into the dynamic routing control module to obtain a path activation vector; wherein each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module; each element in the path activation vector is used to indicate the activation probability of the corresponding sub-module. The path activation module is used to determine the activation state of each sub-module in the second feature extraction module based on the path activation vector. The fault detection module is used to process the comprehensive feature vector sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network. The fault detection model is a deep learning model trained based on sample traffic data and fault labels from the communication network.

[0011] On the other hand, an electronic device is provided, comprising: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform the aforementioned communication network fault detection method based on dynamic routing.

[0012] In another aspect, a computer-readable storage medium is provided, on which computer instructions are stored, the computer instructions being used to cause a computer to execute the above-described dynamic routing-based communication network fault detection method.

[0013] Compared with the prior art, the technical solution provided in this application has the following advantages: After obtaining the raw traffic data of the communication network, this application inputs the raw traffic data into a fault detection model. In the fault detection model, a first feature extraction module first extracts features from the raw traffic to obtain a comprehensive feature vector. Then, the fault detection model processes the comprehensive feature vector through a dynamic routing control module to obtain a path activation vector, thereby determining whether a deep second feature extraction module needs to be activated and the number of sub-modules to be activated. Finally, the comprehensive feature vector is processed by the second feature extraction module and a classifier to obtain the final fault detection result. This scheme, through the dynamic routing control module, determines the feature extraction paths activated in the deep second feature extraction module, allowing the fault detection model to activate or trim network paths as needed based on the raw traffic data of the communication network. For simpler raw traffic data, a smaller model structure is used; for more complex raw traffic data, a more complex deep feature extraction module can be activated, reducing the consumption of computational and storage resources while ensuring detection accuracy. Attached Figure Description

[0014] Figure 1 A flowchart of a communication network fault detection method based on dynamic routing according to an embodiment of this application is shown; Figure 2 A flowchart illustrating a communication network fault detection method based on dynamic routing according to an embodiment of this application is shown. Figure 3 This paper shows a schematic diagram of the structure of a fault detection model according to an embodiment of the present application; Figure 4 This application illustrates a model training logic diagram according to an embodiment. Figure 5This paper shows a structural block diagram of a communication network fault detection device based on dynamic routing, as illustrated in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of this application. Detailed Implementation

[0015] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0016] In the management and optimization of communication networks, network fault detection is a cutting-edge means of protection and tracing. Traditional signature and rule-based methods struggle to discover unknown or hidden fault types, while statistical traditional machine learning methods have limitations in temporal modeling and noise robustness. Deep learning can capture complex spatiotemporal patterns and improve the identification of unknown faults, but deep learning fault detection technologies generally employ complex network models with fixed structures, resulting in a large number of parameters and high computational cost, leading to slow inference speed and high detection latency, which does not meet the application requirements of real-time monitoring and rapid response.

[0017] To address the aforementioned problems, this application provides a communication network fault detection method based on dynamic routing. Figure 1 A flowchart of a communication network fault detection method based on dynamic routing according to an embodiment of this application is shown, as follows: Figure 1 As shown, the process of the communication network fault detection method based on dynamic routing provided in this application embodiment includes the following steps: Step 101: Obtain the raw traffic data of the communication network.

[0018] Optionally, in this embodiment of the application, the raw traffic data may include link traffic statistics, node congestion information, data packet forwarding information, packet loss rate, latency variation, jitter, and protocol characteristics collected by the communication network within a preset sampling period.

[0019] The aforementioned raw traffic data can be collected and reported in real time by a network management system (NMS), SDN controller, or monitoring probe. After acquiring the data from these devices, the computer equipment stores it in chronological order to generate raw traffic data for subsequent analysis.

[0020] Step 102: The original traffic data is subjected to feature extraction by the first feature extraction module in the fault detection model to obtain a comprehensive feature vector.

[0021] In this embodiment of the application, the fault detection model may adopt a deep learning architecture, and the fault detection model is a deep learning model trained based on sample traffic data of the communication network and fault labels.

[0022] Optionally, the first feature extraction module may include structures such as convolutional neural networks, recurrent neural networks, and long short-term memory networks to extract temporal and / or spatial characteristics from the raw traffic data, and finally output a comprehensive feature vector F to represent the operating status of the communication network.

[0023] The fault detection model also includes a dynamic routing control module, a second feature extraction module, and a classifier. The specific functions of the dynamic routing control module, the second feature extraction module, and the classifier will be detailed in subsequent steps and will not be elaborated upon here.

[0024] Step 103: Input the integrated feature vector into the dynamic routing control module to obtain the path activation vector.

[0025] Each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module; each element in the path activation vector is used to indicate the activation probability of the corresponding sub-module.

[0026] In other words, in this embodiment of the application, the dynamic routing control module is used to adaptively select the subsequent feature extraction path based on the feature distribution of the comprehensive feature vector F.

[0027] Specifically, if the number of sub-modules in the second feature extraction module of the fault detection model is K, then the dynamic routing control module can process the input comprehensive feature vector F (through MLP or gating mechanism) to generate a path activation vector A of length K.

[0028] At this point, each element of A corresponds to a sub-module in the second feature extraction module; the value of A[i] (that is, the i-th element in the path activation vector A) is used to represent the probability that the i-th sub-module is activated.

[0029] Step 104: Determine the activation state of each sub-module in the second feature extraction module based on the path activation vector.

[0030] In this embodiment of the application, after obtaining the path activation vector, since the value of the i-th element in the path activation vector A is used to represent the probability of the i-th sub-module being activated, the current activation state of each sub-module of the second feature extraction module can be controlled according to the path activation vector, thereby determining the size of the network parameters to be used when performing fault detection based on the original traffic data.

[0031] In one optional implementation, for the i-th element in the path activation vector A, its corresponding value can be converted into a probability value through normalization and compared with a preset probability threshold to determine the activation state of the i-th sub-module of the second feature extraction module.

[0032] In another alternative implementation, for the i-th element of the path activation vector A, its corresponding value can be converted into a probability value through normalization, and randomization can be performed based on the probability value to determine whether the i-th sub-module is in an active state.

[0033] Step 105: The comprehensive feature vector is processed sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network.

[0034] After determining the activation state of the sub-module, this embodiment inputs the comprehensive feature vector F into the activated sub-modules in the second feature extraction module to perform deep feature transformation in sequence, thereby obtaining a more discriminative high-dimensional feature representation.

[0035] If there is an inactive sub-module in the data transmission path of the second feature extraction module, then the sub-module will not process the data and will directly transmit it to the next sub-module or output it to the classifier.

[0036] Therefore, in one possible implementation, if all sub-modules in the second feature extraction module are not activated, the second feature extraction module does not perform data processing operations on the comprehensive feature vector F, but directly passes it to the classifier for classification (such as a Softmax classifier, a fully connected network, or an attention-based discriminant module) to obtain the fault detection results of the communication network.

[0037] In summary, after obtaining the raw traffic data of the communication network, this application inputs the raw traffic data into a fault detection model. In the fault detection model, the first feature extraction module extracts features from the raw traffic to obtain a comprehensive feature vector. Then, the fault detection model processes the comprehensive feature vector through a dynamic routing control module to obtain a path activation vector, thereby determining whether a deep second feature extraction module needs to be activated and the number of sub-modules to be activated. Finally, the comprehensive feature vector is processed by the second feature extraction module and a classifier to obtain the final fault detection result. This scheme, through the dynamic routing control module, determines the feature extraction paths activated in the deep second feature extraction module, allowing the fault detection model to activate or trim network paths as needed based on the raw traffic data of the communication network. For simpler raw traffic data, a smaller model structure is used; for more complex raw traffic data, a more complex deep feature extraction module can be activated, reducing the consumption of computational and storage resources while ensuring detection accuracy.

[0038] Figure 2 A flowchart illustrating a communication network fault detection method based on dynamic routing according to an embodiment of this application is shown. Figure 2 As shown, the method includes: Step 201: Obtain the raw traffic data of the communication network.

[0039] In this embodiment, the raw traffic data of the communication network at each time slice is first acquired. The raw traffic data may include, but is not limited to, multi-dimensional performance indicators such as throughput, latency, packet loss rate, and port utilization, and is composed of time-series traffic data according to the order in which they are generated, for subsequent time-series feature extraction and reconstruction analysis.

[0040] Step 202: Input the raw traffic data into the gated loop module according to the time sequence to obtain the first feature vector.

[0041] In this embodiment, to achieve fault detection in a communication network, the raw traffic data of the communication network can be input into a fault detection model for processing. The fault detection model can employ the basic framework of a deep learning model to improve the accuracy of fault detection in the communication network. However, since general deep learning models have a large number of parameters, they place very high demands on the computing performance and storage capacity of the computer during fault prediction.

[0042] Therefore, this application's embodiments optimize the model structure from multiple perspectives based on the deep learning model, thereby reducing the requirements for computational and storage performance while ensuring accurate fault identification. Please refer to... Figure 3 , Figure 3 A schematic diagram of the structure of a fault detection model according to an embodiment of this application is shown. Figure 3 As shown, the fault detection model in this embodiment includes a first feature extraction module, a dynamic routing control module, a second feature extraction module, and a classifier.

[0043] First, the first feature extraction module includes, for example: Figure 3 The diagram shows a gated loop module and a spatiotemporal feature reconstruction module. The gated loop module includes at least one gated loop unit. In the gated loop unit, the target matrix is ​​decomposed into a first matrix and a second matrix. The first matrix is ​​used to weight the input data in the computation process of the gated loop unit. The second matrix is ​​used to weight the hidden layer data in the computation process of the gated loop unit. The target matrix is ​​at least one of an update gate weight matrix, a reset gate weight matrix, and a candidate state weight matrix.

[0044] In this embodiment, the gated recurrent unit (GRU) is a lightweight recurrent neural network unit used to capture long-term dependencies in sequence data. The GRU controls the retention and updating of information through two gates—an update gate and a reset gate. However, to ensure the ability to extract time-series data, the dimensionality of the GRU's weight matrix may be too large, placing a heavy burden on computer storage and computation. In this case, a low-rank decomposition of the weight matrix can be performed.

[0045] Specifically, for the weight matrix W (which is also the target matrix mentioned above, and can be the update gate weight matrix), Reset gate weight matrix and candidate state weight matrix (any one of them), after decomposition, we get (That is, the first matrix) and (That is, the second matrix), as shown in formula (1).

[0046] The core formula of GRU has been updated to:

[0047]

[0048]

[0049]

[0050] in To update the door, To reset the door, This is a candidate hidden state. This represents the current hidden state, and it represents element-wise multiplication. , , These are the input weights after low-rank decomposition. , , For the hidden layer weights, low-rank decomposition is used to reduce the dimension of the weight matrix, making the model calculation process more efficient.

[0051] Optionally, the gated loop module also includes a localized sensitive attention unit; At this point, in the model, the original traffic data can be processed sequentially through the gated loop unit to obtain the traffic feature sequence. Through the local sensitive attention unit, the traffic features at each time step in the traffic feature sequence are weighted and fused with the traffic features of the previous N time steps to obtain the first feature vector.

[0052] Specifically, to further improve GRU's ability to extract temporal features, a Local Sensitive Attention (LSA) unit is introduced. Compared with traditional attention mechanisms, the LSA mechanism only calculates the attention weights between the current time step and the previous N (e.g., N=5) time steps, thus exponentially reducing computational complexity. The specific calculation process is as follows, assuming the input sequence is... Based on the query variables at the current moment and the key vectors of the first 5 time steps Attention weights are obtained through dot product operations. , (t is the current time, For the relevant time steps), as shown in formula (6):

[0053] After obtaining the normalized attention weights, we can then use formula (7) to obtain...

[0054] in, It is a corresponding value vector. This is the first eigenvector mentioned above.

[0055] After the above optimizations, the model can focus more on short-term historical information closely related to the current moment, reducing the amount of computation while enhancing the ability to extract key time-series features.

[0056] Step 203: Input the first feature vector into the spatiotemporal feature reconstruction module to obtain the second feature vector.

[0057] To further enhance the model's ability to extract complex spatiotemporal features, this invention designs a spatiotemporal feature reconstruction module based on an improved denoising autoencoder. This module replaces the fully connected layers in a traditional denoising autoencoder with a grouped convolutional structure to reduce the number of model parameters and improve spatial feature extraction efficiency. The grouped convolutional operation not only possesses sparse connectivity and local awareness characteristics but also achieves efficient parallel computation through channel splitting and weight sharing, thereby significantly reducing computational complexity while maintaining extraction capabilities. While retaining the advantages of spatial feature extraction, this module preserves the core functionality of the denoising autoencoder, effectively improving the model's ability to recognize local spatial features and combinations of composite features through denoising and compressing the input data. The introduction of reconstruction errors further enhances the model's sensitivity to fault signals, enabling it to maintain stable feature representation performance even in complex network environments.

[0058] In other words, such as Figure 3As shown, the spatiotemporal feature reconstruction module includes an encoding unit and a decoding unit. The spatiotemporal feature reconstruction module also includes a noise injection layer and a bottleneck layer. The noise injection layer, encoding unit, bottleneck layer and decoding unit are connected in sequence.

[0059] At this point, in the spatiotemporal feature reconstruction module, the first feature vector can be processed through the noise injection layer to obtain noise data; the noise data is then input into the encoding unit for group encoding to obtain latent features; the encoding unit includes at least two group encoding layers; each group encoding layer divides the input channel into multiple groups, and each group is convolved before the results are concatenated; the latent features are processed through the bottleneck layer to obtain sparse features; the sparse features are then input into the decoding unit for group decoding to obtain the second feature vector; the decoding unit includes at least two group decoding layers; each group decoding layer divides the input channel into multiple groups, and each group is convolved before the results are concatenated.

[0060] Specifically, the data is processed through a lightweight GRU module to obtain the input data X for the spatiotemporal feature reconstruction module. The data first enters a noise injection layer to obtain noise data Xnoise, which then enters the encoder. The encoder consists of two layers of grouped convolutions, with the number of groups set to 8. The input channels are divided into multiple groups, each undergoing a convolution operation, and the results are then concatenated. Taking the first layer of grouped convolutions as an example, assuming the input channels... The output channels are 64, and the kernel size is k. Then, for the g-th group (g = 1, ..., 8), its input is... The convolution kernel is Output As shown in formula (8) below:

[0061] Therefore, the final output of the spatiotemporal feature reconstruction module for:

[0062] Furthermore, in this embodiment, the weights of each group convolution are shared, which can significantly reduce the number of model parameters while also enabling the learning of local features within different groups. The first layer of group convolution transforms the number of channels from 128 dimensions to 64 dimensions, and the second layer further reduces the number of channels to 32 dimensions, gradually extracting spatial features from the data. The data passes through the encoder's two layers of group convolution to obtain latent features Z, which then reaches the bottleneck layer. The bottleneck layer uses 16-bit sparse feature representation.

[0063] The 16-bit sparse features output by the bottleneck layer finally reach the decoder. The decoder adopts a grouped convolutional structure that is symmetrical to the encoder. Through grouped convolutional operations, the 16-dimensional features are gradually reconstructed back into the original feature space, realizing the reconstruction of data X and obtaining the second feature vector.

[0064] Step 204: Concatenate the first feature vector and the second feature vector to obtain the comprehensive feature vector.

[0065] To achieve on-demand activation and adaptive resource allocation of the model, this invention employs a dynamic routing control mechanism. This mechanism fuses the temporal features generated by the lightweight GRU module with the statistical features extracted by the spatiotemporal feature reconstruction module to form a comprehensive feature vector. This feature vector is then processed by a multilayer perceptron to generate a path activation vector, which is further converted into a binary mask signal to determine whether to enable the variable deep learning module.

[0066] Specifically, after the input data is processed by the lightweight GRU module and the spatiotemporal feature reconstruction module to reduce the dimensionality of the features, the feature vectors of the lightweight GRU module and the first 10 features of the feature vectors generated by the spatiotemporal feature reconstruction module are concatenated, such as average packet length, protocol distribution characteristics, traffic entropy value, port change rate, etc., to generate a comprehensive feature vector F that is input to the dynamic routing control module.

[0067] Step 205: Input the comprehensive feature vector into the dynamic routing control module to obtain the path activation vector; wherein each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module.

[0068] Based on the comprehensive feature vector F, the dynamic routing module mechanism performs fast computation through a multilayer perceptron to generate the path activation vector A, and its calculation formula (10) is as follows:

[0069] To achieve binary decision-making, each element of the activation vector A represents the activation probability of a specific module. The activation vector A is converted into a binary mask M. By setting a threshold, it is determined which modules should be activated and which should be skipped, thereby dynamically adjusting the computation path of the model.

[0070] Therefore, the dynamic routing control module can dynamically adjust the deep model structure according to real-time traffic and operating environment, ensuring the detection effect of network traffic while maximizing the utilization of computing resources and reducing unnecessary consumption of computing resources.

[0071] Step 206: Determine the activation state of each sub-module in the second feature extraction module based on the path activation vector.

[0072] In this embodiment, the second feature extraction module includes several sub-modules connected in sequence. If at least one sub-module in the second feature extraction module is activated, the comprehensive feature vector is processed through the activated sub-module to obtain a deep feature extraction result. The deep feature extraction result is then input into the classifier to obtain the fault detection result of the communication network. If no sub-module is activated in the second feature extraction module, the comprehensive feature vector is input into the classifier to obtain the fault detection result of the communication network.

[0073] In other words, when traffic characteristics are simple or resources are limited, the model automatically skips the variable depth path and directly enters the classification output stage, achieving fast detection with low latency and low energy consumption. When traffic characteristics are complex or detection accuracy requirements are high, the model activates the deep modeling path and selects at least one sub-module for deep feature extraction, thereby improving global feature extraction capability and detection accuracy. This mechanism enables the model to achieve an efficient dynamic balance between detection performance and computational cost.

[0074] like Figure 3 As shown, each submodule includes a multi-head attention module, a feedforward neural network, and a normalization layer connected in sequence, and the input of the submodule is residually connected to the output of the feedforward neural network.

[0075] Specifically, the sub-module, also known as the variable deep learning module, mainly consists of two parts: a sparse multi-head attention module and a feedforward neural network (FFN), which are used to capture global features and complex dependencies. The calculation process of traditional single-head attention is shown in formula (11):

[0076] Where Q, K, and V represent the query vector, key vector, and value vector, respectively. Let K be the length of the vector K, then SAM is called the attention matrix.

[0077] First, the input features pass through a sparse multi-head attention module, enabling each feature vector in the sequence to focus on and integrate information from other relevant features in the sequence. The output of the multi-head attention module... The specific formula (12) is as follows:

[0078] in, Represents the parameter matrix, These represent the query vector, key vector, and value vector in the attention mechanism, respectively. Additionally, each sparse attention head... The calculation is as follows:

[0079] Where H represents the number of attention heads, Let represent the learnable parameter matrix of the i-th head. The sparse strategy limits the scope of attention computation through structured masks, reduces interference from irrelevant information, focuses on key features, and thus improves the computational efficiency and generalization ability of the model.

[0080] After passing through a sparse multi-head attention module, the input features are... The input is fed into the FFN for nonlinear transformation. The FNN consists of two nonlinear transformation layers and the ReLU activation function, as shown in equation (14):

[0081] Where W1, W2, b1, and b2 are the learnable parameters of the model.

[0082] To prevent gradient vanishing and accelerate convergence, residual connections and layer normalization are used to add the input of the previous layer to the output of the current layer, as shown in Equation (15):

[0083] The residual structure allows gradients to propagate directly within the deep structure, effectively mitigating gradient vanishing and preserving original features. Subsequently, layer normalization standardizes all features for each sample, as shown in equations (16) and (17):

[0084]

[0085] Where, µ, The mean and variance of the features of the previous samples. is the stability constant.

[0086] The variable deep learning module enhances global dependency capture through sparse multi-head attention, performs nonlinear mapping with the help of feedforward neural networks, and optimizes deep training by combining residual connections and layer normalization. This enhances the deep feature representation and adaptive capability of the lightweight spatiotemporal reconstruction traffic fault detection model based on dynamic routing, thereby improving the model's fault detection performance for complex traffic.

[0087] Step 207: The comprehensive feature vector is processed sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network.

[0088] In this embodiment, after determining the activation state of a submodule, if at least one submodule is activated, the comprehensive feature vector is sequentially input into the activated submodules to obtain the deep feature extraction result; then, the deep feature vector is sent to the classifier to generate the fault detection result of the communication network; if no submodule is activated, the comprehensive feature vector is directly sent to the classifier to obtain the fault detection result. This embodiment, by dynamically selecting the deep path, can improve feature extraction capabilities while reducing unnecessary computation, achieving efficient and accurate communication network fault detection.

[0089] Figure 4 This illustration shows a model training logic diagram according to an embodiment of this application. Figure 4 As shown in the embodiments of this application, the model can also be trained through the following steps: Step 401: Obtain sample traffic data of the communication network and fault labels of the communication network.

[0090] Step 402: Input the sample traffic data of the communication network into the fault detection model to obtain the prediction results output by the classifier, the number of sub-modules activated in the second feature extraction module, the weight parameters of the bottleneck layer, the first prediction feature output by the gated loop module, and the second prediction feature output by the spatiotemporal feature reconstruction module.

[0091] Step 403: Based on the prediction result and fault labeling, generate the predicted loss value.

[0092] Specifically, this application improves upon cross-entropy loss by assigning a weight to each category of samples. The smaller the sample size of a category, the higher its weight, and vice versa. The specific weight calculation formula is shown in formula (18):

[0093] in, It is the weight of a certain type of sample. It is the total number of samples. It is the total number of categories. This represents the number of samples in class c. The weighting formula indicates that the weight of each class is inversely proportional to the number of samples in that class across the entire dataset. In the binary classification case, the weighted cross-entropy loss function is shown in formula (19):

[0094] Where K represents the number of sample classes, and c is the number of classes in the c-th sample class. , The detection category label and the true label represent the sample.

[0095] Step 404: Perform regularization processing based on the weight parameters of the bottleneck layer to generate a regularization loss value.

[0096] In this embodiment, the bottleneck layer can be constrained using L1 regularization. L1 regularization is achieved by adding the L1 norm of the weight vector to the loss function. for:

[0097] Where λ is the regularization coefficient and ωi is the weight parameter.

[0098] Step 405: Based on the first predicted feature and the second predicted feature, generate the reconstruction loss value of the spatiotemporal feature reconstruction module.

[0099] Step 406: Activation cost is generated based on the number of activated sub-modules in the second feature extraction module.

[0100] In this embodiment of the application, in order to further balance model performance and computational resource requirements, a cost-aware joint loss function is designed for the lightweight spatiotemporal reconstruction traffic fault detection model based on dynamic routing. This loss function introduces an additional cost regularization term based on the activation mask M on the basis of the traditional classification loss, and its overall form is as follows:

[0101] Where ∑M represents the number of currently activated modules, and λ represents the cost adjustment coefficient. By adjusting the weight parameter λ, the model can autonomously balance detection performance and computational overhead according to the specific application scenario: when λ is small, the optimization objective is biased towards reducing reconstruction error, and it tends to activate deeper paths to improve detection accuracy; when λ is large, the model no longer performs deep calculations and selects lightweight paths to save computational resources.

[0102] Step 407: Update the parameters of the fault detection model based on the predicted loss value, the regularization loss value, the reconstruction loss value, and the activation cost.

[0103] Finally, the loss function of the overall model is expressed by the following formula (22):

[0104] in, It is the reconstruction loss function for grouped convolutional denoising autoencoders. It is the weighted cross-entropy loss function of the DR-LSTR model. It is the routing loss function of the DR-LSTR model. It is the total function of the DR-LSTR model.

[0105] Based on the above design, on the one hand, spatiotemporal reconstruction and sparse attention enhance the ability to perceive multidimensional traffic patterns and long-range correlations, thus improving detection accuracy and robustness to unseen faults and noisy data; on the other hand, low-rank decomposition and dynamic routing, by introducing routing cost constraints during training, realize on-demand variable depth inference, thus balancing performance and efficiency under different resource constraints, significantly reducing the number of parameters, inference latency and memory usage, making the model not only have high detection performance, but also suitable for real-time deployment in edge-constrained scenarios.

[0106] In summary, after obtaining the raw traffic data of the communication network, this application inputs the raw traffic data into a fault detection model. In the fault detection model, the first feature extraction module extracts features from the raw traffic to obtain a comprehensive feature vector. Then, the fault detection model processes the comprehensive feature vector through a dynamic routing control module to obtain a path activation vector, thereby determining whether a deep second feature extraction module needs to be activated and the number of sub-modules to be activated. Finally, the comprehensive feature vector is processed by the second feature extraction module and a classifier to obtain the final fault detection result. This scheme, through the dynamic routing control module, determines the feature extraction paths activated in the deep second feature extraction module, allowing the fault detection model to activate or trim network paths as needed based on the raw traffic data of the communication network. For simpler raw traffic data, a smaller model structure is used; for more complex raw traffic data, a more complex deep feature extraction module can be activated, reducing the consumption of computational and storage resources while ensuring detection accuracy.

[0107] Figure 5 This document illustrates a structural block diagram of a communication network fault detection device based on dynamic routing, as shown in an embodiment of this application. Figure 5 As shown, the device includes: The data acquisition module 501 is used to acquire raw traffic data of the communication network; The feature extraction module 502 is used to extract features from the original traffic data through the first feature extraction module in the fault detection model to obtain a comprehensive feature vector; the fault detection model also includes a dynamic routing control module, a second feature extraction module, and a classifier; The activation determination module 503 is used to input the comprehensive feature vector into the dynamic routing control module to obtain the path activation vector; wherein each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module; each element in the path activation vector is used to indicate the activation probability of the corresponding sub-module. The path activation module 504 is used to determine the activation state of each sub-module in the second feature extraction module based on the path activation vector. The fault detection module 505 is used to process the comprehensive feature vector sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network. The fault detection model is a deep learning model trained based on sample traffic data and fault labels from the communication network.

[0108] In summary, after obtaining the raw traffic data of the communication network, this application inputs the raw traffic data into a fault detection model. In the fault detection model, the first feature extraction module extracts features from the raw traffic to obtain a comprehensive feature vector. Then, the fault detection model processes the comprehensive feature vector through a dynamic routing control module to obtain a path activation vector, thereby determining whether a deep second feature extraction module needs to be activated and the number of sub-modules to be activated. Finally, the comprehensive feature vector is processed by the second feature extraction module and a classifier to obtain the final fault detection result. This scheme, through the dynamic routing control module, determines the feature extraction paths activated in the deep second feature extraction module, allowing the fault detection model to activate or trim network paths as needed based on the raw traffic data of the communication network. For simpler raw traffic data, a smaller model structure is used; for more complex raw traffic data, a more complex deep feature extraction module can be activated, reducing the consumption of computational and storage resources while ensuring detection accuracy.

[0109] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0110] The system in this embodiment is presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0111] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of this application. The electronic device may be a computer device used to achieve, for example... Figure 5The device shown includes one or more processors 10, a memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processor can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface).

[0112] The processor 10 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0113] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0114] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device based on the display of a mini-program landing page. Furthermore, the memory 20 may include high-speed random access memory (RAM), and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. The memory 20 may include volatile memory, such as RAM; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid-state drive; the memory 20 may also include combinations of the above types of memory.

[0115] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.

[0116] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for fault detection in a communication network based on dynamic routing, characterized in that, The method includes: Obtain raw traffic data from the communication network; The fault detection model uses a first feature extraction module to extract features from the raw traffic data to obtain a comprehensive feature vector. The fault detection model also includes a dynamic routing control module, a second feature extraction module, and a classifier. The comprehensive feature vector is input into the dynamic routing control module to obtain the path activation vector; wherein each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module; each element in the path activation vector is used to indicate the activation probability of the corresponding sub-module. Based on the path activation vector, determine the activation state of each sub-module in the second feature extraction module; The comprehensive feature vector is processed sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network. The fault detection model is a deep learning model trained based on sample traffic data and fault labels from the communication network.

2. The method according to claim 1, characterized in that, The second feature extraction module includes several sub-modules connected in sequence; The step of processing the comprehensive feature vector sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network includes: If at least one sub-module in the second feature extraction module is activated, the comprehensive feature vector is processed through the activated sub-module to obtain the deep feature extraction result; The deep feature extraction results are input into the classifier to obtain the fault detection results of the communication network; If no sub-module is activated in the second feature extraction module, the comprehensive feature vector is input into the classifier to obtain the fault detection result of the communication network.

3. The method according to claim 2, characterized in that, Each submodule includes a multi-head attention module, a feedforward neural network, and a normalization layer connected in sequence, and the input of the submodule is residually connected to the output of the feedforward neural network.

4. The method according to any one of claims 1 to 3, characterized in that, The first feature extraction module includes a gated loop module and a spatiotemporal feature reconstruction module; the gated loop module includes at least one gated loop unit; in the gated loop unit, the target matrix is ​​decomposed into a first matrix and a second matrix; the first matrix is ​​used to weight the input data in the calculation process of the gated loop unit; The second matrix is ​​used to weight the hidden layer data in the computation process of the gated loop unit; the target matrix is ​​at least one of the update gate weight matrix, the reset gate weight matrix, and the candidate state weight matrix; the spatiotemporal feature reconstruction module includes an encoding unit and a decoding unit; The step of extracting features from the raw traffic data using the first feature extraction module in the fault detection model to obtain a comprehensive feature vector includes: The raw traffic data is input into the gated loop module according to the time sequence to obtain the first feature vector; The first feature vector is input into the spatiotemporal feature reconstruction module to obtain the second feature vector; The first feature vector and the second feature vector are concatenated to obtain the comprehensive feature vector.

5. The method according to claim 4, characterized in that, The gated loop module also includes a localized sensitive attention unit; The step of inputting the raw traffic data into the gated loop module according to the time sequence to obtain the first feature vector includes: The raw traffic data is processed sequentially through the gated loop unit according to the time sequence to obtain a traffic feature sequence. The first feature vector is obtained by weighted fusion of the traffic features at each time step in the traffic feature sequence with the traffic features of the previous N time steps through the local sensitive attention unit.

6. The method according to claim 4, characterized in that, The spatiotemporal feature reconstruction module further includes a noise injection layer and a bottleneck layer; the noise injection layer, the encoding unit, the bottleneck layer, and the decoding unit are connected in sequence. The step of inputting the first feature vector into the spatiotemporal feature reconstruction module to obtain the second feature vector includes: The first feature vector is processed through the noise injection layer to obtain noise data; The noise data is input into the coding unit for group coding to obtain latent features; the coding unit includes at least two group coding layers; each group coding layer divides the input channel into multiple groups, and each group is convolved separately before the results are concatenated. The latent features are processed through a bottleneck layer to obtain sparse features; The sparse features are input into the decoding unit for group decoding to obtain the second feature vector; the decoding unit includes at least two group decoding layers; each group decoding layer divides the input channel into multiple groups, and each group is convolved and the results are concatenated.

7. The method according to claim 4, characterized in that, The method further includes: Obtain sample traffic data of the communication network and fault labels of the communication network; The sample traffic data of the communication network is input into the fault detection model to obtain the prediction results output by the classifier, the number of sub-modules activated in the second feature extraction module, the weight parameters of the bottleneck layer, the first prediction feature output by the gated loop module, and the second prediction feature output by the spatiotemporal feature reconstruction module. Based on the prediction results and fault labels, a predicted loss value is generated; Regularization is performed based on the weight parameters of the bottleneck layer to generate a regularized loss value. Based on the first and second prediction features, the reconstruction loss value of the spatiotemporal feature reconstruction module is generated; Based on the number of activated sub-modules in the second feature extraction module, an activation cost is generated; The fault detection model is updated with parameters based on the predicted loss value, the regularization loss value, the reconstruction loss value, and the activation cost.

8. A communication network fault detection device based on dynamic routing, characterized in that, The device includes: The data acquisition module is used to acquire raw traffic data from the communication network. The feature extraction module is used to extract features from the original traffic data through the first feature extraction module in the fault detection model to obtain a comprehensive feature vector; the fault detection model also includes a dynamic routing control module, a second feature extraction module, and a classifier; An activation determination module is used to input the comprehensive feature vector into the dynamic routing control module to obtain a path activation vector; wherein each element of the path activation vector corresponds one-to-one with each sub-module in the second feature extraction module; each element in the path activation vector is used to indicate the activation probability of the corresponding sub-module. The path activation module is used to determine the activation state of each sub-module in the second feature extraction module based on the path activation vector. The fault detection module is used to process the comprehensive feature vector sequentially through the second feature extraction module and the classifier to obtain the fault detection result of the communication network. The fault detection model is a deep learning model trained based on sample traffic data and fault labels from the communication network.

9. An electronic device, characterized in that, include: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the communication network fault detection method based on dynamic routing as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the communication network fault detection method based on dynamic routing as described in any one of claims 1 to 7.