Underwater acoustic target classification method and system based on multi-time-frequency analysis and channel attention sliding window transformer

By integrating FSST, WSST, and LOFAR time-frequency analysis and introducing a channel attention mechanism, the Swin Transformer solves the problem of adaptive processing of multi-channel time-frequency maps in underwater acoustic target classification, and achieves high-precision underwater acoustic target classification.

CN122391695APending Publication Date: 2026-07-14KUNMING SHIP EQUIPMENT RESEARCH & TESTING CENTER (CHINA SHIPBUILDING CORP 750 TEST SITE)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNMING SHIP EQUIPMENT RESEARCH & TESTING CENTER (CHINA SHIPBUILDING CORP 750 TEST SITE)
Filing Date
2026-03-23
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing underwater acoustic target classification methods struggle to fully leverage the complementary information from multi-time-frequency analysis methods in complex marine environments. They fail to effectively adapt to multi-channel time-frequency maps and lack sufficient feature fusion mechanisms, resulting in limited classification performance.

Method used

Complementary time-frequency representations are generated using multi-time-frequency analysis methods (FSST, WSST, LOFAR), and a channel attention mechanism is introduced into the Swing Transformer architecture. Adaptive importance weighting and deep fusion are achieved through the MTFCA module.

Benefits of technology

It significantly improves the accuracy and robustness of underwater acoustic target classification, achieving high-precision classification in complex marine noise environments, with a model performance improvement of approximately 4%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391695A_ABST
    Figure CN122391695A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-time-frequency analysis and channel attention sliding window Transform of underwater acoustic target classification method and system, first to original underwater acoustic signal carries out parallel time-frequency analysis, synchronously generates FSST, WSST and LOFAR three kinds of complementary time-frequency representation, and is spliced into multi-channel time-frequency image in channel dimension fusion;Standard Swin Transformer network is improved into Swin-MTFCA architecture: embedding dedicated multi-time-frequency channel attention module, the module is through multi-scale pooling and compression-excitation mechanism, adaptively learns and generates differentiating importance weight for three feature channels, realizes dynamic feature selection and depth fusion.Network is through hierarchical window and shift window attention mechanism, efficiently models the local details and global long-range dependence relationship of time-frequency feature.The application effectively solves the problem that the conventional method is insufficient to utilize multi-time-frequency feature, and the channel relationship modeling is lacking, significantly improves the high-precision, strong robust classification ability of ship, underwater vehicle and other targets in complex noise environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater acoustic target classification, and more specifically to an underwater acoustic target classification method and system based on multi-time-frequency analysis and channel attention sliding window Transformer. Background Technology

[0002] Underwater acoustic target classification is a key technology in fields such as marine monitoring, underwater defense, and marine resource development. Due to the complexity of underwater acoustic channels, including strong background noise, severe multipath effects, time-varying channel characteristics, and the non-stationarity of target radiated noise, accurate classification of underwater acoustic targets faces enormous challenges.

[0003] Traditional underwater acoustic target classification methods mainly rely on single time-frequency analysis techniques and artificially designed features, which have limited classification performance in complex marine environments. Time-frequency analysis is an important tool in underwater acoustic signal processing. Commonly used time-frequency analysis methods include Short-Time Fourier Transform (STFT), Wavelet Transform (WT), and Wigner-Ville Distribution (WVD). In recent years, Synchrosqueezing Transform (SST) technology has received widespread attention, including Fourier-based Synchrosqueezing Transform (FSST) and Wavelet-based Synchrosqueezing Transform (WSST). FSST can effectively extract transient features of signals and enhance frequency clustering, while WSST performs well in balancing time and frequency resolution. In addition, Low-Frequency Analysis and Recording (LOFAR) technology can effectively extract the line spectrum features of underwater acoustic targets through long-term cumulative spectrum analysis.

[0004] With the development of deep learning technology, especially after the breakthrough success of the Transformer model in natural language processing and computer vision, researchers have begun to introduce it into the field of underwater acoustic target classification. The core of the Transformer model is the self-attention mechanism, which effectively captures the global dependencies of the input sequence, thus overcoming the limitations of traditional convolutional neural networks (CNNs) in terms of receptive field. In underwater acoustic classification tasks, one-dimensional underwater acoustic signals are typically converted into two-dimensional time-spectrum maps, and then processed using advanced models from the field of vision. For example, Li et al. first applied the Transformer to this field, and their proposed STM (Spectrogram Transformer Model) model verified the great potential of the Transformer architecture in capturing global contextual information from time-spectrum maps, achieving a significant performance improvement compared to traditional CNN models.

[0005] To further improve performance, researchers explored various model optimization paths. One approach was to construct a hybrid architecture combining CNN and Transformer, using CNN to extract local texture features and then using Transformer for global relationship modeling. Another approach was to improve the Transformer model itself to adapt to the needs of image-based tasks. Among these, the SwinTransformer, due to its efficient capture of multi-scale features through a shifted window and hierarchical design, has received widespread attention in the field of underwater acoustic target classification. For example, a patent (CN118051831B) discloses a network model based on the collaboration of CNN and Swin Transformer, aiming to combine the advantages of both for feature extraction. Meanwhile, some studies have also recognized the limitations of single features and have attempted to fuse different spectral features (such as DEMON spectrum and Mel spectrum) before feeding them into the model for classification.

