Ultraviolet oil measuring device and method and ultraviolet oil measuring instrument

By combining an ultraviolet oil analysis device with a machine learning processing module, the standard curve is dynamically adjusted, solving the measurement error problems caused by instrument drift and environmental changes in traditional ultraviolet oil analysis methods. This achieves automated and intelligent measurement calibration, improving the accuracy and stability of the measurement.

CN121499412APending Publication Date: 2026-02-10SHANGHAI YOKE INSTR CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610037468.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional ultraviolet oil measurement methods cannot effectively address issues such as instrument hardware drift, environmental changes, and long-term stability degradation, resulting in large measurement errors and the need for frequent manual calibration.

Method used

An ultraviolet oil analysis device is used in conjunction with a machine learning processing module. Multi-dimensional information is acquired through a data acquisition module to generate feature vectors. A pre-trained PLS model is used to analyze concentration deviations, and the standard curve is dynamically adjusted to achieve automatic compensation and correction.

Benefits of technology

It improves measurement accuracy and stability, reduces reliance on manual calibration, and achieves closed-loop self-calibration of the measurement process, making it suitable for long-term stable online monitoring and rapid on-site detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121499412A_ABST
    Figure CN121499412A_ABST
Patent Text Reader

Abstract

The invention relates to an ultraviolet oil measuring device and method and an ultraviolet oil measuring instrument. The device comprises a data acquisition module and a machine learning processing module. The data acquisition module is used for acquiring an ultraviolet spectrum matrix of a water sample to be measured in a measurement wavelength range, acquiring instrument diagnosis parameters and historical measurement data of the ultraviolet oil meter, and generating a feature vector. And the machine learning processing module is used for determining a concentration deviation value by using a pre-trained PLS model according to the feature vector, adjusting the standard curve based on the concentration deviation value to generate a corrected standard curve, and calculating the petroleum substance concentration of the water sample to be detected according to the corrected standard curve. The prediction capability of machine learning is combined with the traditional standard curve method, and automatic compensation and correction of various error sources such as instrument hardware drift, environment change and long-term stability reduction are realized, so that the measurement accuracy and stability of the ultraviolet oil meter are remarkably improved, and the dependence on frequent manual calibration is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of environmental monitoring and analysis instruments, in particular to a ultraviolet oil measuring device, method and ultraviolet oil measuring instrument. BACKGROUND

[0002] The detection of petroleum substances is of great significance in many fields such as environmental monitoring and industrial production. In the aspect of environmental monitoring, accurate detection of the content of petroleum substances in water can help to evaluate the degree of water pollution and provide scientific basis for water resource protection and management. In industrial production, the detection of petroleum substances can ensure the safety of the production process and the quality of the products. With the continuous progress of science and technology, ultraviolet oil measurement technology has gradually become one of the important means for detecting petroleum substances due to its high sensitivity and relatively simple operation. It can obtain relatively accurate detection results in a short time, meeting the needs of rapid detection and real-time monitoring.

[0003] The traditional ultraviolet oil measurement method mainly relies on the standard curve method. This method measures the absorbance of a standard sample with known concentration at a specific wavelength, draws a standard curve between absorbance and concentration, and then measures the absorbance of the water sample to be tested. According to the standard curve, the concentration of petroleum substances in the water sample to be tested is determined. In addition, a single-point calibration method is also used, which selects a representative standard sample for calibration. Some methods combine some simple optical elements and sensors to perform preliminary pretreatment and detection of the water sample. These methods can achieve the detection of petroleum substances to some extent, but are limited by various factors in actual application.

[0004] However, the traditional ultraviolet oil measurement method has obvious defects. The standard curve method and the single-point calibration method cannot effectively deal with problems such as instrument hardware drift, environmental changes and long-term stability decline. During use, the light source intensity will gradually decrease, the wavelength may deviate, and the dark current will change, which will cause large errors in the measurement results. Moreover, changes in environmental temperature, humidity and other factors will also affect the measurement results. Since these error sources cannot be compensated and corrected in real time, the traditional method cannot guarantee the accuracy and stability of the measurement, and frequent manual calibration is often required, increasing the detection cost and workload. SUMMARY

[0005] In order to at least partially solve the above technical problems in the prior art, the present application provides an ultraviolet oil measuring device, method and automatic ultraviolet oil measuring instrument.

