Lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation, and terminal device

CN122592375APending Publication Date: 2026-08-18HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610624997.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0008]本发明所要解决的技术问题是,针对现有技术不足,提供一种基于频域波束形成与知识蒸馏的轻量化水下目标检测方法、终端设备,解决传统方法检测精度低、深度学习方法实时性差的问题

Benefits of technology

[0035]1.适配性强:将频域波束形成与知识蒸馏技术深度结合,针对水听器接收信号的处理流程,设计维的单角度输入特征,实现波束形成特征与师生模型的精准适配,解决了现有知识蒸馏模型与水下信号特征适配性差的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122592375A_ABST
    Figure CN122592375A_ABST
Patent Text Reader

Abstract

The application discloses a kind of light-weight underwater target detection method based on frequency domain beam forming and knowledge distillation, terminal equipment, pre-processes to underwater acoustic signal, extracts the frequency domain beam forming feature of pre-processed underwater acoustic signal;Frequency domain beam forming feature is used as the input of pre-trained teacher model, obtains training dataset with soft label;The training dataset with soft label is used as the input of student model, the student model is trained, and an underwater target detection model is obtained.The application deeply combines frequency domain beam forming and knowledge distillation technology, designs single-angle input feature for the processing flow of hydrophone receiving signal, realizes the accurate adaptation of beam forming feature and teacher-student model, and solves the poor adaptability of existing knowledge distillation model and underwater signal feature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of underwater acoustic engineering and deep learning technology, and in particular to a lightweight underwater target detection method and terminal device based on frequency domain beamforming and knowledge distillation. Background Technology

[0002] Underwater target detection, a core technology in underwater acoustic engineering, operates on the following logic: a transducer emits a detection signal, a hydrophone array receives the reflected echo signal from the underwater target, and a signal processor analyzes and processes the echo signal to determine the target's location and distance. This technology is widely used in various critical scenarios such as marine resource exploration, underwater security, and ship navigation and obstacle avoidance, playing an irreplaceable and vital role in the field of marine engineering.

[0003] However, the underwater environment is extremely complex and uncertain. The echo signals received by hydrophones are easily affected by factors such as marine environmental noise and multipath propagation interference, resulting in weak target signal amplitude and blurred characteristic information, which poses a great challenge to the accurate detection of underwater targets.

[0004] Currently, existing underwater target detection methods are mainly divided into two categories: one is traditional signal processing methods, which achieve target detection through steps such as beamforming, matched filtering, and threshold decision, but suffer from drawbacks such as long computation time and significant fluctuations in detection performance depending on the false alarm rate setting. The other category is deep learning methods, which significantly improve detection accuracy in low signal-to-noise ratio scenarios by constructing deep neural networks to mine deep features of the signal, but most deep neural networks have problems such as complex structure, large parameter scale, and slow inference speed, making them difficult to adapt to the lightweight deployment requirements of underwater embedded devices and real-time active sonar data processing.

[0005] Furthermore, existing underwater target detection methods mostly use hard labels to indicate the presence or absence of targets for model training, which cannot retain information on the confidence level of detected targets, thus limiting the training accuracy of the models.

[0006] Beamforming, a crucial processing step in underwater target detection, reflects the response characteristics of received underwater acoustic data in various directions, thus characterizing the target's azimuth features. For target feature extraction in the range dimension, most existing methods rely on matched filtering. While matched filters are optimal detectors against white noise backgrounds, they rely on sliding window convolution to find the correlation between the received and transmitted signals. However, target echoes are prone to distortion to varying degrees during transmission through complex underwater acoustic channels, and the echo background often exhibits non-Gaussian characteristics, along with significant reverberation interference, resulting in poor actual detection performance of matched filters.

[0007] Furthermore, existing underwater target detection methods often employ hard-labeling ("target exists / does not exist") during model training, failing to retain target detection confidence information and thus limiting model training accuracy. In summary, current technologies suffer from both the poor detection performance and insufficient robustness of traditional methods, and the technical bottlenecks of lightweight deployment and limited training accuracy of deep learning methods. Therefore, how to efficiently mine feature information of faint targets using deep learning models and overcome these multiple limitations has become a core technical problem urgently needing to be solved in the field of underwater target detection. Summary of the Invention

