A soft measurement method for concentration of sodium alkoxide based on transfer learning

CN123017234APending Publication Date: 2026-10-30SHANDONG RUINATE CHEM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611177569.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]然而,上述现有技术方案存在以下技术缺陷:未针对性分离工业现场因视窗结晶、光路老化引起的低频基线漂移,导致有效吸收特征被淹没,测量精度低;仅通过简单转移模型进行浅层校正,未利用深度域适应机制对齐实验室与现场数据分布,模型泛化能力差;缺乏对无标签现场数据的置信度评估与筛选机制,错误伪标签易误导模型训练;模型静态固定,无法感知工况分布漂移,缺少增量更新与预警机制,长期运行稳定性差

Benefits of technology

本发明通过光谱分解与多尺度特征融合,能够准确提取醇钠碱液的有效吸收特征并消除基线漂移干扰。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017234A_ABST
    Figure CN123017234A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on transfer learning's sodium alcohol alkali concentration soft measurement method, belong to spectral analysis and soft measurement technical field, including to source domain calibration spectrum and target field spectrum are aligned preprocessing, and through piecewise asymmetric least square fitting baseline drift is separated, reconstructs purified spectral data;Fusion wave peak form, derivative curve and integral energy information extract multiscale spectral feature, input cross-domain alignment network, obtain domain invariant feature representation under domain discrimination and feature distribution difference constraint;High confidence pseudo-label sample is filtered using prediction uncertainty, and the training of transfer soft measurement model is completed by constructing cross-domain joint loss function;In online application stage, according to characteristic deviation degree, trigger early warning and model incremental update, finally output accurate concentration prediction value.The application adopts cross-domain alignment network and joint loss function driving mechanism, combined with multiscale spectral feature extraction, can realize the accurate soft measurement of sodium alcohol alkali concentration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of spectral analysis and soft measurement technology, and in particular to a soft measurement method for sodium alkali solution concentration based on transfer learning. Background Technology

[0002] Sodium alkali solution has wide applications in chemical production, and accurate measurement of its concentration is crucial for ensuring product quality and production safety. Transmission spectroscopy, as a non-contact analytical method, enables rapid detection of solution components by measuring the absorption characteristics of substances to specific wavelengths of light. In practical industrial applications, it is usually necessary to establish a quantitative analytical model, i.e., a soft-sensor model, between spectral data and substance concentration to achieve online concentration monitoring.

[0003] In related technologies, Chinese invention patent CN106680238B discloses a method for analyzing the content of substance components based on infrared spectroscopy, comprising: establishing a first regression model based on source domain infrared spectral data and the source domain substance component content corresponding to the source domain infrared spectral data, and obtaining the parameters in the first regression model; acquiring target domain infrared spectral data, establishing a transfer model between the target domain infrared spectral data and the source domain infrared spectral data, and obtaining the parameters in the transfer model; and obtaining the target domain substance component content corresponding to the target domain infrared spectral data using the first regression model based on the target domain infrared spectral data and the transfer model.

[0004] However, the aforementioned existing technical solutions have the following technical defects: they do not specifically separate low-frequency baseline drift caused by window crystallization and optical path aging in industrial settings, resulting in the effective absorption characteristics being submerged and measurement accuracy being low; they only perform shallow correction through a simple transfer model, without utilizing a deep domain adaptation mechanism to align laboratory and field data distributions, resulting in poor model generalization ability; they lack a confidence assessment and screening mechanism for unlabeled field data, and erroneous pseudo-labels can easily mislead model training; the model is static and fixed, unable to perceive the drift in operating condition distribution, lacks incremental update and early warning mechanisms, and has poor long-term operational stability. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a soft measurement method for sodium alkoxide concentration based on transfer learning. By employing a cross-domain alignment network and a joint loss function-driven mechanism, combined with multi-scale spectral feature extraction, it can achieve accurate soft measurement of sodium alkoxide concentration.

[0006] The above objectives can be achieved through the following approach: A soft measurement method for sodium alkali solution concentration based on transfer learning includes: aligning and preprocessing the source domain calibration spectrum and the target domain field spectrum; separating baseline drift through piecewise asymmetric least squares fitting to reconstruct purified spectral data; extracting multi-scale spectral features by fusing peak morphology, derivative curves, and integral energy information, and inputting these features into a cross-domain alignment network to obtain domain-invariant feature representations under constraints of domain discrimination and feature distribution differences; filtering high-confidence pseudo-label samples using prediction uncertainty; training the transfer soft measurement model by constructing a cross-domain joint loss function; and triggering early warning and incremental model updates based on feature deviation during the online application phase, ultimately outputting accurate concentration prediction values.

[0007] Optionally, obtaining the source domain calibration spectral set and the target domain field spectral set includes: scanning sodium alkoxide solution samples with concentration gradients covering the industrial production usage area under laboratory calibration conditions to obtain original laboratory spectra with true concentration labels; recording the transmission response of the sodium alkoxide solution flowing through the industrial pipeline at a continuous sampling rate to obtain original field spectra without concentration labels; and performing wavelength axis interpolation alignment and light intensity normalization processing on the original laboratory spectra and the original field spectra respectively to obtain the source domain calibration spectral set and the target domain field spectral set.

[0008] Optionally, obtaining the purified spectral data includes: performing piecewise asymmetric least squares fitting on the source domain calibration spectral set and the target domain field spectral set respectively to estimate the low-frequency slowly varying components caused by window crystal adhesion and optical path aging, as baseline drift components; subtracting the baseline drift components from the source domain calibration spectral set and the target domain field spectral set to obtain the remaining absorption response, and using the shape constraint of sodium alkoxide molecules in the characteristic band to screen and retain the remaining absorption response to obtain effective absorption characteristic components; rearranging the effective absorption characteristic components in the original wavelength order and performing amplitude normalization within the interval to obtain purified spectral data.

[0009] Optionally, obtaining the multi-scale spectral features includes: performing local convolution scanning on the purified spectral data using sliding windows of different widths to extract local peak morphology information reflecting changes in the position and shape of characteristic absorption peaks; performing multi-order difference operations on the purified spectral data to obtain derivative curve information, and performing numerical integration on the band intervals reflecting the characteristic absorption of sodium alkoxide in the purified spectral data to obtain integrated energy information; and splicing and fusing the local peak morphology information, derivative curve information, and integrated energy information along the channel dimension to obtain multi-scale spectral features.

[0010] Optionally, obtaining the domain-invariant feature representation includes: inputting the multi-scale spectral features into a shared feature extraction network to obtain a cross-domain shared embedding representation; feeding the cross-domain shared embedding representation into a regression branch and a domain discrimination branch coupled with a gradient inversion layer, respectively, whereby the domain discrimination branch identifies the domain affiliation and propagates the gradient back to the shared feature extraction network through the gradient inversion layer to calculate the domain discrimination loss; calculating the difference in higher-order statistical moments between source domain samples and target domain samples in the feature space of the cross-domain shared embedding representation to obtain a cross-domain feature distribution difference constraint; and using the domain discrimination loss and the cross-domain feature distribution difference constraint as joint driving conditions for backpropagation to optimize the shared feature extraction network and output a domain-invariant feature representation.