[0006] In one aspect, the present application provides an ultraviolet oil measuring device, which adopts the following technical solution: An ultraviolet oil measuring device for an ultraviolet oil measuring instrument, comprising: The data acquisition module is configured to acquire an ultraviolet spectrum matrix of a water sample to be measured in a measurement wavelength range, obtain instrument diagnostic parameters of the ultraviolet oil measuring instrument, read historical measurement data of the ultraviolet oil measuring instrument, and generate a feature vector based on the ultraviolet spectrum matrix, the instrument diagnostic parameters, and the historical measurement data. The machine learning processing module is connected to the data acquisition module and configured to determine a concentration deviation amount based on the feature vector using a pre-trained PLS model, adjust a standard curve based on the concentration deviation amount to generate a corrected standard curve, and calculate a concentration of petroleum substances in the water sample to be measured based on the corrected standard curve.

[0007] By using the above technical solution, the data acquisition module acquires multi-dimensional information including ultraviolet spectrum, instrument diagnostic parameters, and historical measurement data and generates a feature vector, and the machine learning processing module analyzes the feature vector using a pre-trained PLS model, which can accurately quantify the concentration deviation amount under the current instrument state and dynamically adjust the standard curve based on the deviation amount. This solution combines the prediction ability of machine learning with the traditional standard curve method, realizes automatic compensation and correction of various error sources such as instrument hardware drift, environmental changes, and long-term stability decline, and significantly improves the measurement accuracy, stability, and automation level of the ultraviolet oil measuring instrument, reducing the dependence on frequent manual calibration.

[0008] Optionally, the instrument diagnostic parameters include a dark current correction value, a wavelength correction deviation, a light source intensity attenuation coefficient, and an environmental temperature.

[0009] By using the above technical solution, the instrument diagnostic parameters are specifically dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and environmental temperature, so that the data acquisition module can capture key physical factors that cause measurement errors. For example, dark current reflects baseline drift, and light source intensity attenuation affects measurement sensitivity. This provides more specific and rich input information for subsequent machine learning models to accurately trace errors and target correction, thereby improving the accuracy of model analysis of error causes and correction of standard curves.

[0010] Optionally, the training process of the pre-trained PLS model includes: constructing a training data set; extracting latent variables from the training data set by a PLS algorithm; evaluating the error of the PLS model under different numbers of latent variables by cross-validation to select a pre-trained PLS model that can provide the lowest prediction residual; verifying the pre-trained PLS model and deploying the pre-trained PLS model in the machine learning processing module.

[0011] By using the technical scheme, through a systematic training process of constructing a training data set, using a PLS algorithm to extract latent variables, selecting an optimal model through cross-validation, and final verification and deployment, the pre-trained PLS model used has good prediction accuracy and generalization ability. The training process ensures that the model can effectively learn from complex multi-dimensional data and establish a reliable correlation between the spectrum, instrument state and concentration, providing stable and efficient core algorithm support for subsequent online real-time calibration, and is the basis for realizing high-precision measurement.

[0012] Optionally, the machine learning processing module is configured to determine a concentration deviation amount according to the feature vector using a pre-trained PLS model; wherein the machine learning processing module is configured to: calculate a predicted concentration C ML according to the feature vector, and the predicted concentration C ML is expressed as follows: , wherein X represents the feature vector, represents a regression coefficient vector of the pre-trained PLS model, and C0 represents an intercept of the pre-trained PLS model; The concentration deviation amount is calculated according to the predicted concentration C ML , and the concentration deviation amount is expressed as follows: , wherein C true represents the real concentration of the quality control liquid.

[0013] By using the technical scheme, the calculation method of the concentration deviation amount is clear. First, a theoretical concentration value C ML is predicted by the pre-trained PLS model and the real-time feature vector, and then it is compared with a known real concentration C true of a quality control liquid. This method provides a clear and quantifiable error evaluation standard for the entire calibration system, so that the overall measurement deviation of the instrument under the current state can be accurately calculated, and a clear basis is provided for subsequent targeted adjustment of the standard curve.

[0014] Optionally, the machine learning processing module adjusts the standard curve based on the concentration deviation amount to generate a corrected standard curve; wherein the machine learning processing module (20) is configured to: analyze the contribution degree of the instrument diagnosis parameter to the concentration deviation amount to generate error source analysis information; calculate a slope correction amount and an intercept correction amount of the standard curve based on the error source analysis information through the PLS model; and determine the corrected standard curve according to the slope correction amount and the intercept correction amount , and the corrected standard curve is expressed as follows: , Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

[0015] By employing the above technical solution, and analyzing the contribution of diagnostic parameters to concentration deviation, a deeper understanding has been achieved, moving beyond simply "calculating the total error" to "analyzing the sources of error." This solution can distinguish and quantify the impact of different error sources (such as sensitivity drift and baseline drift) on the total deviation, and accordingly calculate the correction amount ∆k for the slope of the standard curve and the correction amount ∆b for the intercept. This targeted correction method is more precise than simple overall translation or scaling, and can more realistically reflect changes in instrument status, thereby generating a more accurate and suitable corrected standard curve for the current state.

