Neural network-based max-dois technology spectral automatic calibration method, device and medium

CN122835976APending Publication Date: 2026-09-29ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611021882.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0007]针对现有MAX-DOAS光谱校准方法人工依赖强、实时性差、鲁棒性弱、适配性不足的问题,本发明提出一种基于MAX-DOAS技术的光谱自动校准神经网络方法、计算机可读存储介质及计算机设备,通过“MAX-DOAS多源数据预处理→光谱特征提取→深度学习模型训练→全流程校准验证”的技术路线,充分利用MAX-DOAS观测特性与深度学习的拟合能力,实现全自动、高精度光谱校准

Benefits of technology

(1)克服现有网络局限,构建契合硬件漂移规律的非对称物理约束架构:本发明摒弃了传统序列映射模型的逐点校正范式,将光谱仪的“全局机械刚性位移”物理先验知识编码入网络底层拓扑中。发明人强制干预网络输出层设计,采用“15N维高维特征输入维唯一标量输出”的漏斗型非对称物理约束。该15N维输入由观测光谱特征(5N)、参考光谱特征(5N)与二者的显式差值特征(5N)拼接而成。该约束强制网络在复杂高维特征提取后,仅能输出一个全局一致的高精度偏移量。这一技术手段从物理逻辑上有效克服了现有无约束数据驱动模型在映射过程中易引发的光谱原生线型(ILS)畸变缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122835976A_ABST
    Figure CN122835976A_ABST
Patent Text Reader

Abstract

The application discloses a neural network-based MAX-DOAS technology spectrum automatic calibration method and device and a medium, and comprises the following steps: obtaining MAX-DOAS spectrum data and standard sunlight spectrum data; performing pretreatment and feature extraction on the obtained spectrum data; constructing a data set by using the pretreated spectrum data, training a deep neural network wavelength calibration model based on the data set; pretreating MAX-DOAS spectrum data which needs to be calibrated, inputting the pretreated data into the trained deep neural network wavelength calibration model to predict the wavelength offset; and finally obtaining the calibrated wavelength through wavelength correction. The method can be used for improving the precision and efficiency of the wavelength calibration of a spectrometer, is suitable for spectrum automatic calibration in the fields of celestial spectrum, environmental monitoring, industrial detection and the like, and has important significance for the automation and intelligentization of spectrum analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of atmospheric remote sensing and deep learning, specifically to a deep learning-based automatic spectral calibration method, computer-readable storage medium, and computer equipment based on MAX-DOAS (Multiaxial Differential Absorption Spectroscopy) technology. It is specifically adapted for ultraviolet-visible (300-420nm) spectral calibration of ground-based MAX-DOAS observation systems and can be directly applied to scenarios such as vertical distribution inversion of atmospheric trace gases (O3, NO2, SO2, etc.) and regional compound pollution monitoring. It solves the problem of spectral wavelength deviation caused by instrument drift and environmental interference in long-term MAX-DOAS field observations, providing reliable data support for subsequent high-precision inversion. Background Technology

[0002] As a core means of ground-based atmospheric remote sensing, MAX-DOAS technology receives solar scattered light spectra at different elevation angles (including low elevation angle and zenith elevation angle) and inverts the distribution of tropospheric aerosols and trace gases by combining the differential absorption principle. It has advantages such as long-term continuous observation, low equipment cost, and wide spatial coverage, and has become a key component of global atmospheric environment monitoring networks (such as EARLINET and China MAX-DOAS observation network).

[0003] In MAX-DOAS observations, spectral wavelength accuracy is the core prerequisite for the precision of trace gas inversion. Characteristic absorption peaks of target gases such as O3 and NO2 are concentrated in the 300-420 nm band, with a full width at half maximum (FWHM) of only 0.1-0.5 nm. If the observed spectrum exhibits a wavelength shift greater than 0.05 nm, it will lead to a mismatch between the gas absorption cross-section and the observed spectrum, resulting in an inversion concentration error exceeding 20%. However, wavelength drift is difficult to avoid during long-term field operation of the MAX-DOAS system. The main contributing factors include: 1. Instrument hardware drift: The grating, the core component of the spectrometer, is easily affected by temperature fluctuations (the temperature difference between day and night in the field can reach 10-20℃) and vibration (wind, equipment operating noise), which can cause slight displacement, resulting in a deviation between the actual wavelength after spectral dispersion and the theoretical wavelength. 2. Environmental interference: Atmospheric turbulence and humidity changes alter the propagation path of light in the optical system, indirectly causing a shift in the position of spectral characteristic peaks; 3. Equipment aging and wear: Aging of optical lenses and increased non-uniformity of detector response further amplify the wavelength drift effect.

[0004] Existing MAX-DOAS spectral calibration methods suffer from significant technical bottlenecks, making it difficult to meet the demands for high precision and real-time performance: 1. Traditional manual calibration method: This method relies on the characteristic spectral lines of standard light sources such as mercury lamps and deuterium lamps (e.g., 253.65nm and 435.83nm for mercury lamps), calculating the offset by manually comparing the "standard spectral line position" with the "observed spectral line position." The drawbacks of this method are: long calibration cycles (usually once a month), making it unable to handle short-term drift; complex operation requiring interruption of observation for instrument adjustments; and the sparse spectral lines of standard light sources in the 300-420nm band, failing to cover the full absorption band of the target gas; furthermore, the resolution of different spectrometers varies, and the corresponding channel wavelengths are inconsistent, hindering batch data processing and standardization.

[0005] Semi-automatic signal processing method: Based on algorithms such as cross-correlation analysis and peak matching, the observed spectrum is compared with the "historical standard spectrum" to calculate the offset. However, this method is highly dependent on "clear characteristic peaks", while the MAX-DOAS low elevation angle spectrum is affected by aerosol scattering, and the characteristic peaks are easily smoothed, leading to calibration failure; at the same time, it has weak noise resistance, and cloud scattering and background light interference will increase the error.