[0008] The technical problem to be solved by this invention is to provide a lightweight underwater target detection method and terminal device based on frequency domain beamforming and knowledge distillation, which addresses the shortcomings of existing technologies and solves the problems of low detection accuracy of traditional methods and poor real-time performance of deep learning methods.

[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation, comprising the following steps:

[0010] S1. Preprocess the underwater acoustic signal and extract the frequency domain beamforming features of the preprocessed underwater acoustic signal;

[0011] S2. Use the frequency domain beamforming features as input to the pre-trained teacher model to obtain a training dataset with soft labels.

[0012] S3. Use the training dataset with soft labels as input to the student model, train the student model, and obtain the underwater target detection model;

[0013] The teacher model includes an input layer, multiple cascaded fully connected layers connected in series with the input layer, the last fully connected layer being connected to a first activation layer, and the first activation layer being connected to a first output layer.

[0014] The student model includes an input layer, multiple cascaded fully connected layers, a second activation layer, and a second output layer connected in sequence.

[0015] The teacher model employs a 14-layer deep network structure, combining ReLU activation layers to capture weak target features under low signal-to-noise ratio (SNR) conditions. A sigmoid layer outputs 0-1 probability soft labels, preserving target confidence information, significantly improving training accuracy compared to traditional hard-label training. Simultaneously, the student model mimics the teacher model's soft labels, maintaining high detection accuracy while remaining lightweight, and is suitable for underwater scenarios with a low SNR of -15dB. The student model uses a lightweight fully connected structure, combined with LeakyReLU activation layers to optimize feature extraction in low SNR scenarios, resulting in an approximately 30% improvement in inference speed. It can meet the requirements for real-time traversal detection from all angles and is suitable for lightweight deployment scenarios such as underwater embedded devices.

[0016] The frequency domain beamforming characteristics of the preprocessed underwater acoustic signal are represented as follows:

[0017] ;

[0018] in, This refers to the normalized spectral characteristics, i.e., the frequency domain beamforming characteristics of the preprocessed underwater acoustic signal. For the directional spectrum eigenvector, real() represents the real part of the vector, and imag() represents the imaginary part of the vector. This indicates a normalization operation. ; ; ; ; Frequency domain data matrix The Middle A multi-channel frequency vector constructed from the complex amplitudes of all array elements corresponding to each frequency point, frequency domain data matrix. It is obtained by performing a Fast Fourier Transform on the time-domain received data for each array element. The number of elements in the hydrophone array. The spacing between adjacent array elements. For the first The physical frequency corresponding to each frequency point The angle between the signal incident direction and the array normal. , for transpose, Indicates the reference speed of sound.

[0019] This invention deeply integrates frequency domain beamforming with knowledge distillation technology. It designs a single-angle input feature (frequency domain beamforming feature) for the processing flow of hydrophone received signals, and achieves accurate matching between the beamforming feature and the teacher-student model, thus solving the problem of poor compatibility between existing knowledge distillation models and underwater signal features.

[0020] The loss function of the teacher model Represented as:

[0021] ;

[0022] Where N is the number of samples in a single training session. This is the original hard label of the sample, with a value of 0 or 1. This is the predicted probability in the 0-1 interval output by the teacher model.

[0023] The process of acquiring the pre-trained teacher model includes: generating a target echo dataset by adding marine environmental noise of different intensities to the continuous wave simulation signal; generating a targetless echo dataset by using a pure noise signal that matches the actual underwater environment; hard-labeling the target echo dataset and the targetless echo dataset, with target echo samples labeled as 1 and targetless echo samples labeled as 0; allocating the number of target and targetless samples in a 1:1 ratio to form a hard-labeled dataset for training the teacher model; and training the teacher model using the hard-labeled dataset to obtain the pre-trained teacher model.

[0024] This invention uses a teacher model to label training data with soft labels: input feature data after angular domain FFT transformation, output target existence probability, with a value range of 0~1, and improves the accuracy of model training by retaining confidence information.

[0025] Before using the training dataset with soft labels as input to the student model, the method further includes: if the teacher model's judgment result based on the soft labels is consistent with the original hard labels of the samples, then the soft labels are used; if the judgment results are inconsistent, then the corresponding soft labels are discarded and the original hard labels are used as soft labels.

[0026] Methods for determining whether the teacher model's soft label-based judgment result is consistent with the original hard label of the sample include: if the soft label probability value of the teacher model's output layer is not lower than the judgment threshold, then the teacher model's soft label-based judgment result is consistent with the original hard label of the sample.

[0027] The method of the present invention further includes:

[0028] Underwater signals are acquired in real time, preprocessed, and frequency domain beamforming features of the preprocessed underwater signals are extracted to obtain the joint feature matrix of the angle and frequency domains.

[0029] By iterating through the input features corresponding to each angle in the joint feature matrix of angle frequency domain, and taking the input features of each angle as the input of the underwater target detection model, the probability value is obtained, and the real-time detection of underwater targets is completed.

[0030] After obtaining the probability values, the process also includes mapping the probability values ​​corresponding to all angles to color gradients to obtain a 0-1 probability color distribution map covering all angles.

[0031] The data used for student model training is soft-labeled by the teacher model. The input is the data after FFT transformation in the angle domain, and the output is the probability of the target's existence, which is distributed between 0 and 1. This preserves the information of the confidence of the detected target and improves the training accuracy of the model.

[0032] As an inventive concept, the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the steps of the above method.

[0033] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instructions stored thereon; when the computer program / instructions are executed by a processor, they implement the steps of the above-described method.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0035] 1. High adaptability: It deeply integrates frequency domain beamforming with knowledge distillation technology, and is designed specifically for the signal processing flow of hydrophones. The single-angle input feature of the dimension enables accurate matching between beamforming features and teacher-student models, solving the problem of poor compatibility between existing knowledge distillation models and underwater signal features;