[0016] Optionally, the machine learning processing module is configured to analyze the contribution of the instrument diagnostic parameters to the concentration deviation to generate error source analysis information; wherein, the concentration deviation is... Decomposed into sensitivity error and baseline error And using the regression coefficient vector of the PLS model Estimating sensitivity error and baseline error It can be expressed as the following formula: , Among them, f k and f b Represents the attribution function. Indicates the light source attenuation characteristics, This indicates the characteristics of dark current.

[0017] The above technical solution further refines the analysis method for error sources. Using a specific attribution function, the total concentration deviation is decomposed into sensitivity error related to light source attenuation and baseline error related to dark current using the regression coefficients of the PLS model. This makes the error attribution process more model-driven and automated, intelligently determining whether the measurement deviation is mainly caused by sensitivity changes (affecting the slope) or baseline drift (affecting the intercept). This provides direct, model-driven input for calculating precise corrections to the slope and intercept, significantly improving the intelligence and accuracy of the calibration.

[0018] On the other hand, this application also provides a method for ultraviolet oil determination, which adopts the following technical solution:

[0019] An ultraviolet oil determination method includes the following steps: S1. Collect feature data, including collecting the ultraviolet spectral matrix of the water sample to be tested within the measurement wavelength range, obtaining the instrument diagnostic parameters of the ultraviolet oil analyzer, and reading the historical measurement data of the ultraviolet oil analyzer; S2. Generate a feature vector based on the ultraviolet spectral matrix, the instrument diagnostic parameters, and the historical measurement data; S3. Use the pre-trained PLS model to determine the concentration deviation based on the feature vector; S4. Adjust the standard curve based on the concentration deviation to generate a corrected standard curve; S5. Calculate the concentration of petroleum substances in the water sample to be tested based on the corrected standard curve.

[0020] The above technical solution provides a complete, fully automated ultraviolet (UV) oil content measurement calibration method. This method, through systematic steps, from multi-dimensional data acquisition and feature vector generation to using machine learning models to determine deviations and adjust the standard curve, ultimately achieves high-precision concentration calculation, realizing closed-loop self-calibration of the measurement process. This method automates complex calibration logic, improves measurement efficiency, and ensures the reliability and continuity of results, making it particularly suitable for online monitoring or rapid on-site detection scenarios requiring long-term stable operation.

[0021] Optionally, in step S1, the instrument diagnostic parameters include dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and ambient temperature. In step S3, the training process of the pre-trained PLS model includes: constructing a training dataset; extracting latent variables from the training dataset using the PLS algorithm; evaluating the error of the PLS model under different numbers of latent variables through cross-validation to select the pre-trained PLS model that can provide the lowest prediction residual; and validating and deploying the pre-trained PLS model.

[0022] By employing the above technical solution, and through clearly defining specific instrument diagnostic parameters and a rigorous training process for the pre-trained PLS model, the oil measurement method ensures high-quality data input and a reliable algorithm model during execution. Clearly defined diagnostic parameters provide a more solid data foundation for error analysis, while a standardized model training process guarantees the stability and accuracy of the core algorithm. The combination of these two aspects enhances the overall performance and reliability of this automated calibration method.

[0023] Optionally, in step S3, the predicted concentration C is calculated based on the feature vector. ML It can be expressed as the following formula: , Where X represents the feature vector. C0 represents the regression coefficient vector of the pre-trained PLS model, and C0 represents the intercept of the pre-trained PLS model. According to the predicted concentration C ML Calculate concentration deviation It can be expressed as the following formula: , Among them, C true This indicates the actual concentration of the quality control solution; In step S4, the contribution of the instrument diagnostic parameters to the concentration deviation is analyzed to generate error source analysis information; wherein, the concentration deviation is... Decomposed into sensitivity error and baseline error And using the regression coefficient vector of the PLS model Estimating sensitivity error and baseline error It can be expressed as the following formula: , Among them, f k and f b Represents the attribution function. Indicates the light source attenuation characteristics, Indicates the characteristics of dark current; The slope correction of the standard curve is calculated using the PLS model based on the error source analysis information. and intercept correction amount According to the slope correction amount and the intercept correction amount The corrected standard curve is represented by the following formula: , Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

[0024] The above technical solution details the mathematical implementation path from calculating concentration deviation to generating the corrected standard curve. This method not only provides a quantitative formula for the deviation ∆C, but also introduces steps for error decomposition and attribution based on the PLS model, and finally gives the specific form for calculating the slope and intercept corrections and updating the standard curve. This complete calculation process makes the entire calibration logic clear, rigorous, and executable, ensuring that each step is based on sound reasoning, ultimately enabling precise dynamic correction of the standard curve and guaranteeing the accuracy of the final measurement results.