[0006] In recent years, while conventional deep learning techniques have been introduced into the field of spectral data processing, their direct application to MAX-DOAS spectral wavelength calibration presents significant architectural flaws: First, they violate the physical drift characteristics of optical hardware. Traditional sequence mapping networks tend to output multidimensional independent correction values, while the wavelength drift of the spectrometer's core components, dominated by temperature differences, is essentially a "globally rigid translation." Without network structure constraints, this can easily distort the original shape of absorption lines. Second, there is a lack of dedicated training strategies for the spectrometer's field environment. Conventional mean squared error loss functions cannot effectively cope with gradient explosion caused by non-stationary noise, nor can they be specifically optimized for physical tolerances (such as 0.05nm). Therefore, there is an urgent need to develop a neural network calibration technique that combines physical output constraints with noise-resistant robust training capabilities to fill the current technological gap. Summary of the Invention

[0007] To address the problems of existing MAX-DOAS spectral calibration methods, such as heavy reliance on manual intervention, poor real-time performance, weak robustness, and insufficient adaptability, this invention proposes a neural network method for automatic spectral calibration based on MAX-DOAS technology, a computer-readable storage medium, and a computer device. Through a technical route of "MAX-DOAS multi-source data preprocessing → spectral feature extraction → deep learning model training → full-process calibration verification," this invention fully utilizes the observation characteristics of MAX-DOAS and the fitting capabilities of deep learning to achieve fully automatic, high-precision spectral calibration. To achieve the above objectives, this invention adopts the following technical solution: Includes the following steps: Acquire observational spectral data and standard solar reference spectral data from the MAXDOAS observation system; The acquired spectral data is preprocessed, including time period filtering, format verification, smoothing and denoising, and perturbation addition. Multi-dimensional spectral features are extracted from the preprocessed spectral data. These multi-dimensional spectral features include intensity continuity mapping features, peak feature mapping features, gradient feature mapping features, semantic peak fusion features, and semantic gradient fusion features. In the feature normalization space, the multi-dimensional spectral features of the observed spectrum are subtracted dimension by dimension from the corresponding features of the aligned standard solar reference spectrum to obtain the explicit difference feature vector; the observed spectral feature vector, the reference spectral feature vector, and the explicit difference feature vector are concatenated dimensionally to construct the input feature set; A deep neural network wavelength calibration model is trained based on the input feature set. The deep neural network adopts an asymmetric physical constraint architecture. Its input layer dimension matches the input feature set dimension. The hidden layer dimension is a preset three-layer structure of 1024, 512, and 256. The output layer dimension is 1, which is used to output a single wavelength offset scalar. After preprocessing and feature extraction of the MAXDOAS spectral data to be calibrated, the data is input into the trained deep neural network wavelength calibration model to predict the wavelength shift. Based on the predicted wavelength offset, a global translation correction is performed on the wavelength axis of the original observed spectrum, and the calibrated spectral data is output.

[0008] Further, the intensity continuity mapping feature is the original intensity value I(i) of the spectrum in the i-th channel; the peak feature mapping feature is: when (I(i)-I(i-1))×(I(i+1)-I(i))<0, the value is I(i), otherwise the value is 0; the gradient feature mapping feature is DGM(i)=I(i)-I(i-1), where i≥2; the semantic peak fusion feature is the pointwise product of the intensity continuity mapping feature and the peak feature mapping feature; the semantic gradient fusion feature is the pointwise product of the intensity continuity mapping feature and the gradient feature mapping feature.

[0009] Furthermore, the hidden layer of the deep neural network wavelength calibration model comprises three layers connected in sequence, with the number of neurons configured as 1024, 512, and 256 respectively; a layer normalization (LayerNorm) module is introduced after the linear transformation of each hidden layer; a dropout layer with a dropout rate of 0.2 is introduced after the activation output of the first hidden layer, and a dropout layer with a dropout rate of 0.1 is introduced after the activation output of the second and third hidden layers.

[0010] Furthermore, the deep neural network wavelength calibration model uses an asymmetric smooth L1 loss function based on physical tolerance as the training loss function. Specifically, a physical tolerance threshold for wavelength drift is set. When the model prediction error is less than or equal to the threshold, the standard smooth L1 loss is used for calculation. When the prediction error is greater than the threshold, a penalty weight is applied to the loss value to amplify the penalty, thereby guiding the model to converge within the physical tolerance range. Regularization is performed using weight decay and gradient clipping mechanisms, combined with an early stopping strategy to prevent overfitting.

[0011] Furthermore, before performing a global translation correction on the wavelength axis of the original observed spectrum based on the predicted wavelength offset, an anomaly blocking step is also included: truncating the predicted offset that exceeds the preset safety threshold range to the safety threshold interval, which is -0.4nm to +0.4nm; for invalid mathematical outputs, directly setting them to zero and keeping the original wavelength unchanged.

[0012] Furthermore, the calibration formula for the global translation correction of the wavelength axis is: wl_calibrated = wl_original shift, where wl_calibrated is the calibrated wavelength, wl_original is the original observed wavelength, and shift is the wavelength shift predicted by the model.

[0013] Furthermore, it also includes result output and evaluation steps: outputting calibrated wavelength data and offset prediction values, supporting CSV format storage; generating spectral comparison charts before and after calibration, scatter plots of predicted and true values, error distribution histograms, and sample error trend charts; calculating mean absolute error, root mean square error, correlation coefficient, and coefficient of determination to form a qualitative and quantitative evaluation system.

[0014] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0015] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that, when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0016] Compared with the prior art, the core breakthroughs and beneficial effects of this invention are as follows: (1) Overcoming existing network limitations and constructing an asymmetric physical constraint architecture that conforms to hardware drift patterns: This invention abandons the point-by-point correction paradigm of the traditional sequence mapping model and encodes the physical prior knowledge of the spectrometer's "global mechanical rigid displacement" into the network's underlying topology. The inventors forcibly intervened in the network output layer design, adopting a "15N-dimensional high-dimensional feature input..." The 15N-dimensional input is a funnel-shaped asymmetric physical constraint of "unique scalar output". This 15N-dimensional input is composed of observed spectral features (5N), reference spectral features (5N), and their explicit difference features (5N). This constraint forces the network to output only a globally consistent high-precision offset after complex high-dimensional feature extraction. This technique effectively overcomes the spectral native line shape (ILS) distortion defect that is easily caused by existing unconstrained data-driven models during the mapping process from a physical and logical perspective.

