A method for rapid quantitative detection of multiple additives in motor gasoline by near infrared spectroscopy

CN122944360APending Publication Date: 2026-10-20BEIJING YIXINGYUAN PETROCHEMICAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611349675.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

现有技术中,基于近红外光谱的汽油添加物定量方法常采用全光谱建模偏最小二乘回归模型或人工经验选波段,然而,全光谱建模会引入大量与添加物无关的基质干扰信息,导致模型过拟合,并且计算量大,难以满足油品检测快速的需求;人工选波段主观性强,无法自适应不同标号汽油的复杂变化

Benefits of technology

本实施例通过引入基于化学信息冗余度和模型稳定性指数的光谱区间竞争因子,有效解决了传统全光谱建模中基质干扰严重及虚假相关导致模型失稳的问题。特别地,通过子区间筛选,本实施例将高维光谱解构为多个独立的局部特征单元,有效阻断了无关波段对有效信号的稀释与掩盖,显著降低了数据维度与模型复杂度。该竞争因子通过化学信息冗余度精准剔除了仅反映汽油基底共性吸收的冗余波段,确保入选区间包含独特的添加物化学结构信息。同时,借助模型稳定性指数有效甄别并排除了对样本扰动或噪声过于敏感的过拟合区间,保证了模型在实际复杂工况下的鲁棒性。不仅大幅提升了低浓度添加物的检测灵敏度与定量精度,还显著加快了模型运算速度,使其更适配车载或便携式快检设备的现场快速筛查需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure QLYQS_2
    Figure QLYQS_2
Patent Text Reader

Abstract

This invention relates to the field of petroleum product testing technology, and more particularly to a rapid quantitative near-infrared spectroscopy method for detecting multiple additives in automotive gasoline. This invention effectively solves the problems of severe matrix interference and spurious correlations leading to model instability in traditional full-spectrum modeling by introducing a spectral interval competition factor based on chemical information redundancy and model stability index. Specifically, through sub-interval screening, the high-dimensional spectrum is deconstructed into multiple independent local feature units, effectively preventing irrelevant bands from diluting and masking the effective signal, significantly reducing data dimensionality and model complexity. This competition factor accurately eliminates redundant bands that only reflect the common absorption of the gasoline matrix through chemical information redundancy, ensuring that the selected intervals contain unique chemical structure information of the additives. This invention significantly accelerates model computation speed, making it more suitable for the rapid on-site screening needs of vehicle-mounted or portable rapid testing equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil testing technology, and in particular to a rapid quantitative near-infrared spectroscopy method for detecting multiple additives in automotive gasoline. Background Technology

[0002] Currently, the quantitative detection of common additives in automotive gasoline mostly employs gas chromatography or near-infrared spectroscopy combined with partial least squares regression. Near-infrared spectroscopy is widely used in fuel quality monitoring due to its advantages of speed, non-destructive nature, and reagent-free operation. Existing technologies for quantitative analysis of gasoline additives based on near-infrared spectroscopy often use full-spectrum modeling with partial least squares regression or manual selection of bands based on experience. However, full-spectrum modeling introduces a large amount of matrix interference information unrelated to the additives, leading to model overfitting and high computational cost, making it difficult to meet the demands of rapid fuel detection. Manual band selection is highly subjective and cannot adapt to the complex variations of different octane ratings of gasoline. Furthermore, some technical solutions select bands based on signal-to-noise ratio or sensitivity, but these indicators are easily affected by instrument conditions and ambient temperature fluctuations, resulting in unstable selection results and reducing the model's engineering applicability. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy, which solves the problems existing in the prior art.

[0004] This invention provides a rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy, the method comprising the following steps:

[0005] S1: Prepare a set of standard samples, acquire spectral data, and construct a dataset; S2: Perform data preprocessing operations on the spectral data of each dataset; S3: Perform spectral partitioning on the spectral data after data preprocessing; S4: Calculate the spectral interval competition factor based on the chemical information redundancy and interval model stability index of each sub-interval, and perform interval screening based on the spectral interval competition factor; Specifically, S4 consists of: S4.1: Calculating the chemical information concentration of each sub-interval; S4.2: Calculating the interval information overlap of each sub-interval; S4.3: Calculating the chemical information redundancy of each sub-interval based on the chemical information concentration and the interval information overlap; S4.4: Calculating the interval model stability index of each sub-interval; S4.5: Calculating the spectral interval competition factor based on the chemical information redundancy and the interval model stability index of each sub-interval; S4.6: Performing interval screening on the sub-intervals based on the spectral interval competition factor of each sub-interval. S5: Combine the selected sub-intervals of each sample into an optimal dataset to train the partial least squares regression model; S6: Collect spectral data of the sample to be tested, input the spectral data into the trained partial least squares regression model, and obtain the near-infrared spectral detection results of various additives in automotive gasoline.

[0006] Preferably, in step S4.1, the calculation process for the chemical information concentration of each sub-interval is as follows: By analyzing the spectral data matrix of the k-th sub-interval Principal component analysis is performed, and the proportion of explained variance of the first principal component is extracted as the chemical information concentration of the k-th subinterval. The expression for the proportion of explained variance of the first principal component is as follows: ; In the formula, Let be the percentage of variance explained by the first principal component in the k-th subinterval. Let be the eigenvalue corresponding to the first principal component of the k-th subinterval. This represents the number of wavelength points in the k-th sub-interval.

[0007] Preferably, in step S4.2, mutual information is used to quantify the overlap of interval information in each sub-interval, and the expression is: ; In the formula, Let be the interval information overlap of the k-th sub-interval. It is a full-spectrum data matrix. Let be the spectral data matrix of the k-th sub-interval. For mutual information operators; Mutual information is calculated using the kernel density estimation method, and the expression is as follows: ; In the formula, Let be the probability density function.

[0008] Preferably, in step S4.3, the formula for calculating the redundancy of chemical information is: ; In the formula, Let be the redundancy of chemical information in the k-th sub-interval.

[0009] Preferably, in S4.4, calculating the interval model stability index for each sub-interval specifically involves: For the k-th sub-interval, a partial least squares regression model is established using the spectral data matrix of the k-th sub-interval and the corresponding additive concentration, and its root mean square error of prediction under five-fold cross-validation is calculated as the baseline performance. The expression is: ; in, Let be the spectral data matrix of the k-th sub-interval. This refers to the corresponding additive concentration; Spectral data matrix for the k-th sub-interval Perform intra-column permutations, specifically by permuting the spectral data matrix of the k-th sub-interval. Each column is independently and randomly shuffled to generate a permuted spectral matrix. ; Using the permuted spectral matrix A new partial least squares regression model was established based on the corresponding additive concentrations, and its cross-validation error was calculated. The expression is: ; Repeat the above permutation operation P times to obtain a set of permutation errors. In the formula The cross-validation error calculated for the partial least squares regression model built for the data after the p-th permutation; Then the model stability index of the k-th subinterval The expression is: .

[0010] Preferably, in step S4.5, the expression for the spectral interval competition factor is: ; In the formula, The spectral interval competition factor for the k-th sub-interval. Let the redundancy of chemical information in the k-th sub-interval be denoted as . Let be the model stability index for the k-th sub-interval.

[0011] Preferably, in step S4.6, a threshold for the spectral range competition factor is set. Spectral interval competition factors greater than the spectral interval competition factor threshold are selected. This allows for interval filtering by identifying sub-intervals.

[0012] Preferably, S3 specifically comprises: Let S be the spectral vector of the spectral data after data preprocessing. The spectral vector is divided into K continuous sub-intervals. Each of the sub-intervals Include There are wavelength points, and the wavelength points satisfy... ; Wherein, the number of wavelength points in the sub-interval The full width at half maximum (FWHM) of the characteristic peaks of typical additives in near-infrared spectra is determined by the following formula: ; In the formula, K is the total number of sub-intervals, and p is the total number of wavelength points in the full spectrum; For the k-th sub-interval, extract the spectral data of all samples within that interval to form a sub-interval spectral data matrix. .

[0013] Preferably, in step S2, the data preprocessing operation includes multivariate scattering correction and first-order derivative processing.

