Method for rapid inversion of temperature and concentration based on multi-scale CNN-transformer of ultraviolet broadband absorption spectrum
Patent Information
- Application Number
- CN202611384384.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-09
AI Technical Summary
然而,现有的深度学习方法通常将整段光谱作为无差别的输入,由网络自行学习所有特征,温度和浓度信息在特征空间中高度耦合,在弱吸收、噪声扰动或长时间测量条件下,反演结果的稳定性和准确性仍然有待提升
1. 通过将多尺度光谱特征并行映射为温度token和浓度token,并分别以温度敏感度权重向量和浓度敏感度权重向量对多尺度光谱特征进行加权聚合,在特征层面实现了温度敏感信息与浓度敏感信息的结构性分离;温度token由对谱线相对强度、峰形比例和谱带分布敏感的局部特征构成,浓度token由对吸收强度和积分面积敏感的全局特征构成,使得网络能够分别沿温度信息通道和浓度信息通道组织光谱信息,而非将整段光谱作为无差别的特征混合处理;在后续Transformer编码器的自注意力计算中,温度token与浓度token各自保留独立的嵌入空间,同时通过注意力权重学习二者之间的跨参数关联,既保持了不同物理参数信息的相对独立性,又捕捉了温度效应对浓度反演所需吸收强度修正的必要耦合关系;通过上述物理敏感token分流与联合建模机制,显著降低了温度与浓度信息在特征提取过程中的相互干扰,在弱吸收、光源波动和基线漂移等测量扰动条件下,仍能保持反演结果的稳定性,解决了现有深度学习光谱反演方法中温度与浓度信息在特征空间高度耦合导致的反演误差问题;
Smart Images