[0017] Innovative topology design and single-sample stabilization mechanism enable robust training under high-dimensional input: This invention addresses the problem of conventional feedforward networks easily getting stuck in gradient saddle points under high-dimensional input feature spaces. It designs a hidden layer structure of "1024→512→256" and introduces a layer normalization (LayerNorm) module after each hidden layer to suppress variance shift (internal covariate shift) generated by 15N-dimensional high-dimensional features during continuous matrix multiplication. For the intermediate input vector of a hidden layer with dimension H... The mathematical formula for layer normalization is: LayerNorm(x) = γ⊙(x-μ) / √(σ²+ε)+β, where, and These are the mean and standard deviation of the input features, respectively. and For learnable scaling and translation parameters, This represents element-wise multiplication. To prevent division by zero by extremely small constants, this mechanism ensures gradient stability under pure stochastic gradient descent with a minimal batch size (BatchSize=1). Simultaneously, a Dropout layer with a dropout rate of 0.2 is introduced after the activation output of the first hidden layer (1024), and Dropout layers with a dropout rate of 0.1 are introduced after the activation output of the second and third hidden layers (512, 256), reducing the inter-neuron dependencies. This structure, combined with the minimal batch training strategy, enables the model to escape stagnation regions near high-dimensional saddle points using single-sample gradient noise, continuously converging towards lower error ranges.

[0018] (3) A robust training pipeline for dealing with non-stationary noise in the field is proposed: Addressing the technical challenge of drastic signal-to-noise ratio fluctuations in real-world field monitoring, this invention uses the linear truncation characteristic of the SmoothL1 Loss function in the training pipeline to suppress outliers. Furthermore, it incorporates a physical tolerance threshold of 0.05 nm to construct an asymmetric penalty mechanism—applying a 3x penalty weight to samples with prediction errors exceeding 0.05 nm, thereby guiding the network to converge within the physical tolerance range without triggering gradient explosion. Its mathematical expression is:

[0019] The basic smoothing L1 loss function is defined as follows:

[0020] At the same time, random perturbations covering the hardware thermal drift boundary are specifically injected into the training samples. The network is forced to lock the correct rigid translation mapping relationship under strong background noise interference by using a range of Gaussian noise at 1% level. Finally, it achieves an effective balance between single-sample ultra-fast inference (about 10ms) and high accuracy on independent test sets. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the overall architecture of the automatic spectral calibration method described in an embodiment of the present invention; Figure 2 This is a flowchart of the automatic spectral calibration method described in an embodiment of the present invention; Figure 3 This is a schematic diagram of the neural network structure described in an embodiment of the present invention; Figure 4 This is a comparison diagram of the solar spectrum before and after spectral calibration as described in an embodiment of the present invention; Figure 5 This is a local comparison image of the spectrum before and after calibration in the 400-410nm band according to an embodiment of the present invention. Detailed Implementation

[0022] 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 some embodiments of the present invention, but not all embodiments.

[0023] This application aims to propose a machine learning-based automatic spectral calibration method. It utilizes a channel matching neural network to establish a wavelength offset mapping model between the observed spectrum and the reference spectrum, thereby achieving fast and high-precision wavelength calibration of the observed spectrum and providing a high-precision and high-efficiency spectral calibration algorithm.

[0024] First Technical Solution: A neural network-based automatic spectral calibration method for MAX-DOAS technology. The method takes MAX-DOAS observation spectra and solar reference spectra as core data, constructs training data through smoothing denoising and perturbation addition, captures drift signals through multi-dimensional feature extraction, and enables the deep learning model to learn the offset mapping relationship, finally completing automatic calibration of MAX-DOAS spectra. The method specifically comprises the following steps: Step 1: Acquisition and preprocessing of MAX-DOAS multi-source data: Acquire observation spectral data and solar reference spectral data, and construct a high-quality data set adapted to a deep learning model through screening, smoothing denoising and perturbation addition. The operations are as follows: Data acquisition: MAX-DOAS observation spectral data: Obtain daytime observation spectral data through a ground-based MAX-DOAS observation station. The spectrum is in CSV format (the first column is wavelength, the second column is intensity), and is read in batches by traversing directories.

[0025] Standard solar reference spectral data: Adopt the Kurucz solar spectrum model (default file name "Kur01.csv") as the standard reference. The spectrum covers the 300-420nm band, has a resolution of 0.01nm, matches the observation accuracy of MAX-DOAS, and is stored in the same level path as MAX-DOAS spectral data.

[0026] Data screening and validity verification: Time period screening: Reject spectral data from periods at night or with poor light conditions (for example, reject invalid night data from 18:00 to 06:00 the next day), and retain high-quality daytime observation samples; Format verification: Check whether the wavelength range of the spectral file covers 300-420nm and whether the intensity data is empty. If the requirements are not met, mark the file as abnormal and skip it; Description of pre-format conversion: In actual engineering deployment, the observation spectral data can be used to batch parse the original format data output by the spectrometer with the help of a special pre-data format conversion tool (such as the .std to .csv converter provided with the present invention). The conversion process realizes the corresponding mapping of wavelength-intensity data based on a shared wavelength reference file, and generates a standard CSV format spectrum for unified reading and processing by subsequent modules Spectrum smoothing and perturbation data set construction: Smoothing denoising: Adopt Savitzky-Golay filtering (window length 11, polynomial order 3) to smooth the observation spectral intensity data, which retains characteristic peaks while suppressing environmental noise and electronic noise; Perturbation addition: To improve the model's generalization ability, random perturbations are added to the smoothed observation spectrum—wavelength shift perturbation (range ±0.4nm, simulating actual instrument drift) and intensity noise perturbation (noise level is 1% of the original intensity mean, simulating environmental interference), to construct training sample pairs of "perturbed observation spectrum - true offset" to support deep learning model training.