[0006] Despite some progress in underwater acoustic target classification, existing technologies still have the following shortcomings:

[0007] (1) Most existing methods rely on single time-frequency analysis (such as STFT or MFCC) or simple multi-feature stacking, failing to fully explore the deep complementary information between different time-frequency analysis methods (such as FSST, WSST, LOFAR), resulting in insufficient characterization ability of complex underwater acoustic signals.

[0008] (2) When the standard Transformer or Swing Transformer model is directly applied to process multi-channel time-frequency diagrams, the model usually treats all channels equally, and does not adequately model the channel relationship between different time-frequency representations. It is difficult to adaptively select and enhance key feature channels and suppress the interference of noise channels.

[0009] (3) Existing feature fusion methods are mostly simple early fusion (input end splicing) or late fusion (decision layer fusion), lacking a mechanism for deep feature interaction in the middle layer of the network, which limits the further improvement of model performance.

[0010] (4) When processing multi-channel time-frequency plot input, the Swin Transformer-based method does not fully consider that the feature channels generated by different time-frequency analysis methods may have different discriminative importance. This indiscriminate processing may lead to noise or redundant information negatively affecting the classification results, and fails to fully realize the potential of the Swin Transformer. Summary of the Invention

[0011] To address the aforementioned problems, this invention provides a method and system for underwater acoustic target classification based on multi-time-frequency analysis and channel attention sliding window Transformer. By integrating the complementary advantages of multiple time-frequency analysis methods and introducing a channel attention mechanism into the Swin Transformer architecture, high-precision classification of underwater acoustic targets is achieved.

[0012] Specifically, the present invention includes the following steps:

[0013] Step S1: Preprocess the original underwater acoustic signal by resampling, segmenting, removing DC components, and standardizing it into a unified format.

[0014] Step S2: Parallel multi-time-frequency analysis feature extraction. Perform FSST, WSST and LOFAR time-frequency transformations on the same preprocessed signal segment to generate three time-frequency representations.

[0015] Step S3: Time-frequency feature fusion and standardization. The three time-frequency representations are unified on the frequency axis, independently normalized, and unified on the time axis. They are then stitched together in the channel dimension to form a three-channel time-frequency image, and the size is standardized.

[0016] Step S4: Feature learning and classification based on channel attention enhancement of the Swin Transformer. The standardized time-frequency image is input into the improved Swin Transformer network for deep feature extraction and target classification. The improved Swin Transformer network is a deep neural network architecture formed by replacing the basic building blocks of the standard Swin Transformer with Swin-MTFCABlock. On the basis of the original window attention mechanism, a multi-time-frequency channel attention module designed for multi-time-frequency features is embedded to realize adaptive importance weighting and deep fusion of the input three-channel time-frequency data.

[0017] Another aspect of the present invention discloses an underwater acoustic target classification system, comprising:

[0018] The signal preprocessing module is used to resample and segment the raw underwater acoustic signal to obtain a preprocessed signal;

[0019] The multi-channel time-frequency analysis module is used to perform FSST transform, WSST transform and LOFAR analysis on the preprocessed signal in parallel to generate three corresponding time-frequency representations;

[0020] The feature fusion module is used to stitch and standardize the three time-frequency representations in the channel dimension to form a three-channel time-frequency image;

[0021] The classification and recognition module employs an improved Swing Transformer network to perform deep feature extraction and target classification on the three-channel time-frequency images. The improved Swing Transformer network integrates an MTFCA channel attention module in its base SwingBlock to adaptively weight and fuse different time-frequency feature channels.

[0022] The working principle of this invention is as follows: This invention constructs a multi-channel complementary acoustic representation by fusing three heterogeneous time-frequency analysis methods: FSST, WSST, and LOFAR. It also designs a dedicated channel attention module (MTFCA) embedded in the hierarchical architecture of the Swin Transformer to achieve adaptive importance weighting and deep fusion of multiple time-frequency feature channels. Its innovative method lies in the following: First, at the signal processing level, it utilizes the high-resolution time-frequency concentration of FSST, the multi-scale adaptability of WSST, and the low-frequency line spectrum specialization of LOFAR to generate complementary time-frequency images from different mathematical transformation perspectives. Then, at the deep learning level, it improves the standard Swin Block into a Swin-MTFCABlock, simultaneously introducing the MTFCA module based on the original window attention capturing spatial (time-frequency) local and global dependencies. This module extracts channel statistical features through multi-scale pooling, generates channel weights related to the input content via a compression-excitation network, and recalibrates the feature map using residual scaling. This dynamically strengthens discriminative feature channels and suppresses noise or redundant channels at each layer of the network's forward propagation. The synergistic effect of multi-source feature generation, intelligent channel selection, and spatiotemporal joint modeling ultimately enables more robust and discriminative high-level feature extraction and classification of complex underwater acoustic signals.

[0023] Beneficial effects compared to existing technologies:

[0024] 1. Comprehensive and robust signal representation capabilities: By integrating three complementary time-frequency analysis methods—FSST (High-Resolution Transient Feature), WSST (Multi-Scale Time-Frequency Balance), and LOFAR (Low-Frequency Line Spectrum Accumulation)—a multi-view acoustic representation system was constructed. This system can comprehensively capture multi-dimensional information in underwater acoustic signals, ranging from transient pulses and continuous harmonics to mechanical modulation characteristics, significantly enhancing the model's feature completeness and representation robustness in complex marine noise environments.