Figure CN122882369A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas analysis technology, and in particular to a rapid inversion method for temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer. Background Technology
[0002] Ultraviolet Broadband Absorption Spectroscopy (UV-BAS) is a spectroscopic diagnostic technique that measures gas parameters based on the absorption characteristics of molecules or free radicals in the ultraviolet band. This technique acquires broadband transmission or absorption spectra within a specific wavelength range and, by combining the spectral line positions, line intensities, band structures, and temperature dependence characteristics of the target component, retrieves parameters such as temperature, concentration, and component content. UV-BAS features non-contact operation, a wide spectral range, and simultaneous acquisition of multiple spectral lines, making it valuable for applications in combustion diagnostics, high-temperature gas measurement, pollutant monitoring, and free radical concentration analysis.
[0003] Current UV-BAS parameter inversion typically relies on physical spectral models. A typical process involves establishing the relationship between transmission spectra and absorption coefficients based on Beer-Lambert's law, calculating the theoretical absorption spectra of the target component at different temperatures, pressures, and concentrations using spectral line databases or absorption cross-section data, and considering factors such as line shape functions, instrument functions, baseline terms, wavelength calibration shifts, and experimental noise. Finally, the target parameters are solved using full-spectrum fitting, spectral difference, derivative fitting, or other optimization methods. However, in actual measurements, UV-BAS spectra are affected by factors such as fluctuations in light source intensity, detector noise, optical system baseline drift, wavelength calibration errors, and instability of weak absorption signals. Temperature and concentration interact with the spectrum in a coupled manner: temperature changes typically alter the relative intensity, peak width, and band distribution between different spectral lines or bands, while concentration changes primarily alter the absorption intensity, absorption area, and overall amplitude. Relying solely on frame-by-frame physical fitting can easily lead to problems such as high computational load, fluctuating results, and insufficient real-time performance when noise is high, initial values are unstable, or operating conditions change rapidly.
[0004] Taking the full-spectrum fitting method as an example, this method is based on Beer-Lambert's law and molecular absorption spectroscopy theory. It iteratively optimizes and adjusts parameters such as temperature and concentration to minimize the residual between the theoretical spectrum and the experimental spectrum. While the physical meaning of this method is clear, each frame of spectrum requires line shape calculation, spectral line superposition, instrument convolution, and nonlinear iteration, resulting in a large computational load. This makes it difficult to meet the needs of real-time or near-real-time inversion, and the fitting results are easily affected by baseline, noise, and initial values. Spectral difference or differential processing methods highlight the absorption characteristics of the target component by differentiating the measured spectrum from the reference spectrum. To some extent, this can enhance the target spectral peaks or component differences. However, this method relies on a stable reference spectrum. When the light source intensity, baseline drift, or wavelength calibration changes, the difference results will simultaneously contain changes in target absorption and system disturbances, making it difficult to stably separate temperature and concentration information. The derivative spectral fitting method improves the fitting effect by taking the first or second derivative of the original absorption spectrum to weaken the slowly changing background term and highlight the narrow-band absorption peak structure. However, derivative operations amplify high-frequency noise and are sensitive to smoothing windows, differential order and spectral resolution. When the signal-to-noise ratio is low or the measurement conditions change, the inversion results may still fluctuate.
[0005] In recent years, deep learning has provided a new technical approach for rapid spectral inversion. Using training samples constructed from physical models, experimental calibration data, or a fusion of both, neural networks can be trained to learn the nonlinear mapping between spectra and target parameters. However, existing deep learning methods typically treat the entire spectrum as undifferentiated input, allowing the network to learn all features autonomously. Temperature and concentration information are highly coupled in the feature space, and the stability and accuracy of the inversion results still need improvement under conditions of weak absorption, noise perturbation, or long-term measurements. Therefore, an inversion method is needed that can leverage the rapid inference advantages of deep learning while also reflecting the physical sensitivity differences between temperature and concentration in UV-BAS spectra, to achieve rapid and stable joint inversion of temperature and concentration. Summary of the Invention
[0006] The purpose of this invention is to provide a fast inversion method for temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer. By constructing a parallel mapping mechanism between temperature tokens and concentration tokens at the feature level, temperature-sensitive features and concentration-sensitive features are structurally separated and aggregated separately. This improves the stability of joint temperature and concentration inversion under weak absorption and measurement perturbation conditions in ultraviolet broadband absorption spectra, and solves the problem of mutual interference in inversion results caused by the high coupling of temperature and concentration information in the feature space in the prior art.
[0007] To address the aforementioned technical problems, this invention provides a fast inversion method for temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer. The inversion method is implemented using a deep learning model comprising a cascaded multi-scale one-dimensional convolutional neural network, a parallel token mapping module, a Transformer encoder, and a multi-task regression network, and includes the following steps: S1, acquire the broadband absorption spectrum of the gas to be tested in the target ultraviolet band, and preprocess the broadband absorption spectrum to obtain a one-dimensional spectral sequence on a preset wavelength grid. S2, input the one-dimensional spectral sequence into the multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, including narrow absorption peak shape features, adjacent spectral line combination features, and wide spectral band background trend features; S3, input the multi-scale spectral features into the parallel token mapping module, and generate temperature token and concentration token simultaneously. The temperature token includes the narrow absorption peak shape feature and adjacent spectral line combination feature in the multi-scale spectral features, and the concentration token includes the broad spectral band background trend feature in the multi-scale spectral features. S4, input the temperature token and the concentration token into the Transformer encoder, and perform global interaction between the temperature token and the concentration token through a multi-head self-attention mechanism to obtain fused spectral features; S5, input the fused spectral features into the multi-task regression network, and obtain the temperature and concentration of the gas to be measured through the temperature output branch and the concentration output branch, respectively.
[0008] Further, step S3, which involves inputting the multi-scale spectral features into the parallel token mapping module to simultaneously generate temperature and concentration tokens, includes the following sub-steps: S31, perform sensitivity assignment on the multi-scale spectral features to obtain a temperature sensitivity weight vector and a concentration sensitivity weight vector. The temperature sensitivity weight vector is used to indicate the temperature-sensitive part of the multi-scale spectral features, and the concentration sensitivity weight vector is used to indicate the concentration-sensitive part of the multi-scale spectral features. S32, the multi-scale spectral features are weighted and aggregated according to the temperature sensitivity weight vector to obtain the temperature token; S33, the multi-scale spectral features are weighted and aggregated according to the concentration sensitivity weight vector to obtain the concentration token; The temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training, or are preset based on known spectral data of the target component.
[0009] Furthermore, the temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during the training process through a learnable gating network; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31a1, The multi-scale spectral features are input into a learnable gating network, and the learnable gating network outputs the temperature gating coefficient and concentration gating coefficient corresponding to each feature position in the multi-scale spectral features; S31a2, the temperature gating coefficients at each feature location are combined into the temperature sensitivity weight vector, and the concentration gating coefficients at each feature location are combined into the concentration sensitivity weight vector.
[0010] Furthermore, the temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training through an attention mechanism; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31b1, Calculate multi-head self-attention weights for the multi-scale spectral features. The multi-head self-attention weights include at least a first attention head and a second attention head. The first attention head is used to learn to focus on temperature-sensitive spectral features during training, and the second attention head is used to learn to focus on concentration-sensitive spectral features during training. S31b2, the attention weight output by the first attention head is used as the temperature sensitivity weight vector, and the attention weight output by the second attention head is used as the concentration sensitivity weight vector.
[0011] Furthermore, the temperature sensitivity weight vector and the concentration sensitivity weight vector are preset based on known spectral line data of the target component; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31c1, based on the sensitivity of each spectral line position to temperature changes in the known spectral line database of the target component, determine the first wavelength range that is sensitive to temperature and the second wavelength range that is sensitive to concentration on the preset wavelength grid. S31c2, reset the weights of the feature positions corresponding to the first wavelength range to a first preset value and reset the weights of the remaining feature positions to a second preset value to obtain the temperature sensitivity weight vector; reset the weights of the feature positions corresponding to the second wavelength range to the first preset value and reset the weights of the remaining feature positions to the second preset value to obtain the concentration sensitivity weight vector.
[0012] Further, step S2, which involves inputting the one-dimensional spectral sequence into the multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, includes the following sub-steps: S21, the one-dimensional spectral sequence is input into the first convolutional branch, the second convolutional branch, and the third convolutional branch respectively. The first convolutional branch uses the first convolutional kernel scale to extract the peak shape features of narrow absorption peaks. The second convolutional branch uses the second convolutional kernel scale, which is larger than the first convolutional kernel scale, to extract the combination features of adjacent spectral lines. The third convolutional branch uses the third convolutional kernel scale, which is larger than the second convolutional kernel scale, to extract the background trend features of wide spectral bands. S22, the outputs of the first convolution branch, the second convolution branch and the third convolution branch are fused to obtain the multi-scale spectral features.
[0013] Furthermore, the third convolutional branch employs dilated convolution, the receptive field of which is larger than that of non-dilated convolution using the same kernel size.
[0014] Furthermore, the fusion in step S22 involves concatenating the outputs of the first convolutional branch, the second convolutional branch, and the third convolutional branch along the feature channel dimension.
[0015] Further, step S4, which involves inputting the temperature token and the concentration token into the Transformer encoder and performing global interaction between the temperature token and the concentration token through a multi-head self-attention mechanism to obtain fused spectral features, includes the following sub-steps: S41, the temperature token and the concentration token are mapped to the temperature token embedding space and the concentration token embedding space respectively through independent embedding matrices, and the temperature token embedding space and the concentration token embedding space are kept separate through their respective independent embedding parameters; S42, In the multi-head self-attention mechanism, self-attention weights are calculated for the embedded temperature token and concentration token. The self-attention weights simultaneously include the internal correlation between temperature tokens, the internal correlation between concentration tokens, and the cross-parameter correlation between temperature tokens and concentration tokens. S43, The embedded temperature token and concentration token are weighted and aggregated based on the self-attention weights to obtain the fused spectral features.
[0016] Furthermore, the training samples for the deep learning model are constructed through the following steps: S101, Obtain a one-dimensional spectral sequence sample within the target ultraviolet band and its corresponding temperature and concentration labels; S102, Inject a perturbation of a preset perturbation type into the one-dimensional spectral sequence sample to obtain an enhanced spectral sample. The preset perturbation type includes at least one of the following: amplitude scaling perturbation simulating light source intensity fluctuations, baseline offset perturbation simulating baseline drift, wavelength translation perturbation simulating wavelength calibration error, random noise perturbation simulating detector noise, and instrument broadening perturbation simulating instrument function changes. S103, The enhanced spectral samples are added to the training sample set and used together with the original spectral samples without perturbation for training the deep learning model.
[0017] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described method for fast inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer.
[0018] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer.
[0019] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects: 1. By mapping multi-scale spectral features in parallel to temperature and concentration tokens, and then weighting and aggregating these features using temperature-sensitive and concentration-sensitive weight vectors respectively, a structural separation of temperature-sensitive and concentration-sensitive information is achieved at the feature level. Temperature tokens consist of local features sensitive to relative spectral intensity, peak ratio, and band distribution, while concentration tokens consist of global features sensitive to absorption intensity and integral area. This allows the network to organize spectral information along temperature and concentration channels separately, rather than treating the entire spectrum as an indiscriminate feature mixture. This is further demonstrated in the subsequent Transformer encoder's self-annotation. In the attention calculation, temperature tokens and concentration tokens each retain independent embedding spaces. At the same time, attention weights are used to learn the cross-parameter correlation between them. This maintains the relative independence of different physical parameter information while capturing the necessary coupling relationship between temperature effect and absorption intensity correction required for concentration inversion. Through the above-mentioned physical sensitive token diversion and joint modeling mechanism, the mutual interference between temperature and concentration information in the feature extraction process is significantly reduced. Under measurement perturbation conditions such as weak absorption, light source fluctuations, and baseline drift, the stability of the inversion results can still be maintained. This solves the inversion error problem caused by the high coupling of temperature and concentration information in the feature space in existing deep learning spectral inversion methods. 2. By cascading a multi-scale one-dimensional convolutional neural network and a Transformer encoder, multi-level spectral feature extraction and correlation modeling from local peak shape to global spectral bands are achieved. The multi-scale one-dimensional convolutional neural network employs at least three parallel convolutional branches of different scales to extract narrow absorption peak shape features, adjacent spectral line combination features, and wide spectral band background trend features, respectively. This allows spectral information from different spatial scales to coexist in the same feature representation, overcoming the limitation of single-scale convolution which can only capture local or global features. Based on this, the Transformer encoder uses a multi-head self-attention mechanism to further refine the features. Modeling long-distance dependencies between wavelength regions allows the model to extract compensation information from other stable spectral lines or bands even when certain spectral lines are affected by noise or local perturbations. The synergistic effect of multi-scale local feature extraction and global self-attention modeling enables the inversion method to comprehensively utilize multi-level spectral information such as strong absorption peaks, weak absorption peaks, spectral line intensity ratios, and overall spectral band structure. Temperature and concentration can be output with only one neural network forward propagation in the online stage. Compared with the traditional full-spectrum fitting method, which requires frame-by-frame line shape calculation, spectral line superposition, and nonlinear iteration, this method significantly improves the inversion speed while maintaining inversion accuracy. 3. By injecting physically targeted perturbations into the spectral samples during the training phase—including amplitude scaling perturbations simulating light source intensity fluctuations, baseline offset perturbations simulating baseline drift, wavelength translation perturbations simulating wavelength calibration errors, random noise perturbations simulating detector noise, and instrument broadening perturbations simulating instrument function variations—the training samples can cover common non-ideal factors in real-world measurement environments. Unlike general data augmentation methods, these perturbation types directly correspond to typical systematic error sources in ultraviolet broadband absorption spectroscopy experiments. The enhanced spectral samples after perturbation injection participate in model training together with the original spectral samples without perturbation injection, forcing the model to learn from the perturbed spectra during training. The method extracts feature representations that are robust to temperature and concentration, rather than overfitting to specific forms of ideal spectra. At the model structure level, the parallel mapping mechanism of temperature tokens and concentration tokens maintains structural separation through their respective independent embedding parameters, further enhancing the model's insensitivity to input perturbations. The physical perturbation enhancement during the training phase and the physical sensitive shunting design of the model structure work together to enable the inversion method to maintain the stability of the output results during long-term continuous measurements, even when faced with factors such as light source aging, detector temperature drift, and slow changes in environmental conditions. Compared with the large fluctuations that occur in traditional physical fitting methods during long-term measurements, the inversion fluctuation range of this invention is significantly narrowed. Attached Figure Description
[0020] Figure 1 This is a flowchart of the method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer provided in this embodiment of the invention; Figure 2 This is a schematic diagram of the UV-BAS physical mechanism and multi-scale CNN-Transformer network model provided in the embodiments of the present invention; Figure 3 This is a schematic diagram showing the long-term concentration inversion stability comparison provided in an embodiment of the present invention. Detailed Implementation
[0021] 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 and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0022] In this invention, rapid inversion refers to the online inference stage after the deep learning model has been trained. Only the pre-processed ultraviolet broadband absorption spectrum of the gas to be tested needs to be input into the model. Through a single forward propagation from a multi-scale one-dimensional convolutional neural network to a multi-task regression network, the inversion results for temperature and concentration can be obtained simultaneously within milliseconds. Compared to traditional full-spectrum fitting methods, which require frame-by-frame access to the spectral database, calculation of line shape functions, execution of instrument convolution, and iterative parameter optimization, this method eliminates all physical model calculations and iterative optimization steps in the online stage. Compared to spectral difference methods and derivative spectral fitting methods, this method does not require selecting a reference spectrum, setting difference parameters, or determining the smoothing window and differential order, eliminating the influence of manual parameter adjustments on the inversion results. The rapid inversion characteristic makes this method suitable for applications requiring long-term continuous monitoring of temperature and concentration, such as real-time temperature and concentration field monitoring in combustion diagnostics, continuous online analysis of flue gas pollutants in environmental monitoring, and real-time feedback control of gas parameters in industrial processes.
[0023] Please refer to Figure 1 This invention provides a fast inversion method for temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer. The inversion method is implemented based on a deep learning model comprising a cascaded multi-scale one-dimensional convolutional neural network, a parallel token mapping module, a Transformer encoder, and a multi-task regression network, and includes the following steps: S1. Obtain the broadband absorption spectrum of the gas to be tested in the target ultraviolet band, and preprocess the broadband absorption spectrum to obtain a one-dimensional spectral sequence on a preset wavelength grid.
[0024] In ultraviolet broadband absorption spectroscopy measurements, the ultraviolet beam emitted by the light source passes through the region of the gas to be measured, and the detector collects information on the change of transmitted light intensity with wavelength, forming the original broadband absorption spectrum. However, in addition to the absorption information of the target component, the original spectrum also contains non-absorption factors such as the dark current signal of the detector, the spectral energy distribution of the light source itself, and stray light introduced by optical elements. Therefore, it is necessary to first perform dark background subtraction on the original spectrum, that is, to collect the background signal of the detector under conditions without light source and subtract it from the original signal to eliminate the influence of the detector's dark current; then, reference light normalization is performed, and the transmission spectrum after dark background subtraction is divided by the reference spectrum of the light source under conditions without absorption to obtain the transmittance spectrum; finally, through absorbance conversion, the negative logarithm of the transmittance is taken to obtain the absorbance spectrum that is proportional to the concentration of the target component. In combustion diagnostic scenarios, the gas to be tested may be free radicals such as OH, CH, and NO in a high-temperature combustion field. The ultraviolet band is typically selected in the 200-400 nm range, within which these free radicals exhibit characteristic absorption bands. In environmental monitoring scenarios, the gas to be tested may be sulfur dioxide or nitrogen oxides in flue gas, and similarly, characteristic bands with large absorption cross-sections exist in the ultraviolet band. After absorbance conversion, wavelength resampling of the spectrum is required. The original non-uniform wavelength grid is interpolated and mapped onto a preset uniform wavelength grid. Intensity normalization is then used to adjust the overall amplitude of the spectrum to a uniform scale, eliminating the impact of successive fluctuations in the absolute value of the light source intensity on the consistency of subsequent deep learning model inputs. After these preprocessing steps, the original broadband absorption spectrum is converted into a one-dimensional spectral sequence, where each element corresponds to a normalized absorbance value at a specific wavelength position on the preset wavelength grid, serving as the standardized input for the deep learning model.
[0025] S2 inputs the one-dimensional spectral sequence into a multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, including narrow absorption peak shape features, adjacent spectral line combination features, and wide spectral band background trend features.
[0026] One-dimensional spectral sequences contain rich, multi-level spectral information: narrow absorption peaks carry information about the center wavelength, peak height, and full width at half maximum (FWHM) of individual molecular transition lines; the relative intensity relationships between adjacent absorption peaks reflect the number distribution of particles transitioning to different energy levels; and the broad spectral envelope carries the overall trend of absorption intensity variation with wavelength and possible baseline drift characteristics. To simultaneously capture these different scales of spectral information in the same feature representation, this step employs a multi-scale one-dimensional convolutional neural network (MCN) for feature extraction from the one-dimensional spectral sequence. The MCN has multiple parallel convolutional branches, each using a one-dimensional convolutional kernel of a different size. When a small-sized convolutional kernel slides along the wavelength dimension, its receptive field covers several wavelength sampling points, enabling it to respond to local morphological changes at the absorption peak apex, inflection point, and half-maximum width, thereby extracting peak shape features of narrow absorption peaks, including details such as peak height, peak width, and asymmetry. A medium-sized convolutional kernel covers dozens of wavelength sampling points, traversing wavelength intervals between adjacent spectral lines to capture the relative intensity relationships of spectral line combinations and inter-peak distances. A large-sized or dilated convolutional kernel covers hundreds of wavelength sampling points, enabling smooth perception of slow changes in absorbance over a wide wavelength range, extracting broad-band background trend features, and effectively suppressing high-frequency noise interference. Features extracted from different convolutional branches are spliced and fused along the feature channel dimension to form a multi-scale spectral feature sequence. In this multi-scale spectral feature sequence, each feature location simultaneously contains local peak shape information in its corresponding wavelength neighborhood, the combination relationship of adjacent spectral lines, and the background trend of its corresponding broad-band, providing a rich feature foundation for subsequent steps to separate temperature and concentration information based on physical sensitivity.
[0027] Multi-scale spectral features are feature sequences output by a multi-scale one-dimensional convolutional neural network, where each feature position corresponds to one or more wavelength positions on a preset wavelength grid. Each feature vector in this sequence simultaneously contains narrow absorption peak shape information extracted by a small-scale convolutional kernel, adjacent spectral line combination information extracted by a medium-scale convolutional kernel, and broad spectral background trend information extracted by a large-scale convolutional kernel. These three different scales of features are arranged along the channel dimension, each maintaining an independent feature representation. A definite mapping relationship exists between the number of feature positions in the multi-scale spectral features and the number of sampling points in the preset wavelength grid. This mapping relationship is determined by the convolution stride and padding strategy of the multi-scale one-dimensional convolutional neural network and remains constant during feature extraction.
[0028] S3 inputs the multi-scale spectral features into the parallel token mapping module, and generates temperature tokens and concentration tokens simultaneously. The temperature token includes the narrow absorption peak shape features and adjacent spectral line combination features in the multi-scale spectral features, and the concentration token includes the broad spectral band background trend features in the multi-scale spectral features.
[0029] In this invention, local features in multi-scale spectral features refer to the feature components extracted by small-scale and medium-scale convolutional kernels. These feature components mainly encode microscopic morphological information such as peak height, peak width, and asymmetry of narrow absorption peaks, as well as local spectral band combination information such as intensity ratio and inter-peak distance between adjacent spectral lines. They exhibit sensitive responses to changes in energy level population distribution and collisional broadening effects caused by temperature variations. Global features in multi-scale spectral features refer to the feature components extracted by large-scale convolutional kernels. These feature components mainly encode the overall trend of absorption intensity variation with wavelength, the shape of the broadband absorption envelope, and the overall amplitude level of the absorbance spectrum. They exhibit an approximately linear response to absorption scaling caused by concentration changes, while their response to spectral line shape changes caused by temperature is relatively stable. Local and global features are distributed along the feature channel dimension in multi-scale spectral features, and there is a clear channel boundary between them, which is determined by the feature fusion structure of the multi-scale convolutional network.
[0030] In the physical mechanism of ultraviolet broadband absorption spectroscopy, temperature and concentration modulate the spectrum in fundamentally different ways. Temperature changes affect the relative absorption intensity between different transition lines, the full width at half maximum (FWHM) of absorption peaks, and the height ratio of spectral lines within a band by altering the population distribution of molecules at different rotational-vibrational energy levels. Concentration changes, on the other hand, follow the Beer-Lambert law, primarily changing the overall amplitude of absorption peaks, the integrated absorption area, and the absolute level of the absorbance spectrum. If all spectral features are indiscriminately mixed at the feature level, the network will struggle to distinguish whether changes in spectral line intensity ratios are caused by temperature changes or by signal-to-noise ratio changes accompanying concentration changes. To address this issue, this step inputs multi-scale spectral features into a parallel token mapping module, structurally separating temperature-sensitive and concentration-sensitive information in the feature space. Specifically, local features sensitive to changes in relative spectral intensity and band morphology are separated from multi-scale spectral features and aggregated along the temperature information channel to form temperature tokens. These temperature tokens encode information reflecting the molecular energy level population distribution, including spectral intensity ratios, peak widths, and internal band structure. This information is highly correlated with temperature changes but has a weaker direct correlation with absolute concentration values. Simultaneously, global features sensitive to absorption intensity and integral area are separated from the multi-scale spectral features and aggregated along the concentration information channel to form concentration tokens. These concentration tokens encode information such as absorption peak amplitude, integral area, and overall absorbance level. This information is approximately linearly related to the molecular number density of the target component. Both temperature and concentration tokens are fixed-dimensional feature vector sequences, forming the input to the subsequent Transformer encoder. This parallel mapping process generates both temperature and concentration tokens simultaneously in a single forward propagation, rather than through two independent mapping operations. This ensures that the temperature and concentration information channels maintain structural separation in the feature space through their respective independent mapping parameters, reducing mutual interference between temperature and concentration information during feature learning at the network structure level.
[0031] S4. Input the temperature token and concentration token into the Transformer encoder, and use a multi-head self-attention mechanism to perform global interaction between the temperature token and concentration token to obtain fused spectral features.
[0032] Although temperature and concentration tokens maintain structural separation during feature generation, their effects are not entirely independent in actual ultraviolet broadband absorption spectroscopy. Increased temperature alters spectral line intensity and band shape, affecting the correction required for concentration inversion based on absorption intensity; changes in concentration affect the signal-to-noise ratio of the spectral lines, thus impacting the discriminability of temperature-sensitive lines. Therefore, it is necessary to further learn the necessary coupling relationship between the two types of information while maintaining their relative separation. In this step, temperature and concentration tokens are simultaneously input into the Transformer encoder, and a multi-head self-attention mechanism is used to perform global interaction between the two types of tokens. During the self-attention calculation, each token calculates similarity weights with all tokens in the sequence, including internal weights between temperature and concentration tokens, and cross-weights between temperature and concentration tokens. Through parallel computation by multiple independent attention heads, different attention heads can focus on spectral line correlation patterns between different wavelength regions, cross-parameter coupling patterns between temperature and concentration tokens, and the overall consistency and complementarity of the global spectral structure. For example, when a spectral region is affected by noise or baseline perturbation, making its absorption characteristics unreliable, the self-attention mechanism can automatically reduce the attention weight of tokens in that region while increasing the weight of tokens in other undisturbed spectral regions. This extracts compensation information from stable spectra to maintain the overall accuracy of the inversion. Through this self-attention interaction process, temperature and concentration tokens are mapped to fused spectral features. These fused features preserve the relative independence of temperature and concentration information at the physical sensitivity level while encoding the cross-parameter coupling relationship between them through self-attention weights. This allows subsequent multi-task regression networks to decode accurate temperature and concentration predictions separately from the same fused feature.
[0033] S5 inputs the fused spectral features into the multi-task regression network, and obtains the temperature and concentration of the gas to be measured through the temperature output branch and the concentration output branch, respectively.
[0034] The multi-task regression network is the output module of a deep learning model, used to decode the predicted values of temperature and concentration separately from fused spectral features. The multi-task regression network employs a structural design combining shared feature layers and independent output branches. The shared feature layer consists of several stacked fully connected layers, receiving fused spectral features as input and extracting abstract feature representations related to both temperature and concentration through nonlinear transformations, such as the effective energy level distribution features and effective absorption cross-section features implicitly contained in the molecular spectral physics model. Following the shared feature layer, the network splits into two independent fully connected paths: a temperature output branch and a concentration output branch. The temperature output branch consists of one or more fully connected layers, outputting a scalar value as the temperature prediction result; the concentration output branch also consists of one or more fully connected layers, outputting a scalar value as the concentration prediction result. Although the two output branches share the feature representation of the preceding layers, they each have independent weight parameters. This allows the network to optimize the corresponding branch parameters separately during training based on different loss functions for temperature and concentration inversion, avoiding mutual interference between temperature and concentration prediction errors during backpropagation under a single output structure.
[0035] During the training of the deep learning model, the loss function adopts a weighted combination of temperature prediction error and concentration prediction error. Temperature prediction error is a measure of the deviation between the predicted value of the temperature output branch and the temperature label, while concentration prediction error is a measure of the deviation between the predicted value of the concentration output branch and the concentration label. The two error terms are multiplied by preset weighting coefficients and then summed to form the total loss function. The weighting coefficients for temperature and concentration errors can be adjusted according to the different requirements of temperature and concentration inversion accuracy in actual applications. In combustion diagnostic scenarios with higher requirements for temperature inversion accuracy, a larger weighting coefficient can be set for the temperature error term; in environmental monitoring scenarios with higher requirements for concentration inversion accuracy, a larger weighting coefficient can be set for the concentration error term. To further improve the robustness of the model, robustness constraint terms can also be added to the loss function, such as sparsity constraints on the sensitivity weight vector to encourage the model to concentrate temperature sensitivity weights and concentration sensitivity weights on a few key feature locations; or uncertainty constraint terms can be added to make the model output the prediction uncertainty of both temperature and concentration simultaneously, providing a basis for evaluating the reliability of the measurement results. The specific form of the loss function and the hyperparameter settings can be adjusted according to the actual experimental conditions and inversion requirements.
[0036] After global correlation modeling by the Transformer encoder, the fused spectral features already contain rich temperature and concentration-related information. However, this information is still scattered across various dimensions of the fused features as high-dimensional feature vectors, requiring further mapping to specific temperature and concentration scalar values. In this step, the fused spectral features are input into a multi-task regression network, which employs a structure combining a shared feature layer and independent output branches. The shared feature layer performs further nonlinear transformations on the fused spectral features, extracting abstract feature representations that are jointly related to temperature and concentration, such as the effective energy level distribution features and effective absorption cross-section features implicitly corresponding to the molecular spectral physics model. After the shared feature layer, two independent fully connected paths are formed: a temperature output branch and a concentration output branch. The temperature output branch decodes the temperature value from the shared features, and the concentration output branch decodes the concentration value from the shared features. Although the two output branches share the feature representation of the previous layer, they each have independent network parameters, allowing the network to optimize the corresponding output branch parameters separately for different inversion characteristics of temperature and concentration during training. In online applications, the broadband UV absorption spectrum of the gas to be measured undergoes the same preprocessing as during the training phase, and is then input into the trained deep learning model. The model directly outputs the temperature and concentration results through a complete forward propagation from S1 to S5. The entire online inference process does not involve the spectral database retrieval, line function calculation, instrument convolution operation, and iterative parameter optimization steps in full-spectrum fitting, nor does it require spectral difference correction or derivative spectrum calculation, significantly reducing the computation time of a single inversion.
[0037] The inversion method provided by this invention is divided into two independent stages: an offline training stage and an online inference stage. The offline training stage is completed before deployment and mainly includes the construction of training samples and the parameter optimization of the deep learning model. This stage can utilize large-scale samples generated by physical spectral model simulation, calibration samples collected by experimental systems, or a sample set constructed by fusing both. Various physically targeted perturbations can be added during the training process to enhance the model's robustness. The online inference stage is executed in the actual measurement environment. The ultraviolet broadband absorption spectrum of the gas to be measured undergoes the same preprocessing procedure as in the training stage and is then input into the trained deep learning model. The model directly outputs the temperature and concentration results through a complete forward propagation from a multi-scale one-dimensional convolutional neural network to a multi-task regression network. The online inference stage does not involve spectral database retrieval, line function calculation, instrument convolution operations, iterative parameter optimization, reference spectrum selection, spectral difference correction, or derivative spectrum calculation. All calculations only include spectral preprocessing and neural network forward propagation. The computation time for a single inversion is reduced from seconds or minutes in traditional physical fitting methods to milliseconds.
[0038] like Figure 2 As shown, Figure 2 This diagram illustrates the complete data flow process of a deep learning model from input to output: A one-dimensional spectral sequence is first input into a multi-scale one-dimensional convolutional neural network, where multi-scale spectral features are extracted. These features are then input into a parallel token mapping module, which generates temperature and concentration tokens in parallel through structural separation of temperature-sensitive and concentration-sensitive features. The temperature and concentration tokens are then input into a Transformer encoder, where they interact globally through a multi-head self-attention mechanism to obtain fused spectral features. These fused spectral features are input into a multi-task regression network, which outputs temperature and concentration inversion results via temperature and concentration output branches, respectively. This diagram intuitively demonstrates the physical mechanism of ultraviolet broadband absorption spectroscopy—temperature changes primarily alter the relative intensity and band distribution of spectral lines, while concentration changes primarily alter the absorption intensity and integral area—and its correspondence with the deep learning network structure. Specifically, by aggregating temperature-sensitive features with temperature tokens and concentration-sensitive features with concentration tokens, the physical sensitivity separation of temperature and concentration information is achieved at the feature level.
[0039] The above technical solution employs a multi-scale one-dimensional convolutional neural network in the feature extraction stage to simultaneously capture multi-level spectral features such as narrow absorption peak shape, adjacent spectral line combinations, and broad spectral background trends. In the feature mapping stage, a parallel mapping mechanism for temperature and concentration tokens is introduced to structurally separate temperature-sensitive and concentration-sensitive features. In the global modeling stage, the self-attention mechanism of the Transformer encoder is used to maintain the relative independence of the two types of tokens through global interaction. In the output stage, a multi-task regression network is used to decode temperature and concentration separately from the fused features. This enables the entire inversion process to complete the rapid mapping from ultraviolet broadband absorption spectrum to temperature and concentration in a single neural network forward propagation. At the same time, the structural separation of physically sensitive features effectively suppresses the error propagation caused by the mutual coupling of temperature and concentration information in the feature space. Under measurement perturbation conditions such as light source fluctuations, baseline drift, and weak absorption, the accuracy and stability of the inversion results are maintained.
[0040] like Figure 3 As shown, Figure 3This paper presents the concentration inversion results over time obtained using the traditional full-spectrum physical fitting method and the deep learning inversion method based on multi-scale CNN-Transformer of this invention, under the same long-term continuous measurement conditions. The comparison results show that the traditional physical fitting method is affected by measurement perturbations such as light source fluctuations, baseline drift, and wavelength shifts during long-term measurements, resulting in a large fluctuation range in the concentration inversion results. In contrast, the method of this invention, by structurally separating temperature-sensitive and concentration-sensitive information at the feature level and enhancing the model with targeted physical perturbations during the training phase, enables the model to stably extract concentration-related information from the perturbed spectrum. This significantly narrows the fluctuation range of the concentration inversion results, demonstrating better long-term measurement stability and effectively overcoming the drift problem of inversion results caused by changes in the measurement system state during long-term continuous monitoring using the traditional physical fitting method.
[0041] Specifically, in step S3, the multi-scale spectral features are input into the parallel token mapping module to generate temperature tokens and concentration tokens simultaneously, including the following sub-steps: S31. Sensitivity assignment is performed on the multi-scale spectral features to obtain a temperature sensitivity weight vector and a concentration sensitivity weight vector. The temperature sensitivity weight vector is used to indicate the temperature-sensitive part of the multi-scale spectral features, and the concentration sensitivity weight vector is used to indicate the concentration-sensitive part of the multi-scale spectral features.
[0042] Sensitivity assignment refers to the operation of generating a set of weight coefficients for each feature location of a multi-scale spectral feature. These weight coefficients include a temperature sensitivity weight value and a concentration sensitivity weight value, representing the relative contribution of that feature location to temperature and concentration inversion, respectively. The core purpose of sensitivity assignment is to distinguish and label temperature-sensitive and concentration-sensitive information at the feature level, enabling subsequent weighted aggregation operations to direct them to temperature or concentration tokens based on the physical sensitivity of each feature location. The results of sensitivity assignment are a temperature sensitivity weight vector and a concentration sensitivity weight vector. Both weight vectors have the same dimension as the number of feature locations in the multi-scale spectral feature, and each element in the vector corresponds to a sensitivity weight value for a feature location. Specific implementation methods for sensitivity assignment include a pre-defined method based on known spectral line data of the target component and an automatic learning method based on the deep learning model training process. Both methods aim to generate weight vectors that accurately reflect the temperature and concentration sensitivity of each feature location.
[0043] Multi-scale spectral features contain multi-level spectral information, ranging from narrow absorption peak shapes to broad spectral band background trends. These information exhibits significantly different sensitivities to temperature and concentration. Some feature locations primarily respond to changes in relative spectral line intensity and peak width, showing sensitivity to temperature changes but a weak direct response to absolute concentration values. Other feature locations primarily respond to changes in absorption amplitude and integral area, showing sensitivity to concentration changes but a relatively stable response to temperature-induced changes in spectral line shape. To effectively separate temperature-sensitive and concentration-sensitive information in the feature space, sensitivity assignment is first required for the multi-scale spectral features. This involves generating a pair of weighting coefficients for each feature location, representing its sensitivity to temperature and concentration, respectively. The sensitivity assignment can be automatically learned during the training of a deep learning model or pre-defined based on known spectral line data of the target component. In the learning mode, the model automatically discovers which activation modes of multi-scale spectral features are highly correlated with temperature labels and which are highly correlated with concentration labels through a large number of training samples containing different combinations of temperature and concentration. Based on this, it assigns corresponding temperature sensitivity weights and concentration sensitivity weights to each feature location. In the preset mode, based on parameters such as the low-state energy level and temperature dependence coefficient of the line intensity of each absorption line recorded in the standard spectral database, it pre-determines which wavelength ranges on a preset wavelength grid are sensitive to temperature changes and which are approximately linearly sensitive to concentration changes. Based on this, it sets fixed sensitivity weights for the corresponding feature locations. In the temperature sensitivity weight vector, feature locations corresponding to wavelength ranges sensitive to changes in spectral intensity ratio and peak shape are assigned higher weights, while feature locations corresponding to wavelength ranges where absorption intensity does not change significantly with temperature are assigned lower weights. In the concentration sensitivity weight vector, feature locations corresponding to wavelength ranges where the absorption peak body and integral area contribute significantly are assigned higher weights, while feature locations corresponding to wavelength ranges with weak absorption and susceptibility to noise interference are assigned lower weights. The temperature sensitivity weight vector and concentration sensitivity weight vector obtained through sensitivity allocation indicate which parts of the multi-scale spectral features are sensitive to temperature and which are sensitive to concentration, respectively, providing clear physical guidance for subsequent feature weighting aggregation. In the combustion diagnostic scenario, if the target component is an OH radical, its rotational spectral line group near 308 nm is highly sensitive to temperature changes, and the temperature sensitivity weight vector will receive higher weights at these spectral line positions. In the environmental monitoring scenario, if the target component is sulfur dioxide, it has a broad absorption band in the range of 280 nm to 320 nm, and the absorption cross-section is relatively less dependent on temperature changes, so the concentration sensitivity weight vector will receive higher weights in the main region of the absorption band.
[0044] S32, weighted aggregation of multi-scale spectral features according to temperature sensitivity weight vector, to obtain temperature token.
[0045] For temperature token generation, each feature position in the multi-scale spectral features is weighted according to the weight value of the corresponding position in the temperature sensitivity weight vector. Feature positions with higher weights contribute more to the temperature token, while feature positions with lower weights contribute less. The weighted features are then aggregated along the feature position dimension to obtain the temperature token. The temperature token mainly retains feature components related to temperature-sensitive information such as relative spectral intensity, peak width, and the proportion of internal band structure, while feature components that are proportional to the absolute absorption amplitude but are not sensitive to temperature are suppressed during the weighted aggregation process.
[0046] S33, weighted aggregation of multi-scale spectral features according to concentration sensitivity weight vector to obtain concentration token.
[0047] For the generation of concentration tokens, multi-scale spectral features are weighted and aggregated according to the concentration sensitivity weight vector. The feature positions with higher weights correspond to the main body of the absorption peak and the regions that contribute significantly to the integral area. These regions respond significantly to concentration changes. The aggregated concentration tokens mainly encode concentration-sensitive information such as absorption intensity, integral area, and overall absorbance amplitude.
[0048] Both temperature and concentration tokens are fixed-dimensional feature vector sequences, with each vector corresponding to a token unit. All token units together constitute the input sequence of the Transformer encoder. Although temperature and concentration tokens are generated in parallel and maintain their own independent feature representations, they both originate from the same multi-scale spectral features. They simply project and aggregate the same feature space with different emphases using different weight vectors.
[0049] Temperature and concentration tokens are the basic sequence units input to the Transformer encoder. Temperature tokens are feature vector sequences obtained by weighting and aggregating multi-scale spectral features according to a temperature sensitivity weight vector. Each feature vector is a fixed-dimensional vector that encodes temperature-sensitive local features within the multi-scale spectral features, specifically including spectral expressions related to molecular energy level population distribution, such as relative intensity ratios of spectral lines, absorption peak widths, and the proportion of internal band structures. Concentration tokens are feature vector sequences obtained by weighting and aggregating multi-scale spectral features according to a concentration sensitivity weight vector. Each feature vector is a fixed-dimensional vector that encodes concentration-sensitive global features within the multi-scale spectral features, specifically including absorption peak amplitudes, integrated absorption areas, and overall absorbance levels, such as spectral expressions related to the molecular number density of the target component. The temperature and concentration token sequences together form a unified token sequence when input to the Transformer encoder. Each token unit in the sequence has the same vector dimension to facilitate unified similarity calculations by the self-attention mechanism.
[0050] The temperature information channel refers to the computational path in a deep learning model dedicated to processing and transmitting temperature-sensitive features. This channel begins with a parallel token mapping module, generating temperature tokens through a weighted aggregation operation of temperature sensitivity weight vectors. These tokens are then mapped to a temperature token embedding space via an independent temperature embedding matrix, ultimately transmitting the temperature-sensitive information to the temperature output branch of the Transformer encoder and the multi-task regression network. The concentration information channel refers to the computational path in a deep learning model dedicated to processing and transmitting concentration-sensitive features. This channel begins with a parallel token mapping module, generating concentration tokens through a weighted aggregation operation of concentration sensitivity weight vectors. These tokens are then mapped to a concentration token embedding space via an independent concentration embedding matrix, ultimately transmitting the concentration-sensitive information to the concentration output branch of the Transformer encoder and the multi-task regression network. The temperature and concentration information channels maintain structural separation at the parameter level through their respective independent mapping and embedding parameters, but they interact in a controlled manner during the self-attention computation of the Transformer encoder.
[0051] The temperature sensitivity weight vector and concentration sensitivity weight vector are learned by the deep learning model during training or pre-set based on known spectral data of the target component. During training, the specific values of the temperature sensitivity weight vector and concentration sensitivity weight vector are continuously updated and adjusted as the model parameters are optimized. If a pre-set fixed weight method is used, the weight vector values are determined once before training based on the spectral database information of the target component and are not adjusted during training. Regardless of whether a learned or pre-set method is used, the temperature sensitivity weight vector and concentration sensitivity weight vector together complete the feature mapping process from undifferentiated multi-scale spectral features to physically sensitive token representations. This ensures that temperature and concentration information are structurally separated at the feature level before entering the Transformer encoder, effectively reducing the mutual interference between temperature and concentration effects in subsequent feature interactions.
[0052] The aforementioned technical solution, which generates temperature and concentration tokens through sensitivity allocation and weighted aggregation, embeds the physical differences in ultraviolet broadband absorption spectra—that temperature changes mainly affect the relative intensity and band distribution of spectral lines, while concentration changes mainly affect absorption intensity and integral area—into the feature mapping mechanism of a deep learning model. By assigning temperature and concentration sensitivity weights to each feature location of multi-scale spectral features and performing weighted aggregation separately, structural separation of temperature-sensitive and concentration-sensitive information is achieved in the feature space. This allows temperature and concentration tokens to carry spectral features with different physical orientations, reducing the mutual interference between temperature and concentration information during feature extraction at the network structure level. This provides a physically interpretable feature foundation for subsequent global interactive modeling of the Transformer encoder and parameter output of the multi-task regression network.
[0053] In one embodiment of the present invention, the temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training through a learnable gating network. Step S31, which assigns sensitivity to multi-scale spectral features, includes the following sub-steps: S31a1 inputs multi-scale spectral features into a learnable gating network, which then outputs the temperature gating coefficient and concentration gating coefficient corresponding to each feature position in the multi-scale spectral features.
[0054] Feature positions refer to the position indices in a multi-scale spectral feature sequence. Each feature position corresponds to a feature vector, which encodes the multi-scale spectral information within a wavelength neighborhood on a preset wavelength grid. A correspondence exists between feature positions and wavelength positions on the preset wavelength grid, established by the feature extraction process of a multi-scale one-dimensional convolutional neural network. When the convolution stride is one and an appropriate padding strategy is used, the number of feature positions in the multi-scale spectral features is the same as the number of wavelength sampling points on the preset wavelength grid; each feature position directly corresponds to a wavelength sampling point and its neighborhood. When the convolution stride is greater than one, the number of feature positions in the multi-scale spectral features is less than the number of wavelength sampling points; each feature position corresponds to a downsampled wavelength interval. During sensitivity allocation, weights are assigned using feature positions as the basic unit, with each feature position receiving a temperature sensitivity weight value and a concentration sensitivity weight value.
[0055] In this embodiment, the temperature sensitivity weight vector and concentration sensitivity weight vector are not pre-set manually based on the spectral database of the target component, but are automatically generated during model training by a learnable gating network integrated within the parallel token mapping module. The learnable gating network receives multi-scale spectral features as input, which are extracted from previous steps by a multi-scale one-dimensional convolutional neural network and include different levels of spectral representation such as narrow absorption peak shape, adjacent spectral line combinations, and broad spectral band background trends. The learnable gating network is typically composed of several stacked fully connected layers, but can also be implemented using one-dimensional convolutional layers. An activation function layer is placed at the end of the network to constrain the output value to a preset numerical range. During forward propagation, the learnable gating network calculates two independent scalar output values for each feature location of the multi-scale spectral features: one is the temperature gating coefficient corresponding to that feature location, and the other is the concentration gating coefficient corresponding to that feature location. The temperature gating coefficient characterizes the relative importance of that feature location to the temperature inversion task, and the concentration gating coefficient characterizes the relative importance of that feature location to the concentration inversion task. In the initial training phase, the weight parameters of the learnable gating network are randomly initialized, and the temperature gating coefficients and concentration gating coefficients output at each feature location show a relatively uniform distribution. A differentiated weight allocation pattern for different wavelength regions has not yet been formed.
[0056] As the training process progresses, the deep learning model uses backpropagation to optimize a weighted combination of temperature and concentration prediction errors, simultaneously updating the parameters of the learnable gating network and other network modules. Under supervision with a large number of training samples containing different combinations of temperature and concentration, the learnable gating network gradually discovers the statistical correlations between different feature locations in multi-scale spectral features and temperature and concentration labels. For feature locations in multi-scale spectral features that are highly correlated with temperature changes, such as those located in the wavelength range of temperature-sensitive spectral lines of the target component and encoding information on the relative intensity ratio and peak width, the learnable gating network automatically assigns them higher temperature gating coefficients and lower concentration gating coefficients during training. For feature locations in multi-scale spectral features that are highly correlated with concentration changes, such as those located in the main region of absorption peaks and encoding information on absorption amplitude and integral area, the learnable gating network automatically assigns them higher concentration gating coefficients and lower temperature gating coefficients. In combustion diagnostics, if the analyte is OH radicals in a high-temperature flame, the learnable gating network, after sufficient training, will automatically assign high temperature gating coefficients to the characteristic positions of the rotational spectral line group around 308 nm corresponding to OH radicals in the ultraviolet band. This is because the activation modes of these characteristic positions show significant differences under different temperature conditions, providing important reference value for temperature inversion. Simultaneously, it will assign high concentration gating coefficients to characteristic positions in the corresponding absorption bands that contribute significantly to the integral area. In environmental monitoring, if the analyte is sulfur dioxide in flue gas, the learnable gating network will automatically learn during training that the main region of the broad absorption band of sulfur dioxide in the 280 nm to 320 nm range contributes the most to concentration inversion, and will assign high concentration gating coefficients to the characteristic positions corresponding to these wavelength ranges. This automatic learning mechanism allows the sensitivity allocation strategy to adaptively adjust for different target components and different measurement bands, eliminating the need for manual wavelength range division and fixed threshold settings when changing application scenarios.
[0057] S31a2 combines the temperature gating coefficients of each feature location into a temperature sensitivity weight vector, and combines the concentration gating coefficients of each feature location into a concentration sensitivity weight vector.
[0058] After the learnable gating network outputs temperature and concentration gating coefficients for each feature location of the multi-scale spectral features, these dispersed scalar coefficients need to be ordered according to the spatial order of the feature locations to form complete temperature sensitivity weight vectors and concentration sensitivity weight vectors. The temperature sensitivity weight vector is combined as follows: the temperature gating coefficients corresponding to each feature location are arranged sequentially according to their original position in the multi-scale spectral features, forming a one-dimensional weight vector with the same number of feature locations as the multi-scale spectral features. The first element in the vector corresponds to the temperature gating coefficient of the first feature location in the multi-scale spectral feature sequence, the second element corresponds to the temperature gating coefficient of the second feature location, and so on, until all feature locations are covered. The concentration sensitivity weight vector is combined in the same way: the concentration gating coefficients corresponding to each feature location are arranged sequentially in the same spatial order, forming another one-dimensional weight vector with the same number of feature locations. The combined temperature sensitivity weight vector and concentration sensitivity weight vector have dimensions that completely correspond to the number of feature locations in the multi-scale spectral features, and the value of each element in the vector directly reflects the contribution weight of the corresponding feature location in temperature or concentration inversion. After sufficient training, elements with higher values in the temperature sensitivity weight vector are typically concentrated near the feature positions corresponding to the temperature-sensitive spectral lines of the target component, while elements with higher values in the concentration sensitivity weight vector are typically concentrated near the main absorption peak region and feature positions with large contributions to the integral area. The temperature sensitivity weight vector and the concentration sensitivity weight vector exhibit a complementary but not mutually exclusive relationship in their numerical distribution: a feature position can simultaneously possess moderate levels of both temperature and concentration gating coefficients, indicating that this feature position contains both a certain degree of temperature-sensitive information and a certain degree of concentration-sensitive information. The combined temperature sensitivity weight vector and concentration sensitivity weight vector are then passed to sub-steps S32 and S33, respectively, for weighted aggregation operations on multi-scale spectral features, thereby generating temperature tokens and concentration tokens.
[0059] The aforementioned technical solution, which generates temperature and concentration gating coefficients through a learnable gating network and combines them into a sensitivity weight vector, parameterizes the determination process of the sensitivity allocation strategy into a trainable sub-network within the deep learning model. This allows the distinction criteria between temperature-sensitive and concentration-sensitive features to be automatically learned from the training data, rather than relying on manual pre-division of fixed wavelength ranges based on a spectral database. This learnable sensitivity allocation mechanism, while maintaining the structural constraint of separating the physical sensitivity of temperature and concentration tokens, endows the model with the ability to adaptively adjust the weight allocation strategy for different target components and measurement conditions. This ensures that the sensitivity allocation results are adapted to the data distribution characteristics of the specific inversion task, thus automatically establishing a sensitivity allocation pattern suitable for the new scenario without requiring manual parameter resetting when changing the target component or application scenario.
[0060] In another embodiment of the present invention, the temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training through an attention mechanism. Step S31, which assigns sensitivity to multi-scale spectral features, includes the following sub-steps: S31b1, calculate multi-head self-attention weights for multi-scale spectral features. The multi-head self-attention weights include at least a first attention head and a second attention head. The first attention head is used to learn to focus on temperature-sensitive spectral features during training, and the second attention head is used to learn to focus on concentration-sensitive spectral features during training.
[0061] In this embodiment, the temperature sensitivity weight vector and concentration sensitivity weight vector are learned during model training through a multi-head self-attention mechanism, rather than using an independent learnable gating network. The core operation of the multi-head self-attention mechanism is to calculate the correlation weights between each feature position in the input multi-scale spectral feature sequence, capturing the correlation patterns between features from different angles through multiple parallel attention heads. In this embodiment, the multi-head self-attention weights include at least a first attention head and a second attention head, which are guided to different focusing directions during training. The first attention head is used to learn to focus on temperature-sensitive spectral features during training, and its attention weight distribution gradually concentrates on feature positions in the multi-scale spectral features that are highly correlated with temperature changes. These feature positions typically correspond to regions in the UV absorption spectrum of the target component where the relative intensity of spectral lines changes significantly with temperature, such as the rotational spectral line group of OH radicals near 308 nm and the vibrational-rotational band of NO near 226 nm. In these wavelength regions, the difference in the population of different rotational-vibrational energy levels with temperature leads to a significant change in the absorption intensity ratio between the corresponding spectral lines. The first attention head automatically discovers this statistical regularity during training and assigns higher attention weights to these feature positions. The second attention head is used during training to learn to focus on concentration-sensitive spectral features. Its attention weight distribution gradually concentrates on feature locations within the multi-scale spectral features that are highly correlated with absorption intensity and integral area. These feature locations typically correspond to the main regions of the spectral bands where the target component has a large absorption cross-section and exhibits an approximately linear response to concentration changes. The second attention head automatically assigns higher attention weights to these feature locations during training. Initially, the weight distributions of the first and second attention heads are not differentiated, and their areas of interest may overlap significantly. As training progresses, temperature prediction errors and concentration prediction errors are backpropagated to differentiate the parameters of the two attention heads. The first attention head gradually focuses on temperature-sensitive feature regions, while the second attention head gradually focuses on concentration-sensitive feature regions. The areas of interest for the two attention heads gradually separate, forming a physically directional differentiated attention weight distribution. In a combustion diagnostic scenario, if the test gas is OH radicals in a high-temperature flame, after sufficient training, the high-weight region of the first attention head is concentrated at wavelengths where the intensity of the OH radical rotational spectral line is more sensitive to temperature changes, while the high-weight region of the second attention head is concentrated at wavelengths where the integral area of the absorption band contributes significantly. In environmental monitoring scenarios, if the gas to be measured is sulfur dioxide in flue gas, the high-weight region of the first attention point is concentrated in the wavelength range where the spectral shape of the sulfur dioxide absorption band changes significantly with temperature, while the high-weight region of the second attention point is concentrated in the wavelength range of the main absorption region where the concentration change is significant.
[0062] S31b2, the attention weights output by the first attention head are used as the temperature sensitivity weight vector, and the attention weights output by the second attention head are used as the concentration sensitivity weight vector.
[0063] After the multi-head self-attention mechanism completes the attention weight calculation, the attention weight distribution output by the first attention head is directly used as the temperature sensitivity weight vector, and the attention weight distribution output by the second attention head is directly used as the concentration sensitivity weight vector. The attention weight output by the first attention head is a one-dimensional vector with the same number of feature positions as the multi-scale spectral features. The value of each element in the vector represents the contribution weight of the corresponding feature position in the aggregation of temperature-sensitive features. Since the first attention head has already learned to focus on temperature-sensitive spectral features during training, its output attention weights are higher at temperature-sensitive feature positions and lower at temperature-insensitive feature positions. Therefore, it can be directly used as the temperature sensitivity weight vector without additional transformation or combination operations. Similarly, the attention weight output by the second attention head is also a one-dimensional vector with the same number of feature positions. High weight values are concentrated at feature positions with large contributions from absorption intensity and integral area, while low weight values are concentrated at feature positions with weak absorption or insignificant response to concentration changes. This can be directly used as the concentration sensitivity weight vector. The operation of using the attention weights output by the first attention head as the temperature sensitivity weight vector and the attention weights output by the second attention head as the concentration sensitivity weight vector essentially corresponds the functional alignment between the differentiated focusing capabilities of the multi-head attention heads in the self-attention mechanism and the requirement for separating temperature and concentration physical sensitivities. This makes the weight learning process of the attention heads naturally become the learning process of the sensitivity allocation strategy. The temperature sensitivity weight vector and the concentration sensitivity weight vector are then passed to sub-steps S32 and S33, respectively, for weighted aggregation of multi-scale spectral features to generate temperature tokens and concentration tokens. Compared with the implementation method of learnable gating networks, this implementation utilizes the inherent multi-head parallel computing structure of the multi-head self-attention mechanism. Sensitivity allocation is achieved by assigning different physical sensitivity focusing tasks to different attention heads, without needing to add an additional independent gating network sub-module to the parallel token mapping module. In implementation scenarios with more than two multi-head attention heads, other attention heads besides the first and second attention heads can be used to focus on other physical sensitive factors or spectral background features, providing richer feature discrimination dimensions for sensitivity allocation.
[0064] The aforementioned technical solution for sensitivity allocation through a multi-head self-attention mechanism leverages the inherent characteristic of multiple attention heads in the self-attention mechanism to compute in parallel and learn different feature association patterns. The first attention head is configured to automatically focus on temperature-sensitive spectral features during training, and the second attention head is configured to automatically focus on concentration-sensitive spectral features. The attention weights output by the two attention heads are directly used as temperature-sensitive and concentration-sensitive weight vectors, respectively. This allows the learning process of the sensitivity allocation strategy to be naturally embedded into the computation flow of the multi-head self-attention mechanism. It achieves differentiated allocation of temperature-sensitive and concentration-sensitive features at the weight level without adding additional network sub-modules, simplifies the structural design of the parallel token mapping module, and maintains the adaptive capability of the sensitivity allocation strategy to the distribution characteristics of the training data.
[0065] In one embodiment of the present invention, the temperature sensitivity weight vector and the concentration sensitivity weight vector are pre-set based on known spectral line data of the target component. Step S31, which assigns sensitivity to multi-scale spectral features, includes the following sub-steps: S31c1, based on the sensitivity of each spectral line position to temperature changes in the known spectral line database of the target component, determines the first wavelength range that is sensitive to temperature and the second wavelength range that is sensitive to concentration on the preset wavelength grid.
[0066] In this embodiment, the temperature sensitivity weight vector and concentration sensitivity weight vector are not automatically learned through model training, but are pre-set based on the known spectral line data of the target component before model training. The known spectral line database of the target component is a fundamental data resource in the field of molecular spectroscopy, such as HITRAN, HITEMP, or dedicated spectral line databases for specific free radicals, which include key parameters such as the center wavelength position, line intensity, low-state energy level, and temperature dependence coefficient of each absorption line. Based on these spectral line parameters, the sensitivity of the absorption characteristics at each wavelength position to temperature changes can be quantitatively assessed. For temperature sensitivity analysis, the absorption intensity of spectral lines with lower and higher low-state energy levels shows different trends with temperature changes. The intensity ratio between two spectral lines with significantly different low-state energy levels is most sensitive to temperature changes. The wavelength positions of these spectral lines and their neighborhoods constitute the first wavelength interval that is sensitive to temperature. The first wavelength interval typically corresponds to a spectral region where the rotational spectral line structure of the target component is dense and the low-state energy level distribution of each line is relatively wide. For concentration sensitivity analysis, the main regions of spectral bands with large absolute absorption cross-sections and low temperature dependence coefficients exhibit an approximately linear response to concentration changes. These regions constitute the concentration-sensitive second wavelength range. The second wavelength range typically corresponds to the spectral region in the target component's rotational bands where the absorption cross-section is largest and the spectral intensity changes relatively smoothly with temperature. The specific boundaries of the wavelength range are determined based on the spectral line position parameters and temperature dependence characteristics recorded in the spectral database, and must be aligned with the sampling points of the preset wavelength grid. In combustion diagnostic scenarios, if the target component is an OH radical, the first wavelength range can be set to cover the wavelength region of the OH radical rotational spectral line group in the range of 306 nm to 310 nm. Within this region, the low-state energy levels of each rotational spectral line are widely distributed, and the spectral intensity is highly sensitive to temperature changes. The second wavelength range can be set to cover the main peak region in the OH radical absorption bands where the absorption cross-section is large and relatively insensitive to temperature changes. In environmental monitoring scenarios, if the target component is sulfur dioxide, the first wavelength range can be set to the region where the spectral shape of sulfur dioxide changes significantly with temperature, within the range of 285 nm to 295 nm. The second wavelength range can be set to the region where the absorption cross-section is large and the main absorption characteristics are stable, within the range of 290 nm to 310 nm. The first and second wavelength ranges may partially overlap or be completely separate on the wavelength axis, depending on the specific characteristics of the target component's spectrum.
[0067] S31c2, reset the weights of the feature positions corresponding to the first wavelength range to a first preset value, and reset the weights of the remaining feature positions to a second preset value to obtain a temperature sensitivity weight vector. Reset the weights of the feature positions corresponding to the second wavelength range to the first preset value, and reset the weights of the remaining feature positions to the second preset value to obtain a concentration sensitivity weight vector.
[0068] After determining the first and second wavelength intervals, the wavelength interval division results are mapped to the feature location indices of the multi-scale spectral features. A preset weight value is assigned to each feature location, forming a temperature sensitivity weight vector and a concentration sensitivity weight vector. For the generation of the temperature sensitivity weight vector, all feature locations of the multi-scale spectral features are traversed. The weight value corresponding to the feature location within the first wavelength interval is set to the first preset value, and the weight value corresponding to the feature location outside the first wavelength interval is set to the second preset value. The first preset value is usually set to a value close to one, indicating that the feature location has a high contribution weight to temperature inversion; the second preset value is usually set to a value close to zero, indicating that the feature location has a very low contribution weight to temperature inversion. The resulting temperature sensitivity weight vector exhibits a binary distribution: feature locations within the first wavelength interval have high weights, and other feature locations have low weights. For the generation of the concentration sensitivity weight vector, the same operation is used: the weight value corresponding to the feature location within the second wavelength interval is set to the first preset value, and the weight value corresponding to the feature location outside the second wavelength interval is set to the second preset value, forming a concentration sensitivity weight vector. The temperature sensitivity weight vector and concentration sensitivity weight vector are generated once before training begins and remain fixed throughout the training and inference process, unchanged by model parameter updates. Compared to continuous-value weight vectors generated by learnable gating networks, weight vectors generated based on fixed physical priors have explicit physical interpretability; the weight value at each feature location directly corresponds to the known sensitivity of the wavelength range to temperature or concentration. After generation, the temperature sensitivity weight vector and concentration sensitivity weight vector are passed to sub-steps S32 and S33, respectively, for weighted aggregation of multi-scale spectral features to generate temperature and concentration tokens. When changing the target component or measurement band, the sensitivity allocation strategy can be switched simply by redetermining the first and second wavelength ranges based on the known spectral line database of the new target component and updating the corresponding preset weight vector values, without retraining the model.
[0069] The aforementioned technical solution, which pre-defines sensitivity weight vectors based on known spectral line data of the target component, utilizes physical parameters such as spectral line positions, low-state energy levels, and temperature dependence coefficients recorded in mature spectral line databases in the field of molecular spectroscopy. Before model training, it determines the first wavelength range sensitive to temperature and the second wavelength range sensitive to concentration. By assigning binary weights, the known physical prior knowledge is directly injected into the sensitivity allocation stage of the parallel token mapping module. This makes the feature aggregation process of temperature tokens and concentration tokens have a clear physical basis and full interpretability, avoiding the amount of training data and training time overhead required by the learning method. It is particularly suitable for application scenarios where the spectral parameters of the target component are known and the measurement conditions are relatively stable.
[0070] Specifically, in step S2, the one-dimensional spectral sequence is input into a multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, including the following sub-steps: S21, input the one-dimensional spectral sequence into the first convolutional branch, the second convolutional branch, and the third convolutional branch respectively. The first convolutional branch uses the first convolutional kernel scale to extract the peak shape features of narrow absorption peaks. The second convolutional branch uses the second convolutional kernel scale, which is larger than the first convolutional kernel scale, to extract the combination features of adjacent spectral lines. The third convolutional branch uses the third convolutional kernel scale, which is larger than the second convolutional kernel scale, to extract the background trend features of wide spectral bands.
[0071] One-dimensional spectral sequences simultaneously contain multiple levels of spectral structural information: narrow absorption peaks resulting from single-molecule transitions have specific center wavelengths, peak heights, and full width at half maximum (FWHM). These microscopic peak shape features are highly sensitive to temperature-induced changes in energy level population and collisional broadening effects; the relative intensity relationships and interpeak distances between adjacent absorption peaks reflect the population distribution ratios between different rotational-vibrational energy levels, serving as important evidence for temperature diagnosis; the broad band envelope reflects the overall trend of absorption intensity variation with wavelength, including both the broadband absorption contribution of the target component and potentially slowly changing background signals such as the spectral envelope of the light source and baseline drift. To fully capture the aforementioned spectral information at different scales within the same feature representation, this sub-step inputs the one-dimensional spectral sequence into three parallel one-dimensional convolution branches, each using a convolution kernel of a different size. The first convolution branch uses the first convolution kernel scale, with its kernel covering several sampling points along the wavelength dimension, and its receptive field range is on the same order of magnitude as the FWHM of a typical narrow absorption peak. During convolution operations, small-sized convolution kernels generate the strongest activation response at the apex of narrow absorption peaks, while the response is weaker at the flanks and baseline of the absorption peaks. This effectively extracts local peak shape features such as the center position, peak height, and peak width of the absorption peak. For typical rotation-resolved absorption lines in the ultraviolet band, their full width at half maximum (FWHM) is typically on the order of a few nanometers to a few nanometers under normal or low pressure conditions. The first convolution kernel scale is designed accordingly with several wavelength sampling points to ensure a fine characterization of the shape of individual absorption peaks. The second convolution branch uses a second convolution kernel scale, which is larger than the first convolution kernel scale. Its receptive field can cover the wavelength interval between two or more adjacent absorption peaks. In typical applications such as combustion diagnostics or environmental monitoring, the interval between adjacent rotational spectral lines in the absorption spectrum of target components in the ultraviolet band is typically a few nanometers to several nanometers. The second convolution kernel scale is set accordingly, enabling the second convolution branch to simultaneously sense the intensity differences, inter-peak distances, and local band shapes of adjacent spectral lines, thereby extracting combined features reflecting the population ratios of different energy levels. The third convolutional branch uses the third convolutional kernel scale, which is larger than the second convolutional kernel scale. Its receptive field covers the entire spectral band or a wider region within the spectral band, enabling smooth perception of the slow change trend of absorbance with wavelength and extraction of broadband background trend features, including the shape of the broadband absorption envelope, the baseline of the overall absorption level, and wavelength-related background changes introduced by the optical system.
[0072] S22 fuses the outputs of the first, second, and third convolutional branches to obtain multi-scale spectral features.
[0073] While the feature maps output by the first, second, and third convolutional branches may differ in spatial size due to variations in kernel scale, padding or stride adjustments can be used to ensure that the feature sequences output by each branch maintain the same length along the wavelength dimension. The outputs of the three convolutional branches are concatenated along the feature channel dimension. Specifically, for each wavelength position, all feature channels output by the first, second, and third convolutional branches at that position are sequentially arranged to form an extended feature vector at that position. The concatenated feature sequence constitutes the multi-scale spectral features, where each feature position simultaneously contains narrow absorption peak shape information extracted by small-scale convolution, adjacent spectral line combination information extracted by medium-scale convolution, and broad spectral background trend information extracted by large-scale convolution. During concatenation, features at different scales remain independent, without cross-scale weighting or mixing. This allows the subsequent parallel token mapping module to access feature components at different scales and apply differentiated weights based on sensitivity allocation requirements. For example, in the generation of temperature tokens, the narrow peak shape features extracted by the first convolutional branch and the adjacent spectral line combination features extracted by the second convolutional branch receive higher temperature sensitivity weights due to their sensitivity to changes in relative spectral line intensity and peak width. Similarly, in the generation of concentration tokens, the broad spectral background trend features and some local features related to absorption amplitude extracted by the third convolutional branch receive higher concentration sensitivity weights due to their sensitivity to absorption intensity and integral area. By fusing the outputs of the three convolutional branches in a concatenated manner rather than summing or averaging, the distinguishability of features at different scales is ensured after fusion, providing the necessary feature granularity guarantee for accurately distinguishing between temperature-sensitive and concentration-sensitive features in the subsequent sensitivity allocation step.
[0074] The above-mentioned design of three parallel convolutional branches of the multi-scale one-dimensional convolutional neural network, by setting convolutional kernels with three different receptive fields of small, medium and large size, corresponds to the spectral structure of three different spatial scales in the ultraviolet broadband absorption spectrum: narrow absorption peak shape, adjacent spectral line combination and wide spectral band background trend. The outputs of the three branches are fused by splicing feature channels, so that the multi-scale spectral features simultaneously retain multi-level spectral expressions from microscopic peak shape to macroscopic spectral band, providing a rich and granular feature foundation for effectively distinguishing temperature-sensitive features and concentration-sensitive features based on physical sensitivity in subsequent steps.
[0075] Specifically, the third convolutional branch uses dilated convolution, which has a larger receptive field than non-dilated convolution with the same kernel size.
[0076] In this embodiment, the third convolution branch uses dilated convolution instead of standard convolution. In standard convolution, the kernel elements are spatially continuous, and the receptive field size is linearly related to the kernel scale. Dilated convolution introduces a fixed interval between the kernel elements, i.e., inserting zero-value padding between adjacent kernel elements, thus expanding the wavelength range actually covered by the kernel under the same kernel scale parameter. For broadband ultraviolet absorption spectroscopy background trend extraction tasks, the absorption band envelope typically spans tens to hundreds of wavelength sampling points, while the spatial scale of background changes such as baseline drift and light source spectral envelope is even larger. If standard convolution is used, covering such a wide wavelength range requires a very large kernel scale, leading to a significant increase in the number of parameters and a high risk of overfitting. By using dilated convolution, the third convolution branch can obtain a receptive field several times larger than that of standard convolution without increasing the number of kernel parameters, thereby capturing broadband background trend features more efficiently. In environmental monitoring scenarios, when the gas to be measured is sulfur dioxide, its broad absorption band spans a large range from 280 nm to 320 nm. The third convolution branch of dilated convolution can cover the entire band envelope with fewer parameters, and the extracted absorption background trend features are more complete and smooth, providing more reliable broad-scale spectral background information for the subsequent generation of concentration tokens.
[0077] Furthermore, in step S22, the fusion is achieved by concatenating the outputs of the first convolutional branch, the second convolutional branch, and the third convolutional branch along the feature channel dimension.
[0078] In this embodiment, the fusion operation in step S22 is specifically implemented using feature channel concatenation. The outputs of the first, second, and third convolutional branches are each a feature sequence, with each feature position containing multiple feature channels. The number of feature channels output by different convolutional branches can be the same or different. The specific process of the concatenation operation is as follows: For each feature position, all feature channels output by the first, second, and third convolutional branches at that position are sequentially concatenated in a preset order to form an extended feature vector. The number of channels in this extended feature vector is equal to the sum of the number of channels in the three branches. This operation is repeated at all feature positions to finally obtain the concatenated multi-scale spectral feature sequence. Unlike element-wise summation or averaging, feature channel concatenation preserves the independence and integrity of the features output by each convolutional branch. Features at different scales remain within different channel intervals of the feature vector after concatenation, without numerical mixing between them. This fusion method, which preserves the source identifiers of features, enables the subsequent parallel token mapping module to accurately distinguish which channels in multi-scale spectral features originate from narrow absorption peak shape features extracted by small-scale convolution, which channels originate from adjacent spectral line combination features extracted by medium-scale convolution, and which channels originate from broad spectral band background trend features extracted by large-scale convolution. This provides clear feature source information for the differentiated weight allocation of temperature-sensitive and concentration-sensitive features. For example, in the generation of temperature tokens, feature channels originating from small-scale and medium-scale convolution tend to receive higher temperature sensitivity weights because they encode information on relative spectral line intensity and peak width, while feature channels originating from large-scale convolution tend to receive higher concentration sensitivity weights because they encode overall absorption amplitude and baseline trend information. This discriminatory ability stems from the complete preservation of feature source information at different scales by the splicing and fusion method.
[0079] Specifically, in step S4, the temperature token and concentration token are input into the Transformer encoder, and the temperature token and concentration token are globally interacted through a multi-head self-attention mechanism to obtain fused spectral features, including the following sub-steps: S41, the temperature token and concentration token are mapped to the temperature token embedding space and the concentration token embedding space respectively through independent embedding matrices. The temperature token embedding space and the concentration token embedding space are kept separate by their respective independent embedding parameters.
[0080] Before temperature and concentration tokens interact globally through the multi-head self-attention mechanism, they must first be mapped to their respective independent embedding spaces. Embedding is achieved using embedding matrices, which are a set of trainable parameters used to linearly transform the feature vectors of the input tokens from the original feature space to a new feature space with a preset dimension. In this step, temperature and concentration tokens are mapped using their respective independent embedding matrices: temperature tokens are mapped to the temperature embedding space via the temperature embedding matrix, and concentration tokens are mapped to the concentration embedding space via the concentration embedding matrix. Both the temperature and concentration embedding matrices are part of the deep learning model, and their parameters are updated separately during training, without sharing weights. Due to the use of independent embedding parameters, the temperature and concentration embedding spaces maintain structural separation at the parameter level; the embedding representation of the temperature token is determined only by the parameters of the temperature embedding matrix, and the embedding representation of the concentration token is determined only by the parameters of the concentration embedding matrix. This independent embedding design ensures that the two types of tokens maintain their physical sensitivity independence before entering the self-attention computation, preventing unnecessary mixing of temperature-related and concentration-related features during embedding. In combustion diagnostics, if the analyte is OH radicals in a high-temperature flame, the temperature token embedding space encodes the temperature-dependent variation of the OH radical rotational spectral intensity ratio and band shape, while the concentration token embedding space encodes the concentration-dependent variation of the OH radical absorption peak amplitude and integral area. Each embedding space independently organizes feature representations related to its respective physical parameters. In environmental monitoring, if the analyte is sulfur dioxide in flue gas, the temperature and concentration token embedding spaces also perform independent embedding mappings for the temperature-sensitive and concentration-sensitive features of the sulfur dioxide spectrum, respectively. The embedded temperature and concentration tokens have the same vector length in the embedding dimension, allowing the subsequent self-attention mechanism to perform unified attention weight calculations for both types of tokens.
[0081] Structural separation refers to the independence of temperature and concentration tokens in their feature representation spaces at the network structure level through the use of different trainable parameter matrices. In the embedding stage, structural separation manifests as temperature and concentration tokens undergoing linear transformations through their respective independent embedding matrices, which are updated independently during training without parameter sharing. In the sensitivity assignment stage, structural separation is reflected in the generation of temperature and concentration sensitivity weight vectors through their own independent mapping paths, with different mapping parameters used for the temperature and concentration information channels. Structural separation does not mean that temperature and concentration information are completely isolated in the network. The two types of tokens can still interact across parameters during the self-attention computation stage of the Transformer encoder; however, they maintain their independent representation foundations at the parameter level, ensuring that the coupling of temperature and concentration effects in the feature space does not lead to an indistinguishable mixture of the feature representations of the two types of information.
[0082] S42, In the multi-head self-attention mechanism, self-attention weights are calculated for the embedded temperature token and concentration token. The self-attention weights simultaneously include the internal correlation between temperature tokens, the internal correlation between concentration tokens, and the cross-parameter correlation between temperature tokens and concentration tokens.
[0083] After the embedding mapping is completed, the embedded temperature token and concentration token are jointly input into a multi-head self-attention mechanism for global interaction. The multi-head self-attention mechanism first generates a query vector, key vector, and value vector for each token, and then determines the attention weight between each token and all other tokens by calculating the similarity between the query vector and all key vectors. In this step, the temperature token and concentration token participate in the self-attention calculation as different parts of the same input sequence. Each token position in the sequence calculates its attention weight with all other token positions in the sequence, regardless of whether that position belongs to the temperature token or the concentration token. Therefore, the final calculated self-attention weight matrix contains three types of correlations: internal correlations between temperature tokens, reflecting information interaction between different temperature-sensitive spectral regions, such as intensity ratio mode correlations between different rotational spectral line groups; internal correlations between concentration tokens, reflecting information interaction between different concentration-sensitive spectral regions, such as the consistency of amplitude ratios between different absorption peaks; and cross-parameter correlations between temperature tokens and concentration tokens, reflecting the coupling relationship between temperature and concentration effects in the spectrum, such as the impact of spectral line broadening caused by temperature changes on the absorption intensity correction required for concentration inversion. In combustion diagnostic scenarios, when the temperature and concentration fields of a high-temperature flame change simultaneously, the cross-parameter correlations in the self-attention mechanism can learn the physical law that temperature increases lead to spectral line broadening, thereby reducing the peak value of absorption peaks, and encode this compensation relationship between temperature and concentration effects in the fused spectral features. Multiple attention heads perform the above calculations in parallel. Each attention head can independently learn different types of correlation patterns. Some attention heads may focus on the spectral intensity ratio pattern inside the temperature token, while others may focus on the cross-parameter coupling pattern between the temperature token and the concentration token. The outputs of all attention heads are eventually integrated into the same fusion feature.
[0084] The internal correlation between temperature tokens refers to the attention weights calculated between each token position within the temperature token sequence in the self-attention mechanism. This reflects the information interaction between different temperature-sensitive spectral regions, such as the correlation between intensity ratio modes of different rotational line groups and the consistency of temperature response characteristics in different spectral band regions. The internal correlation between concentration tokens refers to the attention weights calculated between each token position within the concentration token sequence. This reflects the information interaction between different concentration-sensitive spectral regions, such as the consistency of amplitude ratios between different absorption peaks and the distribution of integral areas across different spectral bands. The cross-parameter correlation between temperature and concentration tokens refers to the attention weights calculated between each position in the temperature token sequence and each position in the concentration token sequence. This reflects the coupling relationship between temperature and concentration effects in ultraviolet broadband absorption spectroscopy. Specifically, this includes the correction required for concentration inversion based on absorption peak amplitude due to spectral line broadening caused by temperature changes, and the impact of signal-to-noise ratio changes caused by concentration changes on the discriminability of temperature-sensitive spectral lines. These three correlations are calculated in parallel by multiple attention heads in a multi-head self-attention mechanism. Different attention heads can focus on different types of correlation modes.
[0085] S43, The embedded temperature token and concentration token are weighted and aggregated based on self-attention weights to obtain fused spectral features.
[0086] After calculating the self-attention weight matrix, the embedded temperature and concentration tokens are weighted and aggregated based on this matrix. The specific operation of weighted aggregation is as follows: for each token position in the sequence, the self-attention weight corresponding to that position is used as a weighting coefficient, and the value vectors of all tokens in the sequence are summed in a weighted manner to obtain a new representation vector for that position after being updated by the self-attention mechanism. The new representation vectors of all token positions together constitute the fused spectral features. During the weighted aggregation process, the new representation of each token not only contains its own information but also selectively incorporates information from all other tokens in the sequence according to the magnitude of the attention weight. For temperature token positions, its new representation contains both spectral line intensity ratios and peak shape information from other temperature tokens and absorption intensity information from concentration tokens; the attention weight determines the relative fusion ratio of these two types of information. For concentration token positions, its new representation contains both absorption amplitude and integral area information from other concentration tokens and spectral band shape information from temperature tokens. In the fused spectral features obtained through weighted aggregation, each feature vector is the result of global information integration of the entire input sequence. This preserves the independence of temperature and concentration information in the embedding space while introducing necessary cross-parameter coupling information through adaptive weighting of attention weights. The dimensionality of the fused spectral features is the same as that of the embedded tokens, and the number of feature vectors it contains is consistent with the total number of tokens in the input sequence. This fused spectral feature is then passed to a multi-task regression network for the final prediction of temperature and concentration.
[0087] The global interaction mechanism of the Transformer encoder described above maintains the parameterized separation of the two types of physical information in the embedding space by setting independent embedding matrices for temperature tokens and concentration tokens respectively. At the same time, it uses a multi-head self-attention mechanism to calculate three types of association weights in a unified sequence: intra-temperature token association, intra-concentration token association, and cross-parameter association between temperature tokens and concentration tokens. Based on these weights, a global weighted aggregation is performed to obtain fused spectral features. This allows the fused spectral features to maintain the structural distinction between temperature-sensitive and concentration-sensitive information at the parameter level, and to capture the necessary coupling relationship between temperature and concentration effects in the ultraviolet broadband absorption spectrum through adaptive learning of self-attention weights. This provides a feature representation that is both independent and complementary for the subsequent multi-task regression network to accurately decode temperature and concentration respectively.
[0088] Furthermore, the training samples for the deep learning model are constructed through the following steps: S101, Obtain a one-dimensional spectral sequence sample within the target ultraviolet band and its corresponding temperature and concentration labels.
[0089] The construction of training samples for deep learning models first requires obtaining one-dimensional spectral sequence samples within the target ultraviolet band, along with their corresponding temperature and concentration labels. The sources of these one-dimensional spectral sequence samples can include: generation through physical spectral model simulation, acquisition through experimental measurement systems, or construction through the fusion of physical models and experimental data. In the physical model simulation approach, based on the spectral line database or absorption cross-section database of the target component, under preset temperature, concentration, and pressure conditions, the Beer-Lambert law is invoked to calculate the theoretical absorption spectrum. Factors such as line shape functions, instrument functions, and baseline terms are considered to generate a large number of simulated spectral samples covering different temperature and concentration combinations. Each sample automatically carries the temperature and concentration parameters used during generation as labels. In the experimental measurement approach, the gas to be measured is actually measured using an ultraviolet broadband absorption spectroscopy experimental system. Simultaneously, standard temperature sensors and concentration calibration devices are used to record the corresponding temperature and concentration values, which serve as labels for the spectral samples. Samples obtained through experimental measurement can reflect the instrument characteristics and noise distribution in the real measurement environment, but the coverage and accuracy of the labels are limited by the experimental conditions. In this fusion approach, simulated samples generated from a physical model serve as the primary component, supplemented by a small number of experimental calibration samples to fine-tune or calibrate the model. This ensures that the training sample set possesses both the advantage of a broad coverage of the physical model and the characteristics of the real measurement environment. Temperature labels represent the temperature values of the target gas, while concentration labels represent the molecular number density or mole fraction of the target component. The accuracy of the label data directly affects the upper limit of the inversion accuracy of the deep learning model; therefore, it is necessary to ensure the accuracy of the label data and its one-to-one correspondence with the spectral samples during the sample construction process.
[0090] S102, Inject a perturbation of a preset perturbation type into the one-dimensional spectral sequence sample to obtain an enhanced spectral sample. The preset perturbation type includes at least one of the following: amplitude scaling perturbation simulating light source intensity fluctuations, baseline offset perturbation simulating baseline drift, wavelength translation perturbation simulating wavelength calibration error, random noise perturbation simulating detector noise, and instrument broadening perturbation simulating instrument function changes.
[0091] After obtaining basic one-dimensional spectral sequence samples, injecting pre-defined perturbations into the samples to generate enhanced spectral samples is a crucial step in improving the robustness of deep learning models in real-world measurement environments. The pre-defined perturbation types include amplitude scaling perturbations simulating light source intensity fluctuations, baseline offset perturbations simulating baseline drift, wavelength translation perturbations simulating wavelength calibration errors, random noise perturbations simulating detector noise, and instrument broadening perturbations simulating instrument function variations. These perturbation types can be used individually or in any combination. The amplitude scaling perturbation simulating light source intensity fluctuations is achieved by multiplying the overall amplitude of the one-dimensional spectral sequence by a random scaling factor. The scaling factor's value range is set according to the actual power fluctuation amplitude of the light source. This perturbation simulates the actual situation of slow power drift or short-term fluctuations in the output power of an ultraviolet light source during long-term operation. The baseline offset perturbation simulating baseline drift is achieved by superimposing a slowly varying offset curve onto the one-dimensional spectral sequence. The shape of the offset curve can be set to a linear ramp, a low-order polynomial, or a sinusoidal waveform, used to simulate baseline offset phenomena caused by temperature changes, mechanical deformation, or detector response drift in the optical system. The wavelength shift perturbation simulating wavelength calibration error is achieved by translating or stretching the one-dimensional spectral sequence along the wavelength dimension. The translation amount or stretching coefficient is randomly selected within a preset wavelength calibration error range. This perturbation simulates wavelength reading errors caused by inaccurate wavelength calibration of the spectrometer or grating position shifts due to changes in ambient temperature. The random noise perturbation simulating detector noise is achieved by superimposing random noise following a Gaussian or Poisson distribution at each sampling point of the one-dimensional spectral sequence. The standard deviation of the noise is set according to the actual signal-to-noise ratio (SNR) level of the detector. This perturbation simulates the impact of random noise sources such as detector dark current noise, shot noise, and readout noise on the spectral SNR. The instrument broadening perturbation simulating instrument function variation is achieved by convolving the one-dimensional spectral sequence with instrument functions of different broadening parameters. The instrument function is typically a Gaussian or Lorentz function, and the range of broadening parameters covers the actual variation range of the spectrometer under different slit widths or focusing conditions. This perturbation simulates the broadening changes of the absorption peaks caused by changes in optical alignment or slit width adjustments in the spectrometer's instrument function. In the combustion diagnostic scenario, the gas to be tested is OH radicals in a high-temperature flame. Injecting baseline offset perturbation can simulate baseline drift caused by changes in flame background radiation and optical window contamination. Injecting wavelength translation perturbation can simulate wavelength calibration shift caused by thermal expansion of the spectrometer grating under high-temperature conditions. In the environmental monitoring scenario, the gas to be tested is sulfur dioxide in flue gas. Injecting light source intensity fluctuation perturbation can simulate power attenuation caused by aging of the ultraviolet light source. Injecting random noise perturbation can simulate absorption signal instability caused by insufficient signal-to-noise ratio of the detector under low concentration conditions.
[0092] S103 adds the enhanced spectral samples to the training sample set, which are then used together with the original spectral samples without perturbations for training the deep learning model.
[0093] Enhanced spectral samples obtained after perturbation are added to the training sample set and used together with unperturbed original spectral samples for training the deep learning model. The training sample set is constructed using a mixture of original and enhanced samples, rather than using only enhanced samples, because using only enhanced samples may lead to insufficient learning of the features of ideal spectra, while using only original samples fails to provide robustness to measurement perturbations. During training, a certain number of samples are randomly selected from the training sample set for each training batch. Each sample may be an unperturbed original one-dimensional spectral sequence or an enhanced spectral sample injected with one or more types of perturbations. The model learns the basic mapping relationship between temperature and concentration and spectral features on the original samples, and learns the ability to accurately extract temperature and concentration information from perturbed spectra on the enhanced samples. The temperature and concentration labels of the enhanced samples remain consistent with those of the original samples before perturbation, because the perturbation simulates non-ideal factors in the measurement system, not changes in the actual physical state of the target gas; therefore, the true values of temperature and concentration should not be altered by the perturbation. The ratio of augmented samples to original samples in the training sample set can be adjusted according to the instability of measurement conditions in the actual application scenario. In laboratory conditions with relatively ideal measurement environment, the ratio of augmented samples can be set lower; in on-site online monitoring scenarios with complex and variable measurement environment, the ratio of augmented samples can be set higher, so that the model can fully come into contact with various perturbation combinations during the training process and improve the model's generalization ability when deployed in actual situations.
[0094] The aforementioned training sample construction method injects physically targeted perturbations—simulating typical non-ideal factors in actual ultraviolet broadband absorption spectroscopy measurement systems, such as light source intensity fluctuations, baseline drift, wavelength calibration errors, detector noise, and instrument function variations—into the original one-dimensional spectral sequence samples. These perturbations are then mixed with the original spectral samples without perturbations to form the training sample set. This allows the deep learning model to not only learn the basic mapping relationship between spectral features and temperature / concentration under ideal conditions during training, but also to learn the ability to stably extract temperature and concentration information from the disturbed spectrum when the measurement system exhibits the aforementioned perturbations. This physically targeted perturbation enhancement strategy, combined with the physically sensitive shunting design of the temperature and concentration tokens within the model, improves the output stability of the inversion method under long-term measurement perturbation conditions such as light source aging, detector temperature drift, wavelength calibration shift, and baseline drift, both at the training data level and the model structure level.
[0095] The parameters involved in this invention, such as the number of sampling points in the preset wavelength grid, the kernel size and number of channels in each convolutional branch of the multi-scale one-dimensional convolutional neural network, the number of layers and attention heads in the Transformer encoder, the number of fully connected layers sharing feature layers and output branches in the multi-task regression network, and the number of training samples, can all be flexibly set according to actual conditions such as the absorption spectral characteristics of the target component, the wavelength resolution and signal-to-noise ratio of the spectrometer, and the specific requirements of the measurement scenario for inversion accuracy and speed. For example, for target components with dense absorption peaks and complex spectral structure, the number of channels in the multi-scale one-dimensional convolutional neural network can be appropriately increased to enhance feature extraction capabilities; for application scenarios with low wavelength resolution of the spectrometer, the kernel size can be appropriately reduced to avoid excessive smoothing of spectral features due to an excessively large receptive field; for online monitoring scenarios with high real-time requirements, the number of layers and attention heads in the Transformer encoder can be appropriately reduced to reduce computational load. The adjustment of the above parameters does not affect the implementation of the core technical solution of this invention for structurally separating temperature-sensitive information and concentration-sensitive information at the feature level.
[0096] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described method for fast inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer.
[0097] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer.
[0098] The embodiments of this invention aim to protect a fast inversion method for temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer, which has the following effects: 1. By mapping multi-scale spectral features in parallel to temperature and concentration tokens, and then weighting and aggregating these features using temperature-sensitive and concentration-sensitive weight vectors respectively, a structural separation of temperature-sensitive and concentration-sensitive information is achieved at the feature level. Temperature tokens consist of local features sensitive to relative spectral intensity, peak ratio, and band distribution, while concentration tokens consist of global features sensitive to absorption intensity and integral area. This allows the network to organize spectral information along temperature and concentration channels separately, rather than treating the entire spectrum as an indiscriminate feature mixture. This is further demonstrated in the subsequent Transformer encoder's self-annotation. In the attention calculation, temperature tokens and concentration tokens each retain independent embedding spaces. At the same time, attention weights are used to learn the cross-parameter correlation between them. This maintains the relative independence of different physical parameter information while capturing the necessary coupling relationship between temperature effect and absorption intensity correction required for concentration inversion. Through the above-mentioned physical sensitive token diversion and joint modeling mechanism, the mutual interference between temperature and concentration information in the feature extraction process is significantly reduced. Under measurement perturbation conditions such as weak absorption, light source fluctuations, and baseline drift, the stability of the inversion results can still be maintained. This solves the inversion error problem caused by the high coupling of temperature and concentration information in the feature space in existing deep learning spectral inversion methods. 2. By cascading a multi-scale one-dimensional convolutional neural network and a Transformer encoder, multi-level spectral feature extraction and correlation modeling from local peak shape to global spectral bands are achieved. The multi-scale one-dimensional convolutional neural network employs at least three parallel convolutional branches of different scales to extract narrow absorption peak shape features, adjacent spectral line combination features, and wide spectral band background trend features, respectively. This allows spectral information from different spatial scales to coexist in the same feature representation, overcoming the limitation of single-scale convolution which can only capture local or global features. Based on this, the Transformer encoder uses a multi-head self-attention mechanism to further refine the features. Modeling long-distance dependencies between wavelength regions allows the model to extract compensation information from other stable spectral lines or bands even when certain spectral lines are affected by noise or local perturbations. The synergistic effect of multi-scale local feature extraction and global self-attention modeling enables the inversion method to comprehensively utilize multi-level spectral information such as strong absorption peaks, weak absorption peaks, spectral line intensity ratios, and overall spectral band structure. Temperature and concentration can be output with only one neural network forward propagation in the online stage. Compared with the traditional full-spectrum fitting method, which requires frame-by-frame line shape calculation, spectral line superposition, and nonlinear iteration, this method significantly improves the inversion speed while maintaining inversion accuracy. 3. By injecting physically targeted perturbations into the spectral samples during the training phase—including amplitude scaling perturbations simulating light source intensity fluctuations, baseline offset perturbations simulating baseline drift, wavelength translation perturbations simulating wavelength calibration errors, random noise perturbations simulating detector noise, and instrument broadening perturbations simulating instrument function variations—the training samples can cover common non-ideal factors in real-world measurement environments. Unlike general data augmentation methods, these perturbation types directly correspond to typical systematic error sources in ultraviolet broadband absorption spectroscopy experiments. The enhanced spectral samples after perturbation injection participate in model training together with the original spectral samples without perturbation injection, forcing the model to learn from the perturbed spectra during training. The method extracts feature representations that are robust to temperature and concentration, rather than overfitting to specific forms of ideal spectra. At the model structure level, the parallel mapping mechanism of temperature tokens and concentration tokens maintains structural separation through their respective independent embedding parameters, further enhancing the model's insensitivity to input perturbations. The physical perturbation enhancement during the training phase and the physical sensitive shunting design of the model structure work together to enable the inversion method to maintain the stability of the output results during long-term continuous measurements, even when faced with factors such as light source aging, detector temperature drift, and slow changes in environmental conditions. Compared with the large fluctuations that occur in traditional physical fitting methods during long-term measurements, the inversion fluctuation range of this invention is significantly narrowed.
[0099] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0101] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0102] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer, characterized in that, The inversion method is based on a deep learning model that includes a cascaded multi-scale one-dimensional convolutional neural network, a parallel token mapping module, a Transformer encoder, and a multi-task regression network, and includes the following steps: S1, acquire the broadband absorption spectrum of the gas to be tested in the target ultraviolet band, and preprocess the broadband absorption spectrum to obtain a one-dimensional spectral sequence on a preset wavelength grid. S2, input the one-dimensional spectral sequence into the multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, including narrow absorption peak shape features, adjacent spectral line combination features, and wide spectral band background trend features; S3, input the multi-scale spectral features into the parallel token mapping module, and generate temperature token and concentration token simultaneously. The temperature token includes the narrow absorption peak shape feature and adjacent spectral line combination feature in the multi-scale spectral features, and the concentration token includes the broad spectral band background trend feature in the multi-scale spectral features. S4, input the temperature token and the concentration token into the Transformer encoder, and perform global interaction between the temperature token and the concentration token through a multi-head self-attention mechanism to obtain fused spectral features; S5, input the fused spectral features into the multi-task regression network, and obtain the temperature and concentration of the gas to be measured through the temperature output branch and the concentration output branch, respectively.
2. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 1, characterized in that, Step S3, which involves inputting the multi-scale spectral features into the parallel token mapping module to simultaneously generate temperature and concentration tokens, includes the following sub-steps: S31, perform sensitivity assignment on the multi-scale spectral features to obtain a temperature sensitivity weight vector and a concentration sensitivity weight vector. The temperature sensitivity weight vector is used to indicate the temperature-sensitive part of the multi-scale spectral features, and the concentration sensitivity weight vector is used to indicate the concentration-sensitive part of the multi-scale spectral features. S32, the multi-scale spectral features are weighted and aggregated according to the temperature sensitivity weight vector to obtain the temperature token; S33, the multi-scale spectral features are weighted and aggregated according to the concentration sensitivity weight vector to obtain the concentration token; The temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training, or are preset based on known spectral data of the target component.
3. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 2, characterized in that, The temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training through a learnable gating network; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31a1, The multi-scale spectral features are input into a learnable gating network, and the learnable gating network outputs the temperature gating coefficient and concentration gating coefficient corresponding to each feature position in the multi-scale spectral features; S31a2, the temperature gating coefficients at each feature location are combined into the temperature sensitivity weight vector, and the concentration gating coefficients at each feature location are combined into the concentration sensitivity weight vector.
4. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 2, characterized in that, The temperature sensitivity weight vector and the concentration sensitivity weight vector are learned by the deep learning model during training through an attention mechanism; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31b1, Calculate multi-head self-attention weights for the multi-scale spectral features. The multi-head self-attention weights include at least a first attention head and a second attention head. The first attention head is used to learn to focus on temperature-sensitive spectral features during training, and the second attention head is used to learn to focus on concentration-sensitive spectral features during training. S31b2, the attention weight output by the first attention head is used as the temperature sensitivity weight vector, and the attention weight output by the second attention head is used as the concentration sensitivity weight vector.
5. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 2, characterized in that, The temperature sensitivity weight vector and the concentration sensitivity weight vector are preset based on the known spectral data of the target component; The sensitivity assignment of the multi-scale spectral features in step S31 includes the following sub-steps: S31c1, based on the sensitivity of each spectral line position to temperature changes in the known spectral line database of the target component, determine the first wavelength range that is sensitive to temperature and the second wavelength range that is sensitive to concentration on the preset wavelength grid. S31c2, reset the weights of the feature positions corresponding to the first wavelength range to a first preset value and reset the weights of the remaining feature positions to a second preset value to obtain the temperature sensitivity weight vector; reset the weights of the feature positions corresponding to the second wavelength range to the first preset value and reset the weights of the remaining feature positions to the second preset value to obtain the concentration sensitivity weight vector.
6. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 1, characterized in that, Step S2, which involves inputting the one-dimensional spectral sequence into the multi-scale one-dimensional convolutional neural network to extract multi-scale spectral features, includes the following sub-steps: S21, the one-dimensional spectral sequence is input into the first convolutional branch, the second convolutional branch, and the third convolutional branch respectively. The first convolutional branch uses the first convolutional kernel scale to extract the peak shape features of narrow absorption peaks. The second convolutional branch uses the second convolutional kernel scale, which is larger than the first convolutional kernel scale, to extract the combination features of adjacent spectral lines. The third convolutional branch uses the third convolutional kernel scale, which is larger than the second convolutional kernel scale, to extract the background trend features of wide spectral bands. S22, the outputs of the first convolution branch, the second convolution branch and the third convolution branch are fused to obtain the multi-scale spectral features.
7. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 6, characterized in that, The third convolutional branch employs dilated convolution, where the receptive field of the dilated convolution is larger than that of a non-dilated convolution using the same kernel size.
8. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 6, characterized in that, The fusion in step S22 involves concatenating the outputs of the first convolutional branch, the second convolutional branch, and the third convolutional branch along the feature channel dimension.
9. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to claim 1, characterized in that, Step S4, which involves inputting the temperature token and the concentration token into the Transformer encoder and performing global interaction between the temperature token and the concentration token through a multi-head self-attention mechanism to obtain fused spectral features, includes the following sub-steps: S41, the temperature token and the concentration token are mapped to the temperature token embedding space and the concentration token embedding space respectively through independent embedding matrices, and the temperature token embedding space and the concentration token embedding space are kept separate by their respective independent embedding parameters; S42, In the multi-head self-attention mechanism, self-attention weights are calculated for the embedded temperature token and concentration token. The self-attention weights simultaneously include the internal correlation between temperature tokens, the internal correlation between concentration tokens, and the cross-parameter correlation between temperature tokens and concentration tokens. S43, the embedded temperature token and concentration token are weighted and aggregated based on the self-attention weights to obtain the fused spectral features.
10. The method for rapid inversion of temperature and concentration in ultraviolet broadband absorption spectra based on multi-scale CNN-Transformer according to any one of claims 1-9, characterized in that, The training samples for the deep learning model are constructed through the following steps: S101, Obtain a one-dimensional spectral sequence sample within the target ultraviolet band and its corresponding temperature and concentration labels; S102, Inject a perturbation of a preset perturbation type into the one-dimensional spectral sequence sample to obtain an enhanced spectral sample. The preset perturbation type includes at least one of the following: amplitude scaling perturbation simulating light source intensity fluctuations, baseline offset perturbation simulating baseline drift, wavelength translation perturbation simulating wavelength calibration error, random noise perturbation simulating detector noise, and instrument broadening perturbation simulating instrument function changes. S103, The enhanced spectral samples are added to the training sample set and used together with the original spectral samples without perturbation for training the deep learning model.