[0025] On the other hand, this application also provides an automatic ultraviolet oil analyzer, which adopts the following technical solution: An automatic ultraviolet oil analyzer integrates the aforementioned ultraviolet oil testing device.

[0026] By adopting the above technical solution, the ultraviolet oil testing device is integrated into an automatic ultraviolet oil analyzer, enabling the entire analyzer to possess intelligent and automated real-time self-calibration capabilities. This integration empowers the hardware with advanced algorithms, allowing the automatic ultraviolet oil analyzer to proactively compensate for measurement drift caused by factors such as aging and changes in operating conditions without manual intervention. This provides continuous, stable, accurate, and reliable measurement data in practical applications (such as environmental monitoring and industrial process control).

[0027] In summary, this application includes at least one of the following beneficial technical effects: 1. The data acquisition module obtains multi-dimensional information, including ultraviolet spectra, instrument diagnostic parameters, and historical measurement data, and generates feature vectors. The machine learning processing module then analyzes these feature vectors using a pre-trained PLS model, accurately quantifying the concentration deviation under the current instrument conditions. Based on this deviation, the standard curve is dynamically adjusted. This approach combines the predictive power of machine learning with the traditional standard curve method, enabling automatic compensation and correction for various error sources such as instrument hardware drift, environmental changes, and long-term stability degradation. This significantly improves the measurement accuracy, stability, and automation level of the ultraviolet oil analyzer, reducing reliance on frequent manual calibration.

[0028] 2. A complete, fully automated UV oil content measurement calibration method is provided. This method, through a systematic process, from multi-dimensional data acquisition and feature vector generation to using machine learning models to determine deviations and adjust the standard curve, ultimately achieves high-precision concentration calculation, realizing closed-loop self-calibration of the measurement process. This method automates complex calibration logic, improves measurement efficiency, and ensures the reliability and continuity of results, making it particularly suitable for online monitoring or rapid on-site detection scenarios requiring long-term stable operation.

[0029] 3. Integrating the aforementioned UV oil testing device into an automatic UV oil analyzer enables the entire analyzer to possess intelligent and automated real-time self-calibration capabilities. This integration empowers the hardware with advanced algorithms, allowing the automatic UV oil analyzer to proactively compensate for measurement drift caused by factors such as aging and changes in operating conditions without manual intervention. This provides continuous, stable, accurate, and reliable measurement data in practical applications (such as environmental monitoring and industrial process control). Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the structure of the ultraviolet oil analyzer according to an embodiment of this application; Figure 2 This is a schematic diagram of the module of the ultraviolet oil testing device according to an embodiment of this application; Figure 3 This is a schematic flowchart of the ultraviolet oil determination method according to an embodiment of this application.

[0031] Explanation of reference numerals in the attached figures: 100. Oil analyzer housing; 200. Sample chamber; 300. Radar sensor; 400. Syringe pump; 500. Reagent bottle; 610. Water-resistant membrane; 620. Magnesium silicate adsorption column; 10. Data acquisition module; 11. Spectral data acquisition unit; 12. Instrument status diagnostic feature acquisition unit; 13. Historical calibration feature acquisition unit; 14. Feature vector construction module; 20. Machine learning processing module; 21. Training model storage and retrieval unit; 22. Prediction and error analysis unit; 23. Concentration calculation unit. Detailed Implementation

[0032] The following combination Figures 1-3 This application will be described in further detail.

[0033] This application discloses an ultraviolet oil analyzer.

[0034] Figure 1 This is a schematic diagram of the structure of the ultraviolet oil analyzer according to an embodiment of this application. (Refer to...) Figure 1 The automatic ultraviolet oil analyzer includes an oil analyzer housing 100, a sample chamber 200 (the main body is located inside the oil analyzer housing 100 and is not shown), a radar sensor 300, a syringe pump 400, a reagent bottle 500, a series purification flow path, an optical detection device (located inside the oil analyzer housing 100 and not shown), and a controller (located inside the oil analyzer housing 100 and not shown).

[0035] The main structure of the automatic ultraviolet oil analyzer is a trolley-type oil analyzer housing 100 with high shock resistance, meeting on-site testing requirements. The housing 100 integrates a sample chamber 200, a radar sensor 300, a syringe pump 400, reagent bottles 500, a series purification flow path, an optical detection device, and a controller. Users can connect to the controller via Bluetooth or other portable smart terminals such as mobile phones and tablets, and then use the controller to automatically control the radar sensor 300, syringe pump 400, series purification flow path, and optical detection device. Users can operate and control the automatic ultraviolet oil analyzer through a visual software interface on their portable smart terminals.