[0025] 2. Adaptive Feature Selection and Intelligent Fusion: An MTFCA channel attention module is introduced into the Swin Transformer, enabling the network to dynamically learn and weight the importance of different time-frequency feature channels based on the input content. This mechanism achieves automatic enhancement of key discriminative features and suppression of noisy / redundant channels, solving the problem of equal processing of multi-channel time-frequency maps. The model's classification accuracy is improved by approximately 4% compared to the standard Swin Transformer, demonstrating significant advantages in intelligent feature selection and fusion.

[0026] Window attention + shifted window mechanism: Self-attention is calculated within a local window, reducing the complexity to O(M²•N), where M is the window size.

[0027] Hierarchical feature learning: By gradually reducing the resolution and increasing the number of channels through patch merging, both local details and global semantics are taken into account.

[0028] Adaptability to time-frequency maps: The window mechanism is naturally well-suited for capturing the local texture (narrowband line spectrum, ridge morphology) and long-range temporal dependencies of time-frequency maps.

[0029] 3. Efficient Hierarchical Feature Learning and Global Modeling: Employing an improved Swin-MTFCA hierarchical architecture, while retaining the efficient computational advantages of window attention, it achieves progressive feature learning from local textures to global patterns through the synergy of a shifted window mechanism and channel attention. This design balances computational efficiency with the ability to model long-range time-frequency dependencies, making it particularly suitable for the multi-scale characteristics of underwater acoustic signals.

[0030] 4. Superior training efficiency and generalization performance: Through an early fusion strategy of channel splicing, the complete original information of each time-frequency representation is preserved at the input, providing rich material for subsequent deep processing. Combined with transfer learning on ImageNet pre-trained weights, the model can converge quickly and exhibit stronger generalization ability under limited underwater acoustic sample conditions.

[0031] 5. Achieve continuous channel selection and deep fusion in the feature learning process: From the alignment and standardization of the three time-frequency maps and channel splicing to the continuous interaction within the Swin-MTFCA backbone, the MTFCA module is embedded in each Swin Block of the network backbone to achieve continuous channel selection and deep fusion in the feature learning process.

[0032] 6. Innovative Attention Mechanism: Attention is applied to the three channels FSST / WSST / LOFAR themselves. Multi-scale pooling (1×1, 3×3, 5×5) captures the statistical characteristics of different receptive fields, and differential channel weights are generated through a compressed excitation network. Timing: Embedded in the Swing Block, it occurs continuously at each level of feature extraction. Mechanism: A residual scaling factor is used to achieve channel recalibration while preserving original information. Attached Figure Description

[0033] Figure 1 This application provides a schematic diagram of the overall process of the underwater acoustic target classification method based on multi-channel time-frequency analysis;

[0034] Figure 2 This is a flowchart of the multi-time-frequency analysis data preprocessing process proposed in this application;

[0035] Figure 3 This is a schematic diagram of the network structure proposed in this application;

[0036] Figure 4 This is a schematic diagram of the structure and processing flow of the MTFCA module proposed in this application. Detailed Implementation

[0037] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0038] Example 1: A Classification Method for Underwater Acoustic Targets Based on Multi-Time-Frequency Analysis and Channel Attention Sliding Window Transformer

[0039] The method includes the following steps:

[0040] Step 1: Preprocessing of underwater acoustic signals, resampling and segmenting the original underwater acoustic signals;

[0041] Step 2: Parallel multi-time-frequency analysis feature extraction. The preprocessed signal is subjected to FSST, WSST and LOFAR time-frequency transformations to generate three time-frequency representations.

[0042] Step 3: Time-frequency feature fusion and standardization. The three time-frequency representations are stitched together along the channel dimension to form a three-channel time-frequency image, and then the size is standardized.

[0043] Step 4: Feature learning and classification based on channel attention enhancement of the Swin Transformer. The standardized time-frequency image is input into the improved Swin Transformer network for deep feature extraction and target classification.

[0044] Preferably, step 1 specifically includes:

[0045] 1.1) The original underwater acoustic signal is resampled, and the sampling rate is uniformly adjusted to 16kHz using an anti-aliasing FIR filter;

[0046] 1.2) Divide the resampled signal into segments of fixed duration, each segment lasting 5 seconds and containing 80,000 sampling points;

[0047] 1.3) Perform DC component removal processing on each signal segment, that is, subtract the signal mean to obtain a zero-mean signal.

[0048] Preferably, the FSST transformation in step 2 specifically includes:

[0049] Apply a Fourier-based synchronous compression transform to the preprocessed signal x_ds:

[0050] [s, f_fsst, t_fsst] = fsst(x_ds, f_s)

[0051] Where s is a complex time-frequency matrix, f_fsst is a frequency vector, t_fsst is a time vector, and f_s is the sampling rate; the amplitude s_abs = |s| of the time-frequency matrix is ​​taken as the FSST time-frequency representation.

[0052] Preferably, the WSST transformation in step 2 specifically includes:

[0053] Apply wavelet-based synchronous compression transform to the preprocessed signal x_ds:

[0054] [sst, f_wsst] = wsst(x_ds, f_s)

[0055] Where sst is a complex time-frequency matrix and f_wsst is a frequency vector; the amplitude sst_abs = |sst| of the time-frequency matrix is ​​taken as the WSST time-frequency representation.