[0036] 2. High detection accuracy: The teacher model adopts a 14-layer deep network structure, combined with ReLU activation layers to capture weak target features under low signal-to-noise ratio, and outputs 0-1 probability soft labels through the Sigmoid layer to retain target confidence information. Compared with traditional hard label training, this significantly improves the model training accuracy. At the same time, the student model maintains high detection accuracy while being lightweight by imitating the soft labels of the teacher model, and is suitable for underwater scenes with a low signal-to-noise ratio of -15dB.

[0037] 3. Good real-time performance: The student model adopts a lightweight fully connected structure and combines LeakyReLU activation layer to optimize feature extraction in low signal-to-noise ratio scenarios, improving inference speed by about 30%. It can meet the real-time traversal detection requirements from all angles and is suitable for lightweight deployment scenarios such as underwater embedded devices.

[0038] 4. High practicality: The entire method closely follows the actual engineering process of underwater target detection. From raw signal acquisition and beamforming feature extraction to teacher-student model training and real-time detection, the steps are clear, the parameters are well-defined, and the reproducibility is strong. It can be directly applied to practical scenarios such as marine resource exploration and underwater security, and has high engineering application value. Attached Figure Description

[0039] Figure 1This is a schematic diagram of data preprocessing and feature extraction in an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of the teacher-student model network structure in an embodiment of the present invention;

[0041] Figure 3 This is a comparison chart of the lightweight inference speed of the teacher-student model in an embodiment of the present invention;

[0042] Figure 4 This is a comparison chart of ROC curves of the target detection models in embodiments of the present invention;

[0043] Figure 5 This is an example of the teacher model detection effect in an embodiment of the present invention;

[0044] Figure 6 This is a student model detection result from an embodiment of the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Example 1

[0047] This invention provides a lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation, addressing the technical problems of low detection accuracy in traditional methods, poor real-time performance of deep learning methods, and insufficient model adaptability to underwater beamforming features. This achieves high-precision, lightweight detection of underwater targets in low signal-to-noise ratio environments. The method includes the following steps:

[0048] Step 1: Preprocessing of underwater acoustic signals and extraction of frequency domain beamforming features.

[0049] The data received by the hydrophone array has a high dimensionality. Directly extracting the data from a single hydrophone for feature extraction results in unclear and complex features. Therefore, it is often necessary to perform beamforming on the array data to transform the data in the array element domain into data in the angle domain. This not only reduces the dimensionality of the data but also decouples the azimuth features of the target's location from the target distance features detected by the subsequent network, laying the foundation for subsequent detection.

