Neural network based adaptive filtering method for off-axis integrated cavity output spectrum cavity mode noise

CN123030941APending Publication Date: 2026-11-03BENGBU COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611229180.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing off-axis integrating cavity output spectral systems, high-frequency random fluctuations caused by cavity mode noise affect the signal-to-noise ratio and concentration inversion accuracy of the absorption spectrum. Hardware methods increase system complexity and cost, traditional filtering algorithms have limited adaptability, and deep learning methods experience performance degradation after drifting in noisy environments.

Method used

A base model based on a deep residual network and an adaptive module are adopted. Frequency domain spectral sequences are generated through fast Fourier transform, and training labels are generated by sliding median filtering. An adaptive module is constructed for online optimization. Weight coefficients are calculated using the signal-to-noise ratio for weighted fusion, pseudo-labels are generated, and the parameters of the adaptive module are optimized.

Benefits of technology

It effectively suppresses cavity mode noise, improves the robustness and generalization ability of the model in complex field environments, ensures the accuracy of spectral analysis and concentration inversion, and avoids phase distortion and spectral distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030941A_ABST
    Figure CN123030941A_ABST
Patent Text Reader

Abstract

The application provides a neural network-based off-axis integral cavity output spectrum cavity mode noise adaptive filtering method, relates to the technical field of noise adaptive filtering, and comprises the following steps: constructing a base model based on a deep residual network, simultaneously, constructing a series of adaptive modules and setting up updateable parameters of the adaptive modules, and adjusting a predicted spectrum result output by the base model through the adaptive modules; setting a monitoring window, continuously acquiring a frequency domain spectrum sequence of continuous frames in the monitoring window, determining a baseline area of each frame of the frequency domain spectrum sequence, weighting and fusing multiple frames of the frequency domain spectrum sequence in the monitoring window by using a weight coefficient, and generating a pseudo label of a current frame. Through the introduction of the cooperative architecture of the deep residual network and the online adaptive module, the noise adaptive filtering without manual labeling of true value labels is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of noise adaptive filtering technology, specifically to an adaptive filtering method for cavity mode noise of off-axis integrating cavity output spectrum based on neural networks. Background Technology

[0002] Off-axis integrating cavity output spectroscopy (OA-ICOS) technology couples the laser beam off-axis into an optical resonant cavity composed of a pair of high-reflectivity mirrors, causing the beam to reflect multiple times within the cavity. This significantly extends the effective absorption optical path, thereby greatly improving the sensitivity of trace gas detection. However, high-sensitivity OA-ICOS systems are plagued by various noise sources, among which cavity mode noise is one of the main factors limiting the system's detection performance. This noise originates from intracavity mode interference caused by laser phase noise, manifesting as high-frequency random fluctuations in the spectral sequence, directly affecting the signal-to-noise ratio of the absorption spectrum and the accuracy of concentration inversion. Existing techniques for suppressing cavity mode noise can be broadly categorized into hardware and software methods. Hardware methods include injecting radio frequency white noise to perturb the laser modulation current and using active high-frequency vibrations to change the cavity length to increase the cavity mode density, thereby weakening residual interference fringes. Software methods mainly include traditional signal processing techniques such as wavelet denoising, Kalman filtering, empirical mode decomposition, and improved algorithms combining them with Savitzky-Golay filtering. In recent years, deep learning models have been explored for spectral data filtering and concentration prediction; for example, the Informer network has been used to filter CO2 spectral time series. While achieving approximately twice the signal-to-noise ratio of traditional filtering methods, existing methods still have significant shortcomings: hardware methods increase system complexity and cost; traditional filtering algorithms rely on manually set thresholds and parameters, limiting their adaptability to complex and variable noise environments; although deep learning methods can establish end-to-end mapping relationships, in practical applications, spectral noise characteristics drift with factors such as ambient temperature, pressure, and device aging, causing the filtering performance of pre-trained models to degrade, and it is difficult to update them online through retraining; therefore, there is an urgent need for an adaptive filtering method for off-axis integral cavity output spectral cavity mode noise based on neural networks.

[0003] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide an adaptive filtering method for cavity mode noise in off-axis integrating cavity output spectrum based on neural networks, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: An adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks, the specific steps of which include: S1: Acquire multiple frames of raw time-domain interferogram signals from the off-axis integrating cavity output spectral system, convert them into frequency-domain spectral sequences through fast Fourier transform; perform sliding median filtering on each frequency-domain spectral sequence to generate corresponding training labels, and combine the frequency-domain spectral sequences with the corresponding training labels to form training data pairs; S2: Construct a base model based on a deep residual network, pre-train the base model based on training data to establish a mapping relationship between the frequency domain spectral sequence and the denoised spectral sequence; construct a cascaded adaptive module based on the output of the base model, set the updatable parameters of the adaptive module, and adjust the predicted spectral results output by the base model through the adaptive module. S3: Set a monitoring window and continuously acquire the frequency domain spectral sequence of consecutive frames within the monitoring window; determine the baseline region of each frame's frequency domain spectral sequence and calculate the corresponding signal-to-noise ratio based on the baseline region; determine the weighting coefficient based on the signal-to-noise ratio of each frame's frequency domain spectral sequence, and use the weighting coefficient to perform weighted fusion of multiple frames' frequency domain spectral sequences within the monitoring window to generate a pseudo-label for the current frame; S4: Input the current frame frequency domain spectral sequence into the base model and the adjusted adaptive module to obtain the predicted spectral result; construct a loss function based on the difference between the predicted spectral result and the pseudo-label, and perform gradient optimization on the updatable parameters of the adaptive module based on the loss function; use the optimized adaptive module to filter the subsequent frequency domain spectral sequence to obtain the optimized predicted spectral result.

[0006] Furthermore, the frequency domain spectral sequence is obtained in S1, specifically as follows: A laser whose frequency varies with time is injected into the optical resonant cavity of an off-axis integrating cavity output spectral system. After multiple reflections, the interference light is monitored by a photodetector to generate an original interferogram signal. The original interferogram signal is then uniformly sampled and converted into a discrete original time-domain interferogram signal. Perform a Fast Fourier Transform on the original time-domain interferogram signal to obtain the corresponding complex spectrum. Take the positive frequency part of the complex spectrum to calculate the one-sided power spectrum of the complex spectrum. The calculation method is as follows: for each complex component corresponding to the frequency index after the Fast Fourier Transform, calculate the square of its modulus. The result is the one-sided power spectrum value corresponding to that frequency index. The normalized frequency index output by the Fast Fourier Transform is converted into the actual physical frequency; where the relative frequency point corresponding to each frequency index is equal to the product of the frequency index and the sampling frequency divided by the total number of points of the Fast Fourier Transform; the absolute laser frequency corresponding to each frequency index is equal to the sweep start frequency plus the product of the laser sweep linear scaling factor and the relative frequency point corresponding to the frequency index. Through frequency mapping, multiple discrete frequency-power data pairs are finally obtained. Each data pair consists of the absolute laser frequency corresponding to a certain frequency index and the one-sided power spectrum value corresponding to that frequency index. The power values ​​of all data pairs in a frame are arranged in order of frequency index to form the frequency domain spectrum sequence of that frame. This sequence is a column vector composed of the one-sided power spectrum values ​​corresponding to each frequency index. The total number of one-sided spectra is equal to the total number of points of the fast Fourier transform divided by two and then rounded down. The last element in the sequence corresponds to the power value of the last one-sided spectrum.