[0011] Optionally, obtaining the high-confidence pseudo-label sample set includes: inputting the domain-invariant feature representation corresponding to the target domain field spectral set into the regression branch, and outputting the pseudo-concentration label corresponding to the target domain sample; performing multiple forward samplings on the regression branch under random inactivation conditions, using the variance of the multiple sampling outputs as the prediction uncertainty, and converting the prediction uncertainty into pseudo-label confidence through a monotonically decreasing mapping; adaptively generating a screening threshold based on the distribution quantile of the pseudo-label confidence, removing samples with pseudo-label confidence lower than the preset screening threshold, and retaining the remaining samples and their pseudo-concentration labels to obtain the high-confidence pseudo-label sample set.

[0012] Optionally, obtaining the transfer soft measurement model includes: constructing a source domain supervised regression loss based on the deviation between the true concentration label corresponding to the source domain calibration spectral set and the predicted value of the regression branch; constructing a target domain self-supervised regression loss based on the deviation between the pseudo-concentration label corresponding to the high-confidence pseudo-label sample set and the predicted value of the regression branch, and weighting each sample item in the target domain self-supervised regression loss using the pseudo-label confidence to obtain a weighted target domain self-supervised regression loss; linearly combining the source domain supervised regression loss, the weighted target domain self-supervised regression loss, the domain discrimination loss, and the cross-domain feature distribution difference constraint according to a learnable balance coefficient to obtain a cross-domain joint loss function, and jointly optimizing the shared feature extraction network and the regression branch through backpropagation to obtain the transfer soft measurement model.

[0013] Optionally, the incremental update of the current transfer soft measurement model includes: extracting the online domain-invariant feature representation of the newly arrived field spectrum and calculating its deviation from the historical training distribution; if the deviation exceeds the control upper limit obtained from the historical drift-free window statistics, triggering a distribution drift warning signal; supplementing the training set with the field spectrum that triggered the distribution drift warning signal as an unlabeled target domain sample, fixing the parameters of the regression branch, and performing unsupervised domain adaptive fine-tuning of the shared feature extraction network solely based on the domain discrimination loss and cross-domain feature distribution difference constraints, thereby completing the incremental update of the current transfer soft measurement model.

[0014] Optionally, the output of the predicted sodium alkali solution concentration includes: performing spectral decomposition and reconstruction on the newly arrived field spectrum to obtain online purification spectral data, and performing convolutional feature mapping and information fusion on the online purification spectral data to obtain online multi-scale spectral features; inputting the online multi-scale spectral features into the shared feature extraction network in the current migration soft measurement model to obtain online domain invariant feature representation; feeding the online domain invariant feature representation into the regression branch of the current migration soft measurement model to obtain normalized concentration output; and performing inverse normalization mapping on the normalized concentration output to restore it to the predicted sodium alkali solution concentration.

[0015] Based on the same inventive concept, this invention also provides a soft measurement system for sodium alkoxide solution concentration based on transfer learning. The system includes: a data acquisition and preprocessing module for acquiring transmission spectra of sodium alkoxide solution with and without real concentration labels, and performing wavelength axis alignment and intensity normalization to obtain a source domain calibration spectral set and a target domain field spectral set; a spectral decomposition and reconstruction module for performing spectral decomposition on the source domain calibration spectral set and the target domain field spectral set respectively, separating baseline drift components and effective absorption feature components, and reconstructing the effective absorption feature components to obtain purified spectral data; a multi-scale feature extraction module for performing convolutional feature mapping on the purified spectral data at different wavelength windows and different resolution scales, fusing peak morphology information, derivative curve information, and integral energy information to obtain multi-scale spectral features; a domain-invariant feature extraction module for inputting the multi-scale spectral features into a preset cross-domain alignment network, and obtaining domain-invariant feature representations through joint driving; and a pseudo-label generation and screening module. The system comprises the following modules: a module for estimating pseudo-concentration labels on the target domain field spectrum set based on the domain-invariant feature representation, generating pseudo-label confidence scores by combining prediction uncertainties obtained from multiple random samplings, and filtering samples based on pseudo-label confidence scores to obtain a high-confidence pseudo-label sample set; a model training module for constructing a cross-domain joint loss function using the true concentration labels corresponding to the source domain calibration spectrum set and the pseudo-concentration labels corresponding to the high-confidence pseudo-label sample set, and performing weighted joint training on the cross-domain alignment network to obtain a transfer soft measurement model; an online deviation calculation module for extracting online domain-invariant feature representations from newly arrived field spectra and calculating their deviation from the training distribution during the online phase; a drift warning and update module for generating a distribution drift warning signal if the deviation exceeds a preset threshold, and incrementally updating the current transfer soft measurement model based on the distribution drift warning signal; and a concentration prediction output module for feeding the newly arrived field spectra into the current transfer soft measurement model for inference and outputting the predicted concentration value of sodium alkali solution.

[0016] Compared with the prior art, the present invention has the following advantages: This invention, through spectral decomposition and multi-scale feature fusion, can accurately extract the effective absorption characteristics of sodium alkali solution and eliminate baseline drift interference.

[0017] This invention utilizes a cross-domain alignment network and a joint loss function to achieve knowledge transfer from laboratory calibration data to industrial field data, thereby improving the model's prediction accuracy in the target domain.

[0018] This invention introduces a pseudo-label confidence screening mechanism and an online incremental update strategy, which enhances the model's adaptability to changes in industrial field conditions and its long-term operational stability.

[0019] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic flowchart of a soft measurement method for sodium alkali solution concentration based on transfer learning according to an embodiment of the present invention.

[0022] Figure 2 This is a spectral decomposition and baseline separation diagram according to an embodiment of the present invention.

[0023] Figure 3 This is a time-series curve diagram of online distributed drift early warning according to an embodiment of the present invention.

[0024] Figure 4 This is a schematic diagram of the structure of a soft measurement system for sodium alkali solution concentration based on transfer learning, according to an embodiment of the present invention. Detailed Implementation

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

[0026] Reference Figure 1 One embodiment of the present invention proposes a soft measurement method for sodium alkali solution concentration based on transfer learning. It adopts a cross-domain alignment network and a joint loss function driving mechanism, combined with multi-scale spectral feature extraction, which can achieve accurate soft measurement of sodium alkali solution concentration.

[0027] The method described in this embodiment specifically includes: S1. Obtain the transmission spectra of sodium alkoxide solution with real concentration labels and the transmission spectra of sodium alkoxide solution without labels, and perform wavelength axis alignment and light intensity normalization to obtain the source domain calibration spectrum set and the target domain field spectrum set. Optionally, obtaining the source domain calibration spectral set and the target domain in-situ spectral set includes: In a laboratory calibration environment, sodium alkali solution samples with concentration gradients covering the industrial production use range were scanned to obtain the original laboratory spectra with true concentration labels. Transmission response records were made of sodium alkali solution flowing through the industrial pipeline at a continuous sampling rate to obtain the raw field spectrum without concentration labels. The original laboratory spectra and the original field spectra are subjected to wavelength axis interpolation alignment and light intensity normalization processing to obtain the source domain calibration spectrum set and the target domain field spectrum set.