[0050] The specified number of elements in the hydrophone array is: Sampling rate Then in The number of sampling points collected within the time period is The data processing method employs sliding window framing. The data preprocessing flow for beamforming in a single direction is as follows:

[0051] No. The frame array received data matrix is ​​denoted as The matrix has dimensions of , The number of temporal sampling points in a single frame of data is expressed mathematically as follows:

[0052] (1)

[0053] In the formula: For the first The first frame The temporal sampling vector of each array element, . For the first The first frame The array element in the first The time-domain sampled values ​​of each sampling point .

[0054] Perform a Fast Fourier Transform on the time-domain received data for each array element, and set... Points After conversion, a frequency domain data matrix is ​​obtained. , dimension The mathematical expression is:

[0055] (2)

[0056] Among them, the The time-domain data of each array element is processed point The explicit formula for converting to frequency domain data is:

[0057] (3)

[0058] Extracting the frequency domain data matrix The Middle Construct a multi-channel frequency vector by taking the complex amplitudes of all array elements corresponding to each frequency point. , dimension The mathematical expression is:

[0059] (4)

[0060] For the incident direction is The signal is defined as the first Frequency domain steering vector at each frequency point , dimension The mathematical expression is:

[0061] (5)

[0062] This represents the spacing between adjacent array elements; For the first The physical frequency corresponding to each frequency point; The angle between the signal incident direction and the array normal;

[0063] Performing the inner product of the frequency domain steering vector and the multi-channel frequency point vector with their conjugate transposes yields the first... In-frame direction Frequency Beamforming output scalar The mathematical expression is:

[0064] (6)

[0065] From all Select from frequency points For each frequency point of interest, the beams corresponding to those frequencies are extracted, the outputs are arranged in order, and a directional spectrum feature vector is constructed. The mathematical expression is:

[0066] (7)

[0067] The complex-valued directional spectral feature vector is decomposed into real and imaginary parts, concatenated into a real-valued vector, and then normalized to obtain the normalized spectral feature. The concatenated vector has a dimension of The mathematical expression is:

[0068] (8)

[0069] Normalized spectral characteristics These are the initial features obtained from preprocessing the data, which serve as the input to the subsequent neural network. The working principle of the data preprocessing and feature extraction stages in step one is as follows: Figure 1 As shown.

[0070] It should be noted that considerations In narrowband signal scenarios, when there is mutual movement between the sonar and the target, the target echo will introduce a frequency offset, so the frequency range of the echo is approximately: , It is the frequency of the transmitted signal. This is the maximum frequency offset caused by relative motion. Since the ideal echo signal frequency should appear near the transmit signal frequency band, considering only signals within this frequency range can greatly reduce the dimensionality of the data in the frequency domain.

[0071] Step 2: Construction of the Knowledge Distillation Teacher-Student Model

[0072] The distillation model generates a soft-labeled training dataset from the teacher model, which is then fed into the student model for training. The network structure is as follows: Figure 2 .

[0073] The teacher model is a 14-layer fully connected neural network, consisting of a feature input layer, 12 fully connected and ReLU activation layers, and an output layer using sigmoid activation. The input layer receives... One feature spectrum, 12 fully connected layers for mining deep feature information, ReLU activation layer This avoids the vanishing gradient problem during deep network training by preserving non-negative gradients. The Sigmoid activation layer uses the formula... The model output is mapped to the 0-1 interval, and the output is the probability of the target existing.

[0074] The student model is a 6-layer lightweight fully connected neural network, consisting of a feature input layer, four fully connected layers, a LeakyReLU activation layer, and an output layer. The student model's input and output are consistent with the teacher model. The four fully connected layers are used for lightweight feature extraction, and the LeakyReLU activation layer uses the following formula:

[0075] (9)

[0076] This activation function is used to preserve the negative gradient of weak targets under low signal-to-noise ratio to avoid gradient vanishing. Subsequently, it is mapped to the 0-1 interval through the Sigmoid function to output the probability of the target's existence.

[0077] Step 3: Model Training

[0078] The training dataset for the teacher model comprises two categories: one with target echoes, generated by adding noise to the CW simulation signal; and the other without target echoes, generated from pure noise signals. Both datasets are hard-labeled (0 / 1), with target echoes labeled 1 and without target echoes labeled 0, together forming the hard-labeled dataset for teacher model training. Training employs the Adam optimization method, with the binary cross-entropy loss function, the mathematical expression of which is:

[0079] The loss function is the binary cross-entropy loss function, and its mathematical expression is:

[0080] (10)

[0081] In the formula, N is the number of batch samples in a single training session. This is the original hard label of the sample, with a value of 0 or 1. This is the predicted probability in the 0-1 interval output by the teacher model.

[0082] The training dataset for the student model is generated based on the teacher model. The frequency domain features of a single frame and single angle of the received signal are input into the trained teacher model. The teacher model outputs the target existence probability (soft label) in the 0-1 interval. This soft label is then combined with the corresponding 2B×1 dimensional feature spectrum to construct the initial training dataset. To ensure label accuracy, a validation rule is set for the soft labels: if the teacher model's judgment based on the soft label matches the original hard label of the sample, the 0-1 interval soft label is used; otherwise, the corresponding soft label is discarded, and the original 0 / 1 hard label of the sample is retained. Furthermore, the dataset is further divided into two classes with a threshold of 0.5. The proportion of samples in each class is statistically analyzed, and the class with a smaller proportion is given a higher weight coefficient in the loss function calculation to balance the impact of dataset distribution differences on training performance. The student model training uses the same Adam optimization method and binary cross-entropy loss function as the teacher model. After inputting the constructed training dataset into the lightweight student model, the student model outputs the original score, which is then converted into a 0-1 interval probability using the Sigmoid function. The deviation between this probability and the labeled data in the dataset is used as the core optimization objective to adjust the network parameters in reverse. The training process is continuously iterated and optimized until the student model's detection accuracy is higher than that of the teacher model and its inference speed is better than that of the teacher model. At this point, the training is terminated and the lightweight student model that has been trained is saved.

[0083] The following are specific implementation case examples:

[0084] Step 1: Acquisition and Preprocessing of Raw Hydrophone Signals

[0085] 1.1 The raw underwater time-domain signal was acquired using a hydrophone array. The acquired raw signal dimension was 32768×512, where 32768 represents the number of time-domain sampling points per hydrophone and 512 represents the number of hydrophone array elements.

[0086] 1.2 The original time-domain signal was transformed by FFT using MATLAB software. NFFT=256 was set to convert the time-domain signal into a frequency-domain signal, resulting in a frequency-domain matrix with a dimension of 256×512, where 256 is the number of frequency points after the FFT transformation.

[0087] 1.3 Considering the Doppler effect of the relative motion between the target and the sonar platform, the effective frequency band range of the echo is designed. 41 effective spectral lines are selected from 256 frequency points. Noise interference from invalid frequency bands is removed. Considering the real and imaginary parts of the complex number, an effective frequency domain feature matrix with a dimension of 82×512 is obtained.

[0088] Step 2: Frequency Domain Beamforming Feature Extraction

[0089] 2.1 The 82×512 effective frequency domain feature matrix obtained in step 1.3 is divided into blocks according to spectral lines. Each block corresponds to one effective spectral line. The feature dimension after block division is 512×1, resulting in a total of 82 block features.

[0090] 2.2 Construct the guide vector, set the scanning angle step size to 0.15, then the number of beamforming angles... =1201, the guide vector dimension is 1201×512, used to achieve beamforming in the angular domain.

[0091] 2.3 Beamforming processing is performed on each 512×1 block feature. By performing matrix multiplication of the guide vector and the block feature, the 1201×1 angle domain feature corresponding to each spectral line is obtained, that is, the beamforming output value of each spectral line at 1201 angles.

[0092] 2.4 The angle domain features corresponding to the 82 spectral lines are recombined in columns, that is, the result of frequency domain beamforming is to obtain an angle-frequency domain joint feature matrix with a dimension of 1201×82, where the 82-dimensional features correspond to the real and imaginary parts of 41 complex spectral lines around the frequency band of the single-frequency transmitted signal. This feature matrix covers the angle information and frequency domain information of the underwater target.

[0093] 2.5 Traverse 1201 angles, each angle corresponds to 1×82 input features, which are used as input data for the subsequent teacher-student model.

[0094] Step 3: Knowledge Distillation Teacher-Student Model Construction