[0007] Furthermore, in S1, training labels are generated for each frequency domain spectral sequence, specifically as follows: The continuously acquired multi-frame frequency domain spectral sequences are divided into a group, where each frame of frequency domain spectral sequence is a column vector composed of power values ​​corresponding to each frequency index. Each element of the column vector represents the power value of a certain frame of frequency domain spectrum at the corresponding frequency index. For each frequency index, the light intensity values ​​of all frames in the group at that frequency index are extracted to form a one-dimensional sequence. Each element in this sequence corresponds to the light intensity value of different frames under the same frequency index. Median filtering is applied to this one-dimensional sequence using a sliding window of a preset length. For the frame aligned with the center of the window, all light intensity values ​​within the window are extracted, sorted by value, and the median is taken as the filtered light intensity value of that frame at that frequency index. For the positions at the beginning and end of the sequence that cannot be completely covered by the window, a mirror filling method is used to symmetrically expand the data at the beginning and end of the sequence so that each frame can obtain complete window data before median filtering is performed. Perform the same operation as above on all frequency indices of each frame's frequency domain spectral sequence within the group to obtain the training label corresponding to that frame. The training label is a column vector composed of the filtered light intensity values ​​at each frequency index. Finally, pair each frame's original frequency domain spectral sequence with its corresponding training label to form a training data pair. Perform the same operation on all frames of all groups to obtain the complete training dataset for pre-training the pedestal model.

[0008] Furthermore, S2 constructs a base model based on a deep residual network, specifically as follows: The base model includes a core feature extraction module consisting of four consecutive one-dimensional residual blocks: The first residual block contains two one-dimensional convolutional layers, each with a kernel size of 3, a padding method of 1, and 32 output channels. After each convolutional layer, batch normalization and ReLU activation are performed sequentially. The residual connection of this residual block is as follows: the input data is added element-wise to the output feature map after being processed by the first convolutional layer, batch normalization, ReLU, the second convolutional layer, batch normalization, and ReLU, and the sum is used as the output of this residual block. The second residual block has the same structure as the first residual block, but has 64 output channels; the third residual block has 128 output channels; and the fourth residual block has 256 output channels. Following the core feature extraction module, a global average pooling layer, a fully connected layer with 64 neurons, and a fully connected layer with 128 neurons are sequentially connected. Finally, a one-dimensional deconvolution layer reconstructs the feature map dimension to the same length as the frequency domain spectral sequence.

[0009] Furthermore, an adaptive module is constructed in S2, specifically as follows: The adaptive module contains two fully connected layers. The first fully connected layer transforms the input feature dimension to 64 dimensions, and its output undergoes a nonlinear transformation using the ReLU activation function. The transformed 64-dimensional feature vector is input to the second fully connected layer, which maps the feature dimension from 64 dimensions back to the length of the frequency domain spectral sequence and outputs the adjusted predicted spectral result.

[0010] Furthermore, pseudo-tags for the current frame are generated in S3, specifically as follows: A monitoring window is set up to continuously acquire the frequency domain spectral sequence of the most recent preset number of frames. For each frame of frequency domain spectral sequence within the monitoring window, a sliding window is used to traverse along the frequency index direction. Each time the sliding window moves to a position, a candidate sub-interval is formed. The variance of the frequency domain spectral sequence within each candidate sub-interval is calculated. The continuous frequency range corresponding to the candidate sub-interval with the smallest variance is determined as the baseline region of that frame. At the same time, the mean and standard deviation of the frequency domain spectral sequence within the baseline region are calculated. The signal-to-noise ratio of that frame is obtained by dividing the mean by the standard deviation. Based on the signal-to-noise ratio calculated for each frame, the weighting coefficient of the frequency domain spectral sequence for each frame is dynamically calculated. For each frame within the monitoring window, the weighting coefficient is equal to the square of the signal-to-noise ratio of that frame plus the zero-prevention constant, divided by the sum of the squares of the signal-to-noise ratios of all frames within the monitoring window and the zero-prevention constant. The zero-prevention constant is used to prevent the denominator from being zero. The calculated adaptive weights are used to perform weighted fusion on all frame frequency domain spectral sequences within the monitoring window to generate the final pseudo-label. Specifically, each frame frequency domain spectral sequence within the monitoring window is multiplied by its corresponding weight coefficient and then summed. The result is the pseudo-label of the current frame.

[0011] Furthermore, a loss function is constructed based on the difference between the predicted spectral results and the pseudo-labels. The specific steps are as follows: The frequency domain spectral sequence of the current frame is input into the pre-trained base model to obtain the first output spectral sequence of the base model. Then, the first output spectral sequence is input into the adaptive module to obtain the predicted spectral sequence. A composite loss function is constructed based on the difference between the predicted spectral sequence and the pseudo-label. The composite loss function consists of two terms: the first term is the fidelity term, which calculates the sum of squared differences between the predicted spectral sequence and the pseudo-label at each frequency index, i.e., the square of the L2 norm, to measure the overall numerical difference between the two. The smaller this term is, the better the predicted spectral sequence fits the pseudo-label. The second term is the smoothing constraint term, which calculates the sum of squared second-order differences of the predicted spectral sequence at each frequency index. That is, for each internal frequency index, the value at the next position is subtracted from twice the value at that position and then added to the value at the previous position, the square of the difference is calculated, and the sum of the squared values ​​corresponding to all internal frequency indices is multiplied by the weight coefficient of the smoothing constraint term. The smaller this term is, the smoother the predicted spectral sequence is in the frequency domain. The total value of the composite loss function is equal to the sum of the first and second terms.

[0012] Furthermore, gradient optimization is performed on the updatable parameters of the adaptive module based on the loss function, specifically through the following steps: After constructing the composite loss function, the partial derivative of the loss function with respect to each updatable parameter in the adaptive module is calculated, which is the gradient of the loss function with respect to the updatable parameter. After obtaining the gradient, the parameters of the adaptive module are updated using stochastic gradient descent. The specific update method is as follows: the current parameter value is subtracted from the product of the preset minimum learning rate and the gradient direction to obtain the updated parameter value. After completing one parameter update, the composite loss function and its gradient under the current parameters are recalculated, and the parameter update steps are repeated until the preset maximum number of updates is reached, thus completing the optimization of the parameters of the adaptive module.