[0028] Specifically, to obtain raw laboratory spectra with accurate concentration labels, sodium alkali solution samples of different concentration gradients need to be prepared in a controlled laboratory environment. The concentrations of these samples cover a range that might occur in actual industrial production. These samples are then scanned using a spectrometer, and the light intensity response at different wavelengths is recorded. Because the sample concentrations are known and precisely prepared, each scan yields a precise concentration value, which serves as the accurate concentration label. These spectral data with accurate concentration labels constitute the raw laboratory spectra.

[0029] In actual industrial production pipelines, online spectrometers are installed to continuously record the transmission response of sodium alkoxide solution flowing through the pipeline at set time intervals. Because the concentration of sodium alkoxide solution in the industrial environment is constantly changing and unknown, these recorded spectral data do not have corresponding concentration values; they are raw, unlabeled field spectra.

[0030] Because laboratory spectrometers and industrial field spectrometers may have hardware differences, their wavelength sampling points for recording spectra may not be completely consistent. To enable comparison and calculation of the two sets of data in subsequent processing, wavelength axis interpolation alignment needs to be performed on both the original laboratory spectrum and the original field spectrum. Wavelength axis interpolation alignment refers to setting a unified reference wavelength axis and using mathematical interpolation methods to calculate the light intensity value of the corresponding wavelength point in the original spectrum on this reference wavelength axis. The interpolation calculation formula is as follows: , in, This indicates that after alignment, at the reference wavelength The light intensity value at that location. and Indicates the wavelength enclosing the reference wavelength in the original spectrum. Two adjacent actual sampling wavelengths satisfy . and These represent the original spectrum at wavelengths of [wavelength values ​​missing]. and The actual light intensity value at that point. This formula can unify all spectra to the same wavelength dimension.

[0031] After wavelength axis alignment, due to factors such as light source intensity fluctuations and optical path attenuation, the overall light intensity of different spectra may vary. To eliminate the impact of this absolute light intensity difference, light intensity normalization is required. Light intensity normalization refers to scaling the light intensity value of each spectrum to a fixed numerical range. The normalization calculation formula is as follows: , in, Indicates the wavelength after normalization The light intensity value at that location. This indicates that after wavelength axis alignment, at wavelength... The light intensity value at that location. This represents the minimum light intensity value corresponding to all wavelength points in the spectrum. This represents the maximum light intensity value corresponding to all wavelength points in the spectrum. After light intensity normalization, the original laboratory spectrum is converted into a source domain calibration spectrum set, and the original field spectrum is converted into a target domain field spectrum set.

[0032] For example, sodium alkali solution samples with concentration gradients of 10% to 30% are prepared in a laboratory environment, and raw laboratory spectra with true concentration labels are obtained by scanning with a laboratory spectrometer. Transmission response records of the flowing sodium alkali solution are then obtained on an industrial pipeline at a continuous sampling rate of once per minute, yielding raw field spectra without concentration labels. The reference wavelength axis is set to range from 800 nm to 1200 nm, with intervals of 1 nm. For cases where interpolation is required at the reference wavelength of 900 nm in the raw field spectra, it is known that: ; ; Substituting into the wavelength axis interpolation alignment formula yields... After completing the wavelength axis interpolation and alignment, another original laboratory spectrum is selected: its minimum light intensity value. Maximum light intensity value The light intensity value at 900 nanometers after alignment Substituting into the light intensity normalization formula: The normalized light intensity value at 900 nm was 0.5. After the above processing, the source domain calibration spectrum set and the target domain in-situ spectrum set were finally obtained.

[0033] S2. Perform spectral decomposition on the source domain calibration spectral set and the target domain field spectral set respectively to separate the baseline drift component and the effective absorption characteristic component, and reconstruct the effective absorption characteristic component to obtain the purified spectral data. Optionally, obtaining the purification spectral data includes: Piecewise asymmetric least squares fitting was performed on the source domain calibration spectrum set and the target domain field spectrum set to estimate the low-frequency slowly varying components caused by window crystal adhesion and optical path aging, which were used as baseline drift components. The baseline drift component is subtracted from the source domain calibration spectrum set and the target domain field spectrum set to obtain the remaining absorption response. The shape constraint of sodium alkoxide molecules in the characteristic band is used to screen and retain the remaining absorption response to obtain the effective absorption characteristic component. The effective absorption characteristic components are rearranged in order of their original wavelengths and their amplitudes are normalized within the interval to obtain purified spectral data.

[0034] Specifically, the source domain calibration spectral set and the target domain field spectral set are obtained, and piecewise asymmetric least squares fitting is performed on both sets. Piecewise asymmetric least squares fitting, by minimizing an objective function with a smoothing penalty term, separates the slowly changing background signal from the spectral data, thereby estimating the low-frequency slowly varying component caused by window crystal adhesion and optical path aging. This low-frequency slowly varying component serves as the baseline drift component. The formula for calculating the objective function is as follows: , in This represents the objective function for the fitting error. This indicates that the source domain calibration spectral set or the target domain field spectrum is concentrated at wavelength. The normalized light intensity value at that location. Indicates at wavelength The baseline drift component is estimated at that location. , They represent wavelengths respectively The baseline drift component estimated at [location], where To and Adjacent subsequent sampling wavelength points. This represents the asymmetric weighting coefficient, which is set based on the principle that a smaller weight is assigned when the normalized light intensity value is greater than the baseline drift component, and a larger weight is assigned when it is less than the baseline drift component, so as to make the baseline fit the bottom of the spectrum. This represents the smoothing penalty coefficient, used to control the smoothness of the baseline drift components. The baseline drift components are obtained by iteratively optimizing to minimize the objective function.

[0035] The residual absorption response is obtained by subtracting the baseline drift component from the source domain calibration spectral set and the target domain field spectral set. The calculation formula is as follows: , in Indicates at wavelength The remaining absorption response at the specified wavelength is determined. The shape constraint of the sodium alkoxide molecule in the characteristic wavelength band is used to screen and retain the remaining absorption response. The shape constraint is based on the known physical absorption characteristics of the sodium alkoxide molecule in a specific wavelength range. By calculating the ratio of the peak width to the peak height of the remaining absorption response in the characteristic wavelength band, response portions that do not meet the threshold of this ratio are eliminated, and response portions that meet the conditions are retained, thus obtaining the effective absorption characteristic components.

[0036] The effective absorption characteristic components are rearranged according to their original wavelengths and their amplitudes are normalized within the interval to obtain the purified spectral data. The formula for amplitude normalization within the interval is as follows: , in Indicates at wavelength Purification spectral data at the location. Indicates at wavelength The effective absorption characteristic component at the location. This represents the minimum amplitude of the effective absorption characteristic component within the current wavelength range. This represents the maximum amplitude of the effective absorption characteristic component within the current wavelength range. Spectral decomposition and baseline separation are as follows: Figure 2 As shown.