[0095] The teacher model's input layer has an input dimension of 1×82, used to receive single-angle input features. Hidden layers consist of 10 layers (10 layers total, each with 512 neurons) alternating between fully connected layers and ReLU activation layers. The ReLU activation layers are used to avoid the vanishing gradient problem during deep network training, improving feature extraction capabilities. The output uses a Sigmoid activation layer to map the model output to the 0-1 range, outputting the probability of the target's presence. A binary cross-entropy regression layer is then connected to calculate the loss value during model training. The teacher model is trained using labeled underwater target data until its detection accuracy reaches over 98%, at which point training stops, resulting in a high-precision teacher model.

[0096] The student model's input layer has an input dimension of 1×82, consistent with the teacher model's input format. The hidden layers consist of four sets of fully connected layers alternating with LeakyReLU activation layers. The first, second, and third hidden layers each have 512 neurons, and the fourth has 82. The LeakyReLU activation layers preserve the negative gradients of weak targets under low signal-to-noise ratio conditions, preventing gradient vanishing and reducing model complexity. The output layer outputs the raw detection score, which is then mapped to the 0-1 range using the Sigmoid function, aligning with the teacher model's output format.

[0097] Step 4: Model Training

[0098] The training of the teacher model begins with the construction of a hard-labeled training dataset, comprising two categories: target echo datasets and targetless echo datasets. The target echo dataset is generated by adding varying intensities of marine environmental noise to continuous wave simulation signals, adapting the noise levels to the requirements of real-world low signal-to-noise ratio underwater scenarios. The targetless echo dataset is generated directly using pure noise signals that match the actual underwater environment. Both datasets are labeled with 0 / 1 hard labels: target echo samples are labeled with 1, and targetless echo samples are labeled with 0, with a 1:1 ratio of target and targetless samples to ensure balanced training data distribution. This constitutes the hard-labeled dataset for teacher model training. During training, the batch size is set to 80,000, the initial learning rate is 0.001, the learning rate update strategy uses cosine annealing, and the loss function is the binary cross-entropy loss function. The training lasts for 180 epochs, and the model converges after 80 iterations, completing the teacher model training.

[0099] The student model is trained using soft labels generated by the teacher model as the core of the training dataset. First, the 1×82 single-angle input features obtained from preprocessing and spectral feature extraction of the original data are batch-inputted into the trained teacher model. The teacher model outputs the probability of target existence between 0 and 1 as soft labels through output layer operations. Then, the input features are combined with the corresponding soft labels one by one to construct the initial training dataset with soft labels. To ensure label accuracy, a validation rule is set with a threshold of 0.5. If the teacher model's judgment result based on the soft label is consistent with the original hard label of the sample, the soft label is adopted; otherwise, the corresponding soft label is discarded, and the original hard label is used. Based on the validated labels, the dataset is further divided into two classes with a threshold of 0.5. The proportion of samples in each class is statistically analyzed, and a higher weight coefficient is assigned to the class with a smaller proportion in the loss function calculation to balance the differences in dataset distribution. The training parameters were set to a batch size of 6000, an initial learning rate of 0.001, and a binary cross-entropy loss function. The optimization objective was the deviation between the probability of the student model's original output score after Sigmoid transformation and the soft label. Network parameters were adjusted through backpropagation, and the model was trained for a total of 200 epochs, reaching convergence after 100 iterations. During training, the detection accuracy was verified using a validation set every 10 epochs. If the accuracy did not improve for 10 consecutive epochs, an early stopping strategy was implemented, ultimately resulting in a stable and lightweight student model.

[0100] Step 5: Real-time underwater target detection

[0101] During the deployment phase, the trained student model is first exported in ONNX format and deployed on underwater embedded detection devices such as FPGAs and embedded processors to meet real-time signal processing requirements. Subsequently, a hydrophone array acquires underwater signals in real time and processes them according to steps 1 and 2 to obtain a 1201×82 angle-frequency domain joint feature matrix. The embedded device further iterates through the 1×82 input features corresponding to the 1201 angles in this matrix, inputting them sequentially into the student model. The raw detection scores output by the student model are converted into 0-1 probability values ​​using a Sigmoid function. Finally, all 0-1 probability values ​​corresponding to all angles are mapped to color gradients, generating a 0-1 probability color distribution map covering all angles. The color distribution visually presents the confidence level of underwater target presence at each angle, completing the real-time detection of underwater targets.