[0013] Compared with the prior art, the beneficial effects of the present invention are: By pre-training a deep residual network, the base model fully learns the complex nonlinear mapping relationship between the frequency domain spectral sequence and the denoised spectral sequence, overcoming the shortcomings of traditional filtering algorithms that rely on manually set thresholds and have limited ability to handle nonlinear and non-stationary noise. An adaptive online update mechanism based on a monitoring window is introduced. By determining the baseline region of each frame spectrum and calculating the signal-to-noise ratio (SNR), multiple frames of spectra are weighted and fused to generate pseudo-labels. Then, the lightweight adaptive module is gradient-optimized based on the difference between the pseudo-labels and the predicted spectra. This design enables the pre-trained model to continuously track and adapt to changes in noise characteristics in practical applications, effectively solving the problem of filtering performance degradation of traditional deep learning methods after drifting in noisy environments, and significantly improving the robustness and generalization ability of the model in complex field environments. By processing the filtering problem of the interferogram signal in the dimension of the frequency domain spectral sequence, the phase distortion and spectral distortion problems caused by direct denoising from the time domain interferogram are avoided, ensuring the accuracy of subsequent spectral analysis and concentration inversion. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 The absolute frequency of the laser in the embodiment of the present invention With relative frequency points The relationship diagram of changes. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0016] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0017] Example: Please see Figures 1-2 The present invention provides a technical solution: An adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks, the specific steps of which include: S1: Acquire multiple frames of raw time-domain interferogram signals from the off-axis integrating cavity output spectral system, convert them into frequency-domain spectral sequences through fast Fourier transform; perform sliding median filtering on each frequency-domain spectral sequence to generate corresponding training labels, and combine the frequency-domain spectral sequences with the corresponding training labels to form training data pairs; In this embodiment, the frequency domain spectral sequence obtained in S1 is specifically as follows: A laser whose frequency varies with time is injected into the optical resonant cavity of an off-axis integrating cavity output spectral system. After multiple reflections, the interference light is monitored by a photodetector to generate an original interferogram signal. The original interferogram signal is then uniformly sampled and converted into a discrete original time-domain interferogram signal. Perform a Fast Fourier Transform on the original time-domain interferogram signal to obtain the corresponding complex spectrum. Take the positive frequency part of the complex spectrum to calculate the one-sided power spectrum of the complex spectrum. The calculation method is as follows: for each complex component corresponding to the frequency index after the Fast Fourier Transform, calculate the square of its modulus. The result is the one-sided power spectrum value corresponding to that frequency index. The normalized frequency index output by the Fast Fourier Transform is converted into the actual physical frequency; where the relative frequency point corresponding to each frequency index is equal to the product of the frequency index and the sampling frequency divided by the total number of points of the Fast Fourier Transform; the absolute laser frequency corresponding to each frequency index is equal to the sweep start frequency plus the product of the laser sweep linear scaling factor and the relative frequency point corresponding to the frequency index. Through frequency mapping, multiple discrete frequency-power data pairs are finally obtained. Each data pair consists of the absolute laser frequency corresponding to a certain frequency index and the one-sided power spectrum value corresponding to that frequency index. The power values ​​of all data pairs in a frame are arranged in order of frequency index to form the frequency domain spectrum sequence of that frame. This sequence is a column vector composed of the one-sided power spectrum values ​​corresponding to each frequency index. The total number of one-sided spectra is equal to the total number of points of the fast Fourier transform divided by two and then rounded down. The last element in the sequence corresponds to the power value of the last one-sided spectrum.

[0018] Perform a Fast Fourier Transform on the original time-domain interferogram signal to obtain the corresponding complex spectrum. Calculate the one-sided power spectrum of the complex spectrum using the following formula: in, Indicates the th after Fast Fourier Transform The complex components corresponding to each frequency index; Indicates the first One-sided power spectrum value corresponding to each frequency index; Indicates frequency index; A frequency mapping relationship is constructed, mapping the power sequence to the absolute frequency axis, based on the following formula: in, Indicates the first The relative frequency points corresponding to each frequency index; This indicates the sampling frequency of the Fast Fourier Transform; This represents the total number of points in the Fast Fourier Transform. The linear scaling factor representing the laser sweep frequency; Indicates the first The absolute laser frequency corresponding to each frequency index; Indicates the start frequency of the sweep; Finally obtained A discrete frequency-power data pair The power values ​​of all data pairs within a frame Index by frequency The sequential arrangement of the elements constitutes the frequency domain spectral sequence of the frame. ,in, , Indicates the first The power of a single-sided spectrum; This represents the total number of single-sided spectra.

[0019] In the above process, in the off-axis integrating cavity output spectral system, the laser frequency scans linearly with time. After multiple reflections by the resonant cavity, the original interferogram signal acquired by the photodetector appears in the time domain as a superposition of cavity transmission peaks and interference fringes. Since cavity mode noise manifests as high-frequency periodic fluctuations superimposed on the absorption spectrum in the frequency domain, directly denoising the time-domain interferogram faces risks such as phase distortion and spectral distortion. Therefore, this invention first converts the original time-domain interferogram signal to the frequency domain using a Fast Fourier Transform (FFT). The FFT can reveal the energy distribution characteristics of the signal at different frequency components, effectively separating the cavity mode noise from the true absorption spectrum in the frequency domain, providing a more favorable processing space for subsequent noise suppression. Simultaneously, a single-sided power spectrum is used... Instead of using the two-sided spectrum, it is based on the physical characteristic that the original interferogram signal is a real signal. Its spectrum has conjugate symmetry, and the positive frequency part has completely contained all the information of the signal. Taking the one-sided spectrum can halve the amount of data while retaining all the effective information, thereby reducing the computational overhead and storage requirements of the subsequent neural network model. After obtaining the power spectrum sequence, since the Fast Fourier Transform outputs a normalized frequency index... Its corresponding physical frequency is related to the sampling frequency and the number of FFT points, and needs to be determined through a linear mapping relationship. This is converted into actual relative frequency points. Furthermore, the laser frequency output by the laser in the OA-ICOS system changes linearly with time, and the sweep start frequency... With linear scaling factor The optical path structure of the system is determined by both the laser control parameters and the system optical path structure, therefore it needs to be determined by... Map the relative frequency points to the laser's absolute frequency axis This frequency mapping step enables the subsequent neural network model to learn the mapping relationship between noise features and absorption spectrum in the absolute frequency domain, avoiding signal mismatch problems caused by laser sweep frequency parameter drift or parameter differences between different systems; Index all frequencies within a frame Corresponding power value Arranged in frequency index order, this constitutes the frequency domain spectral sequence of the frame. Each element in the sequence Both with absolute frequency Correspondingly, the linear characteristics of the absorption spectrum, spectral line position information, and spectral structure of cavity mode noise are fully preserved. Transforming the original interferogram signal into the standardized frequency domain spectral sequence form described above facilitates batch learning and processing of spectral features by the subsequent deep residual network, while maintaining the physical integrity of the frequency domain spectrum. This provides a standardized data input format for establishing a precise mapping relationship between the frequency domain spectral sequence and the denoised spectral sequence in the base model.

[0020] In the above embodiments, relative frequency points are given. With the corresponding absolute laser frequency The 20 sets of data are used to reflect the absolute frequency of the laser. With relative frequency points The changes are as shown in Table 1: Table 1: Absolute Frequency of Laser With relative frequency points Change Relationship Table In Table 1 above, the sampling frequency of the Fast Fourier Transform is set as follows: The total number of points in the Fast Fourier Transform: Linear scaling factor for laser frequency sweep: Sweep start frequency: Frequency interval between adjacent frequency indices The corresponding wavenumber interval relative frequency point The absolute frequency of the laser gradually increases from 0.00 MHz to 7.42 MHz. From 6300.00 cm -¹Linearly increased to 6301.48 cm - ¹, each step interval remains consistent, reflecting the strict linearity of the frequency mapping relationship.

[0021] In S1, training labels are generated for each frequency domain spectral sequence, specifically as follows: The continuously acquired multi-frame frequency domain spectral sequences are divided into a group, where each frame of frequency domain spectral sequence is a column vector composed of power values ​​corresponding to each frequency index. Each element of the column vector represents the power value of a certain frame of frequency domain spectrum at the corresponding frequency index. For each frequency index, the light intensity values ​​of all frames in the group at that frequency index are extracted to form a one-dimensional sequence. Each element in this sequence corresponds to the light intensity value of different frames under the same frequency index. Median filtering is applied to this one-dimensional sequence using a sliding window of a preset length. For the frame aligned with the center of the window, all light intensity values ​​within the window are extracted, sorted by value, and the median is taken as the filtered light intensity value of that frame at that frequency index. For the positions at the beginning and end of the sequence that cannot be completely covered by the window, a mirror filling method is used to symmetrically expand the data at the beginning and end of the sequence so that each frame can obtain complete window data before median filtering is performed. Perform the same operation as above on all frequency indices of each frame's frequency domain spectral sequence within the group to obtain the training label corresponding to that frame. The training label is a column vector composed of the filtered light intensity values ​​at each frequency index. Finally, pair each frame's original frequency domain spectral sequence with its corresponding training label to form a training data pair. Perform the same operation on all frames of all groups to obtain the complete training dataset for pre-training the pedestal model.