[0027] Step 2: Multi-dimensional spectral feature extraction. Based on the characteristics of the MAX-DOAS observed spectrum, four types of features are extracted: "intensity peak gradient fusion," to enhance the sensitivity of the deep learning model to wavelength drift. The specific process is as follows: Feature definition and calculation: Intensity Continuity Mapping (ICM): Directly uses the raw intensity values ​​of the observed spectrum to reflect the overall intensity distribution of the spectrum, providing a basis for subsequent feature fusion; Peak Eigenmap (PFM): Calculates the intensity difference (Δ) between adjacent spectral points. + =spectrum[i+1]spectrum[i], Δ - =spectrum[i]spectrum[i1]), when Δ + With Δ - When the signs are reversed (from increasing to decreasing or from decreasing to increasing), it is determined to be a peak / valley value, its intensity value is retained, and the rest are set to 0 to highlight the position information of the spectral characteristic peak; Gradient Feature Mapping (DGM): The intensity change of adjacent spectral points is calculated by backward difference (DGM[i] = spectrum[i]spectrum[i1]) to capture small local gradient changes caused by wavelength drift; Semantic fusion features include semantic peak fusion (SEM_PF=ICM×PFM) and semantic gradient fusion (SEM_DG=ICM×DGM), which combine "overall intensity" and "local features (peak / gradient)" through pointwise multiplication, amplifying the influence of wavelength drift on spectral features.

[0028] Feature Alignment and Concatenation: Due to potential differences in the wavelength grid between the MAX-DOAS observed spectrum and the solar reference spectrum (e.g., different instrument resolutions), linear interpolation is used to align the feature vectors of the solar reference spectrum to the wavelength grid of the MAX-DOAS observed spectrum. During the feature engineering phase, the observed spectral features and the reference spectral features are independently calculated for their respective means and standard deviations and Z-score standardization is performed. Subsequently, in the standardized feature space, the corresponding observed feature vectors are subtracted dimension-wise from the reference feature vectors to obtain the 'observation-reference explicit difference feature' vector. Finally, the standardized observed feature vector, the standardized reference feature vector, and the explicit difference feature vector are concatenated dimensionally to form an input feature vector with a total dimension of 15N (N being the number of wavelength channels in a single spectrum), which is then fed into the neural network for training. The introduction of this explicit difference in the standardized space directly provides the model with clear information on the magnitude of the bias, thereby significantly reducing the fitting burden of deep networks in high-dimensional feature optimization and greatly accelerating the convergence speed.

[0029] For the 300-420nm band spectrometer commonly used in this embodiment (wavelength channel number N=1851), the dimension of the above input feature set is 15N=27765.

[0030] Step 3: Construction and Constrained Training of Deep Learning Models Based on the constructed 15N-dimensional feature dataset, this invention does not call upon existing static models, but instead constructs an asymmetric neural network with physical constraints through algorithms, and introduces a physical constraint training strategy that fits the characteristics of optical hardware. Specifically, this includes: 1. Asymmetric Physically Constrained Network Architecture Asymmetric physical constraint structure: Constructing a "15N-dimensional input layer" The asymmetric mapping topology of the "1-dimensional output layer". The forced output layer dimension is 1 (outputting a single wavelength offset scalar). This architectural design constitutes the core physical constraint of this invention, ensuring that after high-dimensional feature extraction, the model must ultimately fit the "global rigid displacement" phenomenon caused by the mechanical thermal expansion and contraction of the spectrometer in mathematical logic, completely eliminating the point-by-point linear distortion that is easily caused by conventional models.

[0031] Hidden layer structure configuration: For a high-dimensional input feature space (15N dimensions, where N is the number of spectral channels), this system adopts a three-layer hidden layer structure, with the number of neurons configured sequentially as follows: After the linear transformation of each hidden layer (1024, 512, 256), a layer normalization module is introduced to suppress the variance shift (internal covariate shift) caused by high-dimensional features in continuous matrix multiplication, ensuring gradient stability under minimal batch training. At the same time, a dropout layer with a dropout rate of 0.2 is introduced after the activation output of the first hidden layer (1024), and a dropout layer with a dropout rate of 0.1 is introduced after the activation output of the second and third hidden layers (512, 256) to reduce the interdependence between neurons and improve the model's generalization ability.