[0037] For example, a smoothing penalty coefficient is set for the spectral data in the source domain calibration spectral set. =10000, normalized light intensity value at a wavelength of 900 nm (900) = 0.5. To demonstrate the piecewise asymmetric least squares objective function, three adjacent wavelength points of 898nm, 899nm, and 900nm with a 1nm interval are selected and slowly varying baseline data are assigned. , Unified selection based on asymmetric weighting rules Substituting into the objective function of the fitting error, we can obtain the first term, the weighted sum of squares of the residuals, as follows: The second smoothing penalty term is taken have ,then Minimize iteratively Finally, the baseline drift component at that wavelength was obtained. Substitute into the residual absorption response formula The remaining absorption response was obtained. Based on the physical absorption characteristics of sodium alkoxide molecules in the characteristic wavelength range of 850 nm to 950 nm, the shape constraint threshold for the peak width to peak height ratio was set to 2.0 to 5.0. The calculated peak width to peak height ratio of the response was 3.2, which met the constraint. Therefore, it was retained as an effective absorption characteristic component. Minimum amplitude of effective absorption characteristic component within this wavelength range Maximum amplitude Substitute into the normalization formula for amplitude within the interval The purified spectral data was obtained as 0.4375. After the above processing, the purified spectral data was finally obtained.

[0038] S3. Perform convolutional feature mapping on the purified spectral data at different wavelength windows and different resolution scales, and fuse peak morphology information, derivative curve information and integral energy information to obtain multi-scale spectral features. Optionally, obtaining the multi-scale spectral features includes: The purified spectral data is locally convolutionally scanned using sliding windows of different widths to extract local peak morphology information that reflects the changes in the position and shape of characteristic absorption peaks; The purified spectral data is subjected to multi-order difference operations to obtain derivative curve information, and the band interval reflecting the characteristic absorption of sodium alkoxide in the purified spectral data is numerically integrated to obtain integrated energy information. The local peak morphology information, derivative curve information, and integral energy information are spliced ​​and fused along the channel dimension to obtain multi-scale spectral features.

[0039] Specifically, purified spectral data is acquired, and local convolutional scanning is performed on the purified spectral data using sliding windows of varying widths. The sliding window represents a receptive field of different sizes, capable of capturing spectral variations across different ranges. By setting various window widths, local peak morphology information reflecting changes in the position and shape of characteristic absorption peaks is extracted. The formula for calculating local peak morphology information is as follows: , in Indicates the use of the first Local peak morphology information extracted from a window of varying width. Indicates the first The width of the sliding window is set based on the typical full width at half maximum (FWHM) range covering the characteristic absorption peak of sodium alkoxide. Indicates the first The first type of sliding window The convolution kernel weights at each position. Indicates at wavelength Purification spectral data at the location.

[0040] The first-order difference reflects the slope change of the spectral curve, while the second-order difference highlights the peak and valley characteristics of the spectral curve and eliminates constant background interference. The formula for calculating derivative curve information is as follows: , in This represents information about the first derivative curve. and These represent the purified spectral data at adjacent wavelengths. Numerical integration is performed on the wavelength range reflecting the characteristic absorption of sodium alkoxide in the purified spectral data to obtain the integrated energy information. The integrated energy information represents the total absorption intensity within that wavelength range and is closely related to the substance concentration. The formula for calculating the integrated energy information is as follows: , in This represents the integral energy information. and These represent the starting and ending wavelengths of the characteristic absorption band of sodium alkoxide, respectively. The data is dimensionless purified spectral data after amplitude normalization within the interval. This represents the normalized wavelength sampling step size, and its value is a dimensionless constant.

[0041] Concatenation and fusion refers to arranging local peak morphology information, derivative curve information, and integral energy information in sequence and combining them into a higher-dimensional comprehensive feature vector, thereby obtaining multi-scale spectral features. Multi-scale spectral features contain information on various aspects such as local morphology, variation trends, and overall energy of the spectrum, providing rich input for subsequent model training.

[0042] For example, for purified spectral data, three sliding window widths are set: 3 wavelength points, 5 wavelength points, and 7 wavelength points. For the window with a width of 3 wavelength points, the convolution kernel weights are given... ; Purification spectral data corresponding to three adjacent wavelength points Substituting the local peak shape information into the formula: Therefore, the local peak morphology information extracted by this window is 0.48. The purified spectral data of adjacent wavelength points are taken as follows: Substitute the information from the derivative curve into the formula: The first derivative curve information is obtained as 0.2. The wavelength range reflecting the characteristic absorption of sodium alkoxide is set as follows: Wavelength sampling interval Given that the sum of the purified spectral data at each wavelength within this interval is 5.5, substituting this into the integral energy information formula: The integral energy information is 5.5. Finally, the obtained multi-scale features are spliced ​​along the channel dimension: local peak morphology information 0.48, derivative curve information 0.2, integral energy information 5.5, and after fusion, the multi-scale spectral feature vector [0.48, 0.2, 5.5] is obtained.

[0043] S4. Input the multi-scale spectral features into a preset cross-domain alignment network, and obtain domain-invariant feature representations through joint driving; Optionally, the obtained domain-invariant feature representation includes: The multi-scale spectral features are input into a shared feature extraction network to obtain a cross-domain shared embedding representation. The cross-domain shared embedding representation is fed into the regression branch and the domain discrimination branch coupled by the gradient inversion layer, respectively. The domain discrimination branch identifies the domain affiliation and the gradient is passed back to the shared feature extraction network through the gradient inversion layer to calculate the domain discrimination loss. In the feature space of the cross-domain shared embedding representation, the difference of higher-order statistical moments between source domain samples and target domain samples is calculated to obtain the cross-domain feature distribution difference constraint. The domain discrimination loss and the cross-domain feature distribution difference constraint are used as joint driving conditions for backpropagation to optimize the shared feature extraction network and output domain-invariant feature representations.

[0044] Specifically, the shared feature extraction network maps the input multi-scale spectral features into a high-dimensional feature space through multi-layer nonlinear transformations, enabling comparison of data from the source and target domains within the same feature space. The cross-domain shared embedding representation is fed into both the regression branch and the domain discriminant branch coupled via a gradient inversion layer. The domain discriminant branch identifies whether the input features originate from the source domain's calibrated spectral set or the target domain's in-situ spectral set. The formula for calculating the domain discriminant loss is as follows: ], in The domain indicates the loss. This indicates the number of samples in the source domain. This indicates the number of samples in the target domain. Indicates the first The true domain labels of each sample are set to one for the source domain and zero for the target domain. Indicates the first Cross-domain shared embedding representation of samples. The domain discriminant branch predicts the probability that the sample belongs to the source domain. During backpropagation, when the gradient is propagated backward through the gradient reversal layer to the shared feature extraction network, the gradient is multiplied by a negative constant, causing the shared feature extraction network to update its parameters in the direction of deceiving the domain discriminant branch.

[0045] Cross-domain feature distribution difference constraints measure the distance between the feature distributions of the source and target domains. Minimizing this distance can further align the feature distributions of the two domains. The formula for calculating cross-domain feature distribution difference constraints is as follows: , in This indicates a constraint on the difference in cross-domain feature distribution. This represents a cross-domain shared embedding representation of source domain samples. This represents the cross-domain shared embedding representation of the target domain sample. This represents the mapping function that maps features to the reproducing kernel Hilbert space. denoted by .

[0046] The domain discrimination loss and the cross-domain feature distribution difference constraint are weighted and summed using learnable dimensionless balance coefficients to construct a joint driving loss function. The error gradient of this function relative to the shared feature extraction network parameters is then calculated using the backpropagation algorithm. During gradient backpropagation, the gradient of the domain discrimination loss is passed through the gradient reversal layer and multiplied by a negative constant to induce the network to generate features that confuse the domain discriminator; the gradient of the cross-domain feature distribution difference constraint is directly backpropagated to reduce the distance between the source and target domain data distributions in the feature space. By pooling the bidirectional gradients and iteratively updating the network parameters using an optimizer, once training converges, the shared feature extraction network can map any input multi-scale spectral features into a domain-invariant feature representation through a nonlinear transformation.