[0022] Continuously collected The frame frequency domain spectral sequence is divided into a group, where the first... The frame frequency domain spectral sequence is denoted as: in, Indicates the first Frame frequency domain spectrum in frequency index The corresponding power value at that location; Indicates the first Frame frequency domain spectrum; Index for each frequency point Extract a set The light intensity values ​​at that frequency point in the frame frequency domain spectrum constitute a one-dimensional sequence. For this one-dimensional sequence, a length of is applied. Median filtering is performed using a sliding window, and the median value within the window is taken. The median of the light intensity values ​​is used as the filtered light intensity value of that frame at that frequency point; for sequences with insufficient beginning and end... For each point, the data is expanded using a mirror fill method before median filtering is performed; Perform the same operation on all frequency points of each frame's frequency domain spectral sequence within the group to obtain the training label corresponding to that frame, based on the formula: in, Indicates the first Frame frequency domain spectrum in frequency index The filtered light intensity value; In the above process, in the off-axis integrating cavity output spectral system, cavity mode noise manifests as high-frequency random fluctuations superimposed on the true absorption spectrum in the frequency domain spectral sequence. Because the relative positions of the cavity mode and the laser frequency constantly change during laser frequency scanning, the distribution of cavity mode noise across each frame of the spectrum exhibits randomness and time-varying characteristics. However, if the same frequency index... By acquiring a sufficient number of consecutive frames, the cavity mode noise values ​​in these frames will fluctuate randomly around their true spectral values, while the true absorption spectrum changes relatively slowly over a short period, following a deterministic distribution. Based on these physical characteristics, through continuously acquired... Light intensity value at the same frequency index in the frame frequency domain spectral sequence By employing a sliding median filter, the influence of cavity mode noise can be effectively suppressed while preserving spectral characteristic edges and absorption peak shapes. This is because median filtering has excellent smoothing capabilities for impulse and Gaussian random noise, effectively eliminating outlier noise points that deviate from the true spectral values ​​and obtaining the optimal estimate of the true spectral value at that frequency index. Using a sliding window approach instead of global statistics to process consecutive frames further utilizes the correlation between adjacent frames, ensuring a smooth transition of the filtering results between different frames and avoiding statistical biases caused by the limited number of frames and uneven noise distribution. The above results... As the first Frame in Ideal noise reduction value at each frequency index This constitutes the training label for that frame in the frequency domain; For a one-dimensional sequence The sliding median filter uses the following method to determine the value at the center of the window: assuming the sliding window length is... The window slides along the sequence in the frame number dimension, and when the center of the window is aligned with the first frame... At frame number 1 Frame-centric The light intensity values ​​of consecutive frames constitute a one-dimensional array within the window; due to the randomness of noise, the actual measured values ​​are randomly distributed within a certain range around the true value, while outlier noise points tend to deviate significantly from the true value and are relatively few in number. Therefore, within this window... The median of the light intensity values ​​is more robust than the average and can more accurately reflect the intensity of the light intensity. Frame in frequency index The true light intensity value at the given location is particularly suitable for suppressing the impact of impulse noise and outliers on the quality of training labels. This is especially useful for sequences with insufficient beginning and end values. At each point, a mirror-fill method is used to symmetrically expand the data, that is, to use the existing data points at the beginning and end of the sequence for folding and supplementation, so that each frame can obtain complete window context information, effectively avoiding the problem of filtering result deviation due to insufficient statistical samples at boundary frames, and ensuring the consistency of label quality of all frames in the entire training dataset; finally, the original frequency domain spectral sequence of each frame is... Each of these data pairs is paired with a high-quality training label generated by sliding median filtering of the frame to form the training data pairs required for supervised learning.

[0023] S2: Construct a base model based on a deep residual network, pre-train the base model based on training data to establish a mapping relationship between the frequency domain spectral sequence and the denoised spectral sequence; construct a cascaded adaptive module based on the output of the base model, set the updatable parameters of the adaptive module, and adjust the predicted spectral results output by the base model through the adaptive module. In this embodiment, S2 constructs a base model based on a deep residual network, specifically as follows: The base model includes a core feature extraction module consisting of four consecutive one-dimensional residual blocks: The first residual block contains two one-dimensional convolutional layers, each with a kernel size of 3, a padding method of 1, and 32 output channels. After each convolutional layer, batch normalization and ReLU activation are performed sequentially. The residual connection of this residual block is as follows: the input data is added element-wise to the output feature map after being processed by the first convolutional layer, batch normalization, ReLU, the second convolutional layer, batch normalization, and ReLU, and the sum is used as the output of this residual block. The second residual block has the same structure as the first residual block, but has 64 output channels; the third residual block has 128 output channels; and the fourth residual block has 256 output channels. Following the core feature extraction module, a global average pooling layer, a fully connected layer with 64 neurons, and a fully connected layer with 128 neurons are sequentially connected. Finally, a one-dimensional deconvolution layer reconstructs the feature map dimension to the same length as the frequency domain spectral sequence.

[0024] In the above process, this invention employs a deep residual network to construct a base model. Its core feature extraction module consists of four consecutive one-dimensional residual blocks. The aim is to leverage the powerful nonlinear fitting and feature abstraction capabilities of deep convolutional neural networks to automatically learn the end-to-end mapping relationship from the original frequency domain spectral sequence to the ideal denoised spectral sequence from a large amount of paired data of noisy spectra and denoised labels. Each one-dimensional residual block contains two one-dimensional convolutional layers with a kernel size of 3. The small kernel size effectively captures local correlations between adjacent frequency points while maintaining the receptive field of the local frequency neighborhood. This is crucial for extracting the linear contour features of the absorption spectrum and the fluctuation patterns of cavity mode noise. Stacking two convolutional layers increases the network's receptive field, enabling the model to integrate contextual information over a larger frequency range to assist in denoising decisions at the current frequency point, thereby improving the ability to distinguish between absorption peaks and noise. Batch normalization and ReLU activation functions, executed sequentially after each convolutional layer, respectively accelerate training convergence, alleviate gradient vanishing, and introduce nonlinear transformations, allowing the network to fit more complex spectral mapping functions. The structural design of the residual connection is the key to enabling the base model to be trained to a deeper level. The specific implementation method is as follows: the original input data of the residual block is added element-wise along the channel dimension to the output feature map after being processed by the first convolutional layer, batch normalization, ReLU activation function, second convolutional layer, batch normalization and ReLU activation function in sequence, and the sum is used as the final output of the residual block. The number of output channels in the four residual blocks gradually increases from 32 to 256, employing a progressively increasing design strategy. This allows the network to extract local detail features in the shallow layer (32 channels), such as the steep edges of absorption peaks and local fluctuation patterns of noise; in the intermediate layers (64 and 128 channels), local features are combined into mid-level structures, such as the linear contours of specific spectral lines and the spatial distribution patterns of noise; and in the deep layer (256 channels), global semantic information is abstracted, such as baseline drift trends across the entire spectrum and the overall distribution pattern of absorption peaks. This hierarchical feature extraction architecture, from local details to global semantics, highly aligns with the physical hierarchy of the spectral signal itself, enabling the network to learn physically meaningful and highly generalizable spectral feature representations with fewer training samples and iterations. Following the core feature extraction module, sequentially connected global average pooling layers aggregate feature maps at different frequency positions into global statistics, significantly reducing the dimensionality of the feature maps and enhancing the network's ability to perceive the overall energy distribution of the spectral sequence. This is followed by fully connected layers with 64 and 128 neurons, forming a bottleneck structure that further performs non-linear encoding on the global features, compressing and mapping the multi-channel spatial features extracted from the convolutional layers to a compact latent space feature vector. Finally, a one-dimensional deconvolutional layer progressively upsamples the aforementioned low-dimensional latent space features to restore them to the original spectral sequence length, outputting a denoised spectral sequence whose dimension perfectly matches the input sequence. This allows the network to generate accurate denoising correction values ​​for each frequency index based on the contextual information of the global absorption spectrum, ensuring that the final filtered spectral output achieves excellent performance in both spectral line shape and signal-to-noise ratio.