[0014] Preferably, the multivariate scattering correction specifically includes: Calculate all samples at each wavelength point The average spectrum is used as the ideal reference spectrum; The expression is: ; In the formula, For the ideal reference spectrum at the j-th wavelength point, Let be the original absorbance of the i-th sample at the j-th wavelength, and n be the total number of samples. Perform a univariate linear regression on the spectrum of each sample and its corresponding reference spectrum, and then use the regression coefficients to correct the original spectral data, thereby achieving multivariate scattering correction.

[0015] The embodiments of the present invention have the following technical effects: This embodiment effectively addresses the problems of severe matrix interference and spurious correlations leading to model instability in traditional full-spectrum modeling by introducing a spectral interval competition factor based on chemical information redundancy and model stability index. Specifically, through sub-interval screening, this embodiment deconstructs the high-dimensional spectrum into multiple independent local feature units, effectively preventing irrelevant bands from diluting and masking the effective signal, significantly reducing data dimensionality and model complexity. This competition factor accurately eliminates redundant bands that only reflect the common absorption of the gasoline matrix through chemical information redundancy, ensuring that the selected intervals contain unique additive chemical structure information. Simultaneously, the model stability index effectively identifies and eliminates overfitted intervals that are overly sensitive to sample perturbations or noise, ensuring the model's robustness under complex real-world conditions. This not only significantly improves the detection sensitivity and quantitative accuracy of low-concentration additives but also significantly accelerates model computation speed, making it more suitable for the rapid on-site screening needs of vehicle-mounted or portable rapid testing equipment. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific 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 from these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a rapid quantitative detection method for multiple additives in automotive gasoline provided by an embodiment of the present invention; Figure 2 This is a flowchart of interval screening based on spectral interval competition factors provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] Example 1, Figure 1 A flowchart of a rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy is shown, as follows: Figure 1 As shown, a rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy includes the following steps: S1: Prepare a set of standard samples, acquire spectral data, and construct a dataset; Different grades and refining processes of automotive gasoline were collected as base oil samples. Several common functional additives in automotive gasoline were selected as quantitative targets. The additives were added to the base oil samples in a single-component or compound manner according to the concentration range that may exist in actual automotive gasoline. The samples were then thoroughly mixed in a constant temperature shaker for 30 minutes and then allowed to stand for 2 hours to ensure that the additives were uniformly dispersed in the base and reached thermodynamic equilibrium, thereby preparing a standard sample set of automotive gasoline containing different additive concentrations.

[0020] The different grades are 92#, 95#, and 98#; the different refining processes include catalytic cracking, reforming, and alkylation blending; the functional additives include oxygen-containing compounds: methanol, ethanol, methyl tert-butyl ether, antiknock agents: aniline derivatives, antioxidants: 2,6-di-tert-butyl-p-cresol, etc.

[0021] A Fourier transform near-infrared spectrometer was used, equipped with a transmission or diffuse transmission sampling module, for near-infrared spectral acquisition. The acquisition parameters of the Fourier transform near-infrared spectrometer were: spectral range of 900nm-1700nm; resolution of 2nm; number of scans of 32; and reference background of air or blank quartz cuvette.

[0022] The sample is injected into the quartz cuvette of the Fourier transform near-infrared spectrometer, with the optical path controlled at 10 mm. The spectrum is collected under constant temperature to obtain the absorbance curve. The spectrum of each sample is collected three times consecutively, and the average value is taken as the final spectral data of the sample to eliminate sample loading error. If the correlation coefficient of the three spectra is lower than 0.99, the sample is loaded and collected again.

[0023] The collected spectral data are associated with the corresponding additive concentration labels to construct a dataset.

[0024] S2: Perform data preprocessing operations on the spectral data of each dataset; In this step, mathematical correction is performed on the raw near-infrared spectrum to eliminate non-chemical information interference caused by differences in sample physical properties and instrument fluctuations, thereby improving the correlation between spectral data and additive concentrations. The data preprocessing operations include multivariate scattering correction and first-order derivative processing.

[0025] In near-infrared spectroscopy acquisition, tiny particles, bubbles, or inhomogeneities in gasoline samples can cause light scattering, leading to spectral shifts or scaling that mask the true chemical absorption information. Multivariate scattering correction eliminates this interference through the following methods: Calculate all samples at each wavelength point The average spectrum is used as the ideal reference spectrum; The expression is: ; In the formula, For the ideal reference spectrum at the j-th wavelength point, Let be the original absorbance of the i-th sample at the j-th wavelength, and n be the total number of samples.

