Authors: Chaoquan Mo, Ke Huang, Houxin Ji, Wenhan Li, Kaibo Xu
Categories: Article, Mechanical equipment fault diagnosis, CNN-transformer, Random overlapping sampling, Synchrosqueezed wavelet transform, Graphical user interface, Engineering, Mechanical engineering
Source: Scientific Reports
Authors: Chaoquan Mo, Ke Huang, Houxin Ji, Wenhan Li, Kaibo Xu
Convolutional Neural Networks have been widely applied in fault diagnosis tasks of mechanical systems due to their strong feature extraction and classification capabilities. However, they have limitations in handling global context information. Vision Transformers, by leveraging self-attention mechanisms to capture global dependencies, have shown excellent performance in many visual tasks, but often come with high computational costs. Therefore, this paper proposes a lightweight and efficient intelligent fault diagnosis method based on the fusion of Convolutional Network and Vision Transformer features (FCNVT). This method combines the local feature extraction capability of CNNs with the global dependency capturing ability of ViTs, while maintaining computational efficiency. Random overlapping sampling (ROS) techniques are used to preprocess signals, generating two-dimensional synchronized wavelet transform (SWT) images as inputs to the network. Experimental verification has shown that the proposed method achieves up to 100% classification accuracy, with the model having 7 million parameters and a computational cost of only 0.28 G, outperforming other state-of-the-art methods. Finally, a graphical user interface (GUI)-based mechanical equipment fault detection system was developed using this method, which holds positive implications for advancing the practical application of intelligent fault diagnosis in mechanical equipment.
Equipment failure refers to an abnormal state where a component or assembly deteriorates and loses its ability to perform a specified function. Based on this inherent characteristic, it is possible to dynamically monitor, identify, and diagnose the operational model, status parameters, dynamic responses, and signs of failure to achieve the purpose of fault detection and prediction. Due to the presence of working frequency vibration, electrical noise, hydraulic system pulsation noise, and modulation and noise interference in transmission links, the characteristic information in online monitoring is weak, and the robustness of feature extraction methods is poor. Therefore, new solutions for mechanical equipment fault diagnosis have always been a focus and challenge in research both domestically and internationally^1^.
Artificial Intelligence (AI) fault diagnosis and prediction hold promise as a potent tool for ensuring the safe operation of using intelligent algorithms such as artificial neural networks to judge and predict the operational state of equipment to make reasonable maintenance decisions. Smart diagnosis and prediction break away from the traditional reliance on fault mechanisms, diagnosis experts, and professional technicians, making it a core technology of “Smart Industry”^2,3^. After decades of theoretical research, numerous learning algorithms have emerged within AI, with deep learning being the most prominent^4^. With the success of AlphaGo and ChatGPT, enhanced versions of deep learning^5,6^ have rapidly gained widespread research and application in fields such as natural language processing, computer vision, smart marketing, augmented reality, and fault diagnosis.
Mainstream architectures in deep learning for fault diagnosis include Recurrent Neural Networks (RNNs)^7^ and Convolutional Neural Networks (CNNs)^8^. While RNNs can handle sequential data, they cannot perform parallel computations and are unsuitable for training large datasets. Although Long Short-Term Memory networks (LSTMs)^9^, a variant of RNNs, mitigate some issues with long-range dependencies, they require manual extraction of features in time–frequency domains and lack inherent feature extraction capabilities. Compared to RNN models, CNN models adopt local connectivity and weight sharing designs, making them faster to train, with superior feature learning capabilities and broader applicability. However, CNNs lack the ability to model relationships between targets, treating all parts identically and lacking specificity, making it difficult to process data containing temporal information^10^. Additionally, while CNNs excel in deconstructing image information and extracting low-level features, they suffer from limitations such as restricted receptive fields in convolution operations and difficulty capturing global information from images, affecting overall model performance^11^.
To further improve these issues, researchers worldwide have conducted extensive studies and proposed various modified models. For example, Jia et al.^12^ introduced a multi-scale residual attention-based CNN model, utilizing a multi-scale residual attention mechanism to learn distinctive multi-scale features from vibration signals and enhance CNN’s effectiveness in identifying fault features by leveraging multi-scale feature denoising. Li et al.^13^ proposed a deep learning bearing fault diagnosis method combining CNN and LSTM, adding attention to input data segments to visualize learned weights and obtain interpretable diagnostic results, effectively mining fault features. Long et al.^14^ proposed a motor fault diagnosis method using a multi-sensor information-driven attention mechanism and an improved AdaBoost, enhancing the robustness, generalization capability, and accuracy of fault diagnosis. These methods alleviate some of the problems with CNNs and RNNs to some extent, but there is still a pressing need in actual production for more precise, stable, and faster inference speed methods for mechanical equipment fault diagnosis to minimize loss caused by failures.
The self-attention network based on Transformer architecture was first proposed in 2017^15^, and due to its advantages such as parallel computation, capturing long-distance dependencies, and strong global feature learning capabilities, it quickly found wide application in natural language and machine vision fields. The Vision Transformer (ViT) model achieved performance comparable to CNNs^16^ and is considered a strong alternative to CNN models. Improved Transformer models like Swin Transformer (SwinT)^17^, Shuffle Transformer^18^, and Cswin^19^ continue to emerge. Consequently, Transformer-based fault diagnosis and prediction research have become a hotspot for scholars globally.
Fang et al.^20^ proposed the CLFormer self-attention model for bearing fault identification, demonstrating high classification performance under strong noise conditions; Liang et al.^11^ combined sub-domain adaptation with Vision Transformer, realizing bearing fault diagnosis under varying operating conditions based on the integrated Transformer network. Traditional Transformer models mostly adopt hierarchical frameworks, making feature integration across different layers difficult and weakening the learning capability of local features. Moreover, Transformer models have large parameter scales, requiring substantial computational resources, leading to lower efficiency and high computational costs, making rapid deployment challenging in industrial settings^21^.
As discussed, existing deep learning models such as CNNs and LSTMs excel in local feature extraction but face limitations when it comes to processing global information and long-range dependencies. Moreover, although Transformer models have achieved significant success in fields like natural language processing, vision, and fault diagnosis, their application in mechanical fault diagnosis is still hampered by high computational costs and the need for large amounts of data, making deployment in resource-constrained industrial environments challenging.
Based on the above, this paper proposes a lightweight and efficient intelligent fault diagnosis method (FCNVT) that integrates the characteristics of convolutional networks and vision transformers. The FCNVT constructs a network model that fuses the features of convolutional networks and vision transformers, employing random overlapping sampling techniques for data augmentation of vibration signals, and generating two-dimensional synchronized wavelet transform (SWT) images as inputs to the model. By utilizing the strong learning capabilities of FCNVT to automatically extract temporal and spatial features from the images, the diagnosis of the fault status of mechanical equipment can be achieved. Finally, a graphical user interface (GUI)-based mechanical equipment fault detection system has been developed using this method, contributing to the advancement of practical applications in intelligent fault diagnosis for mechanical equipment.
The main contributions of this paper are as The FCNVT model is proposed for fault diagnosis in mechanical equipment, combining convolutional layers and Transformer layers to capture local and global features while maintaining efficiency, utilizing local connection patterns and sparse attention mechanisms to reduce computational load and parameter count.The FCNVT model achieves the fusion of multi-scale features through multi-layer convolution operations and multi-head self-attention mechanisms. The convolutional layers are responsible for extracting local features, while the self-attention mechanism captures global dependencies, all while maintaining lower computational costs. This design of multi-scale feature fusion enables the model to more comprehensively understand and recognize complex fault patterns.By adopting random overlapping sampling techniques to fully utilize the information in the original signal data and simulate the randomness of signals during fault occurrences, SWT is used to improve the time–frequency resolution and reduce redundant information, endowing the model with good diagnostic capability and generalization performance.A GUI-based mechanical equipment fault detection system is developed based on this method, facilitating the practical application and information management of intelligent fault diagnosis in mechanical equipment.
The rest of the paper is organized as Section “Theoretical foundations” outlines the relevant theoretical foundations; Section “Proposed method” elaborates on the proposed method; Section “Fault diagnosis experiment verification and analysis” validates and analyzes the model through fault diagnosis experiments; Section “Development and application of graphical user interface” discusses the development and application of the graphical user interface; Section “Conclusion” summarizes the work of this paper.
The structural characteristics of Convolutional Neural Networks (CNNs) are reflected in three local connection, weight sharing, and spatial pooling. Unlike fully connected neural networks where neurons in each layer are fully interconnected, CNNs implement local connections between layers through convolutional kernels (filters) that are much smaller than the input size. The size of the convolutional kernel is referred to as the receptive field of that layer. The application of local connections significantly reduces the number of connections in the network and allows it to handle arbitrary-sized input data. Weight sharing means that the weights and biases of the convolutional kernels are shared across the same convolutional layer, meaning the parameter values remain constant during convolution operations at different positions in the input data. Spatial pooling is a down-sampling method that reduces the dimensionality of the input data, thereby decreasing the computational load of the model. These three structural characteristics of CNNs overcome the shortcomings of fully connected neural networks, such as inability to handle large-scale data (like high-definition images), excessive parameter counts, and susceptibility to overfitting, enabling the training of networks with dozens or even hundreds of layers and achieving widespread application in the processing of various types of data^22^.
The convolutional layer is the core structure in a CNN network responsible for adaptive feature extraction. Typically composed of one or multiple convolutional kernels, the neurons in the convolutional layer connect locally with the preceding feature layer via the convolutional kernel. Each convolutional kernel independently performs convolution operations on the input features and calculates the final output features through linear superposition. The feature calculation process for the r-th layer of the convolutional layer can be expressed as 1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ C_{n}^{r} = \mathop \sum \limits_{r} f\left( {C_{m}^{r - 1} {*}w_{n}^{r} + b_{n}^{r} } \right)
\usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {C}_{m}^{r-1} $$\end{document} is the output of the previous layer of the neural network, m is the number of convolutional kernels in the r-th convolutional layer, * represents the convolution operation between the input feature and the convolutional kernel, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {w}_{n}^{r} $$\end{document} is the corresponding parameters of the convolutional kernel, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {b}_{n}^{r} $$\end{document} is the bias term, and *f* is the activation function for the output features of the network. Activation functions are usually added after the convolutional network layers to enhance the model’s nonlinear modeling capability and the linear separability of features, thus improving the model’s learning ability for complex problems. In CNN networks, ReLU is the most popular activation function. The convolution operation is illustrated in Fig. 1.Fig. 1Convolution operation. ### Vision transformer neural network The Vision Transformer (ViT)^16^ model utilizes a multi-head self-attention mechanism, which enables it to fully learn the global information of the input signal without being limited by local interactions, thereby addressing the issue of limited receptive fields in convolutional kernels^23^. Additionally, it can learn long-range dependencies within the signal. The model dynamically generates weights for different nodes through similarity measurements and aggregates information, possessing the ability to flexibly respond to changes in input information. This effectively avoids many inherent limitations of Convolutional Neural Networks. ViT replaces convolutional structures entirely with the Transformer architecture to accomplish classification tasks and has achieved performance surpassing that of CNNs on superscale datasets^24–26^. As shown in Fig. 2, the Vision Transformer model primarily consists of three input encoding, Transformer encoder, and classification module.Fig. 2Structure of the vision transformer model. Input Encoding (Image Tokenization) The ViT encoding consists of patch embedding and positional encoding. The image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ x\in {i}^{H\times W\times C} $$\end{document} is divided into patches and linearly transformed into a series of flattened Patches \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {x}_{p}\in {i}^{N\times \left({p}^{2}\cdot c\right)}, $$\end{document}where N is given 2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ N \, = \, HW/P^{2} $$\end{document}where H is the height of the image, W is the width of the image, and (H, W) represents the image resolution; p is the height and width of a Patch, p^2^is the size of a Patch, and (p, p) represents the Patch resolution. In Fig. 2, the patch embedding operation 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ z_{0} = \left[ {x_{{{\text{class}}}} ;x_{p}^{1} E;x_{p}^{2} E;Lx_{p}^{N} E} \right] + E_{{{\text{pos}}}} $$\end{document} In Fig. 2, positional encoding is generated using sine and cosine functions, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \begin{aligned} & {\text{PE}}_{{({\text{pos}} + {\text{k}},{2})}} = {\text{ sin}}\left[ {\left( {{\text{pos}} + {\text{ k}}} \right)/{1}0000^{{{\text{2i}}/{\text{dmodel}}}} } \right] \\ & {\text{PE}}_{{({\text{pos}} + {\text{k}},{\text{2i}} + {1})}} = {\text{ cos}}\left[ {\left( {{\text{pos }} + {\text{ k}}} \right)/{1}0000^{{{\text{2i}}/{\text{dmodl}}}} } \right] \\ \end{aligned} $$\end{document}where pos is the position in the input sequence; *k* is any fixed offset;d~mode~ is the output dimension of the model’s sublayers and embedding layer; *i* is the dimension of the positional encoding vector. (2)Transformer encoder The ViT encoder, as seen in Fig. 2, mainly includes a Multi-Head Self-Attention (MSA) mechanism layer and a Multilayer Perceptron (MLP). The MSA, as shown in Fig. 2, is composed of linear layers, dot-product self-attention layers, Concatenate layers, and linear layers. It maps queries and a set of key-value pairs to outputs, where the output is a weighted sum of the values, with the weights assigned to each value computed using the keys. The calculation of MSA 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \begin{aligned} & {\text{MultiHead}}\left( {{\mathbf{Q}},{\mathbf{K}},{\mathbf{V}}} \right) = {\text{Concatenate }}\left( {Head_{1} \cdots Head_{n} } \right)W^{{\text{T}}} \\ & {\text{Attention}}\left( {{\mathbf{Q}},{\mathbf{K}},{\mathbf{V}}} \right) = {\text{Softmax}}\left( {\frac{{{\mathbf{Q}} \times {\mathbf{K}}^{{\text{T}}} }}{{\sqrt {d_{k} } }}} \right) \times {\mathbf{V}} \\ \end{aligned} $$\end{document}where *n* is the number of heads; \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {d}_{k} $$\end{document} is the dimensionality of the query or key; W is the weight matrix. The attention function is calculated for a set of queries packed into matrix Q , and keys and values are also packed into matrices K and V . The Concatenate function is used to concatenate the outputs from multi-head self-attention calculations, and Softmax is used to obtain the weights of the values.To enable the network to improve fault diagnosis accuracy by increasing depth, residual connections are used within each sublayer, and layer normalization^27^ is applied at the end of each sublayer. Therefore, the output of each sublayer 6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {\text{Out }} = {\text{ LayerNorm}}\left( {{\text{X}} + {\text{Sublayer}}\left( {\text{X}} \right) \, } \right) $$\end{document}where Sublayer(X) represents the processing function of the self-attention mechanism layer and the 1D convolution layer, and LayerNorm is the layer normalization function. After passing through the Transformer encoder, the image is transmitted to the MLP. The MLP contains two Fully Connected (FC) layers and a non-linear layer with a GELU (Gaussian Error Linear Unit) activation function. The fully connected layers map the distributed features learned by the multi-head attention mechanism to the sample space, and the feature calculation process for the (l)-th layer is as 7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ Z_{L} = {\text{MSA}}\left( {{\text{LayerNorm}}\left( {Z^{\prime}_{L} } \right)} \right) + Z^{\prime}_{L} $$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ L = 1,2, \ldots l. $$\end{document} The MLP performs a nonlinear mapping of the image matrix output from the Transformer encoder, and after passing through the Softmax layer, it achieves image recognition. ## Proposed method ### Network architecture description The proposed lightweight and efficient network architecture that integrates the characteristics of convolutional networks and vision transformers, along with specific parameters, is illustrated in Fig. 3. This network consists of a convolutional module, Transformer Module 1, Transformer Module 2, an average pooling module, and a classifier. The approach aims to enhance the model’s efficiency and performance by combining local connectivity patterns with sparse attention mechanisms, while also reducing computational costs.Fig. 3Proposed model architecture.Convolutional Module: The convolutional module employs four layers of 3 × 3 convolutions (with a stride of 2) to reduce the activation maps before feeding them into the Transformer layers. The strong inductive biases of convolutional layers allow the model to learn low-level information effectively at early stages, a capability that Transformers lack. Hence, several convolutional layers are stacked before the Transformer layers.Transformer Layers: The Transformer layers consist of two types of Transformer Block 1 and Transformer Block 2. In the context of Vision Transformers, MLPs are generally more computationally expensive in terms of runtime and parameter count compared to attention blocks. In this paper, the MLP is implemented as a 1 × 1 convolution followed by standard batch normalization, and all non-linear activation functions are Hardswish. To reduce the computational cost at this stage, the expansion factor of the convolutions is reduced from 4 to 2. Transformer Block 1 versus Transformer Block The difference lies in the type of attention blocks they use. As shown in Fig. 4, the left diagram represents regular attention, while the right diagram shows shrink attention, which halves the activation maps. Here, C × H × W denotes the size of the input activation map, D is the key matrix dimension, and N is the number of heads.Fig. 4Two types of attention blocks. Traditional Vision Transformers and similar architectures use positional embeddings to provide positional information, adding a fixed positional encoding to each input token. However, positional embeddings are only appended to the input sequence, implying that positional information is not dynamically updated in higher-level representations. This could lead to unnecessary consumption of representational capacity by positional information in intermediate representations. Therefore, our structure does not include a class token or positional encoding but introduces a new attention bias mechanism allowing each attention head to learn independent positional biases, thereby directly injecting relative positional information within each attention block. The scalar attention value between two pixels (x, y) ∈ [H] × [W] and(x 0, y0) ∈ [H] × [W] in a head h ∈ [N] is calculated 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ A_{{\left( {x,y} \right),\left( {x^{\prime},y^{\prime}} \right)}}^{h} = Q_{{\left( {x,y} \right),:}} \cdot K_{{\left( {x^{\prime},y^{\prime}} \right),:}} + B_{{\left| {x - x^{\prime}} \right|,\left| {y - y^{\prime}} \right|}}^{h} . $$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {\text{A}}_{{\left( {x, \, y} \right)(x^{\prime}, \, y^{\prime})}}^{h} $$\end{document} represents the attention value between positions (x, y) and (x′, y′), indexed by the attention head. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ Q_{{\left( {x,y} \right),:}} \cdot K_{{\left( {x{^{\prime}},y{^{\prime}}} \right),:}} $$\end{document} is the classical attention calculation, i.e., the dot product of Query and Key. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ B_{{\left| {x - x^{\prime}} \right|,\left| {y - y^{\prime}} \right|}}^{h} . $$\end{document} is a learnable attention bias that is computed based on the relative position between (x, y) and (x′, y′). This bias is translation invariant, meaning it depends only on the relative distance between positions. Each attention head has H × W parameters corresponding to different pixel offsets. Here, H and W are the height and width of the activation map, respectively. Through this approach, each attention head can learn specific relative positional relationships, such as those between adjacent pixels.(3)Average Pooling: Following the last Transformer layer, average pooling is introduced to progressively reduce the dimensions of the activation maps, thereby reducing the number of parameters and computational complexity of the model. This pooling operation helps maintain the depth of the model while reducing its width, contributing to higher computational efficiency. ### Data division and transformation #### Random overlapping segmentation To make full use of the information contained in the original signal data and to simulate the randomness of signals when faults occur, this paper adopts a signal division method known as random overlapping segmentation. By “random,” it is meant that the positions at which samples are segmented are chosen randomly. “Overlapping segmentation” refers to the fact that adjacent samples share a portion of the same data points. Using random overlapping segmentation to construct the sample set, different batches of samples are generated each time, as shown in Fig. 5. With sufficient training, theoretically, signal segments from any position can be extracted, leading to better data augmentation effects and thus enhancing the generalization capability of the diagnostic model.Fig. 5Schematic of random overlapping segmentation of sample sets. #### Synchrosqueezed wavelet transform (SWT) Time–frequency analysis, as an effective method for analyzing time-varying signals, allows for a deeper understanding of the multiple components contained within real engineering signals and calculates the instantaneous frequency and amplitude at each moment^28^. However, constrained by the Heisenberg uncertainty principle, classical time–frequency analysis methods produce results with limited resolution in the time–frequency domain, which is not conducive to their application in engineering. Synchrosqueezed Wavelet Transform is a special signal rearrangement method that sharpens the time–frequency curves of continuous wavelet transforms and improves the frequency accuracy of these curves by reassigning the values of wavelet coefficients W(t, s) at different local points (t′, s′) near (t, s). Synchronous Squeezing Wavelet Transform is based on wavelet transform^29^. First, Continuous Wavelet Transform (CWT) is performed on the signal S(t) to obtain the wavelet coefficients \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{\text{s}}\left(a,b\right) $$\end{document}. Given a mother wavelet function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \psi $$\end{document}, the continuous wavelet transform of S(t) 9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ W_{{\text{s}}} (a,b) = \mathop \int \limits_{ - \infty }^{ + \infty } {\text{s}}(t) \frac{1}{\sqrt a }\psi \overline{{\left( {\frac{t - b}{a}} \right)}} {\text{d}}t{ } $$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \psi \overline{\left(\frac{t-b}{a}\right)} $$\end{document} is the conjugate of the wavelet function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \psi \left(\frac{t-b}{a}\right) $$\end{document}; \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ a $$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ b $$\end{document} are the scale and translation factors, respectively; \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left(a,b\right) $$\end{document} is the calculated wavelet coefficient. Based on the one-to-one correspondence between the wavelet scale factor and frequency, the obtained wavelet coefficients \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left(a,b\right) $$\end{document}) can be represented in the time–frequency domain, yielding the time–frequency plot of the wavelet transform. By reassigning \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left(a,b\right) $$\end{document}, one can extract the instantaneous frequency lines, resulting in a more concentrated time–frequency plot. When the signal is a harmonic wave function, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ s\left(t\right)=A\text{cos}\left({\varvec{\upomega}}t\right) $$\end{document} selects a wavelet that is zero in the negative frequency domain. According to the Plancherel theorem, performing continuous wavelet transform on a harmonic wave 10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ W_{s} \left( {a,b} \right) = \frac{1}{2\pi }\smallint \hat{s}\left( \xi \right)\sqrt a \;\overline{{\hat{\psi }\left( {a\xi } \right)}} e^{ib\xi } {\text{d}}\xi = \frac{A}{4\pi }\sqrt a \;\overline{{\hat{\psi }\left( {a\omega } \right)}} e^{ib\omega } $$\end{document}where, when \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \widehat{\psi }\left(\xi \right) $$\end{document} is concentrated at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \xi ={\omega }_{0} $$\end{document}, the wavelet coefficient \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left(a,b\right) $$\end{document} is correspondingly concentrated at scale \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ a={\omega }_{0}/\omega $$\end{document}. Taking the partial derivative of the wavelet coefficients, the instantaneous frequency can be 11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \omega_{s} \left( {a,b} \right) = \left\{ {\begin{array}{*{20}l} { - i\left( {W_{s} \left( {a,b} \right)} \right)^{ - 1} \frac{\partial }{\partial b}W_{s} \left( {a,b} \right),\left| {W_{s} \left( {a,b} \right) > 0} \right|} \hfill \\ {\infty ,\left| {W_{s} \left( {a,b} \right) = 0} \right|} \hfill \\ \end{array} } \right. $$\end{document}where transforming the wavelet coefficients \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left(a,b\right) $$\end{document} from the time-scale plane to the time–frequency plane becomes \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {W}_{s}\left[\begin{array}{c}{\omega }_{s}\left(a,b\right),b\end{array}\right] $$\end{document}. The synchronous squeezing wavelet transform value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {T}_{s}\left({\varvec{\upomega}},b\right) $$\end{document} of the wavelet coefficients at discrete scales \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {a}_{k} $$\end{document} can be obtained by squeezing the values in the frequency band centered at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {{\varvec{\upomega}}}_{l} $$\end{document} with a bandwidth of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ [{{\varvec{\upomega}}}_{l}-\Delta \omega /2,{\omega }_{l}+\Delta \omega /2] $$\end{document}, given by the 12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ T_{s} \left( {\omega_{l} ,b} \right) = \left( {\Delta \omega } \right)^{ - 1} \mathop \sum \limits_{{a_{k} :|\omega \left( {a_{k} ,b} \right) - \omega_{l} | \le \Delta \omega /2}} W_{s} \left( {a_{k} ,b} \right)a_{k}^{ - 3/2} \left( {\Delta a} \right)_{k} $$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {a}_{k}-{a}_{k-1}={\left(\Delta a\right)}_{k} $$\end{document} is the discrete scale interval, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \Delta \omega ={\omega }_{l}- $$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ {\omega }_{l-1} $$\end{document} is the frequency interval. As shown in Fig. 6, from top to bottom, the figures represent the time-domain plots, CWT plots, and SWT plots for different health states. It can be seen that the CWT plots generate a lot of redundant information because each scale produces a subplot on the time–frequency plane, and their energy distribution on the time–frequency plane is relatively blurred. The SWT plot, by reassigning the energy of the CWT, reduces redundant information and redistributes the energy to more precise locations on the blurred time–frequency plane, enhancing frequency resolution.Fig. 6Time-domain plots, CWT plots, and SWT plots for different health states. ### Network diagnosis process The diagnosis process of the proposed scheme is illustrated in Fig. 7. The diagnostic process of the model can be summarized in three sample set preparation, model training, and model evaluation.Fig. 7Diagnostic process of the proposed scheme.*Sample set preparation*: Obtain vibration data from mechanical equipment under different operating conditions. Use random overlapping segmentation technology to augment the original vibration data. Further divide the data into training and testing datasets. Finally, generate the corresponding SWT image samples through Synchronized Compressive Wavelet Transform.*Model training*: After constructing the proposed model architecture and configuring the parameters, divide the training and testing datasets. Next, set the model training parameters, including the learning rate, loss function, and training batch size. During the training process, the learning rate is set to 0.001, and the Adam optimizer is used for parameter updates. Additionally, the loss function chosen is the categorical cross-entropy loss function; the batch size for each step of the model’s training input is 64. After each round of model training, the model’s diagnostic accuracy is tested using the test set to further validate the diagnostic capabilities of the model.*Model evaluation*: To further examine the model’s ability to learn fault features and the degree of mastery, the model is evaluated using values of the loss function, diagnostic classification accuracy, confusion matrices, and t-distributed Stochastic Neighbor Embedding (t-SNE) algorithm. The software environment used for the model to perform fault diagnosis PyCharm Community V2019.3.3, TensorFlow V2.13. The hardware environment Intel i7-12700H @ 2.3 GHz, RAM 32 GB, GPU RTX3060. ## Fault diagnosis experiment verification and analysis ### Experiment one Description of dataset I The Case Western Reserve University (CWRU) bearing dataset is one of the most widely used open-source datasets for mechanical equipment fault diagnosis. To enhance the reference value of our work, we chose to conduct experiments on this public dataset. The experimental setup of the CWRU bearing dataset is shown in Fig. 8. The bearing models include SKF-6205 drive end bearings and SKF-6203 fan end bearings. The sampling frequencies are 12 kHz and 48 kHz, with vibration acceleration signals of faulty bearings collected by accelerometers. The dataset is divided into four operational conditions, with motor loads of 0HP, 1HP, 2HP, and 3HP, corresponding to rotational speeds of 1,797 r/min, 1,772 r/min, 1,750 r/min, and 1,730 r/min, respectively. Fault types are categorized into three major inner race faults (IR), ball faults (B), and outer race faults (OR). Each fault type includes three fault 0.1778 mm, 0.3556 mm, and 0.5334 mm.Fig. 8CWRU bearing fault diagnosis experimental platform. The experiment selects the drive end bearing with a sampling frequency of 12 kHz and a motor load of 2HP, corresponding to a rotational speed of 1,750 r/min. It includes ten fault states, where labels 0 to 8 represent faulty bearing data, and label 9 represents normal bearing data. Each experiment uses a total of 1,000 samples, with each sample containing 1,024 data points. The data is split into training and testing sets in a 3 ratio. The specific experimental data is shown in Table 1.Table 1Description of bearing experiment data.LabelLoad / RPMStatusFault sizes(mm)Training setTesting setsample lengths02HP, 1750 r/minB0070.17787030102412HP, 1750 r/minB0140.35567030102422HP, 1750 r/minB0210.53347030102432HP, 1750 r/minIR0070.17787030102442HP, 1750 r/minIR0140.35567030102452HP, 1750 r/minIR0210.53347030102462HP, 1750 r/minOR0070.17787030102472HP, 1750 r/minOR0140.35567030102482HP, 1750 r/minOR0210.53347030102492HP, 1750 r/minNormal—70301024 (2)Diagnosis results and analysis of dataset I. Analysis of diagnostic accuracy and loss function values Figure 9 illustrates the changes in accuracy and loss values during the training process. It can be observed that the method proposed in this paper demonstrates excellent diagnostic effectiveness for bearing faults, achieving nearly 100% accuracy after about six iterations, requiring very few iterations to reach a high level of accuracy. Around six epochs, the loss function converges towards 0. Additionally, the consistency in diagnostic accuracy and loss function values between the training and testing sets throughout the training process indicates that the model did not experience overfitting or underfitting during hyperparameter tuning. This shows that the proposed method has excellent diagnostic capability and can achieve accurate and stable recognition results for mechanical equipment faults.Fig. 9Loss function values and diagnostic accuracy. Analysis of t-SNE results To verify the feature extraction capability of the proposed method, the t-distributed stochastic neighbor embedding (t-SNE) algorithm was employed to visualize the features of the input and output layers, characterizing the model’s feature learning ability. As shown in Fig. 10. From Fig. 10a, it can be seen that the original input data in the two-dimensional space are mixed together in a chaotic manner, with a high degree of confusion. From Fig. 10b, it can be observed that after the model extracts and learns the features of the input signal data, the data representing different health states are well grouped. The intra-class compactness and inter-class separability of the health state features in the output layer are significantly improved. The inter-class distances between different health states become clear and wide, while the data within the same class become more compact, and the confusion between different features disappears. This indicates that the proposed method can effectively extract and learn the features of different health states in bearing data and accurately identify the corresponding fault types.Fig. 10Feature visualization. Analysis of confusion matrix results To further illustrate the effectiveness and classification performance of the proposed method, a confusion matrix was used to analyze one of the test results on this dataset. Figure 11 visualizes the classification results of the test set using the confusion matrix. It can be seen that all prediction results are correct, achieving 100% diagnostic accuracy in the final diagnostic results, consistent with the results in Fig. 10. This further confirms that the model has excellent fault diagnostic classification performance.Fig. 11Confusion matrix. Verification of training sample extraction at random positions To determine the optimal overlap ratio and segmentation parameters, we designed a series of comparative experiments. The experimental data came from the CWRU bearing dataset, covering different fault types and operating conditions. The specific experimental settings are as overlap 0%, 25%, 50%, 75%; segmentation 128 points, 256 points, 512 points, 1024 points. First, we fixed the segmentation parameter at 1024 points and varied the overlap ratio to observe its impact on the model’s generalization ability and diagnostic accuracy. The experimental results are shown in Table 2. From the table, it can be seen that when the overlap ratio is 50%, the model’s classification accuracy reaches the highest at 100%, with a computational complexity of 0.28 G. Therefore, an overlap ratio of 50% is a relatively ideal choice.Table 2Impact of different overlap ratios.Overlap ratio (%)Accuracy (%)Computational complexity (G)098.20.242599.10.2550100.00.287598.90.32 Next, we fixed the overlap ratio at 50% and changed the segmentation parameters to observe their effect on model performance. The experimental results are shown in Table 3. From the table, it can be seen that when the segmentation parameter is 1024 points, the model’s classification accuracy is the highest, and the computational complexity is relatively moderate. Therefore, in the experiments described in our manuscript, we adopted a segmentation parameter of 1024 points and an overlap ratio of 50%.Table 3Impact of different segmentation parameters.Segmentation parameter (Points)Accuracy (%)Computational complexity (G)12896.30.2025698.50.2251299.20.251024100.00.28 ### Experiment two Description of dataset II To further validate the effectiveness of the proposed model, Experiment Two employs the SEU_gearbox dataset from Southeast University for experimental validation, with the experimental platform illustrated in Fig. 12. The SEU_gearbox dataset was collected from the transmission system dynamic simulator under two different operating one with the speed system load set at 20 Hz–0 V, speed at 1200 rpm, and load at 0 N × m; and the other with the speed system load set at 30 Hz–2 V, speed at 1800 rpm, and load at 10.97 N × m. This dataset includes four gear fault conditions and one healthy condition (Normal). The gear fault conditions crack at the bottom of the gear (Chipped), missing one tooth (Miss), crack at the root of the gear (Root), and wear on the surface of the gear (Surface). The specific experimental data are shown in Table 4.Fig. 12Fault diagnosis test bench for gearbox at Southeast University.Table 4Data description of the test gearbox.LabelLoadStatusTraining setTesting setsample lengths020_0/30_2Chipped70301024120_0/30_2Miss70301024220_0/30_2Root70301024320_0/30_2Surface70301024420_0/30_2Normal70301024 (2)Diagnosis results and analysis of dataset II. Precision, recall, F1 score, and accuracy metrics of the model Precision, recall, F1 score, and accuracy were selected as evaluation metrics to analyze the diagnostic performance of the model. These metrics are crucial references for assessing the performance of an AI model. As shown in Table 5, the proposed model can achieve up to 100% in all these metrics, which, to some extent, indicates that the model possesses excellent diagnostic classification performance.Table 5Diagnostic performance of the proposed model.StatusPrecisionRecallF1-scoreSupportChipped1.001.001.0010Miss1.001.001.0010Root1.001.001.0010Surface1.001.001.0010Normal1.001.001.0010Accuracy––1.0050Macro avg1.001.001.0050Weighted avg1.001.001.0050 Scatter plot of diagnostic prediction vs. true values The experimental validation results are shown in Fig. 13, where the model’s recognition and prediction outcomes for various health statuses are consistent with the actual health statuses, and all predictions are correct. This once again demonstrates the superior diagnostic classification capability and stability of the proposed model.Fig. 13Scatter plot of diagnostic predicted values versus actual values. Confusion matrix analysis Furthermore, to further illustrate the effectiveness of FCNVT, a confusion matrix analysis was conducted on one of the test results from this dataset, as shown in Fig. 14. The proposed method accurately predicted all three health statuses of the mechanical equipment, achieving a maximum diagnostic accuracy of 100% in the final diagnostic results, which aligns with the findings in Fig. 13. This shows that the FCNVT model has excellent fault diagnosis classification accuracy.Fig. 14Confusion matrix. t-SNE analysis To verify the feature extraction capability of the proposed method, the t-distributed Stochastic Neighbor Embedding (t-SNE) algorithm was employed to visualize the features of the input layer and output layer, characterizing the model’s feature learning ability. As shown in Fig. 15. In Fig. 15a, it can be observed that the original input data of various types are mixed together in the two-dimensional space, with a high degree of confusion. From Fig. 15b, after feature extraction and learning of the input signal data by the model, different health status data are well grouped during the learning process. The intra-class compactness and inter-class separability of the health status features at the output layer have significantly improved, with the inter-class distances between different health statuses becoming clear and wide, and the data within the same class becoming more compact, while the confusion between different features has disappeared. This also indicates that the method proposed in this paper can effectively extract and learn the features of different health statuses from bearing data and accurately distinguish the corresponding fault types.Fig. 15Feature visualization. ### Comparison of model parameters and computational costs As shown in Table 6, among the compared models, the proposed method has the smallest number of parameters and computational cost, with the computational cost being only 0.28 G. In contrast, the traditional ViT has the largest number of parameters and computational cost, significantly higher than those of other models. Improved Transformer models such as Swin, ShuffleT, and Cswin, compared to the ViT, exhibit better performance, lower computational costs, and fewer parameters. Conventional Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) have notably lower numbers of parameters and computational costs compared to models like ViT and Swin. The aforementioned comparative analysis demonstrates that the proposed method has a significant advantage in terms of both the number of parameters and computational cost.Table 6Parameter counts and computational costs of various models.ModelsParameters/MComputational Costs/GViT^16^8655.4Swin^17^294.5ShuffleT^18^284.5CSwin^19^234.3CNN13.41.6RNN18.03.2Proposed method70.28 ### Comparison of diagnostic accuracy with state-of-the-art algorithm models Diagnostic accuracy is a core metric in the process of mechanical equipment fault diagnosis. As shown in Fig. 16, we compare the diagnostic accuracy results of the FCNVT model proposed in this paper with other state-of-the-art algorithm models. These algorithms include CNN, LSTM, CNN-LSTM, Dconformer^30^, TST^31^, Diagnosisformer^32^, and TFT^10^.Fig. 16Comparison of diagnostic accuracy with other state-of-the-art algorithms. From Fig. 16, it can be observed that among the seven algorithms compared with the proposed model, the TFT model has the highest diagnostic accuracy at 99.94%, while CNN has the lowest diagnostic accuracy at 93.03%. The FCNVT model proposed in this paper has the highest diagnostic accuracy among all models, improving by 6.97% over CNN and still showing an enhancement compared to TFT. Therefore, we can conclude that the proposed model is better at extracting and learning the characteristic information of mechanical equipment faults, giving it a higher diagnostic accuracy and better classification capability. ## Development and application of graphical user interface ### Graphical user interface (GUI) A GUI (Graphical User Interface) is a type of user interface that allows users to interact with electronic devices (such as computers, smartphones, tablets, etc.) through graphical elements like icons, buttons, windows, etc. Unlike command-line interfaces (CLIs) that rely solely on text commands, GUIs are more intuitive and user-friendly, enabling users to control and utilize software through visual cues and mouse clicks. This significantly reduces the learning and usage costs for non-professionals, thereby accelerating the dissemination and application of related technologies. Therefore, based on the fault diagnosis method proposed in this paper, we have developed a GUI-based mechanical equipment fault detection system to promote the practical implementation and information management of intelligent fault diagnosis for mechanical equipment. ### GUI-based mechanical equipment fault detection system Login interface of the diagnostic system To ensure data security and manage permissions, the system requires entering an account and password for login. The login interface is shown in Fig. 17.Fig. 17Login interface of the diagnostic system.Main interface of the diagnostic system Upon entering the correct account and password, the user logs into the main interface of the mechanical equipment fault diagnosis system, as shown in Fig. 18. The main interface of this system includes functions for data access and reading, intelligent diagnosis, and monitoring of diagnostic results. Below, we will introduce these three functional areas and their implementation methods.Fig. 18Main interface of the diagnostic system.Data access and The system provides three modes for data access and reading. The first mode is selecting a single piece of data for a single fault diagnosis; the second mode involves accessing and reading data in folder form to achieve batch detection and identification of faults; the third mode is accessing and reading data in video file form, which allows for dynamic fault detection and thus possesses certain object detection capabilities.Intelligent diagnosis and monitoring of diagnostic Once the data is loaded into the system, fault diagnosis and recognition are performed. As shown in Fig. 19a, the image data after loading is displayed on the right, with the diagnostic results, duration, and confidence level shown in the lower-left corner.As shown in Fig. 19b, the system can record the detected data and allow viewing of historical diagnostic results individually. Additionally, the system offers the export of recorded diagnostic results, facilitating the information management of diagnostic outcomes.To improve work efficiency, we have integrated an AI assistant function into the system, as shown in Fig. 19c. It leverages powerful AI models like ChatGPT and Kimi to provide assistance.Fig. 19Demonstration of various functional interfaces of the diagnostic system. ## Conclusion This study proposes a lightweight and efficient intelligent fault diagnosis method (FCNVT) that integrates the characteristics of convolutional networks and vision transformers, and successfully develops a GUI-based mechanical equipment fault detection system. The main conclusions of this paper are as The FCNVT model is proposed for the fault diagnosis of mechanical equipment. It combines convolutional layers and Transformer layers, capturing both local and global features while maintaining efficiency. The model utilizes local connection patterns and sparse attention mechanisms to reduce computational costs and the number of parameters.The FCNVT model achieves the fusion of multi-scale features through multi-layer convolution operations and multi-head self-attention mechanisms. The convolutional layers are responsible for extracting local features, while the self-attention mechanism captures global dependencies, all while maintaining lower computational costs. This design of multi-scale feature fusion enables the model to more comprehensively understand and recognize complex fault patterns.The original signal data’s information is fully utilized and the randomness of signals when faults occur is simulated through the use of random overlapping segmentation technology. The synchrosqueezed wavelet transform (SWT) is adopted to improve the time–frequency resolution of images and reduce redundant information, thereby enhancing the model’s diagnostic capability and generalization performance.Based on this method, a GUI-based mechanical equipment fault detection system has been developed. This system facilitates the practical implementation and information management of intelligent fault diagnosis for mechanical equipment.