[0102] This embodiment compares and verifies the method of the present invention with the prior art in a low signal-to-noise ratio underwater scenario of -15dB. The results are as follows:

[0103] 1. Detection Accuracy: The detection accuracy of the student model in this embodiment is 95.76%, and the detection accuracy of the teacher model is 92.51%. Compared with mainstream deep learning detection models (Transformer 88.02%, LSTM 89.20%, Wave-U-Net 87.62%), the detection accuracy of the student model is improved by 7.74%, 6.56%, and 8.14% respectively, showing a significant overall lead. Furthermore, compared with the teacher model (serving as the "teacher end" of knowledge distillation), the student model's accuracy is still 3.25 percentage points higher.

[0104] 2. Inference speed: The student model in this embodiment of the invention performs inferences at different times, 10², 10³, and 10… 4 10 5 The inference times for the next iterations were 0.0746s, 0.792s, 6.141s, and 61.468s, respectively. Compared to the teacher model's times of 0.1065s, 1.059s, 9.660s, and 92.041s, the single-inference speed was improved by approximately 49.7%, and the speed of large-scale inference was significantly improved. 5 The time taken for the next iteration was reduced by 30.573 seconds, a decrease of 33.2%, demonstrating significantly better inference efficiency than the teacher model and greatly improving the real-time performance of the detection task. The inference speed comparison results are as follows: Figure 3 .

[0105] 3. Adaptability: The method of this invention can accurately adapt to the angular frequency domain characteristics after underwater acoustic beamforming, and performs excellently in moderate noise scenarios with an SNR of -10dB. In the low false alarm rate range of practical engineering interest, when the false alarm rate is controlled at 0.001, the detection rate of this invention can reach 0.9010. When the false alarm rate is increased to 0.010, the detection rate further improves to 0.9534, achieving a performance balance of low false detection and high recognition, which is superior to the detection rate of the teacher model. Compared with the traditional matched filtering method, under the same false alarm rate conditions, the detection rate advantage of this invention is more significant, leading by 29.9% at a false alarm rate of 0.001 and still leading by 4.9% at a false alarm rate of 0.010, fully demonstrating that its adaptability to underwater acoustic signal characteristics in moderate noise environments is superior to high-precision models of the same system and traditional methods.

[0106] Even in harsh noise environments with an SNR of -15dB, the embodiments of this invention maintain stable detection performance, demonstrating strong anti-interference adaptability. Even with strong noise interference, when the false alarm rate is controlled at 0.001, the detection rate of the embodiments of this invention still reaches 0.2229. When the false alarm rate is increased to 0.010, the detection rate further increases to 0.3825, representing increases of 3.2 percentage points and 1.55 percentage points respectively compared to the teacher model. In contrast, traditional matched filtering methods, under the same low SNR environment, have a detection rate of only 0.0134 with a false alarm rate of 0.001 and only 0.1663 with a false alarm rate of 0.010. The detection rates of the embodiments of this invention are 15.6 times and 2.3 times higher, respectively. This not only solves the technical pain points of traditional methods, such as severe missed detections and unstable identification, but also achieves performance superior to the teacher model in the same system while maintaining a lightweight design. A comparison of the ROC curves of the three models is provided. Figure 4 The final detection results of the teacher model are as follows: Figure 5 The final detection results of the student model are as follows: Figure 6 The student model not only improves the resolution of the target but also helps to suppress reverberation.

[0107] In summary, the method of the present invention can achieve lightweight real-time detection while ensuring detection accuracy, and is suitable for the engineering requirements of underwater target detection with low signal-to-noise ratio, thus having significant advantages and practical value.

[0108] Example 2

[0109] Embodiment 2 of the present invention provides a terminal device corresponding to Embodiment 1 above. The terminal device can be a processing device for a client, such as a mobile phone, a laptop, a tablet computer, a desktop computer, etc., to execute the method of the above embodiments.

[0110] The terminal device in this embodiment includes a memory, a processor, and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in Embodiment 1 described above.

[0111] In some implementations, the memory may be high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device.