[0026] A univariate linear regression is performed on the spectrum of each sample and its corresponding reference spectrum. The regression coefficients are then used to correct the original spectral data, thereby achieving multivariate scattering correction.

[0027] Even after multivariate scattering correction, the spectrum may still exhibit slowly changing baseline drift, especially in complex matrices. First-order derivative processing can effectively eliminate such low-frequency interference and enhance spectral resolution. Specifically, the first-order derivative processing involves using the Savitzky-Golay convolution derivative method to calculate the first derivative of the multivariate scattering correction spectral data.

[0028] After multivariate scattering correction and first derivative processing, additive and multiplicative interferences caused by optical path changes and scattering in the spectral data are effectively removed, overlapping absorption peaks are separated, the positions of characteristic peaks are clearer, and the linear relationship between the spectrum and the concentration of additives is significantly enhanced, providing high-quality input data for subsequent quantitative detection.

[0029] S3: Perform spectral partitioning on the spectral data after data preprocessing; In the near-infrared spectrum of automotive gasoline, the absorption peaks of different functional groups are distributed in different wavelength regions, and the characteristic information of each additive is often concentrated in a specific narrow band. If the division is too coarse, too many irrelevant variables will be introduced; if the division is too fine, the amount of information in the interval will be insufficient. Therefore, this step adopts a continuous division method with equal bandwidth to balance information integrity and computational efficiency.

[0030] Specifically, S3 is as follows: Let S be the spectral vector of the spectral data after data preprocessing. The spectral vector is divided into K continuous sub-intervals. Each of the sub-intervals Include There are wavelength points, and the wavelength points satisfy... .

[0031] Wherein, the number of wavelength points in the sub-interval The full width at half maximum (FWHM) of the characteristic peaks of typical additives in near-infrared spectra is determined by the following formula: ; In the formula, K is the total number of sub-intervals, and p is the total number of wavelength points in the full spectrum.

[0032] For the k-th sub-interval, extract the spectral data of all samples within that interval to form a sub-interval spectral data matrix. This matrix will serve as the basic input unit for subsequent calculations of the interval competition factor.

[0033] S4: Calculate the spectral interval competition factor based on the chemical information redundancy and interval model stability index of each sub-interval, and perform interval screening based on the spectral interval competition factor; In existing technologies, quantitative methods for gasoline additives based on near-infrared spectroscopy often employ full-spectrum modeling or manual selection of bands based on experience. However, full-spectrum modeling introduces a large amount of matrix interference information unrelated to the additives, leading to model overfitting. Manual band selection is highly subjective and cannot adapt to the complex variations of different gasoline grades. Furthermore, some technical solutions select bands based on signal-to-noise ratio or sensitivity, but these indicators are easily affected by instrument status and ambient temperature fluctuations, resulting in unstable selection results and reducing the model's engineering applicability.

[0034] Based on this, this embodiment proposes a feature selection method based on spectral interval competition factors. Unlike traditional methods that rely on physical signal-to-noise ratio, this invention constructs competition factors from two dimensions: chemical information redundancy and model stability, thereby more robustly screening the spectral intervals most sensitive to additive content. Specifically, as... Figure 2 As shown, S4 specifically includes: S4.1: Calculate the chemical information concentration for each sub-interval; In the near-infrared spectrum of automotive gasoline, most spectral ranges reflect the absorption of basic components such as alkanes and cycloalkanes. This information highly overlaps across the entire spectrum, offering limited contribution to distinguishing specific additives. Truly valuable ranges should contain unique chemical structural information and exhibit low overlap with other ranges. Based on this, this invention proposes a chemical information concentration measure to assess the uniqueness of information in the k-th spectral range.