[0056] Preferably, the LOFAR analysis in step 2 specifically includes:

[0057] Generating LOFAR spectra using short-time Fourier transform:

[0058] [S_lofar, f_lofar, t_lofar] = spectrogram(x_ds, window, noverlap,nfft, f_s)

[0059] Wherein, window is a Hamming window of length 256, noverlap is a 128-point overlap, and nfft is a 512-point FFT length; the amplitude of the spectrum S_lofar_abs = |S_lofar| is taken as the time-frequency representation of LOFAR.

[0060] Preferably, step 3 specifically includes:

[0061] 3.1) Unify the frequency axis of the three time-frequency representations by linear interpolation to unify the frequency axis into 224 frequency points with a frequency range of [0, f_s / 2].

[0062] 3.2) Perform independent normalization for each time-frequency representation: TF_norm = (TF - min(TF)) / (max(TF) - min(TF)), where TF is the time-frequency matrix;

[0063] 3.3) The timeline is standardized by interpolation, adjusting the time dimension to 224 time points;

[0064] 3.4) The three standardized time-frequency representations are spliced ​​together along the channel dimension to form a three-channel time-frequency image with a size of 3×224×224.

[0065] Preferably, the multi-time-frequency channel attention-enhanced Swin Transformer (MTF-Swin Transformer) network structure proposed in step 4 of this invention includes:

[0066] 4.1) The basic architecture adopts the Swin-Tiny model, replacing the original Swin Block with the Swin-MTFCA (Multi-Temporal-Frequency Channel Attention, MTFCA) module, which includes hierarchical feature extraction in four stages:

[0067] Phase 1: Two Swing-MTFCA Blocks with a feature dimension of 96, focusing on extracting local time-frequency texture features;

[0068] Second stage: 2 Swing-MTFCA Blocks, feature dimension 192, capturing medium-scale time-frequency patterns;

[0069] Phase 3: 6 Swing-MTFCA Blocks with 384 feature dimensions to model long-range dependencies in the time-frequency domain;

[0070] Fourth stage: Two Swin-MTFCA Blocks, with a feature dimension of 768, form a high-level semantic representation;

[0071] 4.2) The Swin-MTFCA module is connected to the output of each standard Swin Block to achieve joint space-channel optimization;

[0072] 4.3) The MTFCA channel attention module learns the correlation weights between channels through multi-scale average pooling, channel compression-excitation, and sigmoid activation function.

[0073] Preferably, the specific implementation of the MTFCA channel attention module is as follows:

[0074] Traditional channel attention mechanisms are mainly used for the RGB channels of natural images. However, this application designs an adaptive channel weight learning mechanism for the input features, specifically targeting the characteristics of three heterogeneous time-frequency representations: FSST, WSST, and LOFAR. The calculation process of the MTFCA module is as follows:

[0075] 1) Perform multi-scale average pooling on the output channel feature maps:

[0076]

[0077]

[0078] in, This is the feature map of the c-th channel; For adaptive average pooling, feature maps of arbitrary size are pooled to a fixed size of k×k; This indicates a concatenation operation, which concatenates the pooling results of three different scales along the feature dimension. Let represent the multi-scale global feature vector of the c-th channel, with dimensions (1×1+2×2+4×4)=21.

[0079] 2) Modeling and attention weight calculation:

[0080]

[0081] in, This represents a vector formed by concatenating the multi-scale features of all channels. The learnable weight matrix of the first fully connected layer has dimensions of Where r=4 is the compression ratio; BN is the batch normalization operation, which normalizes intermediate features; GELU is the Gaussian error linear unit activation function. , where Φ(x) is the cumulative distribution function of the standard normal distribution; This represents the weight matrix of the second fully connected layer, with dimension 1. This is used to restore the compressed features to the original number of channels; σ represents the sigmoid activation function. The output value is restricted to the range [0,1]; s is the channel attention weight vector.

[0082] 3) Recalibration:

[0083]

[0084] in, This is the original input feature map for the c-th channel. Let c be the attention weight scalar. The scaling factor represents the residual form, with a value range of [1,2]. It is broadcast as a scaling factor to the first... Channel feature map At all spatial locations, channel-level feature recalibration is achieved while preserving the original feature information (residual connectivity). For element-wise multiplication, the scaling factor is broadcast to every spatial location of the entire feature map; This represents the output feature map of the c-th channel after attention recalibration, with the dimension maintained as H×W.

[0085] Preferably, the basic structure of the Swin-MTFCA Block includes:

[0086] 1) Window-based multi-head self-attention (W-MSA): The input feature map is divided into M×M non-overlapping windows, and self-attention is computed independently within each window;

[0087] 2) Shift-Window Multi-Head Self-Attention (SW-MSA): Enables cross-window information interaction through cyclic shift operations;

[0088] 3) Multilayer Perceptron (MLP) module: Employs a two-layer fully connected network with the GELU activation function;

[0089] 4) The proposed Channel Attention MTFCA module.

[0090] This application also provides an underwater acoustic target classification system based on multi-channel time-frequency analysis, including:

[0091] The signal preprocessing module is used to downsample and segment the raw underwater acoustic signal;

[0092] The multi-channel time-frequency analysis module is used to perform FSST, WSST, and LOFAR time-frequency transformations on the preprocessed signal;