[0025] The adaptive module is constructed in S2 as follows: The adaptive module contains two fully connected layers. The first fully connected layer transforms the input feature dimension to 64 dimensions, and its output undergoes a nonlinear transformation using the ReLU activation function. The transformed 64-dimensional feature vector is input to the second fully connected layer, which maps the feature dimension from 64 dimensions back to the length of the frequency domain spectral sequence and outputs the adjusted predicted spectral result.

[0026] In the above process, a lightweight adaptive module is connected in series at the output of the base model. This module contains two fully connected layers. The first fully connected layer transforms the input feature dimension to 64 dimensions, and its output undergoes a nonlinear transformation using the ReLU activation function. The transformed 64-dimensional feature vector is input to the second fully connected layer, which maps the feature dimension from 64 dimensions back to the length of the frequency domain spectral sequence, outputting the adjusted predicted spectrum result. The core advantage of this design is that the adaptive module has very few parameters, containing only two fully connected layers, which is much smaller than the number of parameters in the base model. Therefore, in practical applications, only online gradient updates of this lightweight module are needed to quickly adapt to the current noisy environment without retraining the entire base model, greatly reducing the online computational overhead and response time of adaptive filtering. The first fully connected layer compresses the input features into a low-dimensional bottleneck space of 64 dimensions, forcing the network to extract the most critical noise distribution features and bias patterns in the current frame's spectrum. The ReLU activation function introduces a nonlinear transformation, enabling the adaptive module to fit complex residual mappings. The second fully connected layer restores the low-dimensional features to the original spectral length, outputting a correction vector with the same dimension as the input spectrum. This correction vector is superimposed on the output of the base model, and through online optimization, the difference between the corrected predicted spectrum and the true denoised spectrum under the current environment is minimized, thus achieving fine-tuning of the base model's output. Since the adaptive module only learns the residual bias between the base model's output and the true spectrum of the current frame, without needing to relearn the complete mapping from the noisy spectrum to the denoised spectrum, its optimization objective is simple, its parameter space is small, and it can quickly converge to the optimal solution under the current noise conditions.

[0027] S3: Set a monitoring window and continuously acquire the frequency domain spectral sequence of consecutive frames within the monitoring window; determine the baseline region of each frame's frequency domain spectral sequence and calculate the corresponding signal-to-noise ratio based on the baseline region; determine the weighting coefficient based on the signal-to-noise ratio of each frame's frequency domain spectral sequence, and use the weighting coefficient to perform weighted fusion of multiple frames' frequency domain spectral sequences within the monitoring window to generate a pseudo-label for the current frame. In this embodiment, the pseudo-tag for the current frame is generated in S3, specifically as follows: A monitoring window is set up to continuously acquire the frequency domain spectral sequence of the most recent preset number of frames. For each frame of frequency domain spectral sequence within the monitoring window, a sliding window is used to traverse along the frequency index direction. Each time the sliding window moves to a position, a candidate sub-interval is formed. The variance of the frequency domain spectral sequence within each candidate sub-interval is calculated. The continuous frequency range corresponding to the candidate sub-interval with the smallest variance is determined as the baseline region of that frame. At the same time, the mean and standard deviation of the frequency domain spectral sequence within the baseline region are calculated. The signal-to-noise ratio of that frame is obtained by dividing the mean by the standard deviation. Based on the signal-to-noise ratio calculated for each frame, the weighting coefficient of the frequency domain spectral sequence for each frame is dynamically calculated. For each frame within the monitoring window, the weighting coefficient is equal to the square of the signal-to-noise ratio of that frame plus the zero-prevention constant, divided by the sum of the squares of the signal-to-noise ratios of all frames within the monitoring window and the zero-prevention constant. The zero-prevention constant is used to prevent the denominator from being zero. The calculated adaptive weights are used to perform weighted fusion on all frame frequency domain spectral sequences within the monitoring window to generate the final pseudo-label. Specifically, each frame frequency domain spectral sequence within the monitoring window is multiplied by its corresponding weight coefficient and then summed. The result is the pseudo-label of the current frame.

[0028] The formula used to dynamically calculate the weight coefficients for each frame is as follows: in, Indicates the first Frame weighting coefficients; Indicates the zero constant; Indicates the first The signal-to-noise ratio of a frame; This indicates the total number of frames within the monitoring window; This indicates the index of the summation frame within the monitoring window; Indicates the frame number index; The weighted fusion of multiple frame frequency domain spectral sequences within the monitoring window is performed using the aforementioned weighting coefficients to generate a pseudo-label for the current frame. The formula used is as follows: The number stored in the monitoring window Frame frequency domain spectral sequence; This represents the pseudo-label of the generated current frame.