[0035] The calculation process for the chemical information concentration of each sub-interval is as follows: The chemical information concentration (CIF) of each sub-interval is calculated. The CIF measures the explanatory power of the spectrum within that interval for internal chemical changes. In this step, this is achieved by analyzing the spectral data matrix of the k-th sub-interval. Principal component analysis is performed, and the proportion of explained variance of the first principal component is extracted as the chemical information concentration of the k-th subinterval. The expression for the proportion of explained variance of the first principal component is as follows: ; In the formula, Let be the percentage of variance explained by the first principal component in the k-th subinterval. Let be the eigenvalue corresponding to the first principal component of the k-th subinterval. Let be the number of wavelength points in the k-th subinterval, where The closer it is to 1, the more concentrated the spectral information in that range is on a single chemical pattern, and the higher the purity of the information.

[0036] S4.2: Calculate the overlap of interval information for each sub-interval; Inter-interval information overlap is used to measure whether the information carried by the spectrum in a given interval highly overlaps with the full-spectral background. In this step, mutual information is used for quantification, and the expression is: ; In the formula, Let be the interval information overlap of the k-th sub-interval. It is a full-spectrum data matrix. Let be the spectral data matrix of the k-th sub-interval. For mutual information operators.

[0037] Furthermore, since near-infrared spectroscopy is high-dimensional continuous data, the kernel density estimation method is used to calculate mutual information, and the expression is: ; In the formula, Let be the probability density function.

[0038] S4.3: Calculate the chemical information redundancy of each sub-interval based on the chemical information concentration and the interval information overlap. The formula for calculating the redundancy of chemical information is as follows: ; In the formula, Let be the redundancy of chemical information in the k-th sub-interval.

[0039] S4.4: Calculate the interval model stability index for each sub-interval; In the near-infrared spectroscopy of automotive gasoline, certain spectral intervals appear to be highly correlated with various components in the fuel, but in reality, they merely approximate random fluctuations in the training set. These intervals perform well during training, but their prediction results are extremely unstable in practical applications. To identify and eliminate such intervals, this step introduces a wavelength point permutation test. By randomly shuffling the correspondence between spectrum and concentration, the degree of model performance collapse is observed, thereby quantifying the essential stability of the interval model. Specifically, the calculation of the interval model stability index for each sub-interval is as follows: For the k-th sub-interval, a partial least squares regression model is established using the spectral data matrix of the k-th sub-interval and the corresponding additive concentration, and its root mean square error of prediction under five-fold cross-validation is calculated as the baseline performance. The expression is: ; in, Let be the spectral data matrix of the k-th sub-interval. This refers to the concentration of the corresponding additive.

[0040] To disrupt the true chemical correlation between spectral data and concentration while maintaining the statistical distribution of the data itself, the spectral data matrix of the k-th sub-interval is... Perform intra-column permutations, specifically by permuting the spectral data matrix of the k-th sub-interval. Each column is independently and randomly shuffled to generate a permuted spectral matrix. At this point, the shape and distribution of the spectrum remain unchanged, but the correspondence with the concentration has been randomized.

[0041] Using the permuted spectral matrix A new partial least squares regression model was established based on the corresponding additive concentrations, and its cross-validation error was calculated. The expression is: ; Repeat the above permutation operation P times to obtain a set of permutation errors. In the formula The cross-validation error is calculated for the partial least squares regression model built for the data after the p-th permutation.

[0042] The model stability index of the k-th subinterval The relative degradation of the baseline performance with respect to the substitution performance is expressed as: ; This step, by slightly disrupting the true relationship between spectrum and concentration, can accurately eliminate spurious intervals that rely solely on statistical coincidence to fit the data. Compared to the perturbation method, this method does not rely on assumptions about the distribution of instrument noise, resulting in more objective evaluation results.

[0043] S4.5: Calculate the spectral interval competition factor based on the chemical information redundancy of each sub-interval and the interval model stability index of each sub-interval; This step integrates the chemical information quality and model anti-interference capability of spectral regions to construct a spectral region competition factor, thereby enabling the optimal selection of the near-infrared spectral region for automotive gasoline.

[0044] Specifically, the expression for the spectral interval competition factor is: ; In the formula, The spectral interval competition factor for the k-th sub-interval. Let the redundancy of chemical information in the k-th sub-interval be denoted as . Let be the model stability index for the k-th sub-interval.