[0093] The feature fusion module is used to concatenate and standardize multiple time-frequency representations along the channel dimension;

[0094] The classification module uses a Swin-Transformer network with MTFCA channel attention for feature extraction and target classification.

[0095] In this embodiment, the physical meaning of FSST (Fourier Synchronous Compression Transform) is: to compress and focus time-frequency energy along the instantaneous frequency direction through energy redistribution; its advantages are: it is sensitive to the non-stationary transient structure caused by underwater acoustic target frequency modulation and maneuvering, and can extract clear time-frequency ridges; applicable scenarios are: multi-component separation and instantaneous frequency trajectory extraction.

[0096] The physical meaning of WSST (Wavelet Synchronous Compression Transform): Synchronous compression based on wavelet multi-scale analysis, preserving scale information; Advantages: Strong ability to characterize cross-scale changes and broadband modulation structures; Complementarity: Complementary to FSST in the extraction of multi-scale non-stationary components.

[0097] The physical significance of LOFAR (Low Frequency Analysis and Recording): It is an engineering characterization specifically for low-frequency narrowband line spectrum and harmonic structure; its advantages: it has a direct physical correspondence to the low-frequency line spectrum characteristics and mechanical noise harmonics of targets such as ships; its engineering value: it is highly interpretable and conforms to the physical mechanism of underwater acoustic target radiated noise.

[0098] The three time-frequency representations proposed in this application can more effectively preserve the key instantaneous frequency trajectory, cross-scale modulation structure, and low-frequency line spectrum information of the target under complex noise and highly non-stationary scenarios, thereby improving the discriminativeness and robustness of underwater acoustic target classification.

[0099] Example 2: Practical Application Process

[0100] In this specific implementation, the server first preprocesses the acquired raw underwater acoustic signal. Considering that the main energy of the underwater acoustic target radiated noise is concentrated in the low-frequency band, and to unify the processing flow, the sampling rate of the raw signal is uniformly adjusted to 16kHz. The continuous underwater acoustic signal is divided into 5-second segments with no overlap between segments, ensuring the independence of training and testing data. Each 5-second signal segment contains 80,000 sampling points. After segmentation, each signal segment undergoes DC component removal processing, i.e., the mean of the signal is subtracted to obtain a preprocessed signal with zero mean, which helps the stability of subsequent time-frequency analysis.

[0101] Step 2: Parallel Multi-Time-Frequency Analysis Feature Extraction

[0102] After preprocessing, the server performs three time-frequency analysis methods in parallel on each signal segment to fully extract the time-frequency characteristics of the underwater acoustic signal.

[0103] For the FSST transform, a Gaussian window function is used as the analysis window, with a window length of 512 sampling points corresponding to a time length of 32 milliseconds. This window length achieves a good balance between time and frequency resolution. The overlap rate of the window function is set to 75%, meaning that adjacent windows overlap by 384 sampling points, ensuring the continuity of the time-frequency representation. FSST enhances the convergence of the time-frequency representation through synchronous compression technology, making it particularly suitable for extracting transient features and modulation components from underwater acoustic signals.

[0104] For the WSST transform, the Morlet wavelet was chosen as the mother wavelet due to its excellent localization properties in time-frequency analysis. The scaling parameter was set to 32 scales per octave. While maintaining the multi-resolution characteristics of wavelet transform, WSST improves the readability of the time-frequency representation through synchronous compression, making it particularly suitable for analyzing non-stationary components in underwater acoustic signals.

[0105] For LOFAR analysis, the classic short-time Fourier transform method was employed, using a Hamming window to reduce spectral leakage. The window length was set to 2048 sampling points, corresponding to a time length of 128 milliseconds; this relatively long window length is beneficial for extracting stable line spectrum features. The window function overlap rate was set to 50%, i.e., overlapping 1024 sampling points. The FFT point count was also set to 2048 points to ensure sufficient frequency resolution. LOFAR analysis can effectively accumulate the steady-state features of underwater acoustic targets, especially the characteristic line spectra generated by rotating machinery such as propellers.

[0106] Step 3: Time-Frequency Feature Fusion and Standardization

[0107] The three time-frequency analysis methods produce time-frequency representations with different dimensions and resolutions, requiring standardization. The server employs bilinear interpolation to uniformly adjust the frequency axis of the three time-frequency representations to 224 frequency points and the time axis to 224 time points. Bilinear interpolation maintains the continuity of time-frequency features and avoids information loss that may result from simple downsampling.

[0108] After unifying the dimensions, each time-frequency representation is independently subjected to Min-Max normalization, mapping the numerical range to the [0,1] interval. This step eliminates the dimensional differences between different time-frequency analysis methods, ensuring the stability of subsequent network training. The three normalized time-frequency representations are concatenated along the channel dimension to form a 3×224×224 three-channel time-frequency image, where the first channel is the FSST result, the second channel is the WSST result, and the third channel is the LOFAR result.

[0109] To fully utilize the knowledge of the pre-trained model, the three-channel time-frequency images were normalized using ImageNet standards. Specifically, the mean values ​​of 0.485, 0.456, and 0.406 were subtracted from each channel, and then divided by the standard deviations of 0.229, 0.224, and 0.225, respectively. This normalization strategy ensures that the distribution of the input data is consistent with the data distribution during ImageNet pre-training, which is beneficial for the effectiveness of transfer learning.