[0047] For example, for the input multi-scale spectral features, a cross-domain shared embedding representation is obtained after processing by a shared feature extraction network. The current batch contains... Each source domain sample and Target domain samples, total number of samples Domain labeling specifies: source domain Target domain For a given source domain sample, the domain discrimination branch predicts the probability that it belongs to the source domain. Substituting this contribution into the formula: After taking the negative sign, the loss component of this sample is For a given sample in the target domain, predict the probability that it belongs to the source domain. Therefore , Substitute into the formula: After taking the negative sign, the loss component of this sample is If we simplify by assuming that samples within the same domain have the same predicted probability, then the total domain discrimination loss is: , Cross-domain feature distribution difference constraint: Calculate the mean of the embedding representations of 10 source domain samples in the reproducing kernel Hilbert space. Mean of 10 target domain samples The difference, then the square of the norm, yields the result. The above and Backpropagation, driven by joint conditions, updates the parameters of the shared feature extraction network, ultimately outputting domain-invariant feature representations.

[0048] S5. Based on the domain-invariant feature representation, perform pseudo-concentration label estimation on the target domain field spectrum set, generate pseudo-label confidence based on the prediction uncertainty obtained from multiple random sampling, and filter the samples according to the pseudo-label confidence to obtain a high-confidence pseudo-label sample set. Optionally, obtaining the high-confidence pseudo-label sample set includes: Input the domain-invariant feature representation corresponding to the target domain field spectrum set into the regression branch, and output the pseudo-concentration label corresponding to the target domain sample; The regression branch is sampled multiple times under random inactivation conditions. The variance of the multiple sampling outputs is used as the prediction uncertainty. The prediction uncertainty is then converted into pseudo-label confidence through a monotonically decreasing mapping. Based on the distribution quantiles of the pseudo-label confidence, an adaptive screening threshold is generated. Samples with pseudo-label confidence below the preset screening threshold are removed, and the remaining samples and their pseudo-concentration labels are retained to obtain a high-confidence pseudo-label sample set.

[0049] Specifically, the domain-invariant feature representation corresponding to the target domain's in-situ spectral set is input into the regression branch. A fully connected layer maps this high-dimensional domain-invariant feature representation to specific concentration values, outputting a pseudo-concentration label for the target domain sample. Since the target domain sample itself does not have a true concentration label, this output is considered an estimate.

[0050] To assess the reliability of this estimate, the regression branch is sampled multiple times under random deactivation. Random deactivation means that during each forward propagation, the output of a subset of neurons in the regression branch is randomly set to zero, which is equivalent to making predictions in multiple different subnetworks. The variance of the multiple sampled outputs is used as the prediction uncertainty. Prediction uncertainty reflects the degree of fluctuation in the model's prediction results for this sample; the larger the variance, the more uncertain the model. The formula for calculating prediction uncertainty is as follows: , in Indicates the first The prediction uncertainty of a target domain sample. This represents the total number of forward samples. Indicates the first The target domain samples in the th... The pseudo-concentration label output during the second sampling. Indicates the first Target domain samples in The average value of the pseudo-concentration labels output from each sampling.

[0051] The prediction uncertainty is converted into pseudo-label confidence using a monotonically decreasing mapping. This monotonically decreasing mapping ensures that samples with lower prediction uncertainty have higher pseudo-label confidence. The formula for calculating pseudo-label confidence is as follows: , in Indicates the first The confidence level of pseudo-labels for each target domain sample. This represents the scaling factor, used to adjust the distribution range of confidence levels.

[0052] The filtering threshold is adaptively generated based on the distribution quantiles of pseudo-label confidence scores. By statistically analyzing the pseudo-label confidence scores of all target domain samples in the current batch, the value of a specific quantile is selected as the threshold, which can adapt to changes in the overall confidence level of data from different batches. Samples with pseudo-label confidence scores below the preset filtering threshold are removed, and the remaining samples and their pseudo-concentration labels are retained to obtain a high-confidence pseudo-label sample set.

[0053] For example, the domain-invariant feature representation of a sample in a target domain is input into the regression branch. The number of forward samples is set. For a given target domain sample, the domain-invariant feature representation is input into the regression branch. Ten forward sampling iterations are performed under random inactivation conditions. The output pseudo-concentration labels are as follows: . Calculate the average value Substituting into the prediction uncertainty formula, the variance can be directly obtained based on the results given in the original example: Set the scaling factor Substitute into the pseudo-label confidence formula: The pseudo-label confidence scores of all target domain samples in the current batch were calculated, with the distribution quantile set to 70%, and the screening threshold calculated to be 0.9. Since the pseudo-label confidence score of this sample (0.9997) is higher than the screening threshold of 0.9, it was retained, and its pseudo-concentration label (0.201) was included in the high-confidence pseudo-label sample set.

[0054] S6. Construct a cross-domain joint loss function using the real concentration labels corresponding to the source domain calibration spectrum set and the pseudo concentration labels corresponding to the high-confidence pseudo label sample set, and perform weighted joint training on the cross-domain alignment network to obtain the transfer soft measurement model. Optionally, the obtained migration soft measurement model includes: The source domain supervised regression loss is constructed by the deviation between the actual concentration labels corresponding to the source domain calibration spectral set and the predicted values ​​of the regression branch. The target domain self-supervised regression loss is constructed by the deviation between the pseudo-concentration label corresponding to the high-confidence pseudo-label sample set and the predicted value of the regression branch. The pseudo-label confidence is used to weight each sample item in the target domain self-supervised regression loss to obtain the weighted target domain self-supervised regression loss. The source domain supervised regression loss, weighted target domain self-supervised regression loss, domain discrimination loss, and cross-domain feature distribution difference constraint are linearly combined with learnable balance coefficients to obtain a cross-domain joint loss function. The shared feature extraction network and the regression branch are then jointly optimized through backpropagation to obtain a transfer soft measurement model.

[0055] Specifically, the source-domain supervised regression loss is constructed using the deviation between the true concentration labels corresponding to the source-domain labeled spectral set and the predicted values ​​of the regression branch. This loss measures the model's prediction accuracy on labeled source-domain data. By minimizing this loss, the model learns the basic mapping relationship from spectral features to concentration. The formula for calculating the source-domain supervised regression loss is as follows: , in This indicates the source domain supervision regression loss. This indicates the number of samples in the source domain. Indicates the first The true concentration label of each source domain sample. Indicates the regression branch on the th The predicted value of each source domain sample.

[0056] The self-supervised regression loss for the target domain is constructed using the deviation between the pseudo-concentration labels corresponding to the high-confidence pseudo-label sample set and the predicted values ​​of the regression branch. Since the target domain samples do not have true labels, the pseudo-concentration labels in the high-confidence pseudo-label sample set are used as supervision signals to guide the model to adaptively learn on the target domain data. To reduce the negative impact of erroneous pseudo-labels on model training, the pseudo-label confidence is used to weight each sample term in the self-supervised regression loss for the target domain, resulting in the weighted self-supervised regression loss for the target domain. The formula for calculating the weighted self-supervised regression loss for the target domain is as follows: , in This represents the weighted objective domain self-supervised regression loss. This indicates the number of samples in the high-confidence pseudo-label sample set. Indicates the first The confidence level of the pseudo-labels for a high-confidence pseudo-label sample. Indicates the first The pseudo-concentration label of a high-confidence pseudo-label sample. Indicates the regression branch on the th Predicted values ​​for a high-confidence pseudo-label sample.