[0032] 2. Customized training strategies for dealing with non-stationary environmental noise: Physical tolerance asymmetric loss function to resist outliers: Addressing the technical challenge of a sudden drop in spectral signal-to-noise ratio (generating high-frequency outliers) caused by severe weather such as heavy rainfall and dust storms, this method abandons the conventional mean squared error (MSE) and instead uses the Smooth L1 Loss function as its basic structure. This function adopts a physical tolerance asymmetric loss function when the prediction error e (i.e., the absolute value of the difference between the model's predicted offset and the actual offset) is less than 1.0. The quadratic form possesses the smooth derivative property of L2 loss, ensuring high-precision fitting accuracy; when e is greater than or equal to 1.0, it automatically switches to... The linear form of the gradient degenerates and is truncated to a constant ( This fundamentally curbs gradient explosion caused by non-stationary noise samples. Building upon this, the present invention further incorporates a physical tolerance threshold of 0.05 nm to construct a targeted asymmetric penalty mechanism: when the absolute error e between the predicted and true offsets does not exceed 0.05 nm, the loss for that sample is directly applied... When e is greater than 0.05 nm, apply a loss to the sample. The penalty weight is multiplied by a factor of 1. This asymmetric loss function... The piecewise expression is: when the prediction error e ≤ 0.05nm, When e > 0.05 nm, = .

[0033] The basic smoothing L1 loss function is defined as follows: when e < 1.0, When e ≥ 1.0, .

[0034] Joint regularization and early stopping to prevent overfitting: In environments with extremely imbalanced field samples, the Adam optimizer (initial learning rate) is used. Weight decay coefficient The gradient pruning mechanism (maximum norm = 1.0) constrains neuron weight expansion. Simultaneously, adaptive learning rate scheduling (the learning rate is multiplied by 0.7 if the validation loss shows no improvement for 5 consecutive epochs) and an early stopping mechanism (termination occurs if the validation loss shows no improvement for 12 consecutive epochs, and the model parameters are rolled back to the optimal level when the validation loss is optimal) are implemented. This ensures model convergence speed while preventing the network from getting bogged down in rote memorization on observational spectral data containing background light.

[0035] Step 4: Fully Automated Calibration Inference and Wavelength Reconstruction The observed spectral data to be calibrated is input into a trained deep neural network to perform end-to-end automated calibration. To ensure industrial-grade reliability, this process specifically includes: 1. Anomaly blocking module based on hardware drift limits: After the model outputs the wavelength shift prediction, the system introduces a threshold blocking mechanism based on the physical limits of optical instruments. Since in practical applications, the mechanical translation caused by temperature difference inside the spectrometer rarely exceeds 0.4 nm, the system forcibly cuts off extreme prediction values ​​exceeding the range of [-0.4, 0.4] nm (usually caused by extreme hardware failures or pure noise from complete cloud cover) to this safe range.

[0036] Meanwhile, a fail-safe callback logic is constructed to directly set invalid mathematical outputs such as NaN / Inf to 0 (i.e., keep the original wavelength uncorrected), thereby ensuring that the long-term unattended monitoring system will not crash due to a single abnormal data stream.

[0037] 2. Wavelength axis global translation correction based on predicted scalar: Based on the predicted offset scalar after blocking, a global translation correction is performed on the original spectral wavelength axis. The basic formula is: translated wavelength = original observed wavelength - predicted offset.

[0038] To ensure accurate matching of the subsequent gas inversion cross section, the new wavelength axis after translation is used as the calibrated wavelength coordinates, while the intensity values ​​remain unchanged. Only the wavelength axis is translated as a whole, and the calibrated spectral sequence is output.

[0039] Results output and evaluation: Data output: Outputs calibrated wavelength data and offset prediction values, supporting CSV format storage for easy use in subsequent trace gas inversion; Visualization output: Generates four types of charts: a comparison chart of spectra before and after calibration (intuitively showing the effect of characteristic peak correction), a scatter plot of predicted and true values ​​(reflecting the accuracy of model prediction), an error distribution histogram (showing the statistical distribution of offset error), and a sample error trend chart (tracking the changes in calibration accuracy of batch samples). The charts are saved in 300dpi PNG format to meet the needs of report generation and result traceability. Quantitative evaluation: Calculate the mean absolute error (MAE), root mean square error (RMSE), correlation coefficient (R), and coefficient of determination (R²). MAE and RMSE reflect the magnitude of the error, R and R² reflect the linear correlation between the predicted value and the true value, and the calibration success rate reflects the reliability of the model in actual application, forming a complete evaluation system of "qualitative + quantitative".

[0040] Technical Solution 2: A Computer-Readable Storage Medium The storage medium stores a computer program. When executed by a processor, this program implements all steps of the aforementioned deep learning-based automatic spectral calibration method based on MAX-DOAS technology, including MAX-DOAS multi-source data acquisition and preprocessing, multi-dimensional spectral feature extraction, deep learning model training, MAX-DOAS spectral calibration, and result output. The storage medium can be in the form of a computer-readable medium such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, facilitating the deployment and dissemination of the method.

[0041] Technical Solution 3: A computer device The device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements all the steps of the aforementioned neural network spectral automatic calibration method based on MAX-DOAS technology. The device also has the following hardware adaptation capabilities: First, it supports GPU-accelerated computing, prioritizing the use of the CUDA architecture (suitable for NVIDIA graphics cards) to accelerate deep learning model training and inference. When the GPU is unavailable, it automatically switches to CPU computing, balancing performance and compatibility. Second, the memory configuration meets the loading requirements of 15N-dimensional feature data (N is the number of spectral channels in the 300-420nm band, typically 1851, corresponding to a feature dimension of 27765), avoiding data loading failure due to insufficient memory.

[0042] The following examples, in conjunction with the accompanying diagrams, illustrate the points: This invention preprocesses and performs feature engineering on observed spectral data and solar reference spectral data to construct an input dataset containing multi-dimensional features such as intensity, peak value, and gradient. It then uses a channel matching neural network to learn the mapping relationship between spectral features and wavelength offset. Combined with a wavelength correction module, it ultimately achieves automatic and accurate calibration of the observed spectrum, solving the wavelength offset problem caused by equipment errors during spectral observation.

[0043] It should be noted that this embodiment is based on the principle of spectral feature matching. It uses an improved feature extraction algorithm (ICM+PFM+DGM+SEM_PF+SEM_DG) to identify the feature differences between the observed spectrum and the reference spectrum. The neural network learns the correspondence between the differences and the wavelength shift. When the model training is completed, a single observed spectrum can be directly input to achieve real-time calibration. Moreover, the computational efficiency is significantly improved compared with traditional methods.

[0044] like Figure 1 As shown, in a specific instance, the method includes the following steps: S1. Acquire observational spectral data and solar reference spectral data, and construct a training dataset containing random offsets and noise; S2. Preprocess and extract features from the spectral data to construct a standardized input feature dataset; S3. Train a physically constrained deep neural network based on the feature dataset and optimize the model parameters to minimize the offset prediction error; S4. Input the observed spectrum to be calibrated into the trained model, and obtain the calibrated spectral data through wavelength correction; S5. Evaluate and visualize the calibration results to verify the model performance.

[0045] Furthermore, specific methods for data acquisition and dataset construction include: S1.1. Obtain raw spectral data (in CSV format) through spectral observation equipment, remove nighttime (hours ≥18 or ≤6) and low-quality spectra, retain 1478 valid daytime observation samples, and construct the benchmark dataset for this embodiment; S1.2. Obtain solar reference spectral data (e.g., Kur01.csv), filter spectral segments in the target wavelength range (300.00~420.00nm), and smooth them using Savitzky-Golay filtering. The actual spectral length is 1851 channels, and the wavelength resolution reaches 0.0100nm / channel. S1.3 Add random wavelength offsets (supporting uniform / normal / extreme distributions, ranging from ±0.4nm) and Gaussian noise to the effective observation spectra to simulate the device offset scenario in actual observations and construct a training dataset containing real offset labels.

[0046] It should be noted that the present invention proposes a reusable training and calibration method. For different models of MAX-DOAS spectrometers, the observation spectral data of the device can be reacquired and the network can be retrained according to the method of the present invention to obtain a calibration model adapted to the device.

[0047] Furthermore, the data preprocessing and feature extraction method includes: S2.1 Spectral smoothing: Savitzky-Golay filtering (window length 11, polynomial order 3) is used to smooth the original spectrum and eliminate high-frequency noise interference. S2.2 Multidimensional Feature Extraction: Based on an improved feature extraction algorithm, 5 core features are extracted, with a single spectral feature dimension of 9255 dimensions (1851 channels × 5 feature categories): ICM (Intensity Continuity Mapping): Preserves the original intensity information of the spectrum; PFM (Peak Feature Mapping): Identifies the location of spectral peaks / valleys and preserves the intensity of feature points; DGM (Gradient Feature Mapping): Calculates the backward difference of the spectrum, reflecting the trend of intensity change; SEM_PF (Semantic Peak Fusion): The pointwise product of ICM and PFM enhances peak features; SEM_DG (Semantic Gradient Fusion): The pointwise product of ICM and DGM enhances gradient features; S2.3 Feature Standardization: Z-Score standardization is used to process feature data. The observed spectral features and the reference spectral features are independently calculated for their respective means and standard deviations and then standardized to eliminate the influence of differences in the absolute magnitude of light intensity under different hardware units or meteorological conditions. The standardization formula is: x_norm=(x-μ) / (σ+ε), where x is the original feature value, μ is the feature mean, σ is the feature standard deviation, and ε is a minimal constant (taken as 1×10⁻¹⁰) to prevent division by zero. -8 ).