[0110] Step 4: Feature Learning and Classification of the Swing Transformer Based on Channel Attention Enhancement

[0111] This embodiment uses Swin-Tiny as the basic network architecture, which is a version of the Swin Transformer family with a smaller number of parameters but excellent performance. The network input is a normalized 3×224×224 three-channel time-frequency image. Swin-Tiny divides the input image into non-overlapping image patches with a 4×4 patch size, and each patch is linearly embedded into a 96-dimensional feature vector. The network adopts a hierarchical structure with four stages, each stage containing 2, 2, 6, and 2 Transformer blocks respectively, with feature dimensions of 96, 192, 384, and 768 dimensions respectively, and the number of attention heads correspondingly 3, 6, 12, and 24.

[0112] The core of this embodiment lies in replacing the standard Swing Block with a Swing-MTFCABlock that integrates the MTFCA module. The MTFCA module is located at the output of each Swing Block and learns the importance weights of different time-frequency representations through multi-scale pooling and channel modeling. Specifically, MTFCA first performs adaptive average pooling on the input features at three scales: 1×1, 2×2, and 4×4, capturing global information under different receptive fields. After concatenating the pooling results, channel modeling is performed through a two-layer fully connected network. The first layer compresses the number of channels to one-quarter of the original number, and after batch normalization and GELU activation, the second layer restores the original number of channels. Finally, channel weights in the range [0,1] are generated using the sigmoid function and multiplied with the original features in residual form to achieve adaptive feature recalibration.

[0113] For network training, this embodiment uses a proprietary dataset collected from lake experiments, containing underwater acoustic signals from 7 categories of targets, including 4 categories of ships and 3 categories of underwater vehicles. After 5 seconds of segmentation, there are a total of 1782 signals, which are randomly divided into training and test sets at an 8:2 ratio to ensure that the distribution of each category in the training and test sets is basically consistent. The proprietary dataset uses the same segmentation strategy.

[0114] The training process employs the Adam optimizer with an initial learning rate of 1e-4. This relatively small learning rate helps to fully utilize the pre-trained weights. The Adam optimizer's momentum parameters β1 and β2 are set to 0.9 and 0.999, respectively, and the weight decay coefficient is set to 1e-4 to prevent overfitting. A cosine annealing strategy is used for learning rate scheduling, gradually reducing the learning rate to 1e-6 over 300 training epochs. This smooth learning rate decay helps the model converge to a better local minimum.

[0115] The batch size was set to 32, and mixed precision training was used during training to reduce memory usage and computation time while maintaining model accuracy. The data for each batch was randomly shuffled before being input into the network to enhance the randomness of training.

[0116] To monitor the training process and detect overfitting in a timely manner, a complete evaluation is performed on the test set at each round, calculating classification accuracy, precision, recall, and F1 score. The calculation methods for the evaluation metrics are as follows:

[0117]

[0118]

[0119]

[0120]

[0121] Wherein, TP (True Positive) is the number of true positive samples, FP (False Positive) is the number of false positive samples, TN (True Negative) is the number of true negative samples, and FN (False Negative) is the number of false negative samples.

[0122] The maximum number of training epochs is set to 300, and an early stopping mechanism is triggered if the test set accuracy does not improve for 10 consecutive epochs to avoid overfitting. The weights of the best-performing model on the test set are saved for final test evaluation.

[0123] The loss function used is cross-entropy loss, which is suitable for multi-class classification tasks. When calculating the loss, the loss for each class is averaged to ensure that class imbalance does not have an excessive impact on training. Label smoothing is also employed during training, converting hard labels to soft labels with a smoothing coefficient set to 0.1, which helps improve the model's generalization ability.

[0124] Experimental Results and Analysis

[0125] To verify the technical effectiveness of the method described in this application, this embodiment conducted systematic comparative experiments and ablation studies. Three representative deep learning network architectures were selected as comparison benchmarks: MobileNet-V2 as a representative of lightweight convolutional neural networks, ResNet-50 as a representative of classic deep convolutional neural networks, and the standard Swin-Tiny without channel attention mechanism as a representative of the original visual Transformer architecture. To verify the technical effectiveness of multi-time-frequency feature fusion, two input modes were set up in the experiment: one was a three-channel time-frequency map that fused the results of FSST, WSST, and LOFAR time-frequency analysis; the other was using only the LOFAR analysis results, with the first layer of the network adapted to a single-channel input. All comparison methods used the same data preprocessing process, training strategy, and performance evaluation criteria.

[0126] Table 1

[0127]

[0128] The experimental results are shown in Table 1. The method proposed in this application, using a three-channel time-frequency graph input, achieves a classification accuracy of 97.32% and an F1 score of 96.89%, which are significant improvements compared to the comparison methods. Specifically, compared to the standard Swin-Tiny method's accuracy of 93.30%, the method of this application improves by 4.02 percentage points; compared to the MobileNet-V2 method's accuracy of 91.96%, it improves by 5.36 percentage points; and compared to the ResNet-50 method's accuracy of 87.95%, it improves by 9.37 percentage points.

