Fault detection method based on fusion network
By constructing a fusion network model that combines CNN, Transformer, and BiGRU, the limitations of traditional methods in processing complex time-series data are overcome, achieving efficient and accurate fault detection and improving the intelligence and production efficiency of industrial equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHIHEZI UNIVERSITY
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional fault diagnosis methods rely on human experience and rules, which makes it difficult to effectively handle complex, high-dimensional time-series data. A single CNN or RNN cannot fully uncover the complex temporal dependencies in the data during fault detection.
A fusion network model is constructed, which combines convolutional neural networks (CNN), Transformer, BiGRU and cross-attention mechanism. Through local feature extraction, global dependency modeling and temporal dependency capture, feature fusion is achieved to make accurate fault prediction.
It improves the accuracy and real-time response capability of fault detection, can automatically extract key features of industrial equipment, enhance equipment intelligence, reduce equipment downtime, lower maintenance costs, and improve production efficiency.
Smart Images

Figure CN122020596A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault detection technology for industrial equipment, and in particular to a fault detection method based on a fusion network. Background Technology
[0002] With the continuous improvement of automation and intelligence in industrial equipment, equipment fault prediction and health monitoring have become increasingly important. They can help us discover potential problems in equipment in advance, avoid sudden failures, reduce equipment downtime, and thus improve production efficiency. Traditional fault diagnosis methods usually rely on human experience and rules, and manual inspection and formulation of complex rules to judge faults. This method is not only inefficient, but also has limited ability to process complex, high-dimensional time-series data, making it difficult to cope with the massive and diverse data in modern industry.
[0003] In recent years, deep learning technology has been gradually applied to fault detection because it can automatically extract important features from data and identify data patterns. In particular, convolutional neural networks (CNN) and recurrent neural networks (RNN) have achieved success in many scenarios. However, a single CNN or RNN still has limitations when processing time-series data and cannot fully explore the complex time-series dependencies in the data. Summary of the Invention
[0004] The purpose of this invention is to provide a fault detection method based on a fusion network, which combines convolutional neural networks (CNN), Transformer, BiGRU, and cross-attention mechanism to construct a new multi-module joint model for efficiently processing complex time-series data and achieving accurate fault prediction.
[0005] To achieve the above objectives, the present invention provides a fault detection method based on a fusion network, comprising the following steps: S1. Convolutional Neural Network (CNN) models use convolutional layers to extract local features from the device's temporal data and perform sliding window operations to capture local patterns and trends. S2, the self-attention mechanism module Transformer helps the CNN model in S1 capture global dependency features in temporal data; S3. The BiGRU bidirectional gated recursive module considers both the forward and reverse information of time series data and captures its sequential dependency features through the gated recurrent neural network GRU. S4 introduces a cross-attention mechanism module to combine the output information of S2 and S3 for feature fusion; S5. The fused features based on the output of S4 are compressed into fixed-length features through adaptive average pooling mapping; S6. The features processed in S5 are classified through a fully connected layer, and the final prediction result of the fault category is output.
[0006] Preferably, the timing data of the device in S1 is processed by a custom make_datasets function to generate data that meets the input requirements of the fusion network. The data is converted into PyTorch's DataLoader format and supports batch processing.
[0007] Preferably, in S1, multiple convolutional layers are created using the make_layers method. Each layer includes convolution, ReLU activation function, and pooling operation. Each convolutional layer extracts local features from the data, while the pooling operation reduces the spatial size of the data. The ReLU activation function increases non-linear expressive power after each convolution. The time axis length is compressed by selecting the maximum value in the local window, while retaining the strongest signal.
[0008] Preferably, the specific process of S1 is as follows: S11. Extract features of local patterns from time series data and scan the time series in a sliding window manner through multiple one-dimensional convolutional layers to learn short-term information such as signal change trends, edges, and abrupt changes in each local region. S12. After each set of convolutional layer operations, add a ReLU activation function and connect a max pooling layer. Compress the time axis length and retain the strongest signal by selecting the maximum value in the window. S13, the ability to capture local patterns and trends by overlaying and optimizing CNNs based on S12.
[0009] Preferably, the specific process in S2 is as follows: S21. Convert the local features extracted by the CNN model in S1 into time steps in sequence form and use them as input to the Transformer; S22. Calculate the attention weights for the time steps obtained in S21 according to the self-attention mechanism, and perform a weighted summation of the features of all time steps to update the representation of the current time step. S23. Incorporate a multi-head self-attention mechanism to learn different types of temporal dependencies simultaneously in multiple subspaces; S24. Add feedforward neural network, residual connection and normalization processing after the self-attention mechanism; S25. After the pooling layer in S1, set up two stacked Transformer encoders to improve global representation capabilities.
[0010] Preferably, the specific process of S3 is as follows: S31. Use a gated recurrent neural network (GRU) to process time series sequentially according to time steps to capture historical information using a forward GRU. S32. Use a gated recurrent neural network (GRU) to process the time series in reverse order of time steps to capture future information using a reverse GRU. S33. Perform a two-layer stacking of BiGRU modules. The first layer captures shallow temporal dependencies in the time dimension and outputs a context-enhanced sequence. The second layer further explores higher-level temporal structure changes based on this.
[0011] Preferably, the specific process of S4 is as follows: The cross-attention mechanism module integrates two types of information: the global dependency relationship of Transformer and the front-to-back dependency relationship extracted by BiGRU. It uses a query-key-value mechanism, taking the output of BiGRU as the query and the output of Transformer as the key and value, and calculates the attention weight between the two.
[0012] Therefore, the fault detection method based on a fusion network described above has the following advantages compared with the prior art: 1. The fault detection method of this application extracts local features through CNN, models global dependency features using Transformer, and combines BiGRU to enhance the learning of the dependency features of time series data. At the same time, it introduces a cross-attention mechanism to integrate the key information of each module, thereby improving the accuracy of fault detection. When processing time series data, the model can automatically focus on the most important features, which greatly improves the diagnostic accuracy and enhances the real-time response capability of the model. It overcomes the shortcomings of traditional models in processing complex high-dimensional time series data. Furthermore, it automatically extracts key features through deep learning, which greatly improves the accuracy and real-time performance of fault diagnosis. It can automatically extract feature information of industrial equipment, thereby improving the intelligence and accuracy of the equipment. 2. This application can be applied to the condition monitoring and fault diagnosis of various industrial equipment, which is of great significance for reducing equipment downtime, reducing maintenance costs, improving productivity, and ensuring stable and safe production.
[0013] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0014] Figure 1 This is an overall structural diagram of a fault detection method based on a fusion network according to the present invention; Figure 2 This is a flowchart of a convolutional neural network for a fault detection method based on a fusion network according to the present invention; Figure 3 This is a flowchart of the Transformer module of a fault detection method based on a fusion network according to the present invention; Figure 4This is a gated recurrent neural network (GRU) graph of a fault detection method based on a fusion network according to the present invention; Figure 5 This is a flowchart of the cross-attention module of a fault detection method based on a fusion network according to the present invention; Figure 6 This is a flowchart of a fault detection method based on a fusion network according to the present invention; Figure 7 This is a diagram showing the changes in the training and verification process of a fault detection method based on a fusion network according to the present invention. Detailed Implementation
[0015] In the description of this invention, it should be noted that the terms "upper," "lower," "inner," "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed when in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0016] Example like Figures 1-6 As shown, a fault detection method based on a fusion network according to the present invention includes the following steps: S1. Convolutional Neural Network (CNN) models use convolutional layers to extract local features from the device's temporal data and perform sliding window operations to capture local patterns and trends. The device's time-series data is segmented and normalized using a custom make_datasets function to generate data that meets the input requirements of the fusion network. The data is then converted to PyTorch's DataLoader format and supports batch processing. The make_layers method creates multiple convolutional layers, each including convolution, ReLU activation function and pooling operation. Each convolutional layer extracts local features from the data, while the pooling operation reduces the spatial size of the data, allowing subsequent layers to focus on higher-level abstract features. The ReLU activation function adds non-linear expressive power after each convolution, compressing the time axis length by selecting the maximum value in the local window while retaining the strongest signal. S11. Extract features of local patterns from time series data and scan the time series in a sliding window manner through multiple one-dimensional convolutional layers to learn short-term information such as signal change trends, edges, and abrupt changes in each local region. S12. After each set of convolutional layer operations, add a ReLU activation function and connect a max pooling layer. Compress the time axis length and retain the strongest signal by selecting the maximum value in the window. S13, the ability to perform CNN stacking optimization based on S12 to capture local patterns and changing trends; enabling the model to gradually capture more complex and abstract local patterns from the bottom layer to the top layer, such as from edges and inflection points to rhythm and frequency, which provides a high-quality local representation foundation for subsequent sequence modeling modules (Transformer, BiGRU). S2, the self-attention mechanism module Transformer helps the CNN model in S1 capture global dependency features in temporal data; S21. Convert the local features extracted by the CNN model in S1 into time steps in sequence form and use them as input to the Transformer; S22. Calculate the attention weights for the time steps obtained in S21 according to the self-attention mechanism, and perform a weighted summation of the features of all time steps to update the representation of the current time step. S23. Incorporate a multi-head self-attention mechanism to learn different types of temporal dependencies simultaneously in multiple subspaces; such as short-term strong correlations, long-term trends, and periodic changes. S24. Adding feedforward neural networks, residual connections, and normalization techniques after the self-attention mechanism makes the model easier to optimize and gives it deep expressive power. S25. After the pooling layer in S1, two stacked Transformer encoders are set to improve the global representation capability, which completes the improvement from local features to global representation, so that each time step can fuse the context information of other time steps in the sequence. S3. The BiGRU bidirectional gated recursive module considers both the forward and reverse information of time series data and captures its sequential dependency features through the gated recurrent neural network GRU. S31. Use a gated recurrent neural network (GRU) to process time series sequentially according to time steps to capture historical information using a forward GRU. S32. Use a gated recurrent neural network (GRU) to process the time series in reverse order of time steps to capture future information using a reverse GRU. S33. Perform a two-layer stacking of BiGRU modules. The first layer captures shallow temporal dependencies in the time dimension and outputs a context-enhanced sequence. The second layer further explores higher-level temporal structure changes on this basis. Use bidirectional GRU layers to process the features extracted from the CNN part. Through multi-layer bidirectional GRU, the model can understand the dependencies in the time series data more deeply and help to diagnose faults more accurately. S4 introduces a cross-attention mechanism module that combines the output information of S2 and S3 for feature fusion. This module integrates two types of information: the global dependencies of the Transformer and the dependencies extracted by BiGRU. It uses a query-key-value mechanism, treating the output of BiGRU as the query and the output of the Transformer as the key and value, calculating the attention weight between them. This strengthens the mutual influence between the two, helping the model make more accurate predictions. Each time step representation from BiGRU determines the time point to focus on from the Transformer output based on the similarity score of all Transformer time steps. This mechanism achieves cross-source alignment, allowing the model to dynamically fuse local dynamic features (from BiGRU) with global static semantic features (from Transformer). S5. The fused features based on the output of S4 are compressed into fixed-length features through adaptive average pooling mapping, which can reduce the data dimensionality. S6. The features processed in S5 are classified through a fully connected layer, and the final prediction result of the fault category is output.
[0017] In the specific implementation process, firstly, by loading and preprocessing the temporal data of the device, training, validation, and test sets suitable for model input are generated. Then, a CTBC-based model is designed and built, which includes convolutional layers to extract local features, Transformer layers to model global dependencies, BiGRU layers to learn temporal dependencies, and a cross-attention mechanism to fuse different features. Next, the model is trained using the cross-entropy loss function and the Adam optimizer. The model parameters are iteratively optimized, and various metrics such as loss, accuracy, precision, and recall are calculated during the training and validation process. Finally, the model performance is evaluated on the test set, and confusion features and classification reports are generated to ensure that the model has good fault detection accuracy. Finally, the best model is saved and deployed for real-time fault prediction.
[0018] 1. Data Loading and Processing In the experiment, the time-series dataset of industrial equipment was first loaded, including training, validation and test sets. Each dataset consists of the equipment's operating data and corresponding labels. The data storage format is joblib file. During data preprocessing, the raw data is read from the MAT file and split and normalized by the custom make_datasets function to finally generate data that meets the model input requirements. The data is converted to PyTorch's DataLoader format, which supports batch processing and facilitates subsequent model training and evaluation.
[0019] 2. Model Training During model training, the CTBC model is used for training, employing the CrossEntropy Loss function and the Adam optimizer. The model parameters are optimized through multiple iterations. To avoid overfitting, an early stopping mechanism and a learning rate adjustment strategy are used. During training, metrics such as model accuracy, loss, precision, and recall are recorded.
[0020] 3. Model Testing The trained model will be evaluated on the test set. The main evaluation metrics include accuracy, precision, recall, and F1 score. By comparing the model's predictions with the true labels, we can comprehensively evaluate the model's performance. The classification report is used to calculate the accuracy, precision, and recall for each category and generate a detailed classification report. Experimental results show that the model performs well across all categories, especially in fault classification, where it excels in precision and recall, with both accuracy and recall exceeding 90%, demonstrating good classification performance.
[0021] 4. Experimental Results In the experiment, we trained the model using the training set and tuned the hyperparameters using the validation set. The final model performance on the test set is as follows: Figure 7 As shown, the model achieves a high accuracy rate on the test set, exceeding 90%, demonstrating its effectiveness in fault detection tasks.
[0022] Precision and Recall: For each category, the model maintains high precision and recall, as shown in Tables 1 and 2.
[0023] Table 1
[0024] Table 2 Therefore, this invention adopts a fault detection method based on a fusion network, which combines convolutional neural networks (CNN), Transformer, BiGRU and cross-attention mechanism to construct a new multi-module joint model for efficiently processing complex time-series data and achieving accurate fault prediction.
[0025] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A fault detection method based on a fusion network, characterized in that: Includes the following steps: S1. Convolutional Neural Network (CNN) models use convolutional layers to extract local features from the device's temporal data and perform sliding window operations to capture local patterns and trends. S2, the self-attention mechanism module Transformer helps the CNN model in S1 capture global dependency features in temporal data; S3. The BiGRU bidirectional gated recursive module considers both the forward and reverse information of time series data and captures its sequential dependency features through the gated recurrent neural network GRU. S4 introduces a cross-attention mechanism module to combine the output information of S2 and S3 for feature fusion; S5. The fused features based on the output of S4 are compressed into fixed-length features through adaptive average pooling mapping; S6. The features processed in S5 are classified through a fully connected layer, and the final prediction result of the fault category is output.
2. The fault detection method based on a fusion network according to claim 1, characterized in that: In S1, the timing data of the device is segmented and normalized using a custom make_datasets function to generate data that meets the input requirements of the fusion network. The data is then converted into PyTorch's DataLoader format and supports batch processing.
3. The fault detection method based on a fusion network according to claim 2, characterized in that: In S1, multiple convolutional layers are created using the make_layers method. Each layer includes convolution, ReLU activation function, and pooling operation. Each convolutional layer extracts local features from the data, while the pooling operation reduces the spatial size of the data. The ReLU activation function adds non-linear expressive power after each convolution. The time axis length is compressed by selecting the maximum value in the local window, while retaining the strongest signal.
4. The fault detection method based on a fusion network according to claim 3, characterized in that: The specific process of S1 is as follows: S11. Extract features of local patterns from time series data and scan the time series in a sliding window manner through multiple one-dimensional convolutional layers to learn short-term information such as signal change trends, edges, and abrupt changes in each local region. S12. After each set of convolutional layer operations, add a ReLU activation function and connect a max pooling layer. Compress the time axis length and retain the strongest signal by selecting the maximum value in the window. S13, the ability to capture local patterns and trends by overlaying and optimizing CNNs based on S12.
5. The fault detection method based on a fusion network according to claim 4, characterized in that: The specific process in S2 is as follows: S21. Convert the local features extracted by the CNN model in S1 into time steps in sequence form and use them as input to the Transformer; S22. Calculate the attention weights for the time steps obtained in S21 according to the self-attention mechanism, and perform a weighted summation of the features of all time steps to update the representation of the current time step. S23. Incorporate a multi-head self-attention mechanism to learn different types of temporal dependencies simultaneously in multiple subspaces; S24. Add feedforward neural network, residual connection and normalization processing after the self-attention mechanism; S25. After the pooling layer in S1, set up two stacked Transformer encoders to improve global representation capabilities.
6. The fault detection method based on a fusion network according to claim 5, characterized in that: The specific process of S3 is as follows: S31. Use a gated recurrent neural network (GRU) to process time series sequentially according to time steps to capture historical information using a forward GRU. S32. Use a gated recurrent neural network (GRU) to process the time series in reverse order of time steps to capture future information using a reverse GRU. S33. Perform a two-layer stacking of BiGRU modules. The first layer captures shallow temporal dependencies in the time dimension and outputs a context-enhanced sequence. The second layer further explores higher-level temporal structure changes based on this.
7. The fault detection method based on a fusion network according to claim 6, characterized in that: The specific process of S4 is as follows: The cross-attention mechanism module integrates two types of information: the global dependency features of Transformer and the front-to-back dependency features extracted by BiGRU. It uses a query-key-value mechanism, taking the output of BiGRU as the query and the output of Transformer as the key and value, and calculates the attention weight between the two.