A lightweight multi-scale bearing fault diagnosis method fusing multi-channel attention
Patent Information
- Application Number
- CN202611524170.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
(1)传统浅层时频分析方法依赖人工提取特征,泛化能力差
空洞深度可分离卷积大幅降低模型参数量与计算量,兼顾轻量化与多尺度感受野,适配嵌入式边缘设备在线诊断;
Smart Images

Figure CN123012785A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of deep learning rotating machinery fault diagnosis technology. It adapts to the standardized bearing time-frequency diagram after adaptive STFT processing and is aimed at the scenario of lightweight and high-precision online diagnosis of variable speed bearings in cranes. Background Technology
[0002] Rolling bearings are core load-bearing components of rotating machinery and are widely used in industrial equipment such as fans, motors, reducers, and CNC machine tools. Under long-term heavy loads, variable speeds, and dust corrosion conditions, bearings are prone to localized faults such as inner ring wear, outer ring spalling, rolling element damage, and cage breakage. If these faults are not accurately identified in their early stages, they can gradually escalate, leading to excessive unit vibration, shutdowns, and even equipment damage and safety accidents. Therefore, achieving accurate and real-time detection of subtle bearing fault characteristics is a core research direction in the field of predictive maintenance in industry.
[0003] Current mainstream diagnostic methods rely on vibration signal analysis: after acquiring the bearing's time-domain vibration waveform, a time-frequency spectrum is generated through time-frequency transformation. Features such as fault impact and modulation harmonics are concentrated in the time-frequency spectrum, and deep learning methods based on image recognition have become the mainstream solution for fault diagnosis. However, there are many practical constraints in industrial field deployment scenarios, and traditional deep learning models are difficult to adapt to actual implementation needs.
[0004] The existing technology has the following shortcomings: (1) Traditional shallow time-frequency analysis methods rely on manual feature extraction and have poor generalization ability. Traditional methods such as wavelet transform, spectrum analysis, and envelope spectrum require engineers to manually select frequency bands and design feature indicators according to equipment operating conditions, which requires high professional threshold for operators. When faced with complex operating conditions such as variable load and strong noise interference, manual features are easily submerged by background noise, and the accuracy of weak early fault identification drops significantly, making it impossible to achieve automated intelligent diagnosis.
[0005] (2) Conventional deep convolutional networks have a large number of parameters and slow inference speed, making them difficult to deploy in a lightweight manner. Standard deep networks such as CNN and ResNet stack a large number of standard convolutional layers, resulting in a huge number of parameters and computational load, which can only be operated offline on high-performance servers; while industrial edge acquisition terminals and embedded detection chips have limited computing power and memory resources, making it impossible for large models to run in real time, resulting in difficulties in deployment and high detection latency. Most existing lightweight networks simply reduce the number of network layers and compress channels, which greatly loses the small-scale fault impact features in the time-frequency map, resulting in a serious loss of diagnostic accuracy.
[0006] (3) Single-scale convolutional structures cannot take into account fault features of different sizes, resulting in insufficient feature extraction capabilities. Bearing faults exhibit multi-scale characteristics: tiny pitting corresponds to fine-grained narrow pulse textures in time-frequency maps, while large-area peeling corresponds to large-scale continuous harmonic regions. A single fixed-size convolutional kernel can only capture single-scale information. Small convolutions are difficult to capture periodic global fault components, while large convolutions weaken subtle early impact details. Multi-scale fault information cannot be extracted simultaneously, limiting the model's ability to distinguish different fault types.
[0007] (4) Lack of targeted attention mechanism, resulting in the inability to identify noise and invalid background interference features. Industrial vibration signals are mixed with irrelevant components such as motor electromagnetic noise, gear meshing interference, and equipment foundation vibration, which form a large area of invalid background region after being mapped to the time-frequency map. Ordinary convolutional networks process all pixels and channels with equal weight, which cannot automatically focus on the key time-frequency region of the fault; a large number of noise features and invalid channels occupy the model's computational resources, weakening the expression of effective fault features, and deep networks are prone to feature submersion and gradient failure problems.
[0008] (5) Existing attention modules have limited functionality and are difficult to simultaneously mine long-distance correlation features of channels, space, and the global domain. Existing diagnostic models mostly use single-channel attention or spatial attention, which can only achieve single-dimensional feature weighting; the fault impact in the bearing time-frequency spectrum has long-distance correlations across time and frequency domains, and a single type of attention cannot model global dependencies; moreover, the attention branches do not have residual connections, and the optimized features are prone to losing the underlying basic time-frequency information, gradient vanishing is prone to occur during the training process, and the model convergence speed is slow. Summary of the Invention
[0009] To address the above problems, the present invention aims to provide a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention. The technical solution adopted in this invention: A lightweight, multi-scale bearing fault diagnosis method incorporating multi-channel attention includes the following steps: S1: Acquire multi-channel vibration signals of the bearing and perform preprocessing to obtain a standardized time-frequency graph and construct a time-frequency graph dataset; S2: Construct a lightweight multi-scale bearing fault diagnosis model; the lightweight multi-scale bearing fault diagnosis model includes a hole depth separable convolutional backbone module, a multi-scale feature pyramid fusion module, a multi-channel collaborative triple attention module, and a lightweight classification output module; S21: Input the standardized time-frequency map into the dilated depth separable convolution backbone module to obtain the basic time-frequency feature map; the dilated depth separable convolution backbone module consists of a 3×3 standard convolutional layer and three convolutional units with the same three-level structure; the three convolutional units with the same three-level structure include a dilated depth convolutional layer, a 3×3 dilated convolutional layer, a max pooling layer and a Dropout layer. S22: Input the basic feature map into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map; the multi-scale feature pyramid fusion module includes a three-way parallel branch convolutional layer, a channel splicing layer, an adaptive fusion convolutional layer, and a batch normalization layer; the three-way parallel branch convolutional layer includes a 1×1 convolutional sub-layer, a 2×2 convolutional sub-layer, and a 3×3 convolutional layer; S23: Input the composite multi-scale feature map into the multi-channel collaborative triple attention module to obtain the attention-enhanced feature map; the multi-channel collaborative triple attention module includes a channel attention branch network layer, a spatial attention branch network layer, a multi-head self-attention branch network layer, and a residual fusion matching layer; the channel attention branch network layer includes a global average pooling sub-layer, a fully connected ReLU activation sub-layer, a fully connected Sigmoid activation sub-layer, and a channel-wise multiplication layer; the spatial attention branch network includes a 7×7 convolution sub-layer, a Sigmoid activation layer, and a pixel-wise multiplication sub-layer; the multi-head self-attention branch network layer includes three sets of 1×1 convolution sub-layers and a multi-head attention calculation sub-layer; the residual fusion matching layer includes a 1×1 projective convolution sub-layer, an element-wise addition sub-layer, and a ReLU activation layer; S24: Input the attention-enhanced feature map into the lightweight classification output module to obtain the fault category probability distribution; the lightweight classification output module includes a global average pooling layer, a lightweight fully connected layer, and a Softmax activation layer; S25: Input the standardized time-frequency graph into the lightweight multi-scale bearing fault diagnosis model, perform backpropagation and optimize the training parameters to obtain the optimized lightweight multi-scale bearing fault diagnosis model. S3: Acquire multi-channel vibration signals of the bearing, perform preprocessing, and input them into an optimized lightweight multi-scale bearing fault diagnosis model to obtain the probability distribution of fault categories.
[0010] Preferably, in step S21, the standardized time-frequency map is input into the hole depth separable convolutional backbone module to obtain the basic time-frequency features. The specific process is as follows: The standardized time-frequency map is input into a 3×3 standard convolutional layer. The shallow time-frequency texture is extracted through 3×3 convolution operations to obtain a shallow basic feature map. This shallow basic feature map is then sequentially input into three convolutional units with identical three-level structures. Finally, the shallow basic feature map is input into a dilated depth convolutional layer for independent lightweight convolution of each channel to obtain a single-channel intermediate feature map, as shown below:
[0011] in, A 3×3 depthwise separable convolution representing the dilation rate. This represents the intermediate feature map of a single channel. This represents a shallow basic feature map. Represents a nonlinear activation function; Indicates batch normalization; The intermediate feature map of a single channel is then input into a 3×3 dilated convolutional layer for cross-channel feature fusion and the channel dimension is increased to obtain a fused feature map, as shown below:
[0012] in, Represents the fused feature map. Indicates batch normalization, This represents the intermediate feature map of a single channel. A 3×3 hollow convolutional layer representing the expansion rate. Indicates the number of output channels for this layer; The fused feature map is then input into a max pooling layer for compression to obtain a compressed feature map. This compressed feature map is then input into a Dropout layer, where some channels are randomly masked to suppress overfitting, resulting in the final output feature map of this layer, as shown below:
[0013] in, This represents the final output feature map of this layer. This indicates random deactivation regularization. This represents a 2×2 max pooling downsampling operation with a stride of 2, where the feature map's width and height are halved. Represents the fused feature map; Feature extraction, downsampling, and regularization are performed step by step. After a complete loop operation of three convolutional units with the same structure, the basic feature map is obtained. The formula for the three identical convolutional units is as follows:
[0014] in, Represents the coordinates on the output feature map The pixel value of the location, Represents the convolution kernel weight matrix. Represents the relative coordinates within the convolution kernel. Represents the convolution kernel radius. This represents the input feature map of a 3×3 dilated convolutional layer. This represents the hole convolution dilation rate.
[0015] Preferably, in step S22, the basic feature map is input into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map. The specific process is as follows: The basic feature maps are fed into parallel convolutional layers of 1×1, 2×2, and 3×3 to extract fault features at different scales, resulting in three sets of independent scale feature maps, as shown below:
[0016] in, This represents the small-scale feature map output by the 1×1 convolutional sublayer. This represents the midscale feature map output by the 2×2 convolutional sublayer. This indicates that the 3×3 convolutional sublayer outputs a large-scale feature map; This indicates that the feature map belongs to a three-dimensional real tensor. Indicates the feature map height; Indicates the width of the feature map. Indicates the number of output channels in a single branch; Represents the fundamental time-frequency characteristic map; This represents a 1×1 two-dimensional convolution with small-scale convolution branches, used to extract subtle fault textures. This represents a 2×2 two-dimensional convolution with a mesoscale convolution branch, used to extract mesoscale fault features. This represents a 3×3 two-dimensional convolution with large-scale convolution branches, used to extract large-scale periodic fault regions. The three sets of independent scale feature maps are input into the channel stitching layer and stacked and fused along the channel dimension to obtain a multi-channel stitched feature map, as shown below:
[0017] in, This represents a multi-channel stitched feature map; The multi-channel stitched feature map is input into the adaptive fusion convolutional layer to perform adaptive integration of channel weights, resulting in a weighted fusion feature map, as shown below:
[0018] in, This represents the weighted fusion feature map. This represents a 1×1 convolution operation. The weighted fused feature map is then input into the batch normalization layer to standardize the feature distribution, ultimately obtaining a composite multi-scale feature map. The three sets of independent scale feature maps include small-scale feature maps, medium-scale feature maps, and large-scale feature maps, as shown below:
[0019] in, Represents a composite multi-scale feature map. This indicates batch normalization operation.
[0020] Preferably, in step S23, the composite multi-scale feature map is input into the multi-channel collaborative triple attention module to obtain the attention-enhanced feature map. The specific process is as follows: S231: Input the composite multi-scale feature map into the channel attention branch network layer to obtain the channel-weighted feature map. The specific process is as follows: The composite multi-scale feature map is input into the global average pooling sublayer for channel-wise global average pooling and spatial dimension compression to obtain the channel-wise global representation, as follows:
[0021] in, This represents the global representation of the channel. Represents the composite multi-scale feature map. Channel, spatial coordinates Pixel value at; Indicates the height of the feature map; Indicates the width of the feature map; The global representation of each channel is input into a fully connected ReLU activation sublayer to reduce the dimensionality of the channel vectors and introduce nonlinearity to obtain dimensionality-reduced nonlinear channel features. These dimensionality-reduced nonlinear channel features are then input into a fully connected Sigmoid activation sublayer to increase the dimensionality and restore the number of channels and channel weights, resulting in the channel attention weight mask, as shown below:
[0022] in, This represents the channel attention weight mask. This represents the Sigmoid activation function. This represents the weight matrix of the second fully connected layer. This represents the weight matrix of the first fully connected layer. This represents the channel global representation of the global average pooling output. Represents the ReLU activation function; The channel attention weight mask is input into the channel-wise multiplication layer, and the weight mask is multiplied with the composite multi-scale feature map channel-wise to obtain the channel-weighted feature map, as shown below;
[0023] in, Indicates the first Channel-weighted feature map of each channel. Represents a composite multi-scale feature map; S232: Input the channel-weighted feature map into the spatial attention branch network layer to obtain the channel-space double-weighted feature map. The specific process is as follows: The channel-weighted feature map is input into a 7×7 convolutional sublayer to extract spatial location correlation information, resulting in a single-channel spatial feature map, as shown below: , in, Represents a single-channel spatial feature map. This represents a two-dimensional convolution operation with a kernel size of 7×7. Represents the channel-weighted feature map; The spatial attention weight map is obtained by inputting the single-channel spatial feature map into the Sigmoid activation sublayer, as shown below: , in, Represents the spatial attention weight map. Indicates the activation function; The spatial attention weight map is input into the pixel-by-pixel multiplication sub-layer, and the spatial attention weight map is multiplied pixel-by-pixel with the channel weighted feature map to obtain the channel spatial double weighted feature map; , in, This represents a dual-weighted feature map of the channel space. This represents the weight coefficients of the spatial attention weight map at the coordinates. Indicates the horizontal direction of the feature map. Represents the vertical spatial coordinates. Indicates the feature channel index. This represents the feature pixel values output by the spatial attention weight map; S233: Input the channel space double-weighted feature map into the multi-head self-attention branch network layer to obtain the global correlation fusion feature map. The specific process is as follows; The channel space double-weighted feature map is input into three sets of 1×1 convolutional sub-layers. The feature maps are linearly transformed to obtain three sets of independent mapping features. The three sets of independent mapping features are input into the multi-head attention calculation sub-layer to split the multi-head calculation scaling dot product attention to obtain the global association fusion feature map. S234: Input the global correlation fusion feature map into the residual fusion layer to obtain the attention-enhanced feature map. The specific process is as follows: The globally correlated and fused feature map is input into a 1×1 projective convolutional sub-layer. The globally correlated and fused feature map is then dimensionally aligned with the composite multi-scale feature map to obtain a dimensionally matched feature map, as shown below:
[0024] in, This represents the global operation function for multi-head self-attention. Represents the query matrix, Represents the key matrix, Represents a value matrix, express The output of a parallel independent single attention head This indicates the number of attention heads specified in this study. This indicates a channel-level concatenation operation. This indicates that a linear mapping is performed to reduce the dimensionality of the concatenated multi-head features; The dimension-matched feature map is input into the element-wise summation sublayer. The feature residuals of the composite multi-scale feature map and the dimension-matched feature map are then summed to obtain the residual fusion feature map, as shown below:
[0025] in, Represents the residual fusion feature map. Feature maps representing dimension matching; Represents a composite multi-scale feature map; The residual fused feature map is input into the ReLU activation sublayer to introduce nonlinearity, and the final feature mapping is completed to obtain the attention-enhanced feature map, as shown below:
[0026] in, This represents the attention-enhanced feature map.
[0027] Preferably, in step S24, the attention-enhanced feature map is input into the lightweight classification output module to obtain the fault category probability distribution. The specific process is as follows: The attention-enhanced feature map is input into a global average pooling layer, and the spatial dimension is compressed by channel-wise global mean operation to obtain a one-dimensional feature vector. The one-dimensional feature vector is then input into a lightweight fully connected layer to complete the dimension mapping and obtain the original score vector. The score vector is then input into a Softmax activation layer for normalization processing, and finally the fault category probability distribution is obtained.
[0028] Preferably, in step S25, the standardized time-frequency diagram is input into the lightweight multi-scale bearing fault diagnosis model for backpropagation and training parameter optimization to obtain an optimized lightweight multi-scale bearing fault diagnosis model. The specific process is as follows: The standardized bearing time-frequency image is input into the network for forward propagation. The time-frequency image is then processed by a depth-separable convolutional backbone module to extract multi-scale basic features. The multi-scale feature pyramid fusion module then aggregates fault information at both large and small scales. The resulting data is fed into a multi-channel collaborative triple attention module to enhance key fault features and perform residual fusion. Finally, a lightweight classification output module outputs the fault prediction probability. The classification loss is calculated by combining the true labels of the samples. Backpropagation is performed with the goal of minimizing the loss. The gradient of the network parameters is solved layer by layer, and all weights are iteratively updated by an optimizer. The forward inference of samples and the parameter gradient update are performed repeatedly until the model performance converges, resulting in a lightweight multi-scale bearing fault diagnosis model with optimized parameters.
[0029] The beneficial effects of this invention are: Separable convolution with hole depth significantly reduces the number of model parameters and computational cost, while balancing lightweight design and multi-scale receptive field, making it suitable for online diagnostics of embedded edge devices. The feature pyramid parallel three-way convolution synchronously extracts fault features at large and small scales, fully integrating shallow impact details with deep semantic information, and significantly improving the ability to identify early weak faults. The system employs a three-tiered attention mechanism—channel, spatial, and multi-head—to collaboratively filter key fault information from three layers: channel, local spatial, and global dependencies. This suppresses noise and irrelevant interference caused by variable speed. Ablation experiments demonstrate an accuracy improvement of 1.3% to 3.7% compared to single-attention systems. Together with the adaptive STFT time-frequency extraction method, it forms a complete end-to-end diagnostic link, achieving a diagnostic accuracy of over 96% on both the self-built variable speed impact hybrid dataset and the publicly available Ottawa bearing dataset, demonstrating strong generalization ability. Attached Figure Description
[0030] Figure 1 This is a flowchart of a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention according to the present invention.
[0031] Figure 2 This is an architecture diagram of a lightweight multi-scale bearing fault diagnosis model for a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention according to the present invention.
[0032] Figure 3 This is an architecture diagram of the multi-scale feature pyramid fusion module of a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention according to the present invention.
[0033] Figure 4 This is an architecture diagram of the multi-head self-attention branch network layer in the multi-channel collaborative triple attention module of a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention according to the present invention.
[0034] Figure 5 This is a flowchart of the residual fusion layer of a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention according to the present invention. Detailed Implementation
[0035] The following detailed description of the implementation of the present invention is in conjunction with the accompanying drawings. However, these descriptions do not constitute a limitation of the present invention and are merely examples. Through these descriptions, the advantages of the present invention will be more clearly understood. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in the present invention should be considered to be within the scope of protection of the present invention. Other parts not described in detail in the embodiments are all prior art. like Figure 1 As shown, the present invention proposes a lightweight multi-scale bearing fault diagnosis method that integrates multi-channel attention, comprising the following steps: S1: Acquire multi-channel vibration signals of the bearing and perform preprocessing to obtain a standardized time-frequency graph and construct a time-frequency graph dataset; First, raw vibration time-series signals of various faults, including bearing normal operation, inner ring, outer ring, and rolling elements, under different speeds and load conditions are synchronously collected using multi-channel accelerometers. After eliminating environmental clutter interference by wavelet threshold denoising, equal-length time-domain samples are truncated by sliding segmentation. Then, the one-dimensional time-series signals are converted into two-dimensional time-frequency spectra by short-time Fourier transform. The spectrum amplitude is normalized by min-max and the image resolution is standardized. Finally, the training set, validation set, and test set are evenly divided in a 7:2:1 ratio. Using an adaptive STFT time-frequency feature extraction method based on fault impact layering, fault category labels are simultaneously labeled to construct a standardized time-frequency graph dataset that can be directly input into a convolutional network, from which the standardized time-frequency graph is obtained.
[0036] S2: Construct a lightweight multi-scale bearing fault diagnosis model; the lightweight multi-scale bearing fault diagnosis model includes a hole depth separable convolutional backbone module, a multi-scale feature pyramid fusion module, a multi-channel collaborative triple attention module, and a lightweight classification output module, such as Figure 2 As shown; S21: Input the standardized time-frequency map into the dilated depth separable convolution backbone module to obtain the basic time-frequency feature map; the dilated depth separable convolution backbone module consists of a 3×3 standard convolutional layer and three convolutional units with the same three-level structure; the three convolutional units with the same three-level structure include a dilated depth convolutional layer, a 3×3 dilated convolutional layer, a max pooling layer and a Dropout layer. To construct a lightweight multi-scale bearing fault diagnosis model, initial feature extraction is first performed on the preprocessed spectrogram. This module uses a 3×3 standard convolutional layer to capture the local spatial features of the input data, i.e., the basic time-frequency feature map, as shown in the following mathematical expression:
[0037] in, This indicates a 3×3 convolution kernel that outputs 32 feature channels. Represents the fundamental time-frequency characteristic map. Represents a standardized time-frequency plot. This indicates the batch normalization layer.
[0038] The design of this initial convolutional layer ensures the local feature extraction capability of the 3×3 convolutional kernel while avoiding the computational burden caused by an excessively large receptive field, and also lays the foundation for subsequent multi-scale feature extraction.
[0039] To capture fault features at different scales with limited parameters, this paper designs three identical convolutional units to form the backbone of the model's feature extraction. Dilated convolution, by introducing a dilation rate parameter into the standard convolutional kernel, can expand the receptive field without increasing the number of parameters. Its mathematical expression is:
[0040] in, Represents the coordinates on the output feature map The pixel value of the location, Represents the convolution kernel weight matrix. Represents the relative coordinates within the convolution kernel. Represents the convolution kernel radius. This represents the input feature map of a 3×3 dilated convolutional layer. This represents the hole convolution dilation rate.
[0041] when When dilated convolution degenerates into a standard convolution operation; when At this time, a gap is introduced between the elements of the convolution kernel, and the effective receptive field is expanded to... This step can be divided into the following two steps: First, each dilated convolutional block is first subjected to lightweight feature extraction using a dilated depth convolutional layer:
[0042] in, A 3×3 depthwise separable convolution representing the dilation rate. This represents the intermediate feature map of a single channel. This represents a shallow basic feature map. Represents a nonlinear activation function; This indicates batch normalization.
[0043] Depthwise convolution applies a convolution kernel independently to each input channel, without fusing information across channels. The number of parameters in depthwise convolution is... The number of parameters is significantly lower than that of standard convolution. At this point, dilated standard convolution is introduced to replace the traditional second-layer pointwise convolution feature transformation and channel dimension expansion:
[0044] in, Represents the fused feature map. Indicates batch normalization, This represents the intermediate feature map of a single channel. A 3×3 hollow convolutional layer representing the expansion rate. Indicates the number of output channels for this layer; This design does not use the traditional 1×1 pointwise convolution, but instead retains 3×3 convolution kernels to maintain feature extraction capability within the same receptive field. This layer is responsible for fusing the features extracted from each channel by the depthwise convolution and expanding the feature dimension. To avoid overfitting and enhance feature robustness, downsampling and regularization operations are introduced after each dilated convolution block:
[0045] in, This represents the final output feature map of this layer. This indicates random deactivation regularization. This represents a 2×2 max pooling downsampling operation with a stride of 2, where the feature map's width and height are halved. This represents the fused feature map.
[0046] This operation halves the spatial dimension of the fused feature map, achieving feature compression and position invariance. This represents random deactivation with a dropout rate of 0.3. During the training phase, neurons are randomly masked with a 30% probability, forcing the network to learn redundant feature representations and improving the model's generalization ability.
[0047] S22: Input the basic feature map into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map; the multi-scale feature pyramid fusion module includes a three-way parallel branch convolutional layer, a channel splicing layer, an adaptive fusion convolutional layer, and a batch normalization layer; the three-way parallel branch convolutional layer includes a 1×1 convolutional sub-layer, a 2×2 convolutional sub-layer, and a 3×3 convolutional layer; S22: Input the basic feature map into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map; the multi-scale feature pyramid fusion module includes a three-way parallel branch convolutional layer, a channel splicing layer, an adaptive fusion convolutional layer, and a batch normalization layer; the three-way parallel branch convolutional layer includes a 1×1 convolutional sub-layer, a 2×2 convolutional sub-layer, and a 3×3 convolutional sub-layer, such as... Figure 3 As shown; To address the multi-scale characteristics of rolling bearing fault features, this paper designs a multi-scale feature pyramid fusion module. This module extracts features from different receptive fields through parallel convolutional paths and effectively integrates multi-scale features using an adaptive fusion mechanism to achieve comprehensive characterization of faults of different sizes, from microcracks to significant damage.
[0048] Each branch employs a convolutional kernel of different sizes to capture spatial features at different scales: the small-scale feature extraction branch uses a 1×1 convolutional kernel to extract local detail features; the medium-scale feature extraction branch uses a 2×2 convolutional kernel to extract medium-scale features; and the large-scale feature extraction branch uses a 3×3 convolutional kernel to extract large-scale features. Let the input base feature map be... ,in and These represent the height and width of the feature map, respectively. The number of input channels. The output feature maps of the three parallel branch convolutional layers can be represented as follows:
[0049]
[0050] in, This represents the small-scale feature map output by the 1×1 convolutional sublayer. This represents the midscale feature map output by the 2×2 convolutional sublayer. This indicates that the 3×3 convolutional sublayer outputs a large-scale feature map; This indicates that the feature map belongs to a three-dimensional real tensor. Indicates the feature map height; Indicates the width of the feature map. Indicates the number of output channels in a single branch; Represents the fundamental time-frequency characteristic map; This represents a 1×1 two-dimensional convolution with small-scale convolution branches, used to extract subtle fault textures. This represents a 2×2 two-dimensional convolution with a mesoscale convolution branch, used to extract mesoscale fault features. This represents a 3×3 two-dimensional convolution with large-scale convolution branches, used to extract large-scale periodic fault regions.
[0051] In this paper, the output channels are set to 64. The multi-scale features extracted from the three branches are concatenated along the channel dimension, and the output of the channel concatenation layer forms a multi-channel concatenated feature map, as shown below:
[0052] in, This represents a multi-channel stitched feature map; The concatenated features are adaptively fused using 1×1 convolutions, adjusting the number of channels and integrating multi-scale information to obtain a weighted fused feature map, as shown below:
[0053] in, This represents the weighted fusion feature map. This represents a 1×1 convolution operation.
[0054] Batch normalization is performed on the fused features to improve training stability and convergence speed. Indicates batch normalization operation:
[0055] in, Represents a composite multi-scale feature map. This indicates batch normalization operation.
[0056] S23: Input the composite multi-scale feature map into the multi-channel collaborative triple attention module to obtain the attention-enhanced feature map; the multi-channel collaborative triple attention module includes a channel attention branch network layer, a spatial attention branch network layer, a multi-head self-attention branch network layer, and a residual fusion matching layer; the channel attention branch network layer includes a global average pooling sub-layer, a fully connected ReLU activation sub-layer, a fully connected Sigmoid activation sub-layer, and a channel-wise multiplication layer; the spatial attention branch network includes a 7×7 convolution sub-layer, a Sigmoid activation layer, and a pixel-wise multiplication sub-layer; the multi-head self-attention branch network layer includes three sets of 1×1 convolution sub-layers and a multi-head attention calculation sub-layer; the residual fusion matching layer includes a 1×1 projective convolution sub-layer, an element-wise addition sub-layer, and a ReLU activation layer; The multi-channel collaborative triple attention module enhances the response to task-relevant channels by adaptively learning the importance weights of each feature channel, while suppressing irrelevant or noisy channels. This mechanism establishes a dependency model between channels based on the statistical characteristics of the channel dimensions of the feature map, achieving adaptive recalibration of feature channels. Given an input feature map... in These represent the height, width, and number of channels of the feature map, respectively. The channel attention mechanism first compresses the spatial information of each channel through global average pooling to generate a global channel representation, as follows:
[0057] in, This represents the global representation of the channel. Represents the composite multi-scale feature map. Channel, spatial coordinates Pixel value at; Global average pooling operation generates channel global representations The global statistical characteristics of each channel are comprehensively characterized. Subsequently, the non-linear dependencies between channels are learned through a two-layer fully connected network. The first fully connected layer compresses the channel dimension to... , This represents the compression ratio; in this study, we take... The ReLU activation function is applied; the second fully connected layer restores the channel dimension to its original dimension and generates a normalized channel attention weight mask using the Sigmoid activation function, as shown below:
[0058] in, This represents the channel attention weight mask. This represents the Sigmoid activation function. This represents the weight matrix of the second fully connected layer. This represents the weight matrix of the first fully connected layer. This represents the channel global representation of the global average pooling output. Represents the ReLU activation function; the generated channel attention weights. Each element The value is in the range [0,1], representing the importance of the corresponding feature channel.
[0059] Finally, the channel attention weights are multiplied channel by channel with the original feature map to achieve feature recalibration:
[0060] in, Indicates the first Channel-weighted feature map of each channel. This represents a composite multi-scale feature map.
[0061] This operation preserves the original feature space structure while achieving adaptive enhancement of key feature channels, significantly improving the model's ability to identify bearing fault feature channels.
[0062] Spatial attention mechanisms focus on the importance differences between different spatial locations in the feature map, strengthening the focus on salient regions of fault features by generating a spatial attention weight map. Unlike channel attention mechanisms, spatial attention mechanisms calculate the importance weights of each location in the spatial dimension, thereby enhancing the model's ability to represent the spatial distribution of fault features. Spatial attention mechanisms are based on input channel weighted feature maps. First, a 7×7 convolution operation is applied along the channel dimension to generate a single-channel spatial feature map, as shown below:
[0063] in, Represents a single-channel spatial feature map. This represents a two-dimensional convolution operation with a kernel size of 7×7. This represents the channel-weighted feature map.
[0064] The choice of kernel size is based on prior knowledge of the characteristic scale of the bearing vibration signal, which effectively captures spatial context information within a large receptive field and fully models the spatial dependencies between locations in the feature map. To generate normalized spatial attention weights, a sigmoid activation function is applied to the convolution output:
[0065] in, Represents the spatial attention weight map. This represents the activation function.
[0066] The spatial attention weight map is input into the pixel-by-pixel multiplication sub-layer; the spatial attention weight map is multiplied pixel-by-pixel with the channel weighted feature map to obtain the channel spatial double weighted feature map;
[0067] in, This represents a dual-weighted feature map of the channel space. This represents the weight coefficients of the spatial attention weight map at the coordinates. Indicates the horizontal direction of the feature map. Represents the vertical spatial coordinates. Indicates the feature channel index. This represents the feature pixel values output by the spatial attention weight map.
[0068] The spatial attention branch network layer enables the model to adaptively focus on spatial regions with significant fault characteristics. In bearing vibration signal analysis, this mechanism can effectively identify time periods containing fault impact components and enhance the model's sensitivity to transient fault characteristics.
[0069] Multi-head self-attention branch network layers enhance the model's representational capabilities by computing multiple attention heads in parallel, capturing rich feature dependencies from different representation subspaces. The multi-head self-attention module designed in this study performs self-attention computation on two-dimensional feature maps based on a query, key, and value mechanism, modeling the global dependencies between any two positions in the feature map.
[0070] Multi-head self-attention branch network layers enhance the model's feature capture capability in different representation subspaces by using multiple attention heads in parallel, such as... Figure 4 As shown. Represented as follows:
[0071] Each attention head is calculated independently:
[0072] The parameter matrix satisfies , The multi-head mechanism enables the model to collectively focus on information from different representation subspaces at different locations, improving the richness and robustness of feature extraction.
[0073] Given an input feature map First, feature maps for the query, key, and value are generated through three independent 1×1 convolutional layers:
[0074] in: To query the convolution kernel weights of the projection; The convolution kernel weights are the key projections; The convolution kernel weights are the values projected onto the input. This indicates a convolution operation.
[0075] To reduce computational complexity, the channel dimension is compressed to... ,Right now Subsequently, the two-dimensional feature map is reshaped into a sequence, and the dot product attention weights of the query and key are calculated:
[0076] In the formula: The dimension of the key vector is used to scale the dot product result to prevent gradient vanishing.
[0077] Considering that single-head attention may not be able to fully capture complex feature relationships, this study uses a multi-head attention mechanism to compute h attention heads in parallel:
[0078] in, This represents the global operation function for multi-head self-attention. Represents the query matrix, Represents the key matrix, Represents a value matrix, express The output of a parallel independent single attention head This indicates the number of attention heads specified in this study; The calculation for each attention head is as follows:
[0079] in: and It is a learnable projection matrix.
[0080] This study sets the number of attention heads. Key vector dimension A balance must be struck between computational efficiency and representational capability. The computed multi-head attention output needs to be reconstructed back to the original spatial dimension. And through learnable scaling parameters Perform residual connections with the input feature map:
[0081] in: This is a learnable scalar parameter, initialized to 0.
[0082] This design allows the network to primarily utilize raw features in the initial stages, gradually learning the contribution of the attention mechanism as training progresses. This design ensures the stable introduction of the attention mechanism and avoids interference with the initial training process.
[0083] Element-wise addition sublayer: Feature residual addition establishes a shortcut path to directly pass module input to output, effectively alleviating the gradient vanishing problem in deep neural networks and promoting model training stability and convergence speed. In the multi-channel attention mechanism module designed in this study, residual connections combine the original input features with the attention-enhanced features to form the final output.
[0084] For a desired underlying mapping The residual network decomposes it into identity mappings. With residual mapping The sum of The network is designed to learn the residual function. A typical residual block structure diagram is shown below. Figure 5 As shown. Assume identity mapping If it is the optimal solution, then drive the residual. Approaching zero ratio to learn a complete nonlinear mapping It is much easier. This structure significantly improves gradient flow through forward and backward propagation paths across layers.
[0085] Residual joins combine the two elements by adding them element-wise:
[0086] in, Represents the residual fusion feature map. Feature maps representing dimension matching; Represents a composite multi-scale feature map. This is the feature map after processing with channel attention, spatial attention, and multi-head self-attention.
[0087] This operation preserves the complete information flow of the original input while incorporating feature representations enhanced by an attention mechanism. To ensure feature dimension matching, when and When dimensions are inconsistent, it is necessary to... Performing a 1×1 convolutional projection, it is represented as follows:
[0088] in, represents the weights of the projected convolution kernel.
[0089] The dimension-adjusted residual join is represented as follows:
[0090] in, Represents the residual fusion feature map. Feature maps representing dimension matching; Represents a composite multi-scale feature map; Finally, a nonlinear transformation is introduced through the ReLU activation function to generate the attention-enhanced feature map output by the module, as shown below:
[0091] in, This represents the attention-enhanced feature map.
[0092] This study's multi-channel attention mechanism module integrates channel attention, spatial attention, and multi-head self-attention, forming a multi-layered, multi-dimensional attention network. Channel attention strengthens key feature channels, spatial attention focuses on salient spatial regions, and multi-head self-attention models global dependencies. These three mechanisms complement each other, jointly enhancing the model's ability to represent bearing fault features. The introduction of residual connections ensures the smooth propagation of gradient information, enabling the deep attention network to train stably and converge quickly.
[0093] S24: Input the attention-enhanced feature map into the lightweight classification output module to obtain the fault category probability distribution; the lightweight classification output module includes a global average pooling layer, a lightweight fully connected layer, and a Softmax activation layer; The attention-enhanced feature map is input into the global average pooling layer, and the spatial dimension is compressed by channel-wise global mean operation to obtain a one-dimensional feature vector. The one-dimensional feature vector is then input into a lightweight fully connected layer to complete the dimension mapping and obtain the original score vector. The score vector is then input into a Softmax activation layer for normalization processing, and finally the fault category probability distribution is obtained. S25: Input the standardized time-frequency graph into the lightweight multi-scale bearing fault diagnosis model, perform backpropagation and optimize the training parameters to obtain the optimized lightweight multi-scale bearing fault diagnosis model. The normalized and data-augmented bearing time-frequency map is used as the model input and fed into a lightweight multi-scale bearing fault diagnosis model for end-to-end training. The model first extracts shallow basic fault features from the time-frequency map through first-layer convolution, activation, and batch normalization operations. Then, through multi-scale lightweight parallel branches, it mines bearing impact, periodic modulation, and global time-frequency distribution features at different scales. Feature fusion and a lightweight classification head are used to predict the bearing fault category. Finally, the cross-entropy loss function is used to calculate the error between the model's predicted value and the actual fault label, relying on reverse... The propagation algorithm performs chain-like differentiation from the output layer to the input layer, sequentially calculating and propagating the gradients of the weights, biases, and normalized parameters of the fusion module, multi-scale feature branches, and basic feature extraction layers. It also incorporates gradient clipping and L2 weight decay to suppress overfitting and gradient anomalies. Finally, the Adam optimizer dynamically updates all trainable parameters of the model based on an adaptive learning rate. Through multiple rounds of iterative training, the training loss is continuously minimized and the model's feature extraction capability is optimized, ultimately resulting in an optimized, lightweight multi-scale bearing fault diagnosis model with better accuracy and generalization performance, and lower parameter and computational costs.
[0094] S3: Acquire multi-channel vibration signals of the bearing, perform preprocessing, and input them into an optimized lightweight multi-scale bearing fault diagnosis model to obtain the probability distribution of fault categories.
[0095] Although preferred embodiments of this application have been described, those skilled in the art, once they learn the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application. Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. If such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A lightweight multi-scale bearing fault diagnosis method integrating multi-channel attention, characterized in that, include: S1: Acquire multi-channel vibration signals of the bearing and perform preprocessing to obtain a standardized time-frequency graph and construct a time-frequency graph dataset; S2: Construct a lightweight multi-scale bearing fault diagnosis model; the lightweight multi-scale bearing fault diagnosis model includes a hole depth separable convolutional backbone module, a multi-scale feature pyramid fusion module, a multi-channel collaborative triple attention module, and a lightweight classification output module; S21: Input the standardized time-frequency map into the dilated depth separable convolution backbone module to obtain the basic time-frequency feature map; the dilated depth separable convolution backbone module consists of a 3×3 standard convolutional layer and three convolutional units with the same three-level structure; the three convolutional units with the same three-level structure include a dilated depth convolutional layer, a 3×3 dilated convolutional layer, a max pooling layer and a Dropout layer. S22: Input the basic feature map into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map; the multi-scale feature pyramid fusion module includes a three-way parallel branch convolutional layer, a channel splicing layer, an adaptive fusion convolutional layer, and a batch normalization layer; the three-way parallel branch convolutional layer includes a 1×1 convolutional sub-layer, a 2×2 convolutional sub-layer, and a 3×3 convolutional layer; S23: Input the composite multi-scale feature map into the multi-channel collaborative triple attention module to obtain the attention-enhanced feature map; the multi-channel collaborative triple attention module includes a channel attention branch network layer, a spatial attention branch network layer, a multi-head self-attention branch network layer, and a residual fusion matching layer; The channel attention branch network layer includes a global average pooling sub-layer, a fully connected ReLU activation sub-layer, a fully connected Sigmoid activation sub-layer, and a channel-wise multiplication layer; the spatial attention branch network includes a 7×7 convolution sub-layer, a Sigmoid activation sub-layer, and a pixel-wise multiplication sub-layer; the multi-head self-attention branch network layer includes three sets of 1×1 convolution sub-layers and a multi-head attention computation sub-layer; the residual fusion matching layer includes a 1×1 projective convolution sub-layer, an element-wise addition sub-layer, and a ReLU activation layer. S24: Input the attention-enhanced feature map into the lightweight classification output module to obtain the fault category probability distribution; the lightweight classification output module includes a global average pooling layer, a lightweight fully connected layer, and a Softmax activation layer; S25: Input the standardized time-frequency graph into the lightweight multi-scale bearing fault diagnosis model, perform backpropagation and optimize the training parameters to obtain the optimized lightweight multi-scale bearing fault diagnosis model. S3: Acquire multi-channel vibration signals of the bearing, perform preprocessing, and input them into an optimized lightweight multi-scale bearing fault diagnosis model to obtain the probability distribution of fault categories.
2. The lightweight multi-scale bearing fault diagnosis method incorporating multi-channel attention as described in claim 1, characterized in that, In step S21, the standardized time-frequency map is input into the hole depth separable convolutional backbone module to obtain the basic time-frequency features. The specific process is as follows: The standardized time-frequency map is input into a 3×3 standard convolutional layer. The shallow time-frequency texture is extracted through 3×3 convolution operations to obtain a shallow basic feature map. This shallow basic feature map is then sequentially input into three convolutional units with identical three-level structures. Finally, the shallow basic feature map is input into a dilated depth convolutional layer for independent lightweight convolution of each channel to obtain a single-channel intermediate feature map, as shown below: , in, A 3×3 depthwise separable convolution representing the dilation rate. This represents the intermediate feature map of a single channel. This represents a shallow basic feature map. Represents a nonlinear activation function; Indicates batch normalization; The intermediate feature map of a single channel is then input into a 3×3 dilated convolutional layer for cross-channel feature fusion and the channel dimension is increased to obtain a fused feature map, as shown below: , in, Represents the fused feature map. Indicates batch normalization, This represents the intermediate feature map of a single channel. A 3×3 hollow convolutional layer representing the expansion rate. Indicates the number of output channels for this layer; The fused feature map is then input into a max pooling layer for compression to obtain a compressed feature map. This compressed feature map is then input into a Dropout layer, where some channels are randomly masked to suppress overfitting, resulting in the final output feature map of this layer, as shown below: , in, This represents the final output feature map of this layer. This indicates random deactivation regularization. This represents a 2×2 max pooling downsampling operation with a stride of 2, where the feature map's width and height are halved. Represents the fused feature map; Feature extraction, downsampling, and regularization are performed step by step. After a complete loop operation of three convolutional units with the same structure, the basic feature map is obtained. The formula for the three identical convolutional units is as follows: , in, Represents the coordinates on the output feature map The pixel value of the location, Represents the convolution kernel weight matrix. Represents the relative coordinates within the convolution kernel. Represents the convolution kernel radius. This represents the input feature map of a 3×3 dilated convolutional layer. This represents the hole convolution dilation rate.
3. The lightweight multi-scale bearing fault diagnosis method incorporating multi-channel attention as described in claim 1, characterized in that, In step S22, the basic feature map is input into the multi-scale feature pyramid fusion module to obtain a composite multi-scale feature map. The specific process is as follows: The basic feature maps are fed into parallel convolutional layers of 1×1, 2×2, and 3×3 to extract fault features at different scales, resulting in three sets of independent scale feature maps, as shown below: , , , in, This represents the small-scale feature map output by the 1×1 convolutional sublayer. This represents the midscale feature map output by the 2×2 convolutional sublayer. This indicates that the 3×3 convolutional sublayer outputs a large-scale feature map; This indicates that the feature map belongs to a three-dimensional real tensor. Indicates the feature map height; Indicates the width of the feature map. Indicates the number of output channels in a single branch; Represents the fundamental time-frequency characteristic map; This represents a 1×1 two-dimensional convolution with small-scale convolution branches, used to extract subtle fault textures. This represents a 2×2 two-dimensional convolution with a mesoscale convolution branch, used to extract mesoscale fault features. This represents a 3×3 two-dimensional convolution with large-scale convolution branches, used to extract large-scale periodic fault regions. The three sets of independent scale feature maps are input into the channel stitching layer and stacked and fused along the channel dimension to obtain a multi-channel stitched feature map, as shown below: , in, This represents a multi-channel stitched feature map; The multi-channel stitched feature map is input into the adaptive fusion convolutional layer to perform adaptive integration of channel weights, resulting in a weighted fusion feature map, as shown below: , in, This represents the weighted fusion feature map. This represents a 1×1 convolution operation. The weighted fused feature map is then input into the batch normalization layer to standardize the feature distribution, ultimately obtaining a composite multi-scale feature map. The three sets of independent scale feature maps include small-scale feature maps, medium-scale feature maps, and large-scale feature maps, as shown below: , in, Represents a composite multi-scale feature map. This indicates batch normalization operation.
4. The lightweight multi-scale bearing fault diagnosis method incorporating multi-channel attention as described in claim 1, characterized in that, In step S23, the composite multi-scale feature map is input into the multi-channel collaborative triple attention module to obtain the attention-enhanced feature map. The specific process is as follows: S231: Input the composite multi-scale feature map into the channel attention branch network layer to obtain the channel-weighted feature map. The specific process is as follows: The composite multi-scale feature map is input into the global average pooling sublayer for channel-wise global average pooling and spatial dimension compression to obtain the channel-wise global representation, as follows: , in, This represents the global representation of the channel. Represents the composite multi-scale feature map. Channel, spatial coordinates Pixel value at; Indicates the height of the feature map; Indicates the width of the feature map; The global representation of each channel is input into a fully connected ReLU activation sublayer to reduce the dimensionality of the channel vectors and introduce nonlinearity to obtain dimensionality-reduced nonlinear channel features. These dimensionality-reduced nonlinear channel features are then input into a fully connected Sigmoid activation sublayer to increase the dimensionality and restore the number of channels and channel weights, resulting in the channel attention weight mask, as shown below: , in, This represents the channel attention weight mask. This represents the Sigmoid activation function. This represents the weight matrix of the second fully connected layer. This represents the weight matrix of the first fully connected layer. This represents the channel global representation of the global average pooling output. Represents the ReLU activation function; The channel attention weight mask is input into the channel-wise multiplication layer, and the weight mask is multiplied with the composite multi-scale feature map channel-wise to obtain the channel-weighted feature map, as shown below; , in, Indicates the first Channel-weighted feature map of each channel. Represents a composite multi-scale feature map; S232: Input the channel-weighted feature map into the spatial attention branch network layer to obtain the channel-space double-weighted feature map. The specific process is as follows: The channel-weighted feature map is input into a 7×7 convolutional sublayer to extract spatial location correlation information, resulting in a single-channel spatial feature map, as shown below: , in, Represents a single-channel spatial feature map. This represents a two-dimensional convolution operation with a kernel size of 7×7. Represents the channel-weighted feature map; The spatial attention weight map is obtained by inputting the single-channel spatial feature map into the Sigmoid activation sublayer, as shown below: , in, Represents the spatial attention weight map. Indicates the activation function; The spatial attention weight map is input into the pixel-by-pixel multiplication sub-layer, and the spatial attention weight map is multiplied pixel-by-pixel with the channel weighted feature map to obtain the channel spatial double weighted feature map; , in, This represents a dual-weighted feature map of the channel space. This represents the weight coefficients of the spatial attention weight map at the coordinates. Indicates the horizontal direction of the feature map. Represents the vertical spatial coordinates. Indicates the feature channel index. This represents the feature pixel values output by the spatial attention weight map; S233: Input the channel space double-weighted feature map into the multi-head self-attention branch network layer to obtain the global correlation fusion feature map. The specific process is as follows; The channel space double-weighted feature map is input into three sets of 1×1 convolutional sub-layers. The feature maps are linearly transformed to obtain three sets of independent mapping features. The three sets of independent mapping features are input into the multi-head attention calculation sub-layer to split the multi-head calculation scaling dot product attention to obtain the global association fusion feature map. S234: Input the global correlation fusion feature map into the residual fusion layer to obtain the attention-enhanced feature map. The specific process is as follows: The globally correlated and fused feature map is input into a 1×1 projective convolutional sub-layer. The globally correlated and fused feature map is then dimensionally aligned with the composite multi-scale feature map to obtain a dimensionally matched feature map, as shown below: , in, This represents the global operation function for multi-head self-attention. Represents the query matrix, Represents the key matrix, Represents a value matrix, express The output of a parallel independent single attention head This indicates the number of attention heads specified in this study. This indicates a channel-level concatenation operation. This indicates that a linear mapping is performed to reduce the dimensionality of the concatenated multi-head features; The dimension-matched feature map is input into the element-wise summation sublayer. The feature residuals of the composite multi-scale feature map and the dimension-matched feature map are then summed to obtain the residual fusion feature map, as shown below: , in, Represents the residual fusion feature map. Feature maps representing dimension matching; Represents a composite multi-scale feature map; The residual fused feature map is input into the ReLU activation sublayer to introduce nonlinearity, and the final feature mapping is completed to obtain the attention-enhanced feature map, as shown below: , in, This represents the attention-enhanced feature map.
5. The lightweight multi-scale bearing fault diagnosis method integrating multi-channel attention as described in claim 1, characterized in that, In step S24, the attention-enhanced feature map is input into the lightweight classification output module to obtain the fault category probability distribution. The specific process is as follows: The attention-enhanced feature map is input into a global average pooling layer, and the spatial dimension is compressed by channel-wise global mean operation to obtain a one-dimensional feature vector. The one-dimensional feature vector is then input into a lightweight fully connected layer to complete the dimension mapping and obtain the original score vector. The score vector is then input into a Softmax activation layer for normalization processing, and finally the fault category probability distribution is obtained.
6. The lightweight multi-scale bearing fault diagnosis method incorporating multi-channel attention as described in claim 1, characterized in that, In step S25, the standardized time-frequency graph is input into the lightweight multi-scale bearing fault diagnosis model for backpropagation and training parameter optimization to obtain the optimized lightweight multi-scale bearing fault diagnosis model. The specific process is as follows: The standardized bearing time-frequency image is input into the network for forward propagation. The time-frequency image is then processed by a depth-separable convolutional backbone module to extract multi-scale basic features. The multi-scale feature pyramid fusion module then aggregates fault information at both large and small scales. The resulting data is fed into a multi-channel collaborative triple attention module to enhance key fault features and perform residual fusion. Finally, a lightweight classification output module outputs the fault prediction probability. The classification loss is calculated by combining the true labels of the samples. Backpropagation is performed with the goal of minimizing the loss. The gradient of the network parameters is solved layer by layer, and all weights are iteratively updated by an optimizer. The forward inference of samples and the parameter gradient update are performed repeatedly until the model performance converges, resulting in a lightweight multi-scale bearing fault diagnosis model with optimized parameters.