[0036] The radar sensor 300 is used to automatically identify the water sample volume, measure the liquid level of the water sample in the sample chamber 200 in a non-contact manner, calculate and input the water sample volume data into the controller in real time. The syringe pump 400 is used to draw reagent from the reagent bottle 500 and inject the reagent into the sample chamber 200. A separation electrode is provided in the sample chamber 200, in which a strong gradient electric field is applied to the electrode to exert different forces on oil droplets and water droplets with different dielectric properties. Since the dielectric constant of the petroleum organic phase is significantly different from that of the aqueous phase, the electric field force can achieve effective and active separation of oil and water. The series purification flow path is used to purify the separated organic phase to meet the requirements of ultraviolet measurement. The series purification flow path 600 includes a water-proof membrane 610 and a magnesium silicate adsorption column 620 connected in series. The organic phase first flows through the water-proof membrane 610 for dehydration, removing residual water droplets. Subsequently, the organic phase flows through the magnesium silicate adsorption column 620, which selectively removes polar interfering substances such as animal and vegetable oils and humic acids. The optical detection device measures the ultraviolet spectral information of the separated sample. The controller can then adjust the standard analysis curve based on this ultraviolet spectral information, historical measurement data, and real-time instrument operating status. Based on the adjusted standard analysis curve, the true concentration of petroleum-related substances in the water sample is calculated.

[0037] The implementation principle of an ultraviolet oil analyzer according to an embodiment of this application is as follows: the ultraviolet oil analysis device is integrated into an automatic ultraviolet oil analyzer, enabling the entire analyzer to possess intelligent and automated real-time self-calibration capabilities. This integration empowers the hardware with advanced algorithm advantages, allowing the automatic ultraviolet oil analyzer to actively compensate for measurement drift caused by factors such as aging and changes in operating conditions without manual intervention. This provides continuous, stable, accurate, and reliable measurement data in practical applications (such as environmental monitoring and industrial process control).

[0038] This application also discloses an ultraviolet (UV) oil testing device. This UV oil testing device can be integrated into the controller of the automatic UV oil analyzer described in the above embodiments. It can also be applied to conventional UV oil testing systems.

[0039] Figure 2 This is a schematic diagram of the ultraviolet oil testing device according to an embodiment of this application. (Refer to...) Figure 2 The ultraviolet oil testing device includes a data acquisition module 10 and a machine learning processing module 20.

[0040] The data acquisition module 10 includes a spectral data acquisition unit 11, an instrument status diagnostic feature acquisition unit 12, a historical calibration feature acquisition unit 13, and a feature vector construction module 14.

[0041] The spectral data acquisition unit 11 is used to acquire the ultraviolet spectral matrix of the water sample to be tested within the measurement wavelength range (e.g., 190 nm to 300 nm) measured by the optical detection device. The ultraviolet spectral matrix provides high-dimensional, multi-wavelength spectral information and is the basis for multivariate calibration. The ultraviolet spectral matrix contains absorbance values ​​of multiple wavelengths within the measurement wavelength range, with the interval between wavelength values ​​being 1 nm or less. Hundreds of data points together depict the complete ultraviolet spectral curve of the water sample to be tested.

[0042] The instrument status diagnostic feature acquisition unit 12 is used to monitor and quantify the instrument's own health status and operating environment in real time to compensate for hardware drift. Specifically, the instrument status diagnostic feature acquisition unit 12 acquires diagnostic parameters provided by the automatic ultraviolet oil analyzer's self-test and built-in sensors in real time. These diagnostic parameters include dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and ambient temperature. The dark current correction value reflects the baseline drift and noise level of the automatic ultraviolet oil analyzer. The wavelength correction deviation reflects changes in the accuracy of the grating or detector. The light source intensity attenuation coefficient quantifies the degree of light source aging or intensity fluctuations; this parameter directly affects measurement sensitivity. The ambient temperature reflects the impact of environmental changes on optical and electronic components.

[0043] The historical calibration feature acquisition unit 13 is used to record and read the historical data of fitting parameters and residuals from previous standard curve establishment and testing. This historical measurement data can help the model predict and compensate for long-term drift, enhancing the model's robustness and predictive ability under long-term operating conditions.

[0044] The feature vector construction module 14 is connected to the spectral data acquisition unit 11, the instrument status diagnostic feature acquisition unit 12, and the historical calibration feature acquisition unit 13, and is used to summarize the ultraviolet spectral matrix, the diagnostic parameters, and the historical measurement data to generate an input feature vector.

[0045] The machine learning processing module 20 includes a pre-trained model storage and retrieval unit 21, a prediction and error analysis unit 22, and a concentration calculation unit 23.

[0046] The pre-trained model storage and retrieval unit 21 is responsible for storing and loading machine learning models trained offline. This unit stores high-dimensional regression models, such as partial least squares (PLS) models, trained based on a large amount of historical standard solution test data and concurrently recorded multivariate feature vectors. When the instrument is started or requires calibration, this unit will call the currently optimal PLS model.