[0029] In the above process, this invention generates high-quality pseudo-tags by statistically fusing measurement data from multiple consecutive frames in the time domain. The core basis for this is that there is a significant difference between the random fluctuation characteristics of cavity mode noise between frames and the relative stability of the true absorption spectrum. That is, the changes in the true absorption spectrum over a short period are negligible, while the instantaneous amplitude and phase distribution of cavity mode noise fluctuate with the random changes in the laser frequency and the relative position of the cavity mode. Therefore, weighted averaging of measurements at the same frequency index across multiple consecutive frames can effectively suppress random noise components while preserving the characteristics of the true absorption spectrum. However, the noise levels and spectral quality of different frames differ, and a simple equal-weighted averaging is not feasible; otherwise, frames with poor quality will degrade the quality of the fusion result. Therefore, this invention first determines the baseline region of each frame's frequency domain spectral sequence within the monitoring window. This region contains only background signals and noise components without any absorption peaks, and the fluctuation of its spectral sequence values ​​is entirely determined by system noise. The baseline region of each frame's frequency domain spectral sequence within the monitoring window is determined as follows: A sliding window traverses the frame's frequency domain spectral sequence along the frequency index direction. Each position the sliding window moves to forms a candidate sub-interval. The variance of the frequency domain spectral sequence within each candidate sub-interval is calculated, and the continuous frequency range corresponding to the candidate sub-interval with the smallest variance is determined as the baseline region of that frame. The physical basis of this method is that absorption peak regions in the absorption spectrum exhibit a significant decrease in light intensity with frequency, resulting in a large variance. In contrast, the baseline region does not contain absorption peaks, and its light intensity is composed only of background signals and noise, resulting in the smallest variance. Therefore, the continuous frequency range with the smallest variance is the optimal baseline region without absorption spectral characteristics. Based on this, the mean of the frequency domain spectral sequence within this baseline region is calculated. and standard deviation Dividing the two values ​​gives the signal-to-noise ratio of the frame. A higher signal-to-noise ratio (SNR) indicates better spectral quality and lower cavity mode noise levels in the frame, thus requiring higher weighting in pseudo-label generation. Conversely, a lower SNR indicates more severe noise contamination, necessitating a reduction in the frame's contribution. Therefore, the weighting coefficient for each frame is dynamically calculated based on its SNR, proportional to the square of the SNR. This enhances the dominant role of high-quality frames in weighted fusion while suppressing the negative impact of low-quality frames, resulting in a more robust fusion outcome. Using the adaptive weights calculated above, weighted fusion is performed on the frequency domain spectral sequences of all frames within the monitoring window. This weighted fusion strategy statistically preserves the common true components in multiple frames' spectra to the greatest extent possible, while effectively suppressing random noise interference through the SNR weighting mechanism. Without requiring any external reference instruments or manual annotation, it provides high-quality training and supervision signals for the online optimization of the adaptive module, enabling the module to update its parameters based on the pseudo-label, thereby achieving dynamic adaptation of the filtering model to real-time noise characteristics. This data-driven pseudo-label generation method completely eliminates the dependence on labeled samples for online adaptive updates, ensuring the deployability and long-term autonomous operation capability of the method in actual unattended monitoring scenarios. The preset number of frames is set according to the system's temporal stability and noise correlation time, and is generally in the range of 10 to 50 frames. This range can ensure sufficient statistical samples to suppress random noise, and avoid averaging physical changes as noise, so that the pseudo-labels achieve the optimal balance between statistical robustness and temporal response speed. A candidate sub-interval refers to the continuous frequency range covered by a sliding window at each position it moves when traversing each frame of the frequency domain spectral sequence along the frequency index direction. The window length of the sliding window is the number of frequency indices included in the candidate sub-interval, typically set to cover 2 to 3 times the full width at half maximum (FWHM) of the absorption peak, for example, an FWHM of 0.1 cm.- ¹The frequency width of the candidate sub-interval can be set to 0.2 to 0.3 cm. - ¹; The step size of the sliding window is usually set to one frequency index, that is, to perform a fine search of the entire frequency domain by moving point by point, ensuring that no possible baseline intervals are missed; on this basis, the entire frequency index range of the frequency domain spectral sequence of the frame is traversed, and the variance of all data points within each candidate sub-interval is calculated. Since the light intensity value of the absorption peak region changes drastically with frequency and has a large variance, while the baseline region does not contain absorption peaks and the light intensity value is composed only of background signal and noise, and has the smallest variance, the continuous frequency range corresponding to the candidate sub-interval with the smallest variance is the best baseline region of the frame.

[0030] S4: Input the current frame frequency domain spectral sequence into the base model and the adjusted adaptive module to obtain the predicted spectral result; construct a loss function based on the difference between the predicted spectral result and the pseudo-label, and perform gradient optimization on the updatable parameters of the adaptive module based on the loss function; use the optimized adaptive module to filter the subsequent frequency domain spectral sequence to obtain the optimized predicted spectral result.

[0031] In this embodiment, a loss function is constructed based on the difference between the predicted spectral result and the pseudo-label. The specific steps are as follows: The frequency domain spectral sequence of the current frame is input into the pre-trained base model to obtain the first output spectral sequence of the base model. Then, the first output spectral sequence is input into the adaptive module to obtain the predicted spectral sequence. A composite loss function is constructed based on the difference between the predicted spectral sequence and the pseudo-label. The composite loss function consists of two terms: the first term is the fidelity term, which calculates the sum of squared differences between the predicted spectral sequence and the pseudo-label at each frequency index, i.e., the square of the L2 norm, to measure the overall numerical difference between the two. The smaller this term is, the better the predicted spectral sequence fits the pseudo-label. The second term is the smoothing constraint term, which calculates the sum of squared second-order differences of the predicted spectral sequence at each frequency index. That is, for each internal frequency index, the value at the next position is subtracted from twice the value at that position and then added to the value at the previous position, the square of the difference is calculated, and the sum of the squared values ​​corresponding to all internal frequency indices is multiplied by the weight coefficient of the smoothing constraint term. The smaller this term is, the smoother the predicted spectral sequence is in the frequency domain. The total value of the composite loss function is equal to the sum of the first and second terms.

[0032] A loss function is constructed based on the difference between the predicted spectral results and the pseudo-labels, using the following formula: in, Represents the loss function; This indicates the predicted spectral sequence output by the adaptive module based on the current frame's frequency domain spectral sequence; express The One element; Represents the weighting coefficients of the smoothing constraint term; express The One element; Represents the square of the L2 norm; express Inner element index; express Total number of internal elements; This represents the pseudo-label of the current frame.

[0033] In the above process, in obtaining pseudo-labels Subsequently, the online optimization of the adaptive module requires constructing a loss function that can accurately measure the difference between the predicted spectrum and the pseudo-label to drive the gradient update of the module parameters. The frequency domain spectral sequence of the current frame is first input into the pre-trained base model to obtain the first output spectral sequence. Then The final predicted spectral sequence is obtained by inputting into the adaptive module. Here, the internal frequency index refers to all intermediate frequency indices in the predicted spectral sequence excluding the first and last endpoints; since the task of the adaptive module is to fine-tune the output of the base model, rather than reconstructing the denoised spectrum from scratch, the core of the loss function design lies in: making Approaching the pseudo-label Simultaneously, it maintains the physical rationality and continuous smoothness of the spectral sequence. The first term of the loss function is the fidelity term, which calculates the squared L2 norm of the frequency-wise index between the predicted spectral sequence and the pseudo-label to measure the overall numerical difference between the two. The smaller this term is, the higher the fit between the predicted spectrum and the pseudo-label, and it is the main supervision signal driving the optimization of the adaptive module parameters towards the true spectral distribution of the current frame. The second term is the smoothness constraint term, whose mathematical form is the smoothness constraint of the predicted spectral sequence in... Second difference at The sum of squares, which is essentially a regularization constraint on the curvature of the predicted spectral sequence across the entire frequency domain; Second-order difference term The magnitude of the value reflects the frequency index of the spectral curve. The smaller the value, the smoother and closer to a linear change in that spectral segment, which conforms to the physical characteristics of a true absorption spectrum. In the early stages of adaptive module parameter initialization, there may be a deviation between the output of the base model and the true spectrum of the current frame; relying solely on the fidelity term... The updating of driving parameters may introduce unnecessary spectral fluctuations due to residual noise in the pseudo-labels, resulting in non-physical high-frequency spikes and spurious absorption peaks in the predicted spectrum, interfering with the accuracy of subsequent spectral analysis and concentration inversion. The smoothing constraint term, by regularizing the spectral curvature, forces the adaptive module to maintain the frequency domain smoothness of the output spectral sequence while fitting the pseudo-labels, effectively suppressing overfitting and local distortions caused by residual noise in the pseudo-labels. This ensures that the update direction of the adaptive module balances data fitting accuracy and spectral physical rationality. The value is usually set to to Within the range, when the system signal-to-noise ratio is high, Take the smaller value. to This allows the fidelity term to dominate the loss function, enabling the adaptive module to fully utilize the supervision information from high-quality pseudo-labels; when the system signal-to-noise ratio is low, Take the larger value. to This strengthens the penalty effect of the smoothing constraint term and suppresses non-physical local fluctuations in the predicted spectral sequence caused by residual noise from false labels. In the smoothing constraint term of the composite loss function, the second-order difference operation Calculating the degree of local curvature at a given point requires considering the values ​​at both the preceding and following positions. For the first endpoint of the predicted spectral sequence, i.e., the first frequency index, the corresponding... Since it does not have a value at the previous position, the second difference at that point cannot be calculated; similarly, for the tail end of the predicted spectral sequence, i.e., the last frequency index, the corresponding... Since there is no value at the next position, it is impossible to calculate the second difference at that point; for the above reasons, the smoothing constraint term is only applied to the internal frequency index of the predicted spectral sequence, that is, only to the frequency index from the 2nd element to the 1st element. The second-order sum of squared differences is calculated for all internal positions of each element, while the first and last endpoints are excluded from the calculation of the smoothing constraint term. Correspondingly, in the formula, the lower bound of the summation sign is set to... The upper limit is set to The summation range is explicitly limited to the internal frequency index, and the beginning and end points are naturally excluded from the smoothing constraint term. This approach not only ensures the effectiveness of the smoothing constraint term in mathematical calculation and avoids the calculation bias introduced by the lack of neighborhood data for boundary points, but also makes the evaluation of the composite loss function more reasonable and reliable. This is because the beginning and end points themselves only involve the boundary frequencies of the spectral sequence, and their local curvature contributes negligibly to the overall smoothness of the spectral waveform. Not participating in the smoothing constraint will not affect the effective constraint on the overall smoothness of the predicted spectral sequence.