[0048] S2.4 Data Filtering: Remove extreme offset samples (absolute offset ≥ 2.0nm) to avoid outliers affecting model training.

[0049] It should be noted that the feature extraction in this embodiment strictly follows the following formulas to maintain the original spectral dimension (1851 channels). The formulas for the above 5 types of features are defined as follows: (1) Intensity continuity mapping ICM(i) = I(i); (2) Peak feature mapping PFM(i): when (I(i)-I(i-1))×(I(i+1)-I(i))<0, the value is I(i), otherwise the value is 0; (3) Gradient feature mapping DGM(i) = I(i)-I(i-1) (i≥2); (4) Semantic peak fusion SEM_PF(i) = ICM(i)×PFM(i); (5) Semantic gradient fusion SEM_DG(i) = ICM(i)×DGM(i). Where I(i) is the intensity value of the spectrum in the i-th channel, i is the spectral channel index (1≤i≤N), and N=1851 is the total number of spectral channels.

[0050] After extracting the above five types of features and performing Z-score standardization on the observed and reference spectral features according to the method described in S2.3, the "observation-reference explicit difference feature" DIFF is further defined. Its calculation formula is: DIFF = F_obs - F_ref, where F_obs and F_ref are the standardized five-type feature vectors of the observed spectrum and the aligned five-type feature vectors of the reference spectrum, respectively (both 5N-dimensional, i.e., 9255-dimensional). Subsequently, the standardized observed feature vector, the standardized reference feature vector, and the explicit difference feature vector are concatenated according to their dimensions to form an input feature vector with a total dimension of 15N (27765-dimensional, N=1851), which is then fed into the deep neural network wavelength calibration model. The introduction of this explicit difference in the standardized space directly provides the model with clear information on the magnitude of the bias, thereby significantly reducing the fitting burden of deep networks in high-dimensional feature optimization and greatly accelerating the convergence speed.

[0051] Furthermore, the construction and training of deep neural networks based on physical constraints include: like Figure 3 As shown, the deep neural network based on physical constraints of the present invention adopts an asymmetric physical constraint architecture. The input layer receives 15N-dimensional features (5N observed features + 5N reference features + 5N explicit difference features), which are mapped by the hidden layers (1024→512→256, each layer is equipped with LayerNorm, and the first two layers are equipped with Dropout) and output a single offset scalar. The basic structure of the deep neural network based on physical constraints includes an input layer, a hidden layer, and an output layer, specifically configured as follows: S3: Reconstruction and Targeted Training of Deep Neural Networks Based on Physical Constraints.

[0052] This embodiment addresses the differences in spectrometer hardware characteristics and the non-stationarity of the field environment. Instead of employing a general static network architecture, it achieves wavelength mapping by constructing a physically constrained asymmetric neural network. The specific steps are as follows: S3.1 Fixed hidden layer structure and single-sample stabilization mechanism: The system first reads the number of wavelength channels of the current spectrometer device. In this embodiment, the input feature tensor is formed by concatenating the observed spectrum's 5 types of features (5N), the aligned reference spectrum's 5 types of features (5N), and their explicit difference features (5N), with a total dimension of [missing value]. To address this high-dimensional input, the inventors designed a hidden layer structure scheme and a corresponding single-sample stabilization mechanism: This system employs a fixed three-layer hidden layer structure. For an input feature dimension of 15N (N being the number of spectral channels), the number of neurons in the hidden layers is configured as follows: : The first hidden layer has 1024 dimensions: it receives 15N dimensions (27765 dimensions in this embodiment) of input features, performs a linear transformation, introduces a layer normalization (LayerNorm) module and a ReLU activation function, and is coupled with a Dropout layer with a dropout rate of 0.2; the second hidden layer has 512 dimensions: it receives 1024-dimensional output and is also configured with LayerNorm, ReLU, and Dropout (dropout rate of 0.1); the third hidden layer has 256 dimensions: it receives 512-dimensional output and is configured with LayerNorm, ReLU, and Dropout (dropout rate of 0.1). This structure is suitable for... High-resolution device scenarios (such as in this embodiment) (Input dimension 27765). Layer normalization calculates statistics based on the sample's own feature dimensions, independent of batch size. Combined with a pure stochastic gradient descent strategy with BatchSize=1, it effectively suppresses internal covariate bias.