[0129] Analysis of the technical performance of network architectures shows that Transformer-based methods (including the standard Swin-Tiny and the Swin-MTFCA proposed in this application) outperform CNN-based methods (including MobileNet-V2 and ResNet-50) in classification. This result demonstrates the significant advantage of Transformer's global feature modeling capabilities in underwater acoustic target classification tasks. Among the CNN architecture comparisons, MobileNet-V2, employing depthwise separable convolutions, achieved an accuracy of 91.96%, higher than ResNet-50's 87.95% using standard convolutions, indicating that depthwise separable convolutional structures have better feature extraction capabilities when processing time-frequency map features.

[0130] Ablation experiments confirmed the effectiveness of the multi-time-frequency fusion strategy proposed in this application. When the input degenerates to a single LOFAR time-frequency representation, the classification performance of each method decreased to varying degrees: the accuracy of MobileNet-V2 decreased from 91.96% to 85.71%, a drop of 6.25 percentage points; the standard Swin-Tiny decreased from 93.30% to 91.07%, a drop of 2.23 percentage points; and the method proposed in this application decreased from 97.32% to 93.30%, a drop of 4.02 percentage points. These results indicate that fusing FSST, WSST, and LOFAR time-frequency analysis methods can provide complementary feature information and play a role in improving classification performance.

[0131] In particular, the method of this application still achieves an accuracy of 93.30% using only a single LOFAR input. This performance is comparable to the standard Swin-Tiny using a three-channel input and surpasses the latter's 91.07% accuracy with a single-channel input. This result demonstrates that the MTFCA channel attention module proposed in this application can still extract more discriminative feature representations through an adaptive feature calibration mechanism, even when the input features are relatively simple.

[0132] Analysis of the channel attention weights output by the MTFCA module reveals that it can adaptively adjust the weights of each time-frequency channel based on the acoustic characteristics of different target categories. Specifically: for fast-moving targets characterized primarily by transient features and modulation components, the average weight of the FSST channel is 0.42, higher than the 0.31 of the WSST channel and the 0.27 of the LOFAR channel; for medium-to-large ship targets with stable mechanical noise and distinct line spectrum characteristics, the weight of the LOFAR channel increases to 0.45, while the weights of the FSST and WSST channels are 0.28 and 0.27, respectively; for targets with complex acoustic characteristics, the weight distribution of the three channels tends to be balanced, with FSST channel at 0.35, WSST channel at 0.33, and LOFAR channel at 0.32. These observations indicate that the MTFCA module tends to adjust the weights of each time-frequency channel according to the acoustic characteristics of different target categories, demonstrating the adaptive capability of the channel attention mechanism in fusing multi-source time-frequency information.

[0133] Analysis of the F1 score shows that the proposed method achieved an F1 score of 96.89%, only 0.43 percentage points lower than its accuracy of 97.32%, indicating a good balance between precision and recall. In contrast, the standard Swin-Tiny method achieved an F1 score of 92.32%, 0.98 percentage points lower than its accuracy of 93.30%, indicating a certain degree of class imbalance. The smaller gap between the F1 score and accuracy of the proposed method suggests that the MTFCA module helps mitigate the class imbalance problem.

[0134] In summary, this embodiment achieves high-precision classification of underwater acoustic targets by fusing three complementary time-frequency analysis methods and introducing the MTFCA channel attention mechanism. Experimental results show that the proposed method achieves a classification accuracy of 97.32% on a proprietary lake experimental dataset, demonstrating a significant performance advantage over existing methods. Ablation experiments verify the effectiveness of the two technical features: multi-time-frequency fusion and the channel attention mechanism.

[0135] Example 3

[0136] This embodiment relates to an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the underwater acoustic target classification method based on multi-time-frequency analysis and channel attention Swin Transformer in the above embodiment 1.

[0137] Example 4

[0138] This embodiment relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method described in Embodiment 1 above.

[0139] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A method for classifying underwater acoustic targets based on multi-time-frequency analysis and channel attention sliding window Transformer, characterized in that... Includes the following steps: Step S1: Preprocess the original underwater acoustic signal by resampling, segmenting, removing DC components, and standardizing it into a unified format. Step S2: Parallel multi-time-frequency analysis feature extraction. Perform FSST, WSST and LOFAR time-frequency transformations on the same preprocessed signal segment to generate three time-frequency representations. Step S3: Time-frequency feature fusion and standardization. The three time-frequency representations are unified on the frequency axis, independently normalized, and unified on the time axis. They are then stitched together in the channel dimension to form a three-channel time-frequency image, and the size is standardized. Step S4: Feature learning and classification based on channel attention enhancement of the Swin Transformer. The standardized time-frequency image is input into the improved Swin Transformer network for deep feature extraction and target classification. The improved Swin Transformer network is a deep neural network architecture formed by replacing the basic building blocks of the standard Swin Transformer with Swin-MTFCABlock. On the basis of the original window attention mechanism, a multi-time-frequency channel attention module designed for multi-time-frequency features is embedded to realize adaptive importance weighting and deep fusion of the input three-channel time-frequency data.

2. The underwater acoustic target classification method according to claim 1, characterized in that... The adaptive importance weighting and deep fusion described in step S4 is achieved by extracting channel statistical features through multi-scale pooling, generating adaptive weights through a compression-excitation mechanism, and recalibrating the feature channels in the form of residual scaling. This realizes the collaborative optimization of spatial local relationship modeling and channel importance adaptation, enabling the network to gradually complete the deep selection and fusion of multi-time-frequency features at different levels (from local texture to global pattern).