[0034] The updatable parameters of the adaptive module are optimized using gradients based on the loss function. The specific steps are as follows: After constructing the composite loss function, the partial derivative of the loss function with respect to each updatable parameter in the adaptive module is calculated, which is the gradient of the loss function with respect to the updatable parameter. After obtaining the gradient, the parameters of the adaptive module are updated using stochastic gradient descent. The specific update method is as follows: the current parameter value is subtracted from the product of the preset minimum learning rate and the gradient direction to obtain the updated parameter value. After completing one parameter update, the composite loss function and its gradient under the current parameters are recalculated, and the parameter update steps are repeated until the preset maximum number of updates is reached, thus completing the optimization of the parameters of the adaptive module.

[0035] The formula used to calculate the gradient of the loss function with respect to the parameters of the adaptive module is: in, This represents the updatable parameters of the adaptive module; This represents the gradient of the composite loss function with respect to the parameters of the adaptive module; The stochastic gradient descent method is used to update the adaptive module parameters based on the gradient direction and a preset minimum learning rate. The formula used is as follows: in, This represents the updated adaptive module parameters; In the above process, after constructing the composite loss function, the adaptive module needs to minimize this loss function through parameter optimization, thereby improving the prediction of the spectral sequence. It approximates the true denoised spectrum of the current frame. Since the adaptive module contains only two fully connected layers, its parameters can be updated. The number of parameters is much smaller than that of the base model, therefore gradient-based optimization algorithms can be used to quickly adjust the parameters on a single frame or a small number of frames. (Learning rate) Use the preset minimum value, usually set to to The reason for this is that the base model has been fully pre-trained and possesses good general denoising capabilities. The adaptive module only needs to make minor adjustments based on the output of the base model to adapt to the noise features of the current frame, rather than relearning the entire denoising mapping. Using the minimum learning rate prevents the adaptive module from overfitting to the pseudo-labels of a single frame due to excessively large parameter update steps, which would destroy the general mapping knowledge already learned by the base model. This ensures the stability and reliability of the model during long-term online updates. After each parameter update, the composite loss function under the current parameters is recalculated. and gradient Then, repeat the above parameter update steps until the preset maximum number of updates is reached, usually set to 5 to 10 times, to complete the optimization of the adaptive module parameters. The above optimization strategy makes full use of the powerful feature extraction capability of the base model and the lightweight structural advantage of the adaptive module, and can achieve online fine-tuning of the pre-trained model output by updating only a very small number of parameters; The preset maximum number of updates is set to 5 to 10 times, rather than other numbers such as 20 or 30 times, based on a comprehensive analysis of the structural characteristics of the adaptive module, convergence speed, and system real-time requirements. From the perspective of parameter space, the adaptive module contains only two fully connected layers, and the number of updateable parameters is typically in the thousands to tens of thousands, far less than the millions of parameters in the base model. The loss function surface in this low-dimensional parameter space is relatively smooth, and the gradient descent algorithm can reduce the loss function to a stable region close to the optimum within a few iterations. From the perspective of convergence speed, when the adaptive module parameters are randomly initialized or inherited from the previous frame's optimization results, the loss function reduction in the first 5 iterations accounts for more than 90% of the total reduction. The reduction rate slows significantly from the 5th to the 10th iterations, and after 10 iterations, the loss reduction in a single iteration is usually less than one ten-thousandth of the initial loss value, resulting in extremely limited improvement in filtering accuracy. From a computational perspective, setting the maximum number of updates to 20 or 30 would exponentially increase the computation time for adaptive updates per frame. In applications with high laser scanning repetition frequencies, excessively long parameter update times would prevent the system from completing the optimization calculation for the current frame before the next frame arrives, leading to data backlog and frame loss, severely limiting the system's real-time online processing capabilities. Therefore, setting the maximum number of updates to 5 to 10 is the optimal balance between filtering accuracy and computational efficiency, determined through extensive experimental verification. This ensures that the adaptive module can fully converge to the optimal parameters under the noise conditions of the current frame while also ensuring that the system can complete the full adaptive update process within each frame acquisition cycle.

[0036] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0037] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0038] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks, characterized in that, include: S1: Acquire multiple frames of raw time-domain interferogram signals from the off-axis integrating cavity output spectral system, convert them into frequency-domain spectral sequences through fast Fourier transform; perform sliding median filtering on each frequency-domain spectral sequence to generate corresponding training labels, and combine the frequency-domain spectral sequences with the corresponding training labels to form training data pairs; S2: Construct a base model based on a deep residual network, and pre-train the base model based on training data to establish a mapping relationship between the frequency domain spectral sequence and the denoised spectral sequence. A series of adaptive modules are constructed based on the output of the base model, and the updatable parameters of the adaptive modules are set. The predicted spectral results output by the base model are adjusted through the adaptive modules. S3: Set a monitoring window and continuously acquire the frequency domain spectral sequence of consecutive frames within the monitoring window; determine the baseline region of each frame's frequency domain spectral sequence and calculate the corresponding signal-to-noise ratio based on the baseline region; The weighting coefficients are determined based on the signal-to-noise ratio of each frame's frequency domain spectral sequence. The weighting coefficients are then used to perform weighted fusion of multiple frames' frequency domain spectral sequences within the monitoring window to generate a pseudo-label for the current frame. S4: Input the current frame frequency domain spectral sequence into the base model and the adjusted adaptive module to obtain the predicted spectral result; construct a loss function based on the difference between the predicted spectral result and the pseudo-label, and perform gradient optimization on the updatable parameters of the adaptive module based on the loss function; use the optimized adaptive module to filter the subsequent frequency domain spectral sequence to obtain the optimized predicted spectral result.

2. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 1, characterized in that, The frequency domain spectral sequence obtained in S1 is as follows: A laser whose frequency varies with time is injected into the optical resonant cavity of an off-axis integrating cavity output spectral system. After multiple reflections, the interference light is monitored by a photodetector to generate an original interferogram signal. The original interferogram signal is then uniformly sampled and converted into a discrete original time-domain interferogram signal. Perform a Fast Fourier Transform on the original time-domain interferogram signal to obtain the corresponding complex spectrum. Take the positive frequency part of the complex spectrum to calculate the one-sided power spectrum of the complex spectrum. The calculation method is as follows: for each complex component corresponding to the frequency index after the Fast Fourier Transform, calculate the square of its magnitude. The result is the one-sided power spectrum value corresponding to that frequency index. The normalized frequency index output by the Fast Fourier Transform is converted into the actual physical frequency; where the relative frequency point corresponding to each frequency index is equal to the product of the frequency index and the sampling frequency divided by the total number of points of the Fast Fourier Transform; the absolute laser frequency corresponding to each frequency index is equal to the sweep start frequency plus the product of the laser sweep linear scaling factor and the relative frequency point corresponding to the frequency index. Through frequency mapping, multiple discrete frequency-power data pairs are finally obtained. Each data pair consists of the absolute laser frequency corresponding to a certain frequency index and the one-sided power spectrum value corresponding to that frequency index. The power values ​​of all data pairs in a frame are arranged in order of frequency index to form the frequency domain spectrum sequence of that frame. This sequence is a column vector composed of the one-sided power spectrum values ​​corresponding to each frequency index. The total number of one-sided spectra is equal to the total number of points of the fast Fourier transform divided by two and then rounded down. The last element in the sequence corresponds to the power value of the last one-sided spectrum.

3. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 2, characterized in that, In S1, training labels are generated for each frequency domain spectral sequence, specifically as follows: The continuously acquired multi-frame frequency domain spectral sequences are divided into a group, where each frame of frequency domain spectral sequence is a column vector composed of power values ​​corresponding to each frequency index. Each element of the column vector represents the power value of a certain frame of frequency domain spectrum at the corresponding frequency index. For each frequency index, the light intensity values ​​of all frames in the group at that frequency index are extracted to form a one-dimensional sequence. Each element in this sequence corresponds to the light intensity value of different frames under the same frequency index. Median filtering is applied to this one-dimensional sequence using a sliding window of a preset length. For the frame aligned with the center of the window, all light intensity values ​​within the window are extracted, sorted by value, and the median is taken as the filtered light intensity value of that frame at that frequency index. For the positions at the beginning and end of the sequence that cannot be completely covered by the window, a mirror filling method is used to symmetrically expand the data at the beginning and end of the sequence so that each frame can obtain complete window data before median filtering is performed. Perform the same operation as above on all frequency indices of each frame's frequency domain spectral sequence within the group to obtain the training label corresponding to that frame. The training label is a column vector composed of the filtered light intensity values ​​at each frequency index. Finally, pair each frame's original frequency domain spectral sequence with its corresponding training label to form a training data pair. Perform the same operation on all frames of all groups to obtain the complete training dataset for pre-training the pedestal model.

4. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 1, characterized in that, In S2, a base model based on a deep residual network is constructed, specifically as follows: The base model includes a core feature extraction module consisting of four consecutive one-dimensional residual blocks: The first residual block contains two one-dimensional convolutional layers, each with a kernel size of 3, a padding method of 1, and 32 output channels. After each convolutional layer, batch normalization and ReLU activation are performed sequentially. The residual connection of this residual block is as follows: the input data is added element-wise to the output feature map after being processed by the first convolutional layer, batch normalization, ReLU, the second convolutional layer, batch normalization, and ReLU, and the sum is used as the output of this residual block. The second residual block has the same structure as the first residual block, but has 64 output channels; the third residual block has 128 output channels; and the fourth residual block has 256 output channels. Following the core feature extraction module, a global average pooling layer, a fully connected layer with 64 neurons, and a fully connected layer with 128 neurons are sequentially connected. Finally, a one-dimensional deconvolution layer reconstructs the feature map dimension to the same length as the frequency domain spectral sequence.

5. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 1, characterized in that, The adaptive module is constructed in S2 as follows: The adaptive module contains two fully connected layers. The first fully connected layer transforms the input feature dimension to 64 dimensions, and its output undergoes a nonlinear transformation using the ReLU activation function. The transformed 64-dimensional feature vector is input to the second fully connected layer, which maps the feature dimension from 64 dimensions back to the length of the frequency domain spectral sequence and outputs the adjusted predicted spectral result.

6. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 1, characterized in that, In S3, pseudo-tags for the current frame are generated as follows: A monitoring window is set up to continuously acquire the frequency domain spectral sequence of the most recent preset number of frames. For each frame of frequency domain spectral sequence within the monitoring window, a sliding window is used to traverse along the frequency index direction. Each time the sliding window moves to a position, a candidate sub-interval is formed. The variance of the frequency domain spectral sequence within each candidate sub-interval is calculated. The continuous frequency range corresponding to the candidate sub-interval with the smallest variance is determined as the baseline region of that frame. At the same time, the mean and standard deviation of the frequency domain spectral sequence within the baseline region are calculated. The signal-to-noise ratio of that frame is obtained by dividing the mean by the standard deviation. Based on the signal-to-noise ratio calculated for each frame, the weighting coefficient of the frequency domain spectral sequence for each frame is dynamically calculated. For each frame within the monitoring window, the weighting coefficient is equal to the square of the signal-to-noise ratio of that frame plus the zero-prevention constant, divided by the sum of the squares of the signal-to-noise ratios of all frames within the monitoring window and the zero-prevention constant. The zero-prevention constant is used to prevent the denominator from being zero. The calculated adaptive weights are used to perform weighted fusion on all frame frequency domain spectral sequences within the monitoring window to generate the final pseudo-labels. The specific method is as follows: multiply the frequency domain spectral sequence of each frame within the monitoring window by their respective weight coefficients and then sum them up. The result is the pseudo label of the current frame.

7. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 6, characterized in that, A loss function is constructed based on the difference between the predicted spectral results and the pseudo-labels. The specific steps are as follows: The frequency domain spectral sequence of the current frame is input into the pre-trained base model to obtain the first output spectral sequence of the base model. Then, the first output spectral sequence is input into the adaptive module to obtain the predicted spectral sequence. A composite loss function is constructed based on the difference between the predicted spectral sequence and the pseudo-label. The composite loss function consists of two terms: the first term is the fidelity term, which calculates the sum of squared differences between the predicted spectral sequence and the pseudo-label at each frequency index, i.e., the square of the L2 norm, to measure the overall numerical difference between the two. The smaller this term is, the better the predicted spectral sequence fits the pseudo-label. The second term is the smoothing constraint term, which calculates the sum of squared second-order differences of the predicted spectral sequence at each frequency index. That is, for each internal frequency index, the value at the next position is subtracted from twice the value at that position and then added to the value at the previous position, the square of the difference is calculated, and the sum of the squared values ​​corresponding to all internal frequency indices is multiplied by the weight coefficient of the smoothing constraint term. The smaller this term is, the smoother the predicted spectral sequence is in the frequency domain. The total value of the composite loss function is equal to the sum of the first and second terms.

8. The adaptive filtering method for off-axis integrating cavity output spectral cavity mode noise based on neural networks according to claim 1, characterized in that, The updatable parameters of the adaptive module are optimized using gradients based on the loss function. The specific steps are as follows: After constructing the composite loss function, the partial derivative of the loss function with respect to each updatable parameter in the adaptive module is calculated, which is the gradient of the loss function with respect to the updatable parameter. After obtaining the gradient, the parameters of the adaptive module are updated using stochastic gradient descent. The specific update method is as follows: the current parameter value is subtracted from the product of the preset minimum learning rate and the gradient direction to obtain the updated parameter value. After completing one parameter update, the composite loss function and its gradient under the current parameters are recalculated, and the parameter update steps are repeated until the preset maximum number of updates is reached, thus completing the optimization of the parameters of the adaptive module.