[0045] S4.6: Perform interval screening on the sub-intervals based on the spectral interval competition factor of each sub-interval; Set the threshold for the competition factor in the spectral range Spectral interval competition factors greater than the spectral interval competition factor threshold are selected. This allows for interval filtering by identifying sub-intervals.

[0046] This embodiment effectively addresses the problems of severe matrix interference and spurious correlations leading to model instability in traditional full-spectrum modeling by introducing a spectral interval competition factor based on chemical information redundancy and model stability index. Specifically, through sub-interval screening, this embodiment deconstructs the high-dimensional spectrum into multiple independent local feature units, effectively preventing irrelevant bands from diluting and masking the effective signal, significantly reducing data dimensionality and model complexity. This competition factor accurately eliminates redundant bands that only reflect the common absorption of the gasoline matrix through chemical information redundancy, ensuring that the selected intervals contain unique additive chemical structure information. Simultaneously, the model stability index effectively identifies and eliminates overfitted intervals that are overly sensitive to sample perturbations or noise, ensuring the model's robustness under complex real-world conditions. This not only significantly improves the detection sensitivity and quantitative accuracy of low-concentration additives but also significantly accelerates model computation speed, making it more suitable for the rapid on-site screening needs of vehicle-mounted or portable rapid testing equipment.

[0047] S5: Combine the selected sub-intervals of each sample into an optimal dataset to train the partial least squares regression model; The selected sub-intervals of each sample are concatenated along the wavelength axis to obtain the optimal dataset for each sample. A partial least squares regression model is then trained on this dataset. During training, leave-one-out cross-validation is used to determine the optimal number of principal components to prevent overfitting. Principal component extraction is stopped when adding new principal components no longer significantly reduces the cross-validation error.

[0048] S6: Collect spectral data of the sample to be tested, input the spectral data into the trained partial least squares regression model, and obtain the near-infrared spectral detection results of various additives in automotive gasoline; Take a sample of automotive gasoline to be tested, and inject it directly into a quartz cuvette without complex chemical pretreatment. Using the same near-infrared spectrometer and parameter settings as in the modeling above, collect the raw spectral data of the sample in the range of 900–1700 nm. Perform the same preprocessing and interval filtering operations as in the modeling above on the raw spectral data to obtain the optimized dataset, and input it into the trained partial least squares regression model to obtain the near-infrared spectral detection results of various additives in automotive gasoline.

[0049] Example 3: The present invention also provides an electronic device, including one or more processors and a memory.

[0050] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0051] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processor may execute the program instructions to implement the near-infrared spectroscopy rapid quantitative detection method for multiple additives in automotive gasoline described in any embodiment of this application above, and / or other desired functions. Various contents such as initial extrinsic parameters and thresholds may also be stored in the computer-readable storage medium.

[0052] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy, characterized in that, The method includes the following steps: S1: Prepare a set of standard samples, acquire spectral data, and construct a dataset; S2: Perform data preprocessing operations on the spectral data of each dataset; S3: Perform spectral partitioning on the spectral data after data preprocessing; S4: Calculate the spectral interval competition factor based on the chemical information redundancy and interval model stability index of each sub-interval, and perform interval screening based on the spectral interval competition factor; Specifically, S4 consists of: S4.1: Calculating the chemical information concentration of each sub-interval; S4.2: Calculating the interval information overlap of each sub-interval; S4.3: Calculating the chemical information redundancy of each sub-interval based on the chemical information concentration and the interval information overlap; S4.4: Calculating the interval model stability index of each sub-interval; S4.5: Calculating the spectral interval competition factor based on the chemical information redundancy and the interval model stability index of each sub-interval; S4.6: Performing interval screening on the sub-intervals based on the spectral interval competition factor of each sub-interval. S5: Combine the selected sub-intervals of each sample into an optimal dataset to train the partial least squares regression model; S6: Collect spectral data of the sample to be tested, input the spectral data into the trained partial least squares regression model, and obtain the near-infrared spectral detection results of various additives in automotive gasoline.