[0047] Specifically, the PLS model pre-training process mainly involves three core stages: data preparation and acquisition, model training, and model validation and storage.

[0048] During the data preparation and acquisition phase, a high-quality historical dataset is created for model training. First, a series of petroleum-based standard solutions with known precise concentration gradients are prepared. The concentrations of these standard solutions must cover the concentration range that might occur in actual water samples. For each standard solution sample, the instrument performs multiple measurements, simultaneously acquiring the feature vector X and the true concentration C of each sample. true The feature vector X of all standard solution samples and their corresponding true concentration C are... true Pairing them up to form a large training dataset (X) train C train ).

[0049] During the model training phase, the PLS algorithm is used to train the model from the training dataset (X). train C train Extract latent variables (LVs) from X, which can explain X to the greatest extent possible. train and C train The variance in the model is analyzed to effectively capture the correlation between the spectrum, instrument status, and concentration. Then, cross-validation is used to evaluate the model's prediction error under different numbers of latent variables, thereby selecting the optimal model that provides the lowest prediction residual. Through this process, a high-dimensional pre-trained PLS model can be constructed, which can predict the concentration C of the water sample under the current state based on the input feature vector X. ML .

[0050] During the model validation and storage phase, the performance of the pre-trained PLS model is validated and deployed. Specifically, a validation dataset independent of the training dataset is used to evaluate the generalization ability and prediction accuracy of the pre-trained PLS model. Validation metrics include correlation coefficient and root mean square error. When the generalization ability and prediction accuracy of the pre-trained PLS model meet the requirements, the pre-trained PLS model, its optimal parameters, and the latent variable weight matrix are solidified and stored in the pre-trained model storage and retrieval unit 21.

[0051] The prediction and error analysis unit 22 is connected to the pre-trained model storage and retrieval unit 21. It uses the pre-trained model to evaluate the current state and quantify the measurement deviation. The prediction and error analysis unit 22 inputs the real-time acquired feature vector X into the PLS model, and the model outputs the predicted concentration C under the current state. ML It can be expressed as the following formula:

[0052] in, C represents the regression coefficient vector of the pre-trained PLS model, and C0 represents the intercept of the pre-trained PLS model.

[0053] Subsequently, the prediction and error analysis unit 22 calculates the prediction deviation. It can be expressed as the following formula:

[0054] Among them, C true This indicates the actual concentration of the quality control solution (e.g., 16 mg / L).

[0055] Furthermore, the error is attributed to a specific instrument drift source, and a precise correction is calculated. Specifically, the prediction and error analysis unit 22 is responsible for analyzing the weights and contributions of each diagnostic parameter in the feature vector X within the PLS model to determine the prediction bias. The main source. First, the total prediction bias. It can be decomposed into two parts caused by sensitivity error (affecting k) and baseline error (affecting b), as expressed in the following formula:

[0056] in, This represents the concentration deviation contributed by characteristics affecting sensitivity, such as attenuation of light source intensity (multiplicative error). This represents the concentration deviation contributed by characteristics affecting the baseline (additive error), such as an abnormal increase in dark current. If the dark current correction value is abnormally high, the algorithm's judgment deviation mainly comes from baseline drift, and the correction amount mainly applies to the intercept b. If the light source intensity attenuation is significant, the algorithm's judgment deviation mainly comes from a decrease in sensitivity, and the correction amount mainly applies to the slope k.

[0057] Then, the regression coefficient vector of the PLS model is used. Estimate by weights corresponding to key diagnostic features and It can be expressed as the following formula:

[0058] Among them, f k and f b Represents the attribution function. Indicates the light source attenuation characteristics, This indicates the characteristics of dark current.

[0059] exist and Once estimated, the precise slope correction can be calculated. and intercept correction The intercept correction is expressed as follows:

[0060] The corrected intercept is expressed as follows:

[0061] Adjusting the slope correction amount So that the concentration of the quality control solution is C true Absorbance A at point QC It can be accurately predicted, expressed as follows:

[0062] because The solution for k has been found. new It can also be solved, and then calculated. .

[0063] The calculated correction is applied to the current baseline curve A=k. base C+b base The corrected standard curve is generated, expressed as follows:

[0064] Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

[0065] The concentration calculation unit 23 calculates the concentration of petroleum substances in the water sample to be tested based on the modified standard curve, wherein the concentration of petroleum substances in the water sample to be tested can be determined by substituting the light absorption intensity of the water sample to be tested into the modified standard curve.