[0057] The cross-domain joint loss function is obtained by linearly combining the source domain supervised regression loss, the weighted target domain self-supervised regression loss, the domain discrimination loss, and the cross-domain feature distribution difference constraint using learnable balance coefficients. This cross-domain joint loss function comprehensively considers supervised learning in the source domain, self-supervised learning in the target domain, and cross-domain feature alignment, enabling the model to perform joint optimization under multiple objectives. The formula for calculating the cross-domain joint loss function is as follows: , in This represents the cross-domain joint loss function. This indicates the source domain supervision regression loss. This represents the weighted objective domain self-supervised regression loss. The domain indicates the loss. This indicates a constraint on the difference in cross-domain feature distribution. These represent the corresponding learnable balancing coefficients, which are automatically adjusted during training via backpropagation to balance the contributions of various losses. Using the backpropagation algorithm, the parameters of the shared feature extraction network and the regression branch are jointly optimized using a cross-domain joint loss function, iteratively updated until the model converges, ultimately yielding the transfer soft measurement model.

[0058] For example, in one training iteration, the current batch contains =10 source domain samples and =5 high-confidence pseudo-labeled samples. For source domain samples, if the true concentration label of a certain sample is... The predicted value of the regression branch Substituting into the source domain supervised regression loss formula, the squared error of this sample is calculated as follows: The total squared error of the ten source domain samples is: Substitute Formula For high-confidence pseudo-labeled samples, the pseudo-concentration labels are as follows: The regression branch predicted values ​​are respectively The corresponding pseudo-label confidence levels are as follows: Substituting into the weighted objective domain self-supervised regression loss formula, calculate the weighted squared error for each transaction: Summing all items yields Therefore The currently calculated domain discrimination loss Cross-domain feature distribution difference constraint Learnable balance coefficient Substituting into the cross-domain joint loss function formula: , The network parameters are updated through backpropagation using this loss value, completing one optimization process. After multiple iterations, the transfer soft measurement model is obtained.

[0059] S7. In the online phase, extract online domain invariant feature representations from the newly arrived field spectra and calculate their deviation from the training distribution. Specifically, after model deployment, the real-time collected unlabeled field spectra undergo the same preprocessing and multi-scale feature fusion as in the offline phase to obtain high-level feature vectors, i.e., online domain invariant feature representations. Subsequently, based on the historical feature mean and covariance matrix recorded during the training phase, the Mahalanobis distance between this vector and the historical training distribution is calculated to obtain a dimensionless scalar that quantifies the distribution difference, i.e., the deviation. This value is used to determine whether the operating conditions have drifted, and thus decide whether to trigger incremental model updates to maintain long-term prediction accuracy.

[0060] S8. If the deviation exceeds a preset threshold, a distribution drift warning signal is generated, and the current migration soft measurement model is incrementally updated based on the distribution drift warning signal. Optionally, the incremental update of the current migration soft measurement model includes: Extract the online domain invariant feature representation of the newly arrived field spectrum and calculate its deviation from the historical training distribution; If the deviation exceeds the control limit obtained from the statistics of historical drift-free windows, a distribution drift warning signal is triggered. The field spectrum that triggers the distribution drift warning signal is added to the training set as an unlabeled target domain sample. The parameters of the regression branch are fixed, and the shared feature extraction network is subjected to unsupervised domain adaptive fine-tuning based solely on the domain discrimination loss and cross-domain feature distribution difference constraints, thereby completing the incremental update of the current transfer soft measurement model.

[0061] Specifically, during the online phase, when the system receives newly arrived field spectra, it first extracts its online domain invariant feature representation using a pre-trained shared feature extraction network. To monitor changes in industrial field conditions, it is necessary to calculate the deviation of this online domain invariant feature representation from the historical training distribution. The deviation reflects the degree of difference between the current data distribution and the data distribution observed during model training. The formula for calculating the deviation is as follows: , in This indicates the degree of deviation, which is measured using Mahalanobis distance. This represents the online domain invariant characteristic of newly arrived field spectra. It represents the mean vector of the invariant feature representation of the target domain samples in the historical training set. It represents the inverse of the covariance matrix of the invariant feature representation of the target domain sample domain in the historical training set.

[0062] If the calculated deviation exceeds the control upper limit obtained from historical drift-free window statistics, a distribution drift warning signal is triggered. The control upper limit is set based on the statistical distribution of deviations during historical normal operation data, typically the mean plus three standard deviations. Triggering a distribution drift warning signal means that the current field conditions have changed, the original model may no longer be applicable, and an update is required.

[0063] The current transfer sensing model is incrementally updated based on the distribution drift warning signal. Specifically, the field spectrum that triggered the distribution drift warning signal is added to the training set as an unlabeled target domain sample. During the incremental update process, to preserve the model's learned concentration prediction ability, the parameters of the fixed regression branch are not updated. Unsupervised domain adaptive fine-tuning of the shared feature extraction network is performed solely based on the domain discrimination loss and cross-domain feature distribution difference constraints. In this way, the shared feature extraction network can relearn how to map the new drifted data to a feature space aligned with the source domain, thus completing the incremental update of the current transfer sensing model. The online distribution drift warning time series curve is shown below. Figure 3 As shown.

[0064] For example, in the online phase, the online domain-invariant feature representation of the newly arriving field spectrum is extracted. Based on historical training data, the mean vector of the target domain sample domain-invariant feature representation is calculated. =0.5, the inverse of the covariance matrix =1, i.e., the identity matrix. If the current online domain invariant feature is represented as... =0.8. Calculate the difference vector: =0.8-0.5=0.3. Substitute into the deviation formula to find the quadratic form: The deviation is The control upper limit, obtained from historical drift-free window statistics, is 0.25. Since the current deviation of 0.3 exceeds the control upper limit of 0.25, the system triggers a distribution drift warning signal. Subsequently, the on-site spectrum is added to the training set as an unlabeled target domain sample. The regression branch parameters are fixed, and the domain discrimination loss and cross-domain feature distribution difference constraints are calculated using the new data. The parameters of the shared feature extraction network are fine-tuned through backpropagation to complete the incremental update of the model.

[0065] S9. Input the newly arrived field spectrum into the current migration soft measurement model for inference and output the predicted value of sodium alkali solution concentration.

[0066] Optionally, the predicted output sodium alkali solution concentration includes: The newly arrived on-site spectrum is subjected to spectral decomposition and reconstruction to obtain online purification spectral data. The online purification spectral data is then subjected to convolutional feature mapping and information fusion to obtain online multi-scale spectral features. The online multi-scale spectral features are input into the shared feature extraction network in the current migration soft measurement model to obtain online domain-invariant feature representations. The online domain invariant feature representation is fed into the regression branch of the current migration soft measurement model to obtain the normalized concentration output; The normalized concentration output is denormalized and mapped back to the predicted concentration of sodium alkali solution.