[0053] The above configuration ensures convergence stability under high-dimensional input.

[0054] S3.2 Strongly Physically Constrained Asymmetric Mapping Design: Unlike conventional sequence mapping models, this invention constructs an extreme "topological bottleneck" at the network end. This forces the high-dimensional features of the hidden layers to be mapped to a single one-dimensional output neuron, resulting in a scalar prediction offset that is consistent across the entire spectrum.

[0055] This asymmetric architecture is a rigid constraint designed based on the prior physical knowledge that "the spectrometer grating undergoes a global rigid mechanical translation dominated by the ambient temperature difference." At the mathematical level, it eliminates the possibility of the network outputting multiple normalized positive sequences, fundamentally preventing the spectral native linearity (ILS) distortion that is easily caused by unconstrained neural networks during the fitting process.

[0056] S3.3 Robust operator configuration for complex field environments: Physical Tolerance Asymmetric Loss Operator: Based on the SmoothL1 Loss function, this operator leverages its linear gradient cutoff property when errors are large to effectively isolate gradient explosion caused by sudden noise samples in the field. The basic SmoothL1 Loss function is defined as follows: when e < 1.0, L_smooth(e) = 0.5 × e²; when e ≥ 1.0, L_smooth(e) = e - 0.5 (where e is the absolute value of the difference between the predicted offset and the true offset). Based on this, a physical tolerance threshold of 0.05 nm is introduced to construct an asymmetric penalty mechanism, expressed piecewise as follows: when the prediction error e ≤ 0.05 nm, L_PTA(e) = L_smooth(e); when e > 0.05 nm, L_PTA(e) = 3.0 × L_smooth(e). This mechanism allows the network to specifically correct large error samples in the later stages of training, accelerating convergence towards the physical tolerance range.

[0057] Wide-boundary perturbation enhancement: During the training loop, the system injects random offsets (range ±0.4nm) and Gaussian noise covering the full-range hardware thermal drift boundary into the original spectrum in real time. This technique forces the network to lock the global offset mapping relationship even in extremely low signal-to-noise ratio environments. Ultimately, based on 1478 valid samples (887 in the training set, 295 in the validation set, and 296 in the test set), the network, driven by 887 training samples, achieved a stable convergence of the training set error to 0.001737, with a single-sample inference time of approximately 10ms, achieving a balance between high accuracy and high engineering robustness.

[0058] Further methods for automatic spectral calibration and result visualization include: S4.1 Processing the spectrum to be calibrated: For the input observed spectrum to be calibrated, repeat the preprocessing and feature extraction process of S2.1 and S2.3, and calculate the explicit difference features according to the method described in S2.4 and then concatenate them into a 15N-dimensional input vector; S4.2, Offset Prediction: Input the feature vector into the trained model to obtain the predicted offset, and perform cropping on extreme predicted values ​​(absolute value > 0.4nm); S4.3 Wavelength Correction: Substitute the predicted offset into the wavelength shift formula = -shift, obtains the calibrated wavelength sequence; where For the calibrated wavelength, 'shift' represents the original observed wavelength, and 'shift' represents the wavelength offset predicted by the model.

[0059] S4.4 Result Visualization: Overall comparison ( Figure 4): Plot the superimposed graph of the observed spectra before and after calibration with the solar reference spectrum to show the improvement in matching performance across the entire wavelength range (300-420nm); Local contrast ( Figure 5 ): Focusing on the 400-410nm characteristic band, the details of the spectrum before and after calibration are magnified to show the differences in matching, intuitively demonstrating the calibration accuracy.

[0060] The following are examples: Data acquisition and preprocessing: The raw spectral data (in CSV format) was obtained from the observation data catalog. After removing nighttime (hours ≥18 or ≤6) and low-quality spectra, 1478 valid daytime observation samples were retained. The solar reference spectrum was Kur01.csv, and the wavelength range of 300-420nm (1851 channels) was selected. A training dataset was constructed by adding a random offset of ±0.4 nm and 0.01 noise to the observed spectra; After smoothing with Savitzky-Golay filtering, five types of features are extracted and standardized to form a feature vector of 9255 dimensions / line.

[0061] Model training: The dataset was divided into a 6:2:2 ratio for training (887 samples), validation (295 samples), and test (296 samples), with the test set having slightly more samples than the validation set to fully test the model's generalization ability. The model used the Adam optimizer, with an initial learning rate of [value missing]. Weight decay coefficient The training was conducted for 48 epochs (48). During training, the learning rate was adaptively adjusted (if the validation loss did not improve for 5 consecutive epochs, the learning rate was multiplied by 0.7). The training set loss decreased from 0.006883 to 0.001737, and the validation set loss gradually converged. The early stopping patience value was set to 12 (if the validation loss did not improve for 12 consecutive epochs, the training was terminated and the optimal parameters were rolled back). After the model training was completed, it was saved as 'corrected_spectral_calibration_model.pt'.

[0062] To alleviate the problem of small sample size, this invention generates different random perturbation combinations for each original sample in real time during each training round by randomly offsetting (within ±0.4nm range) and injecting Gaussian noise, thereby effectively improving the diversity of training data.

[0063] Spectral calibration and visualization: All 296 samples in the test set were successfully processed, achieving a 100% success rate. A sample (the 102nd sample in the test set, filename d11_20240611160247_S8.csv) was visualized, showing a true offset of 0.1989nm, a predicted offset of 0.1984nm, and an absolute error of only 0.0005nm.