[0066] The implementation principle of the ultraviolet oil content measurement device in this application embodiment is as follows: a complete fully automated ultraviolet oil content measurement calibration method is provided. This method, through systematic steps, from multi-dimensional data acquisition and feature vector generation to using machine learning models to determine deviations and adjust the standard curve, ultimately achieves high-precision concentration calculation, realizing closed-loop self-calibration of the measurement process. This method automates complex calibration logic, improves measurement efficiency, and ensures the reliability and continuity of results, making it particularly suitable for online monitoring or rapid on-site detection scenarios requiring long-term stable operation.

[0067] This application also discloses an ultraviolet oil measurement method, which is mainly implemented by the ultraviolet oil measurement device.

[0068] Figure 3 This is a schematic flowchart of the ultraviolet oil determination method according to an embodiment of this application. (Refer to...) Figure 3 The method includes the following steps: S1. Collect characteristic data, including collecting the ultraviolet spectral matrix of the water sample to be tested within the measurement wavelength range, obtaining the instrument diagnostic parameters of the ultraviolet oil analyzer, and reading the historical measurement data of the ultraviolet oil analyzer.

[0069] The instrument diagnostic parameters include dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and ambient temperature.

[0070] S2. Generate a feature vector based on the ultraviolet spectral matrix, the instrument diagnostic parameters, and the historical measurement data.

[0071] S3. Use the pre-trained PLS model to determine the concentration deviation based on the feature vector.

[0072] The training process of the pre-trained PLS model includes: constructing a training dataset; extracting latent variables from the training dataset using the PLS algorithm; evaluating the error of the PLS model with different numbers of latent variables through cross-validation to select the pre-trained PLS model that can provide the lowest prediction residuals; and validating and deploying the pre-trained PLS model.

[0073] Further, the predicted concentration C is calculated based on the feature vector. ML It can be expressed as the following formula:

[0074] Where X represents the feature vector. C0 represents the regression coefficient vector of the pre-trained PLS model, and C0 represents the intercept of the pre-trained PLS model. According to the predicted concentration C ML Calculate concentration deviation It can be expressed as the following formula:

[0075] Among them, C true This indicates the actual concentration of the quality control solution.

[0076] S4. Adjust the standard curve based on the concentration deviation to generate a corrected standard curve.

[0077] Among them, the concentration deviation amount Decomposed into sensitivity error and baseline error And using the regression coefficient vector of the PLS model Estimating sensitivity error and baseline error It can be expressed as the following formula: , Among them, f k and fb Represents the attribution function. Indicates the light source attenuation characteristics, Indicates the characteristics of dark current; The slope correction of the standard curve is calculated using the PLS model based on the error source analysis information. and intercept correction amount According to the slope correction amount and the intercept correction amount The corrected standard curve is represented by the following formula: , Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

[0078] S5. Calculate the concentration of petroleum substances in the water sample to be tested based on the corrected standard curve.

[0079] The implementation principle of the ultraviolet oil testing method in this application embodiment is as follows: the ultraviolet oil testing device is integrated into an automatic ultraviolet oil analyzer, enabling the entire analyzer to possess intelligent and automated real-time self-calibration capabilities. This integration empowers the hardware with advanced algorithmic advantages, allowing the automatic ultraviolet oil analyzer to actively compensate for measurement drift caused by factors such as aging and changes in operating conditions without manual intervention. This provides continuous, stable, accurate, and reliable measurement data in practical applications (such as environmental monitoring and industrial process control).

[0080] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. An ultraviolet oil testing device, characterized in that, For use in an ultraviolet oil analyzer, the ultraviolet oil analyzer device includes: The data acquisition module (10) is used to acquire the ultraviolet spectral matrix of the water sample to be tested within the measurement wavelength range, obtain the instrument diagnostic parameters of the ultraviolet oil analyzer, read the historical measurement data of the ultraviolet oil analyzer, and generate a feature vector based on the ultraviolet spectral matrix, the instrument diagnostic parameters and the historical measurement data. The machine learning processing module (20), connected to the data acquisition module (10), is used to determine the concentration deviation based on the feature vector using a pre-trained PLS model, adjust the standard curve based on the concentration deviation to generate a corrected standard curve, and calculate the concentration of petroleum substances in the water sample to be tested based on the corrected standard curve.

2. The ultraviolet oil testing device according to claim 1, characterized in that, The instrument's diagnostic parameters include dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and ambient temperature.

3. The ultraviolet oil measuring device according to claim 1, characterized in that, The training process of the pre-trained PLS model includes: constructing a training dataset; extracting latent variables from the training dataset using the PLS algorithm; evaluating the error of the PLS model under different numbers of latent variables through cross-validation to select the pre-trained PLS model that can provide the lowest prediction residual; validating the pre-trained PLS model and deploying the pre-trained PLS model in the machine learning processing module (20).