[0067] Specifically, spectral decomposition and reconstruction are performed on the on-site spectrum. This process is similar to the offline stage. Baseline drift is removed through piecewise asymmetric least squares fitting, and effective absorption features are extracted based on shape constraints. After rearrangement and normalization, online purified spectral data is obtained. The online purified spectral data is then subjected to convolutional feature mapping and information fusion to extract local peak morphology information, derivative curve information, and integral energy information, which are then concatenated to obtain online multi-scale spectral features.

[0068] Online multi-scale spectral features are input into the shared feature extraction network of the current transfer soft measurement model. This network utilizes its learned cross-domain invariant feature extraction capabilities to map the input features to a high-dimensional space, obtaining an online domain invariant feature representation. This online domain invariant feature representation is then fed into the regression branch of the current transfer soft measurement model. The regression branch performs numerical mapping through fully connected layers to obtain a normalized concentration output. The normalized concentration output represents the model's prediction in the zero-to-one interval.

[0069] To obtain the actual physical concentration value, an inverse normalization mapping needs to be performed on the normalized concentration output. The inverse normalization mapping is a linear transformation based on the extreme values ​​of the concentration labels during the training phase, restoring it to the predicted concentration value of the sodium alkali solution. The calculation formula for the inverse normalization mapping is as follows: , in This indicates the predicted concentration of sodium alkali solution. This represents the normalized concentration output of the regression branch. This represents the maximum value of the true concentration label in the training set. This represents the minimum value of the true concentration label in the training set.

[0070] For example, the system receives a newly arrived field spectrum, performs spectral decomposition and reconstruction to obtain online purification spectral data, extracts and fuses its features to obtain online multi-scale spectral features. These features are then input into the current migration soft measurement model, and the shared feature extraction network outputs a network-invariant feature representation. The regression branch then outputs a normalized concentration based on this representation. =0.6. The maximum value of the true concentration label in the training set is known to be... =30%, minimum value is =10%. Calculate the concentration range: Substituting into the inverse normalization mapping formula: The decimal result 0.22 is converted to a percentage form, which is 22.0%. Therefore, the final predicted value of the sodium alkali solution concentration is 22.0%.

[0071] Based on the same inventive concept, such as Figure 4 As shown, the present invention also provides a soft measurement system for sodium alkali solution concentration based on transfer learning, the system comprising: The data acquisition and preprocessing module is used to acquire the transmission spectra of sodium alkoxide solution with real concentration labels and the transmission spectra of sodium alkoxide solution without labels, and to perform wavelength axis alignment and light intensity normalization to obtain the source domain calibration spectrum set and the target domain field spectrum set. The spectral decomposition and reconstruction module is used to perform spectral decomposition on the source domain calibration spectral set and the target domain field spectral set respectively, separate the baseline drift component and the effective absorption characteristic component, and reconstruct the effective absorption characteristic component to obtain the purified spectral data. The multi-scale feature extraction module is used to perform convolutional feature mapping on the purified spectral data at different wavelength windows and different resolution scales, and fuse peak morphology information, derivative curve information and integral energy information to obtain multi-scale spectral features. The domain-invariant feature extraction module is used to input the multi-scale spectral features into a preset cross-domain alignment network and obtain the domain-invariant feature representation through joint driving. The pseudo-label generation and filtering module is used to estimate the pseudo-concentration label of the target domain field spectrum set based on the domain-invariant feature representation, generate the pseudo-label confidence score by combining the prediction uncertainty obtained from multiple random samplings, and filter the samples according to the pseudo-label confidence score to obtain a high-confidence pseudo-label sample set. The model training module is used to construct a cross-domain joint loss function using the real concentration labels corresponding to the source domain calibration spectrum set and the pseudo concentration labels corresponding to the high-confidence pseudo label sample set, and to perform weighted joint training on the cross-domain alignment network to obtain the transfer soft measurement model. The online deviation calculation module is used in the online phase to extract online domain invariant feature representations of newly arrived field spectra and calculate their deviation from the training distribution. The drift warning and update module is used to generate a distribution drift warning signal if the deviation exceeds a preset threshold, and to incrementally update the current migration soft measurement model based on the distribution drift warning signal. The concentration prediction output module is used to input the newly arrived field spectrum into the current migration soft measurement model for inference and output the predicted value of sodium alkali solution concentration.

[0072] It should be noted that the electrical connections between the various units described above do not necessarily represent direct or indirect connections. Any indirect connection method can be applied to the embodiments of the present invention as long as it achieves the purpose of the present invention. The above descriptions are merely exemplary embodiments of the present invention and should not be construed as limiting the scope of the present invention.

[0073] All equivalent changes and modifications made in accordance with the teachings of this invention are still within the scope of this invention. Those skilled in the art will readily conceive of other embodiments of this invention upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this invention that follow the general principles of this invention and include common knowledge or conventional techniques in the art not described herein.

Claims

1. A soft measurement method for sodium alkali solution concentration based on transfer learning, characterized in that, The method includes: The transmission spectra of sodium alkoxide solution with real concentration labels and the transmission spectra of sodium alkoxide solution without labels were obtained, and wavelength axis alignment and light intensity normalization were performed to obtain the source domain calibration spectrum set and the target domain field spectrum set. The source domain calibration spectral set and the target domain field spectral set are respectively subjected to spectral decomposition to separate the baseline drift component and the effective absorption characteristic component, and the purified spectral data are obtained by reconstructing the effective absorption characteristic component. The purified spectral data is convolutionally mapped at different wavelength windows and different resolution scales, and the peak morphology information, derivative curve information and integral energy information are fused to obtain multi-scale spectral features. The multi-scale spectral features are input into a preset cross-domain alignment network, and domain-invariant feature representations are obtained through joint driving. Based on the domain-invariant feature representation, pseudo-concentration label estimation is performed on the target domain field spectral set. The prediction uncertainty obtained from multiple random sampling is combined to generate pseudo-label confidence. The samples are then screened based on the pseudo-label confidence to obtain a high-confidence pseudo-label sample set. A cross-domain joint loss function is constructed using the true concentration labels corresponding to the source domain calibration spectrum set and the pseudo concentration labels corresponding to the high-confidence pseudo label sample set. The cross-domain alignment network is then subjected to weighted joint training to obtain the transfer soft measurement model. In the online phase, online domain invariant feature representations are extracted from newly arrived field spectra, and their deviation from the training distribution is calculated. If the deviation exceeds a preset threshold, a distribution drift warning signal is generated, and the current migration soft measurement model is incrementally updated based on the distribution drift warning signal. The newly arrived field spectrum is fed into the current migration soft measurement model for inference, and the predicted value of sodium alkali solution concentration is output.

2. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 1, characterized in that, The obtained source domain calibration spectral set and target domain in-situ spectral set include: In a laboratory calibration environment, sodium alkali solution samples with concentration gradients covering the industrial production use range were scanned to obtain the original laboratory spectra with true concentration labels. Transmission response records were made of sodium alkali solution flowing through the industrial pipeline at a continuous sampling rate to obtain the raw field spectrum without concentration labels. The original laboratory spectra and the original field spectra are subjected to wavelength axis interpolation alignment and light intensity normalization processing to obtain the source domain calibration spectrum set and the target domain field spectrum set.

3. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 1, characterized in that, The obtained purification spectral data includes: Piecewise asymmetric least squares fitting was performed on the source domain calibration spectrum set and the target domain field spectrum set to estimate the low-frequency slowly varying components caused by window crystal adhesion and optical path aging, which were used as baseline drift components. The baseline drift component is subtracted from the source domain calibration spectrum set and the target domain field spectrum set to obtain the remaining absorption response. The shape constraint of sodium alkoxide molecules in the characteristic band is used to screen and retain the remaining absorption response to obtain the effective absorption characteristic component. The effective absorption characteristic components are rearranged in order of their original wavelengths and their amplitudes are normalized within the interval to obtain purified spectral data.

4. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 1, characterized in that, The obtained multi-scale spectral features include: The purified spectral data is locally convolutionally scanned using sliding windows of different widths to extract local peak morphology information that reflects the changes in the position and shape of characteristic absorption peaks; The purified spectral data is subjected to multi-order difference operations to obtain derivative curve information, and the band interval reflecting the characteristic absorption of sodium alkoxide in the purified spectral data is numerically integrated to obtain integrated energy information. The local peak morphology information, derivative curve information, and integral energy information are spliced ​​and fused along the channel dimension to obtain multi-scale spectral features.

5. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 1, characterized in that, The obtained domain-invariant feature representation includes: The multi-scale spectral features are input into a shared feature extraction network to obtain a cross-domain shared embedding representation. The cross-domain shared embedding representation is fed into the regression branch and the domain discrimination branch coupled by the gradient inversion layer, respectively. The domain discrimination branch identifies the domain affiliation and the gradient is passed back to the shared feature extraction network through the gradient inversion layer to calculate the domain discrimination loss. In the feature space of the cross-domain shared embedding representation, the difference of higher-order statistical moments between source domain samples and target domain samples is calculated to obtain the cross-domain feature distribution difference constraint. The domain discrimination loss and the cross-domain feature distribution difference constraint are used as joint driving conditions for backpropagation to optimize the shared feature extraction network and output domain-invariant feature representations.

6. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 1, characterized in that, The obtained high-confidence pseudo-label sample set includes: Input the domain-invariant feature representation corresponding to the target domain field spectrum set into the regression branch, and output the pseudo-concentration label corresponding to the target domain sample; The regression branch is sampled multiple times under random inactivation conditions. The variance of the multiple sampling outputs is used as the prediction uncertainty. The prediction uncertainty is then converted into pseudo-label confidence through a monotonically decreasing mapping. Based on the distribution quantiles of the pseudo-label confidence, an adaptive screening threshold is generated. Samples with pseudo-label confidence below the preset screening threshold are removed, and the remaining samples and their pseudo-concentration labels are retained to obtain a high-confidence pseudo-label sample set.

7. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 5, characterized in that, The obtained migration soft measurement model includes: The source domain supervised regression loss is constructed by the deviation between the actual concentration labels corresponding to the source domain calibration spectral set and the predicted values ​​of the regression branch. The target domain self-supervised regression loss is constructed by the deviation between the pseudo-concentration label corresponding to the high-confidence pseudo-label sample set and the predicted value of the regression branch. The pseudo-label confidence is used to weight each sample item in the target domain self-supervised regression loss to obtain the weighted target domain self-supervised regression loss. The source domain supervised regression loss, weighted target domain self-supervised regression loss, domain discrimination loss, and cross-domain feature distribution difference constraint are linearly combined with learnable balance coefficients to obtain a cross-domain joint loss function. The shared feature extraction network and the regression branch are then jointly optimized through backpropagation to obtain a transfer soft measurement model.

8. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 5, characterized in that, The incremental update of the current migration soft measurement model includes: Extract the online domain invariant feature representation of the newly arrived field spectrum and calculate its deviation from the historical training distribution; If the deviation exceeds the control limit obtained from the statistics of historical drift-free windows, a distribution drift warning signal is triggered. The field spectrum that triggers the distribution drift warning signal is added to the training set as an unlabeled target domain sample. The parameters of the regression branch are fixed, and the shared feature extraction network is subjected to unsupervised domain adaptive fine-tuning based solely on the domain discrimination loss and cross-domain feature distribution difference constraints, thereby completing the incremental update of the current transfer soft measurement model.

9. The soft measurement method for sodium alkali solution concentration based on transfer learning according to claim 7, characterized in that, The predicted output sodium alkali solution concentration includes: The newly arrived on-site spectrum is subjected to spectral decomposition and reconstruction to obtain online purification spectral data. The online purification spectral data is then subjected to convolutional feature mapping and information fusion to obtain online multi-scale spectral features. The online multi-scale spectral features are input into the shared feature extraction network in the current migration soft measurement model to obtain online domain-invariant feature representations. The online domain invariant feature representation is fed into the regression branch of the current migration soft measurement model to obtain the normalized concentration output; The normalized concentration output is denormalized and mapped back to the predicted concentration of sodium alkali solution.

10. A soft measurement system for sodium alkali solution concentration based on transfer learning, applied to the soft measurement method for sodium alkali solution concentration based on transfer learning as described in any one of claims 1-9, characterized in that, The system includes: The data acquisition and preprocessing module is used to acquire the transmission spectra of sodium alkoxide solution with real concentration labels and the transmission spectra of sodium alkoxide solution without labels, and to perform wavelength axis alignment and light intensity normalization to obtain the source domain calibration spectrum set and the target domain field spectrum set. The spectral decomposition and reconstruction module is used to perform spectral decomposition on the source domain calibration spectral set and the target domain field spectral set respectively, separate the baseline drift component and the effective absorption characteristic component, and reconstruct the effective absorption characteristic component to obtain the purified spectral data. The multi-scale feature extraction module is used to perform convolutional feature mapping on the purified spectral data at different wavelength windows and different resolution scales, and fuse peak morphology information, derivative curve information and integral energy information to obtain multi-scale spectral features. The domain-invariant feature extraction module is used to input the multi-scale spectral features into a preset cross-domain alignment network and obtain the domain-invariant feature representation through joint driving. The pseudo-label generation and filtering module is used to estimate the pseudo-concentration label of the target domain field spectrum set based on the domain-invariant feature representation, generate the pseudo-label confidence score by combining the prediction uncertainty obtained from multiple random samplings, and filter the samples according to the pseudo-label confidence score to obtain a high-confidence pseudo-label sample set. The model training module is used to construct a cross-domain joint loss function using the real concentration labels corresponding to the source domain calibration spectrum set and the pseudo concentration labels corresponding to the high-confidence pseudo label sample set, and to perform weighted joint training on the cross-domain alignment network to obtain the transfer soft measurement model. The online deviation calculation module is used in the online phase to extract online domain invariant feature representations of newly arrived field spectra and calculate their deviation from the training distribution. The drift warning and update module is used to generate a distribution drift warning signal if the deviation exceeds a preset threshold, and to incrementally update the current migration soft measurement model based on the distribution drift warning signal. The concentration prediction output module is used to input the newly arrived field spectrum into the current migration soft measurement model for inference and output the predicted value of sodium alkali solution concentration.

Citation Information

Patent Citations

  • Methods for analyzing the content of material components based on infrared spectroscopy

    CN106680238B