2. The method for rapid quantitative detection of multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 1, characterized in that, In S4.1, the calculation process for the chemical information concentration of each sub-interval is as follows: By analyzing the spectral data matrix of the k-th sub-interval Principal component analysis is performed, and the proportion of explained variance of the first principal component is extracted as the chemical information concentration of the k-th subinterval. The expression for the proportion of explained variance of the first principal component is as follows: ; In the formula, Let be the percentage of variance explained by the first principal component in the k-th subinterval. Let be the eigenvalue corresponding to the first principal component of the k-th subinterval. This represents the number of wavelength points in the k-th sub-interval.

3. The method for rapid quantitative detection of multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 2, characterized in that, In step S4.2, mutual information is used to quantify the overlap of interval information in each sub-interval, and the expression is as follows: ; In the formula, Let be the interval information overlap of the k-th sub-interval. It is a full-spectrum data matrix. Let be the spectral data matrix of the k-th sub-interval. For mutual information operators; Mutual information is calculated using the kernel density estimation method, and the expression is as follows: ; In the formula, Let be the probability density function.

4. The near-infrared spectroscopy rapid quantitative detection method for multiple additives in automotive gasoline according to claim 3, characterized in that, In S4.3, the formula for calculating the redundancy of chemical information is: ; In the formula, Let be the redundancy of chemical information in the k-th sub-interval.

5. The near-infrared spectroscopy rapid quantitative detection method for multiple additives in automotive gasoline according to claim 4, characterized in that, In S4.4, the calculation of the interval model stability index for each sub-interval specifically involves: For the k-th sub-interval, a partial least squares regression model is established using the spectral data matrix of the k-th sub-interval and the corresponding additive concentration, and its root mean square error of prediction under five-fold cross-validation is calculated as the baseline performance. The expression is: ; in, Let be the spectral data matrix of the k-th sub-interval. This refers to the corresponding additive concentration; Spectral data matrix for the k-th sub-interval Perform intra-column permutations, specifically by permuting the spectral data matrix of the k-th sub-interval. Each column is independently and randomly shuffled to generate a permuted spectral matrix. ; Using the permuted spectral matrix A new partial least squares regression model was established based on the corresponding additive concentrations, and its cross-validation error was calculated. The expression is: ; Repeat the above permutation operation P times to obtain a set of permutation errors. In the formula The cross-validation error calculated for the partial least squares regression model built for the data after the p-th permutation; Then the model stability index of the k-th subinterval The expression is: 。 6. The rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 5, characterized in that, In S4.5, the expression for the spectral interval competition factor is: ; In the formula, The spectral interval competition factor for the k-th sub-interval. Let the redundancy of chemical information in the k-th sub-interval be denoted as . Let be the model stability index for the k-th sub-interval.

7. The rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 6, characterized in that, In S4.6, a threshold for the spectral range competition factor is set. Spectral interval competition factors greater than the spectral interval competition factor threshold are selected. This allows for the selection of sub-intervals, thus enabling interval filtering.

8. The rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 1, characterized in that, Specifically, S3 is: Let S be the spectral vector of the spectral data after data preprocessing. The spectral vector is divided into K continuous sub-intervals. Each of the sub-intervals Include There are wavelength points, and the wavelength points satisfy... ; Wherein, the number of wavelength points in the sub-interval The full width at half maximum (FWHM) of the characteristic peaks of typical additives in near-infrared spectra is determined by the following formula: ; In the formula, K is the total number of sub-intervals, and p is the total number of wavelength points in the full spectrum; For the k-th sub-interval, extract the spectral data of all samples within that interval to form a sub-interval spectral data matrix. .

9. The rapid quantitative detection method for multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 1, characterized in that, In S2, the data preprocessing operation includes multivariate scattering correction and first-order derivative processing.

10. The method for rapid quantitative detection of multiple additives in automotive gasoline using near-infrared spectroscopy according to claim 9, characterized in that, The multivariate scattering correction specifically refers to: Calculate all samples at each wavelength point The average spectrum is used as the ideal reference spectrum; The expression is: ; In the formula, For the ideal reference spectrum at the j-th wavelength point, Let be the original absorbance of the i-th sample at the j-th wavelength, and n be the total number of samples; A univariate linear regression is performed on the spectrum of each sample and its corresponding reference spectrum. The regression coefficients are then used to correct the original spectral data, thereby achieving multivariate scattering correction.