[0112] In other implementations, the processor can be any type of general-purpose processor, such as a central processing unit (CPU) or a digital signal processor (DSP), and there is no limitation here.

[0113] Example 3

[0114] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to Embodiment 1 above, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, they implement the steps of the method of Embodiment 1 above.

[0115] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof.

[0116] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0117] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0119] Although preferred embodiments of this application have been described, those skilled in the art, upon learning 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.

[0120] 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. Therefore, 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 underwater target detection method based on frequency domain beamforming and knowledge distillation, characterized in that, Includes the following steps: S1. Preprocess the underwater acoustic signal and extract the frequency domain beamforming features of the preprocessed underwater acoustic signal; S2. Use the frequency domain beamforming features as input to the pre-trained teacher model to obtain a training dataset with soft labels. S3. Use the training dataset with soft labels as input to the student model, train the student model, and obtain the underwater target detection model; The teacher model includes an input layer, multiple cascaded fully connected layers connected in series with the input layer, the last fully connected layer being connected to a first activation layer, and the first activation layer being connected to a first output layer. The student model includes an input layer, multiple cascaded fully connected layers, a second activation layer, and a second output layer connected in sequence.

2. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 1, characterized in that, The frequency domain beamforming characteristics of the preprocessed underwater acoustic signal are represented as follows: ; in, This refers to the normalized spectral characteristics, i.e., the frequency domain beamforming characteristics of the preprocessed underwater acoustic signal. For the directional spectrum eigenvector, real() represents the real part of the vector, and imag() represents the imaginary part of the vector. This indicates a normalization operation. ; ; ; ; Frequency domain data matrix The Middle A multi-channel frequency vector constructed from the complex amplitudes of all array elements corresponding to each frequency point, frequency domain data matrix. It is obtained by performing a Fast Fourier Transform on the time-domain received data for each array element. The number of elements in the hydrophone array. The spacing between adjacent array elements. For the first The physical frequency corresponding to each frequency point The angle between the signal incident direction and the array normal. , for transpose, Indicates the reference speed of sound.

3. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 1, characterized in that, The loss function of the teacher model Represented as: ; Where N is the number of samples in a single training session. This is the original hard label of the sample, with a value of 0 or 1. This is the predicted probability in the 0-1 interval output by the teacher model.

4. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 1, characterized in that, The process of acquiring the pre-trained teacher model includes: generating a target echo dataset by adding marine environmental noise of different intensities to the continuous wave simulation signal; generating a targetless echo dataset by using a pure noise signal that matches the actual underwater environment; hard-labeling the target echo dataset and the targetless echo dataset, with target echo samples labeled as 1 and targetless echo samples labeled as 0; allocating the number of target and targetless samples in a 1:1 ratio to form a hard-labeled dataset for training the teacher model; and training the teacher model using the hard-labeled dataset to obtain the pre-trained teacher model.

5. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 4, characterized in that, Before using the training dataset with soft labels as input to the student model, the method further includes: if the teacher model's judgment result based on the soft labels is consistent with the original hard labels of the samples, then the soft labels are used; if the judgment results are inconsistent, then the corresponding soft labels are discarded and the original hard labels are used as soft labels.

6. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 5, characterized in that, Methods for determining whether the teacher model's soft label-based judgment result is consistent with the original hard label of the sample include: if the soft label probability value of the teacher model's output layer is not lower than the judgment threshold, then the teacher model's soft label-based judgment result is consistent with the original hard label of the sample.

7. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 1, characterized in that, Also includes: Underwater signals are acquired in real time, preprocessed, and frequency domain beamforming features of the preprocessed underwater signals are extracted to obtain the joint feature matrix of the angle and frequency domains. By iterating through the input features corresponding to each angle in the joint feature matrix of angle frequency domain, and taking the input features of each angle as the input of the underwater target detection model, the probability value is obtained, and the real-time detection of underwater targets is completed.

8. The lightweight underwater target detection method based on frequency domain beamforming and knowledge distillation according to claim 7, characterized in that, After obtaining the probability values, the process also includes mapping the probability values ​​corresponding to all angles to color gradients to obtain a 0-1 probability color distribution map covering all angles.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory; characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program / instructions stored thereon; characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 8.