[0064] Figure 4 The calibration effect of this sample in the 300-420nm range is shown, and it can be seen that the overall overlap between the observed spectrum and the solar reference spectrum is significantly improved after calibration; Figure 5 Focusing on the 400-410nm band, after magnification, the difference in the shift between the spectral peak before calibration and the reference spectrum can be clearly observed, as well as the detailed effect of perfect alignment after calibration.

[0065] Result evaluation: The overall performance metrics of the test set are as follows: Key metrics: MAE 0.0117nm, RMSE 0.0361nm, calibration pass rate (error ≤ 0.05nm) 99.7%, excellent sample alignment rate (error ≤ 0.01nm) 62.3%; Error distribution: minimum error 0.0001nm, median absolute error 0.0082nm, 95th percentile error 0.0286nm, maximum error 0.1032nm; among them, 62.3% of the samples achieved excellent accuracy (error ≤0.01nm), and 99.7% of the samples met the physical tolerance threshold (error ≤0.05nm).

[0066] Gain: By training a deep neural network based on physical constraints, real-time automatic calibration of observed spectra is achieved with an inference speed of 10ms / sample. Compared with the traditional O(N²) complexity method, the computational efficiency is improved to O(1), which is suitable for batch calibration scenarios of large-scale spectral data.

[0067] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0068] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0069] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the machine learning-based automatic spectral calibration methods described in the above embodiments. It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and explanations, examples, and beneficial effects of related content can be found in the corresponding parts of the above methods.

[0070] This application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus. Memory, used to store computer programs; The processor, when executing programs stored in memory, implements the aforementioned machine learning-based automatic spectral calibration method. The communication bus mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.

[0071] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0072] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0073] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0074] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0075] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0076] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automatic spectral calibration method based on MAXDOAS technology using neural networks, characterized in that, Includes the following steps: Acquire observational spectral data and standard solar reference spectral data from the MAXDOAS observation system; The acquired spectral data is preprocessed, including time period filtering, format verification, smoothing and denoising, and perturbation addition. Multi-dimensional spectral features are extracted from the preprocessed spectral data. These multi-dimensional spectral features include intensity continuity mapping features, peak feature mapping features, gradient feature mapping features, semantic peak fusion features, and semantic gradient fusion features. In the feature normalization space, the multi-dimensional spectral features of the observed spectrum are subtracted dimension by dimension from the corresponding features of the aligned standard solar reference spectrum to obtain the explicit difference feature vector; the observed spectral feature vector, the reference spectral feature vector, and the explicit difference feature vector are concatenated dimensionally to construct the input feature set; A deep neural network wavelength calibration model is trained based on the input feature set. The deep neural network adopts an asymmetric physical constraint architecture. Its input layer dimension matches the input feature set dimension. The hidden layer dimension is a preset three-layer structure of 1024, 512, and 256. The output layer dimension is 1, which is used to output a single wavelength offset scalar. After preprocessing and feature extraction of the MAXDOAS spectral data to be calibrated, the data is input into the trained deep neural network wavelength calibration model to predict the wavelength shift. Based on the predicted wavelength offset, a global translation correction is performed on the wavelength axis of the original observed spectrum, and the calibrated spectral data is output.

2. The method according to claim 1, characterized in that, The intensity continuity mapping feature is the original intensity value I(i) of the spectrum in the i-th channel; the peak feature mapping feature is: when (I(i)-I(i-1))×(I(i+1)-I(i))<0, it takes the value I(i), otherwise it takes the value 0; the gradient feature mapping feature is D GM(i) = I(i) - I(i-1), where i ≥ 2; the semantic peak fusion feature is the pointwise product of the intensity continuity mapping feature and the peak feature mapping feature; the semantic gradient fusion feature is the pointwise product of the intensity continuity mapping feature and the gradient feature mapping feature.

3. The method according to claim 1, characterized in that, The hidden layer of the deep neural network wavelength calibration model consists of three layers connected in sequence, with the number of neurons configured as 1024, 512, and 256 respectively. A layer normalization module is introduced after the linear transformation of each hidden layer. After the activation output of the first hidden layer, a random deactivation layer with a dropout rate of 0.2 is introduced. After the activation output of the second and third hidden layers, a random deactivation layer with a dropout rate of 0.1 is introduced.

4. The method according to claim 1, characterized in that, The deep neural network wavelength calibration model uses an asymmetric smooth L1 loss function based on physical tolerance as the training loss function. Specifically, a physical tolerance threshold for wavelength drift is set. When the model prediction error is less than or equal to the threshold, the standard smooth L1 loss is used for calculation. When the prediction error is greater than the threshold, a penalty weight is applied to the loss value to amplify the penalty, thereby guiding the model to converge within the physical tolerance range. Regularization is performed using weight decay and gradient clipping mechanisms, combined with an early stopping strategy to prevent overfitting.

5. The method according to claim 1, characterized in that, Before performing a global translation correction on the wavelength axis of the original observed spectrum based on the predicted wavelength offset, an anomaly blocking step is also included: the predicted offset exceeding the preset safety threshold range is truncated to the safety threshold range, which is -0.4nm to +0.4nm; for invalid mathematical outputs, they are directly set to zero and the original wavelength remains unchanged.

6. The method according to claim 1, characterized in that, The calibration formula for the global translation correction of the wavelength axis is: wl_calibrated = wl_original shift, where wl_calibrated is the calibrated wavelength, wl_original is the original observed wavelength, and shift is the wavelength shift predicted by the model.

7. The method according to claim 1, characterized in that, It also includes result output and evaluation steps: outputting calibrated wavelength data and offset prediction values, supporting CSV format storage; generating spectral comparison charts before and after calibration, scatter plots of predicted and true values, error distribution histograms, and sample error trend charts; Calculate the mean absolute error, root mean square error, correlation coefficient, and coefficient of determination to form a qualitative and quantitative evaluation system.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.