4. The ultraviolet oil testing device according to claim 3, characterized in that, The machine learning processing module (20) is used to determine the concentration deviation based on the feature vector using a pre-trained PLS model; wherein, the machine learning processing module (20) is configured to: calculate the predicted concentration C based on the feature vector. ML It can be expressed as the following formula: , Where X represents the feature vector. C0 represents the regression coefficient vector of the pre-trained PLS model, and C0 represents the intercept of the pre-trained PLS model. According to the predicted concentration C ML Calculate concentration deviation It can be expressed as the following formula: , Among them, C true This indicates the actual concentration of the quality control solution.

5. The ultraviolet oil measuring device according to claim 4, characterized in that, The machine learning processing module (20) adjusts the standard curve based on the concentration deviation to generate a corrected standard curve; wherein, the machine learning processing module (20) is configured to: analyze the contribution of the instrument diagnostic parameters to the concentration deviation to generate error source analysis information; and calculate the slope correction of the standard curve based on the error source analysis information using the PLS model. and intercept correction amount According to the slope correction amount and the intercept correction amount The corrected standard curve is expressed as follows: , Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

6. The ultraviolet oil testing device according to claim 5, characterized in that, The machine learning processing module (20) is configured to analyze the contribution of the instrument diagnostic parameters to the concentration deviation to generate error source analysis information; wherein, the concentration deviation... Decomposed into sensitivity error and baseline error And using the regression coefficient vector of the PLS model Estimating sensitivity error and baseline error It can be expressed as the following formula: , Among them, f k and f b Represents the attribution function. Indicates the light source attenuation characteristics, This indicates the characteristics of dark current.

7. A method for determining oil content using ultraviolet light, characterized in that, Includes the following steps: S1. Collect feature data, including collecting the ultraviolet spectral matrix of the water sample to be tested within the measurement wavelength range, obtaining the instrument diagnostic parameters of the ultraviolet oil analyzer, and reading the historical measurement data of the ultraviolet oil analyzer; S2. Generate a feature vector based on the ultraviolet spectral matrix, the instrument diagnostic parameters, and the historical measurement data; S3. Use the pre-trained PLS model to determine the concentration deviation based on the feature vector; S4. Adjust the standard curve based on the concentration deviation to generate a corrected standard curve; S5. Calculate the concentration of petroleum substances in the water sample to be tested based on the corrected standard curve.

8. The ultraviolet oil determination method according to claim 7, characterized in that, In step S1, the instrument diagnostic parameters include dark current correction value, wavelength correction deviation, light source intensity attenuation coefficient, and ambient temperature. In step S3, the training process of the pre-trained PLS model includes: constructing a training dataset; extracting latent variables from the training dataset using the PLS algorithm; evaluating the error of the PLS model under different numbers of latent variables through cross-validation to select the pre-trained PLS model that can provide the lowest prediction residual; and validating and deploying the pre-trained PLS model.

9. The ultraviolet oil determination method according to claim 8, characterized in that, In step S3, the predicted concentration C is calculated based on the feature vector. ML It can be expressed as the following formula: , Where X represents the feature vector. C0 represents the regression coefficient vector of the pre-trained PLS model, and C0 represents the intercept of the pre-trained PLS model. According to the predicted concentration C ML Calculate concentration deviation It can be expressed as the following formula: , Among them, C true This indicates the true concentration of the quality control solution; In step S4, the contribution of the instrument diagnostic parameters to the concentration deviation is analyzed to generate error source analysis information; wherein, the concentration deviation is... Decomposed into sensitivity error and baseline error And using the regression coefficient vector of the PLS model Estimating sensitivity error and baseline error It can be expressed as the following formula: , Among them, f k and f b Represents the attribution function. Indicates the light source attenuation characteristics, Indicates the characteristics of dark current; The slope correction of the standard curve is calculated using the PLS model based on the error source analysis information. and intercept correction amount According to the slope correction amount and the intercept correction amount The corrected standard curve is expressed as follows: , Where A represents the light absorption intensity of the water sample to be tested, k base C represents the slope of the standard curve, C represents the concentration of petroleum substances in the water sample, and b represents the concentration of petroleum substances in the water sample. base This represents the intercept of the standard curve.

10. An ultraviolet oil analyzer, characterized in that, It integrates the ultraviolet oil testing device according to any one of claims 1-6.

Citation Information

Patent Citations

  • Full-automatic portable ultraviolet oil measuring device and oil measuring method

    CN112730295A

  • Temperature drift correction method based on passive Fourier infrared spectrometer

    CN120449945A

  • Intermediate infrared spectrometer sensor verification system

    CN120971363A

  • Infrared spectrum baseline drift dynamic compensation method and system based on multi-parameter fusion

    CN121030257A