3. The underwater acoustic target classification method according to claim 1, characterized in that, In step S1, the resampling includes using an anti-aliasing FIR filter to uniformly adjust the sampling rate to the same frequency; the segmentation process includes dividing the signal into segments with a fixed duration and a fixed number of sampling points; and the removal of the DC component includes subtracting the signal mean to obtain a zero-mean signal.

4. The underwater acoustic target classification method according to claim 1, characterized in that, In step S2, the time-frequency transformation includes: The FSST transform, based on the synchronous compression transform of Fourier, concentrates the energy of the STFT onto the instantaneous frequency trajectory through a compression operator, thereby obtaining a high-resolution time-frequency map. The WSST transform, based on the synchronous compression transform of wavelets, utilizes the multi-scale characteristics of wavelets and has better adaptability to non-stationary signals. LOFAR analysis uses STFT to generate low-frequency spectra to extract low-frequency line spectrum features corresponding to the periodic vibrations of rotating machinery.

5. The underwater acoustic target classification method according to claim 1, characterized in that, In step S3: The frequency axis unification includes: unifying the frequency axis to the same number of points and the same frequency range through linear interpolation, so as to align them in the frequency dimension; The independent normalization includes: performing minimum-maximum normalization on each time-frequency matrix to eliminate differences in amplitude dimensions; The timeline is unified by interpolation to a fixed number of points. The channel-dimensional stitching involves stitching three fixed-size matrices together along the channel dimension to obtain a three-channel time-frequency image, where the first channel is the FSST result, the second channel is the WSST result, and the third channel is the LOFAR result.

6. The underwater acoustic target classification method according to claim 2, characterized in that, Step S4 includes: Step S41: Establish network architecture The architecture uses Swin-Tiny, but replaces the standard Swin Block with Swin-MTFCABloc. The network is divided into four stages, with progressive downsampling and increased feature dimensions. The first stage extracts local time-frequency texture features; the second stage captures medium-scale time-frequency patterns; the third stage models long-range dependencies in the time-frequency domain; and the fourth stage forms high-level semantic representations. Step S42: Implement spatial-channel joint optimization: capture local spatiotemporal relationships through window-based multi-head self-attention (W-MSA); achieve cross-window information interaction through shifted window multi-head self-attention (SW-MSA); and employ a two-layer fully connected network with GELU activation function through a multilayer perceptron (MLP). Step S43: The MTFCA channel attention module learns the correlation weights between channels through multi-scale average pooling, channel compression-excitation, and the sigmoid activation function.

7. The underwater acoustic target classification method according to claim 6, characterized in that, In step S42: Window-based multi-head self-attention (W-MSA) involves dividing the feature map into non-overlapping windows and calculating self-attention within each window. Shift-Window Multi-Head Self-Attention (SW-MSA) works by cyclically shifting the next-level window to the top left corner, allowing elements in adjacent windows to interact and thus establishing cross-window connections.

8. The underwater acoustic target classification method according to claim 6, characterized in that, In step S43, the MTFCA channel attention module is designed with multiple time-frequency channels, and its process is as follows: Multi-scale average pooling: Perform average pooling at three scales (1×1, 2×2, and 4×4) on the feature map of each channel to obtain global descriptions at different granularities; Channel attention weight calculation: The pooling results of the three scales are concatenated, and the importance weight of each channel is learned through two fully connected layers; Recalibration: Multiply the learned weights by a scaling factor γ, γ∈[1,2], and then multiply them by the original features.

9. The underwater acoustic target classification method according to claim 8, characterized in that, In step S43, an adaptive channel weight learning mechanism was designed to address the characteristics of the three heterogeneous time-frequency representations, FSST, WSST, and LOFAR, for the input features. The calculation process of the MTFCA channel attention module is as follows: 1) Perform multi-scale average pooling on the channel feature maps: ; ; in, This is the feature map of the c-th channel; For adaptive average pooling, feature maps of arbitrary size are pooled to a fixed size of k×k; This indicates a concatenation operation, which concatenates the pooling results of three different scales along the feature dimension. Let represent the multi-scale global feature vector of the c-th channel, with dimensions (1×1+2×2+4×4)=21; 2) Modeling and attention weight calculation: ; in, This represents a vector formed by concatenating the multi-scale features of all channels. The learnable weight matrix of the first fully connected layer has dimensions of Where r=4 is the compression ratio; BN is the batch normalization operation, which normalizes intermediate features; GELU is the Gaussian error linear unit activation function. , where Φ(x) is the cumulative distribution function of the standard normal distribution; This represents the weight matrix of the second fully connected layer, with dimension 1. This is used to restore the compressed features to the original number of channels; σ represents the sigmoid activation function. This restricts the output value to the range [0,1]; s is the channel attention weight vector; 3) Recalibration: ; in, This is the original input feature map for the c-th channel. Let c be the attention weight scalar. The scaling factor represents the residual form, with a value range of [1,2]. It is broadcast as a scaling factor to the first... Channel feature map At all spatial locations, channel-level feature recalibration is achieved while preserving the original feature information (residual connectivity). For element-wise multiplication, the scaling factor is broadcast to every spatial location of the entire feature map; This represents the output feature map of the c-th channel after attention recalibration, with the dimension maintained as H×W.

10. An underwater acoustic target classification system, comprising a computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program or instructions that, when executed by a processor, implement the underwater acoustic target classification method as described in any one of claims 1-9.