On-line spectral detection compensation method, device and system based on standard liquid dilution curve

By constructing a compensation matrix for the standard solution dilution curve and analyzing the drift measurement interval, the measured values ​​of the spectrometer are directly corrected, solving the problem of insufficient online compensation accuracy of the spectrometer and achieving higher detection precision.

CN121409898BActive Publication Date: 2026-07-24湖南云河信息科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
湖南云河信息科技有限公司
Filing Date
2025-12-05
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing online compensation methods for spectrometers often result in inaccurate measurements due to the use of a backup spectrometer for prediction, especially when the spectrometer drifts, leading to insufficient accuracy of the compensation values.

Method used

By constructing a compensation matrix based on the standard solution dilution curve, the drift measurement range and compensation coefficient are determined using the standard solution absorbance measurement value of the spectrometer to be compensated and the preset dilution curve, and the measurement value of the spectrometer is directly corrected, avoiding dependence on the backup spectrometer.

Benefits of technology

It improves the accuracy of online compensation for spectrometers, reduces measurement errors caused by equipment drift, and enhances detection precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121409898B_ABST
    Figure CN121409898B_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the field of water quality analysis, and provides an online spectrum detection compensation method and system based on a standard liquid dilution curve, the method comprising the following steps: constructing a compensation matrix according to a sum of first absorbance measurement values in a first absorbance measurement value set of a standard liquid in a to-be-compensated spectrometer and a preset standard liquid dilution curve, obtaining a first compensation matrix; determining a corresponding drift measurement interval of the to-be-compensated spectrometer according to the first compensation matrix, obtaining a first drift measurement interval set; determining a compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set according to measurement environment information of the to-be-compensated spectrometer, obtaining a first compensation coefficient set; and correcting a measurement value of the to-be-compensated spectrometer according to a first compensation coefficient in the first compensation coefficient set, obtaining a first measurement value, so that the accuracy of online compensation of the to-be-compensated spectrometer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of water quality analysis and data processing technology, specifically to an online spectral detection compensation method, equipment, and system based on a standard solution dilution curve. Background Technology

[0002] A spectrometer is a precision instrument that analyzes the composition, structure, or concentration of a substance by measuring its absorption, emission, or scattering characteristics to light of different wavelengths. Because spectrometers calculate the concentration of a target substance by measuring the intensity of absorption, emission, or scattering of light of a sample to a specific wavelength, based on Lambert-Beer's law, they are widely used in scientific research, industry, environmental monitoring, and medical fields, and are commonly used to detect the concentration of samples to be tested.

[0003] Different ambient temperatures and light intensities can cause spectrometer drift, leading to insufficient accuracy in the measured values. Therefore, it is necessary to set compensation values ​​to compensate for the spectrometer's detection values, thereby improving the measurement accuracy of the spectrometer.

[0004] In existing technical solutions, a backup spectrometer of the same model as the one to be compensated is typically selected. A convolutional neural network model is then established to predict the measurement values ​​of both the original and backup spectrometers. Based on the predicted values, an appropriate range is selected to obtain the range prediction value. The probability that the predicted range value is smaller than the actual range value is less than or equal to the probability that it is larger, and a compensation value for the original spectrometer is generated based on the judgment result. However, if both the original and backup spectrometers experience equipment misalignment, the measurement values ​​of both will be inaccurate. Therefore, the compensation value generated by the existing technical solution for the original spectrometer is not accurate enough, resulting in insufficient accuracy when performing online compensation for the original spectrometer. Summary of the Invention

[0005] This application provides an online spectral detection compensation method, device, and system based on a standard solution dilution curve. The compensation coefficient matrix of the spectrometer to be compensated can be determined by the absorbance of the standard solution in the spectrometer and a preset standard solution coefficient curve. The compensation coefficients in the matrix are then used to correct the measured values ​​of the spectrometer. Therefore, there is no need for mutual correction between the spectrometer to be compensated and a backup spectrometer, thus avoiding inaccuracies in the measured values ​​of both spectrometers due to device offsets. This improves the accuracy of online compensation for the spectrometer to be compensated.

[0006] The first aspect of this application provides an online spectral detection compensation method based on a standard solution dilution curve, the method comprising: The first compensation matrix is ​​obtained by constructing a compensation matrix based on the first absorbance measurement value of the standard solution in the set of first absorbance measurement values ​​of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve; The drift measurement interval corresponding to the spectrometer to be compensated is determined based on the first compensation matrix, thus obtaining the first set of drift measurement intervals; Based on the measurement environment information of the spectrometer to be compensated, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined, and the first compensation coefficient set is obtained; The measured value of the spectrometer to be compensated is corrected according to the first compensation coefficient in the first set of compensation coefficients to obtain the first measured value.

[0007] In this example, a compensation matrix is ​​constructed based on the first absorbance measurement value in the first absorbance measurement value set of the standard solution in the spectrometer to be compensated and a preset standard solution dilution curve, resulting in a first compensation matrix. The drift measurement interval corresponding to the spectrometer to be compensated is determined based on the first compensation matrix, resulting in a first drift measurement interval set. The compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined based on the measurement environment information of the spectrometer to be compensated, resulting in a first compensation coefficient set. The measurement value of the spectrometer to be compensated is corrected based on the first compensation coefficient in the first compensation coefficient set, resulting in a first measurement value, thereby improving the accuracy when performing online compensation on the spectrometer to be compensated.

[0008] In one possible implementation, a method for constructing a compensation matrix based on a first absorbance measurement value from a set of first absorbance measurements of a standard solution in the spectrometer to be compensated and a preset standard solution dilution curve, and obtaining a first compensation matrix, includes: Extract the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain a set of k second characteristic peak intensity information; The first compensation matrix is ​​obtained by constructing a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and the preset standard solution dilution curve.

[0009] In one possible implementation, a method for constructing a compensation matrix based on first characteristic peak intensity information in a first characteristic peak intensity information set, second characteristic peak intensity information in a second characteristic peak intensity information set, and a preset standard solution dilution curve, to obtain a first compensation matrix, includes: A first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set. Based on the first fitting curve, the characteristic peak intensities corresponding to different concentrations of the standard solution are determined, and a third set of characteristic peak intensity information is obtained. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; Based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, the drift coefficients of the standard solution at different concentrations are determined to obtain the first drift coefficient set. A drift coefficient matrix is ​​constructed based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; The compensation matrix of the spectrometer to be compensated is determined based on the first drift coefficient matrix, thus obtaining the first compensation matrix.

[0010] In one possible implementation, a method for determining the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix, and obtaining a first set of drift measurement intervals, includes: The first absorbance measurement value in the first absorbance measurement value set is detected for data anomalies using the first compensation matrix and the preset residual threshold to obtain the second absorbance measurement value set. When the residual of the first absorbance measurement value in the first absorbance measurement value set is greater than the preset residual threshold, the first absorbance measurement value is abnormal data. The preset residual threshold is determined by user input or system default. The second absorbance measurement value is abnormal data in the first absorbance measurement value set. Extract the measurement interval corresponding to each second absorbance measurement value from the second absorbance measurement value set to obtain the first drift measurement interval set.

[0011] In one possible implementation, a method for determining the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, and obtaining the first compensation coefficient set, includes: The error type of the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set, and the first type information is obtained; Based on the first type of information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is selected from the preset compensation coefficient table to obtain the reference compensation coefficient set; The reference compensation coefficients in the reference compensation coefficient set are corrected using the measurement environment information of the spectrometer to be compensated, to obtain the first compensation coefficient set.

[0012] A second aspect of this application provides an online spectral detection compensation system based on a standard solution dilution curve, the system comprising: The construction unit is used to construct a compensation matrix based on the first absorbance measurement value in the first absorbance measurement value set of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, so as to obtain the first compensation matrix; The first determining unit is used to determine the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix, and obtain the first drift measurement interval set; The second determining unit is used to determine the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, so as to obtain the first compensation coefficient set. The correction unit is used to correct the measured value of the spectrometer to be compensated according to the first compensation coefficient in the first set of compensation coefficients to obtain the first measured value.

[0013] In one possible implementation, the building unit is specifically used for: Extract the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain a set of k second characteristic peak intensity information; The first compensation matrix is ​​obtained by constructing a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and the preset standard solution dilution curve.

[0014] In one possible implementation, regarding the construction of a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and a preset standard solution dilution curve, to obtain the first compensation matrix, the construction unit is specifically used for: A first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set. Based on the first fitting curve, the characteristic peak intensities corresponding to different concentrations of the standard solution are determined, and a third set of characteristic peak intensity information is obtained. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; Based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, the drift coefficients of the standard solution at different concentrations are determined to obtain the first drift coefficient set. A drift coefficient matrix is ​​constructed based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; The compensation matrix of the spectrometer to be compensated is determined based on the first drift coefficient matrix, thus obtaining the first compensation matrix.

[0015] In one possible implementation, the first determining unit is specifically used for: The first absorbance measurement value in the first absorbance measurement value set is detected for data anomalies using the first compensation matrix and the preset residual threshold to obtain the second absorbance measurement value set. When the residual of the first absorbance measurement value in the first absorbance measurement value set is greater than the preset residual threshold, the first absorbance measurement value is abnormal data. The preset residual threshold is determined by user input or system default. The second absorbance measurement value is abnormal data in the first absorbance measurement value set. Extract the measurement interval corresponding to each second absorbance measurement value from the second absorbance measurement value set to obtain the first drift measurement interval set. In one possible implementation, the second determining unit is specifically used for: The error type of the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set, and the first type information is obtained; Based on the first type of information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is selected from the preset compensation coefficient table to obtain the reference compensation coefficient set; The reference compensation coefficients in the reference compensation coefficient set are corrected using the measurement environment information of the spectrometer to be compensated, to obtain the first compensation coefficient set.

[0016] A third aspect of this application provides a laser water quality analyzer, including a laser bombardment unit, a water sample preparation unit, and a detection unit. The laser output from the laser bombardment unit bombards a spot on the water sample preparation area of ​​the water sample preparation unit through the end of the laser bombardment unit. The detection unit monitors the light generated by the laser bombardment unit bombarding the spot. The laser water quality analyzer is used to execute the step instructions as described in the first aspect of this application.

[0017] A fourth aspect of this application provides a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of this application.

[0018] A fifth aspect of this application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of this application. The computer program product may be a software installation package. Attached Figure Description

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

[0020] Figure 1 This application provides a schematic diagram of the architecture of an online spectral detection compensation system based on a standard solution dilution curve. Figure 2 This application provides a flowchart illustrating an online spectral detection compensation method based on a standard solution dilution curve. Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application; Figure 4 This application provides a schematic diagram of the structure of an online spectral detection compensation system based on a standard solution dilution curve. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0023] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0024] Please see Figure 1 , Figure 1 This application provides a schematic diagram of the architecture of an online spectral detection compensation system based on a standard solution dilution curve. For example... Figure 1 As shown, the system includes a laser module and a water sample platform module. The water sample platform module is used to place the sample to be tested or the standard liquid sample. The laser module serves as the light source for the spectrometer to be compensated, providing light sources of different wavelengths to the water sample platform module. At the same time, the laser module can also be used to detect the absorbance of the sample to be tested or the standard liquid sample, thereby generating the spectrum corresponding to the sample to be tested or the standard liquid sample.

[0025] To better understand the online spectral detection compensation method based on standard solution dilution curves provided in this application, the water sample to be detected needs to be dried before online spectral detection based on standard solution dilution curves. The existing water sample drying and shaping methods are briefly introduced below. Current technologies are mainly designed for water samples with volumes of milliliters and above, making it difficult to adapt to the processing needs of 1-100 μL micro-liter water samples, exhibiting significant technical limitations. Specifically, traditional constant-temperature drying technology uses a single temperature (e.g., 60-70℃) to heat the water sample. Although simple to operate, micro-liter water samples have a significantly higher surface area to volume ratio. A single high temperature can easily cause a sudden rise in moisture and boiling, leading to solute splashing and forming incomplete spots, or causing excessive concentration and caking of local solutes, resulting in irregular shapes. Traditional natural air-drying technology relies on ambient temperature and humidity to evaporate moisture naturally, which is not only time-consuming (several minutes to tens of minutes) and inefficient, but also easily affected by ambient airflow, causing solute to accumulate in large quantities at the edge of the spots, while the central area becomes empty due to insufficient solute, further affecting subsequent detection. Meanwhile, existing technologies lack effective spot position calibration mechanisms. Slight substrate displacement and solute shrinkage during water sample drying can easily cause the dried spots to deviate from the initial water sample position, resulting in inaccurate focusing during laser detection and causing signal deviation. Furthermore, spot defect repair often relies on manual operation, such as manually adjusting the substrate position with a microscope, wiping rough edges with cotton swabs, or adding exogenous solutes to fill gaps. This not only takes 5-10 minutes per sample, making it inefficient for batch analysis, but also easily introduces exogenous impurities to contaminate the sample, or damages the spot structure due to human error. Ultimately, this limits the accuracy and scope of laser water quality analysis in micro-scale water sample scenarios (such as trace heavy metal detection and trace organic matter analysis).

[0026] To address the aforementioned issues, this application provides an online spectral detection compensation method based on a standard solution dilution curve. This method achieves regularized formation of dried spots in micro-level water samples through a gradient temperature-controlled drying mechanism, position calibration, and morphology optimization, thereby reducing detection errors and external interference, and ultimately improving the accuracy and efficiency of laser water quality analysis.

[0027] Please see Figure 1 , Figure 1 A schematic diagram of a laser water quality analysis system is shown. Figure 1 As shown, the laser water quality analysis system may include a control platform and a laser water quality analyzer. The control platform is communicatively connected to at least one laser water quality analyzer. The laser water quality analyzer may include a micro-level water sample drying and spot formation device. The liquids that the laser water quality analyzer can analyze include, but are not limited to, water, oil, and pharmaceutical solutions. The control platform performs data backup and subsequent application processing based on the analysis results of the liquids from the laser water quality analyzer.

[0028] Figure 1 The text describes a laser water quality analyzer as a micro-scale water sample drying and spot formation device. (The provided text is incomplete and requires further context.) Figure 1 The diagram shows a partial structural representation of a micro-level water sample drying and spot formation device. This device includes a laser bombardment unit 11, a water sample preparation unit 12, and a detection unit (not shown). The laser output from the laser bombardment unit 11 bombards the spots on the water sample preparation area 121 of the water sample preparation unit 12 through its end 111. The detection unit uses a spectrometer. The laser water quality analyzer primarily detects heavy metals and non-metals in the spots formed after liquid drying.

[0029] Understandably, a predetermined volume (e.g., 10 μL) of liquid is placed in the water sample preparation area 121 (hereinafter referred to as the substrate), and the liquid in the water sample preparation area 121 is dried to form spots. The laser generated by the laser instrument of the laser bombardment unit 11 contacts the dried residue (spots) of the liquid. The spots form plasma at high temperature, achieving a transition from a low-energy state to a high-energy state. However, the high-energy state is unstable and immediately returns to the ground state (i.e., the original state). At this time, energy is emitted in the form of light, and the light emitted by each element is different. The spectrometer of the detection unit monitors the light emitted by the laser bombardment unit 11 bombarding the spots. The liquid results can be analyzed based on the data detected by the detection unit. In other words, the laser water quality analyzer can quickly detect multiple elements without consuming chemical reagents.

[0030] Optionally, the water sample preparation unit 12 includes a support platform, an unwinding mechanism, a winding structure, and a flexible membrane. The flexible membrane is unwound from the unwinding mechanism, passes over the support platform, and a predetermined volume (e.g., 10 μL) of liquid is placed in the water sample preparation area 121 on the support platform. Before the next test, the unwinding mechanism and the winding structure work together to wind the discarded flexible membrane onto the winding structure, and the unused flexible membrane is placed on the support platform so that a predetermined volume (e.g., 10 μL) of liquid can be placed in the water sample preparation area 121 on the support platform. The implementation of the unwinding mechanism and the winding structure can be selected from existing technologies and will not be described in detail here.

[0031] Optionally, the flexible membrane may be made of zinc.

[0032] To better understand the online spectral detection compensation method based on standard solution dilution curves provided in this application, a brief introduction to existing online spectrometer compensation methods is given below. In existing technical solutions, a backup spectrometer of the same model as the one to be compensated is typically selected. A convolutional neural network model is established to predict the measured values ​​of both the spectrometer to be compensated and the backup spectrometer. Based on the predicted values, an appropriate range is selected to obtain a range prediction value. The probability that the predicted range value is smaller than the actual range value is less than or equal to the probability that it is larger is determined, and a compensation value for the spectrometer to be compensated is generated based on the determination result. If both the spectrometer to be compensated and the backup spectrometer experience equipment misalignment, the measured values ​​of both will be inaccurate. Therefore, the compensation value generated by the existing technical solution for the measured values ​​of the spectrometer to be compensated is not accurate enough, resulting in insufficient accuracy when performing online compensation for the spectrometer to be compensated.

[0033] To address the aforementioned technical problems, this application provides an online spectral detection compensation method based on a standard solution dilution curve. The method involves using a peristaltic pump to gradient dilute a standard solution built into the spectrometer to be compensated and injecting it into the spectrometer's detection cell. The spectrometer then measures the absorbance of the standard solution in the detection cell, obtaining a first set of absorbance measurements. A compensation matrix is ​​constructed based on the first absorbance measurements in the first set and a preset standard solution dilution curve, resulting in a first compensation matrix. The first compensation matrix is ​​then used to determine the drift measurement intervals in the spectrometer, resulting in first drift measurement intervals. By acquiring the measurement environment information of the spectrometer, a compensation coefficient is determined for each drift measurement interval in the first set, resulting in a first set of compensation coefficients. The first compensation coefficients in the first set are used to compensate for the measured values ​​of the spectrometer, obtaining a first measured value. This improves the accuracy of online compensation for the spectrometer.

[0034] Please see Figure 2 , Figure 2 This application provides a schematic flowchart of an online spectral detection compensation method based on a standard solution dilution curve. For example... Figure 2 As shown, the method is applied to a laser water quality analyzer, which includes: a spectrometer to be compensated (i.e., a detection unit), and the method includes: 201. Construct a compensation matrix based on the first absorbance measurement value of the standard solution in the set of first absorbance measurement values ​​of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, and obtain the first compensation matrix.

[0035] The process can begin by first measuring the absorbance of standard solutions of different concentrations under standard experimental conditions (e.g., 25°C) and plotting dilution curves as a preset standard. Then, the spectrometer to be compensated is activated to measure the absorbance of standard solutions of different concentrations, obtaining a first set of absorbance measurements. Next, the characteristic peak intensity information corresponding to the first absorbance measurements in the first set of absorbance measurements is extracted to obtain first characteristic peak intensity information. Finally, the historical characteristic peak intensities corresponding to each first absorbance measurement in the first set of absorbance measurements are extracted to obtain a second set of characteristic peak intensity information. Since the spectrometer's detection accuracy has a non-linear relationship with concentration, quadratic fitting can more accurately describe the drift characteristics. Therefore, based on the characteristic peak intensity information and the standard solution dilution curves, a compensation matrix can be constructed through quadratic fitting and drift coefficient calculation to obtain a first compensation matrix. The first compensation value in the first compensation matrix is ​​the first absorbance measurement value in the first set of absorbance measurements after compensation.

[0036] 202. Determine the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix to obtain the first drift measurement interval set.

[0037] Specifically, this can be achieved by using a first compensation matrix to compensate for the first characteristic peak intensity information in the first characteristic peak intensity information set, and then using a characteristic peak intensity-absorbance conversion formula to convert the compensated first characteristic peak intensity information into absorbance, thus obtaining a third absorbance measurement value set. By calculating the residuals corresponding to the third absorbance measurement values ​​in the third absorbance measurement value set, a first residual information set is obtained. Finally, based on a preset residual threshold and the first residual information in the first residual information set, the drift measurement interval corresponding to the spectrometer to be compensated is determined, thus obtaining a first drift measurement interval set. The drift measurement interval can be understood as the measurement interval where the spectrometer to be compensated experiences errors due to equipment drift.

[0038] 203. Determine the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, and obtain the first compensation coefficient set.

[0039] This process can be achieved by analyzing the patterns of the first drift measurement intervals in the first drift measurement interval set, determining the error type of the spectrometer to be compensated based on the analysis results, and classifying the error types into full-range error, partial-range error, or segmented concentration error by analyzing the distribution pattern and residual magnitude of the measurement intervals, thus obtaining the first type information. Based on the first type information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined, resulting in a reference compensation coefficient set. This first compensation coefficient set is obtained by querying a preset compensation coefficient table and weighting the compensation coefficients according to environmental factors such as temperature and humidity. The compensation coefficient table is constructed by testing the spectrometer to be compensated under different influencing factors (such as temperature, humidity, and light source attenuation) in a standard experimental environment (20°C-25°C) and recording the compensation coefficients corresponding to each measurement interval.

[0040] 204. Correct the measured value of the spectrometer to be compensated according to the first compensation coefficient in the first compensation coefficient set to obtain the first measured value.

[0041] Specifically, this can be achieved by constructing a convolutional neural network model to predict the measured values ​​of the spectrometer to be compensated, determining the range of the sample to be detected based on the predicted values, and obtaining a first range predicted value; selecting a corresponding first compensation coefficient from a first set of compensation coefficients based on the first range predicted value, and obtaining a target compensation coefficient; and calculating the product between the measured values ​​of the spectrometer to be compensated and the target compensation coefficient, thereby correcting the measured values ​​of the spectrometer to be compensated and obtaining a first measured value.

[0042] In this example, a compensation matrix is ​​constructed based on the first absorbance measurement value in the first absorbance measurement value set of the standard solution in the spectrometer to be compensated and a preset standard solution dilution curve, resulting in a first compensation matrix. The drift measurement interval corresponding to the spectrometer to be compensated is determined based on the first compensation matrix, resulting in a first drift measurement interval set. The compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined based on the measurement environment information of the spectrometer to be compensated, resulting in a first compensation coefficient set. The measurement value of the spectrometer to be compensated is corrected based on the first compensation coefficient in the first compensation coefficient set, resulting in a first measurement value, thereby improving the accuracy when performing online compensation on the spectrometer to be compensated.

[0043] In one possible implementation, a method for constructing a compensation matrix based on a first absorbance measurement value from a set of first absorbance measurements of a standard solution in the spectrometer to be compensated and a preset standard solution dilution curve, and obtaining a first compensation matrix, includes: A1. Take the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; A2. Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the second characteristic peak intensity information set; A3. Construct a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and the preset standard solution dilution curve to obtain the first compensation matrix.

[0044] The process involves using a peristaltic pump to gradient dilute the standard solution (containing any one of Cu, Pb, Cd, etc.) built into the spectrometer to be compensated according to a preset dilution ratio (e.g., 1:1, 1:10, 1:100, etc.) to obtain a first set of standard solution samples. The spectrometer to be compensated is then used to measure the absorbance of the first standard solution samples in the first set of standard solution samples, resulting in a first set of absorbance measurement values. The first absorbance measurement values ​​in the first set of absorbance measurement values ​​are analyzed by extracting the peak intensities at wavelengths of 324.7 nm (Cu), 405.8 nm (Pb), or 228.8 nm (Cd) as characteristic peak intensities, thus obtaining a first set of characteristic peak intensity information. The content of Cu, Pb, Cd, etc., in the standard solution of the spectrometer to be compensated is 1000 ppm.

[0045] After obtaining the first characteristic peak intensity information set, the historical absorbance measurements corresponding to each first standard solution sample in the first standard solution sample set can be extracted from a preset database to obtain k sets of second absorbance measurements. The average value of the second absorbance measurements in each of the k sets of second absorbance measurements is calculated to obtain a third absorbance measurement set. The third absorbance measurements in the third absorbance measurement set are then analyzed using the same method as the first characteristic peak intensity information set to obtain the second characteristic peak intensity information set. Here, the number of elements in the third absorbance measurement set is k; k represents the number of first standard solution samples in the first standard solution sample set; the characteristic peak intensity of Cu standard solution is 324.7 nm, the characteristic peak intensity of Pb standard solution is 405.8 nm, and the characteristic peak intensity of Cd standard solution is 228.8 nm.

[0046] After obtaining the second characteristic peak intensity information set, a first fitting curve can be obtained by performing quadratic curve fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set; the drift coefficients corresponding to the standard solution at different concentrations can be determined according to the first fitting curve and the preset standard solution dilution curve, thus obtaining a first drift coefficient set; and the compensation matrix corresponding to the spectrometer to be compensated can be determined according to the first drift coefficients in the first drift coefficient set, thus obtaining a first compensation matrix.

[0047] In one possible implementation, a method for constructing a compensation matrix based on first characteristic peak intensity information in a first characteristic peak intensity information set, second characteristic peak intensity information in a second characteristic peak intensity information set, and a preset standard solution dilution curve, to obtain a first compensation matrix, includes: B1. Perform a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set to obtain the first fitting curve; B2. Determine the characteristic peak intensities of the standard solution at different concentrations based on the first fitting curve to obtain a third set of characteristic peak intensity information. B3. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; B4. Determine the drift coefficients of the standard solution at different concentrations based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, and obtain the first drift coefficient set. B5. Construct a drift coefficient matrix based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; B6. Determine the compensation matrix of the spectrometer to be compensated based on the first drift coefficient matrix to obtain the first compensation matrix.

[0048] Because the detection accuracy of a spectrometer varies with the sample concentration when measuring the absorbance of standard solutions of different concentrations, and the relationship between the detection accuracy and the sample concentration is nonlinear due to instrument characteristics and systematic errors (such as detector saturation, nonlinear signal amplification, background interference, mobile phase fluctuations, and light source attenuation), performing quadratic fitting on data containing two variables allows for the use of a quadratic function to describe the nonlinear transformation between the two variables in the dataset. This enables a quantitative expression of the data in the dataset and allows for the prediction of future absorbance measurements or the analysis of key features using the quadratic function obtained after quadratic fitting. Based on the analysis results, the measurement accuracy of the spectrometer can be improved.

[0049] Specifically, this can be achieved by extracting the concentration of the first standard solution sample corresponding to each second characteristic peak intensity information in the second characteristic peak intensity information set to obtain a first sample concentration information set; determining the fitting coefficient corresponding to the quadratic fitting curve based on the second characteristic peak intensity information in the second characteristic peak intensity information set and the first sample concentration information in the first sample concentration information set to obtain a first fitting coefficient; performing a quadratic fitting on the second characteristic peak intensity information in the second characteristic peak intensity information set and the first acquisition time information in the first acquisition time information set based on the first fitting coefficient to obtain a reference fitting curve; extracting the concentration of the first standard solution sample corresponding to each first characteristic peak intensity information in the first characteristic peak intensity information set to obtain a second sample concentration information set; verifying the accuracy of the reference fitting curve using the second sample concentration information in the second sample concentration information set and the first characteristic peak intensity information in the first characteristic peak intensity information set; if the accuracy of the reference fitting curve is insufficient, correcting the reference fitting curve using the second sample concentration information in the second sample concentration information set and the first characteristic peak intensity information in the first characteristic peak intensity information set to obtain a first fitting curve; otherwise, determining the reference fitting curve as the first fitting curve.

[0050] After obtaining the first fitted curve, the third set of characteristic peak intensity information can be obtained by using the first fitted curve to predict the characteristic peak intensity information corresponding to the second sample concentration information in the second sample concentration information set.

[0051] After obtaining the set of intensity information of the third characteristic peak, the absorbance value corresponding to each second sample concentration information in the set of second sample concentration information can be extracted from the preset standard solution dilution curve, thereby achieving the purpose of extracting the absorbance value corresponding to the standard solution at different concentrations in the preset standard solution dilution curve and obtaining the set of reference absorbance values.

[0052] After obtaining the set of reference absorbance values, the reference absorbance values ​​in the set of reference absorbance values ​​can be analyzed for characteristic peak intensity information using a common characteristic peak intensity analysis method to obtain a fourth characteristic peak intensity information set; the ratio between the fourth characteristic peak intensity information in the fourth characteristic peak intensity information set and the third characteristic peak intensity information in the third characteristic peak intensity information set can be calculated to obtain a first ratio information set; the first ratio information in the first ratio information set can be determined as the drift coefficient corresponding to the standard solution at different concentrations to obtain a first drift coefficient set.

[0053] After obtaining the first set of drift coefficients, the quantity information corresponding to the detection channels of the spectrometer to be compensated can be extracted to obtain the first quantity information; the first quantity information can be determined as the order information of the first drift coefficient matrix to obtain the first order information; according to the first order information, the drift coefficients at different concentrations can be arranged in the order of the detection channels using the first drift coefficients in the first set of drift coefficients to form a 15x15 diagonal matrix or covariance matrix, thereby constructing the drift coefficient matrix and obtaining the first drift coefficient matrix.

[0054] Since the function of the compensation matrix is ​​to correct the actual measurement data of the spectrometer to the true data that is close to the reference state, that is, the ratio between the reference state and the actual measurement data, and the first drift coefficient is determined by calculating the ratio between the intensity information of the fourth characteristic peak and the intensity information of the third characteristic peak, the first drift coefficient matrix should be the inverse of the first compensation matrix.

[0055] After obtaining the first drift coefficient matrix, the inverse matrix corresponding to the first drift coefficient matrix can be determined by a general inverse matrix calculation method to obtain the first compensation matrix.

[0056] In this example, a first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set. This further improves the detection accuracy of the spectrometer to be compensated when detecting standard liquid samples. Based on the preset standard liquid dilution curve, the reference absorbance values ​​of the standard liquid at different concentrations are extracted to obtain a reference absorbance value set. The drift coefficient matrix of the spectrometer to be compensated is determined according to the reference absorbance values ​​in the reference absorbance value set and the first fitting curve, resulting in a first drift coefficient matrix. The compensation matrix corresponding to the spectrometer to be compensated is then determined according to the first drift coefficient matrix, resulting in a first compensation matrix. This improves the accuracy of the obtained first compensation matrix, thereby improving the accuracy when performing online compensation on the spectrometer to be compensated.

[0057] In one possible implementation, a method for determining the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix, and obtaining a first set of drift measurement intervals, includes: C1. Using the first compensation matrix and a preset residual threshold, perform data anomaly detection on the first absorbance measurement value in the first absorbance measurement value set to obtain a second absorbance measurement value set. When the residual of the first absorbance measurement value in the first absorbance measurement value set is greater than the preset residual threshold, the first absorbance measurement value is abnormal data. The preset residual threshold is determined by user input or system default. The first absorbance measurement value that is abnormal data is placed into the second absorbance measurement value set. C2. Extract the measurement interval corresponding to each second absorbance measurement value from the second absorbance measurement value set to obtain the first drift measurement interval set.

[0058] Specifically, this can be achieved by extracting the historical compensation matrix corresponding to the first compensation matrix to obtain a second set of compensation matrices; calculating the stability between the first compensation matrix and each second compensation matrix in the second set of compensation matrices to obtain a first set of stability information; determining whether all the first stability information in the first set of stability information is greater than or equal to a preset stability threshold; if there is first stability information in the first set of stability information that is less than the preset stability threshold, then the number of times the first feature peak intensity information in the first feature peak intensity information set and the second feature peak intensity information in the second set of feature peak intensity information are fitted is adjusted, for example, replacing quadratic fitting with cubic or quadratic fitting. The first fitting curve is obtained by combining the first fitting curves. This is only used as an example. The compensation matrix of the spectrometer to be compensated is recalculated based on the first fitting curve to obtain the first compensation matrix. The first stability information set is obtained based on the stability between the first compensation matrix and the second compensation information in the second compensation matrix set. The steps of repeatedly adjusting the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set during fitting are repeated until the first stability information in the first stability information set is greater than or equal to the preset stability threshold.

[0059] If all the first stability information in the first stability information set is greater than or equal to a preset stability threshold, then the first characteristic peak intensity information in the first characteristic peak intensity information set can be compensated using the first compensation matrix to obtain a fifth characteristic peak intensity information set; the fifth characteristic peak intensity information in the fifth characteristic peak intensity information set can be converted using a general characteristic peak intensity information-absorbance information conversion formula to obtain a third absorbance information set; the residual between the third absorbance information in the third absorbance information set and the first absorbance information in the first absorbance information set can be calculated to obtain a first residual information set; the first residual information in the first residual information set that is greater than a preset residual threshold can be extracted to obtain a second residual information set; and the first absorbance information corresponding to each second residual information in the second residual information set can be extracted to obtain a second absorbance information set. The preset residual threshold can be determined by user input or by system default.

[0060] After obtaining the second absorbance information set, a fourth absorbance information set can be obtained by extracting the third absorbance information set corresponding to the second absorbance information set from the third absorbance information set; then, the measurement interval corresponding to each fourth absorbance information set in the fourth absorbance information set is extracted to obtain the first drift measurement interval set. The measurement interval corresponding to the fourth absorbance information can be understood as the measurement range corresponding to the fourth absorbance information.

[0061] In this example, the accuracy of the first compensation matrix is ​​further improved by verifying its accuracy against the historical compensation matrix corresponding to the first compensation matrix. The first compensation matrix is ​​used to compensate for the intensity of the first characteristic peak in the first characteristic peak intensity information set, resulting in a fifth characteristic peak intensity information set. The residual information corresponding to the intensity of the fifth characteristic peak in the fifth characteristic peak intensity information set is calculated, and the first absorbance information with excessive drift in the first absorbance set is determined based on a preset residual threshold and the residual information, resulting in a second absorbance information set. The measurement interval corresponding to each second absorbance information in the second absorbance information set is extracted, resulting in a first drift measurement interval set. This improves the accuracy of the first drift measurement interval in the obtained first drift measurement interval set, thereby improving the accuracy when performing online compensation on the spectrometer to be compensated.

[0062] In one possible implementation, a method for determining the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, and obtaining the first compensation coefficient set, includes: D1. Determine the error type of the spectrometer to be compensated based on the first drift measurement interval in the first drift measurement interval set, and obtain the first type information; D2. Based on the first type of information, select the compensation coefficient corresponding to each first drift measurement interval from the preset compensation coefficient table to obtain the reference compensation coefficient set; D3. Use the measurement environment information of the spectrometer to be compensated to correct the reference compensation coefficients in the reference compensation coefficient set to obtain the first compensation coefficient set.

[0063] Specifically, it can be determined whether the first drift measurement interval in the first drift measurement interval set covers the entire range of the spectrometer to be compensated. If so, it indicates that all ranges of the spectrometer to be compensated have a large error, and the first type of information of the spectrometer to be compensated can be "full range error". If not, it can be determined by clustering the first drift measurement intervals in the first drift measurement interval set according to their corresponding inspection wavelengths, and performing regularity analysis on the first drift measurement intervals in the first drift measurement interval set. If the analysis results indicate that the first drift measurement intervals in the first drift measurement interval set are all in the same concentration range, the first type of information is "segmented concentration error", otherwise, the first type of information is "partial range error".

[0064] Specifically, the first type of information of the spectrometer to be compensated may exhibit any combination of full-range error, partial-range error, or segmented concentration error. In this case, the error information corresponding to each first measurement curve in the first drift measurement interval set can be obtained by calculating the error information between the third absorbance information corresponding to the second absorbance information in the second absorbance information set, thereby obtaining the first error information set. Based on the wavelength information covered by each first drift measurement interval in the first drift measurement interval set and the first error information in the first error information set, a wavelength-error curve is plotted to obtain the first error variation curve. The error type of the spectrometer to be compensated is determined according to the first error variation curve, thereby obtaining the first type of information.

[0065] After obtaining the first type of information, the influencing factors that cause equipment drift of the spectrometer to be compensated can be determined based on the first type of information to obtain a first set of influencing factors; the mutual influence degree between the first influencing factors in the first set of influencing factors can be determined based on a preset compensation coefficient table to obtain a first set of mutual influence degrees.

[0066] Specifically, this can be achieved by extracting the compensation coefficients corresponding to each measurement interval of the spectrometer to be compensated under the influence of different first influencing factors from a preset compensation coefficient table, obtaining m compensation coefficient sequences; calculating the residual corresponding to each compensation sequence in the m compensation coefficient sequences, obtaining a second residual information set; and performing a quadratic fitting on each compensation sequence in the m compensation coefficient sequences. Since there is a nonlinear relationship between the detection accuracy of the spectrometer and the sample concentration, the quadratic fitting describes the drift characteristics and is used to characterize the mutual influence between the first influencing factors in the first influencing factor set, thus obtaining a first mutual influence set.

[0067] Specifically, the mutual influence degree between the first influence factors in the first influence factor set can be determined according to a preset compensation coefficient table using the method shown in the following formula, thus obtaining the first mutual influence degree set: In the formula This represents the first mutual influence degree between the i-th first impact factor and the j-th first impact factor in the first impact factor set; This represents the weight information corresponding to the i-th first impact factor in the first impact factor set; This represents the weight information corresponding to the j-th first impact factor in the first impact factor set. and The calculation method is the same; The linear correlation coefficient between the i-th and j-th first impact factors in the first impact factor set can be determined by user input or by system default. This represents the residual of the compensation value sequence corresponding to the i-th first influence factor in the first influence factor set. The elements in the compensation value sequence corresponding to the i-th first influence factor in the first influence factor set can be understood as the compensation value of each measurement interval of the spectrometer to be compensated under the influence of the i-th first influence factor in the first influence factor set. This represents the average value of the compensation value sequence corresponding to the i-th first impact factor in the first impact factor set; This indicates the number of first impact factors in the set of first impact factors; This represents the predicted value after performing a second fitting on the compensation value sequence corresponding to the i-th first impact factor in the first impact factor set.

[0068] Based on the first impact factor in the first impact factor set, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is extracted from the preset compensation coefficient table to obtain m sets of compensation coefficients to be determined; where m represents the number of first impact factors in the first impact factor set; based on the first mutual influence degree in the first mutual influence degree set and the compensation coefficients to be determined in the m sets of compensation coefficients to be determined, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is calculated to obtain a reference compensation coefficient set.

[0069] Specifically, the compensation coefficients for each first drift measurement interval in the first drift measurement interval set can be calculated using the method shown in the following formula, based on the first mutual influence degree in the first mutual influence degree set and the compensation coefficients to be determined in the set of m compensation coefficients to be determined, to obtain the reference compensation coefficient set: In the formula This represents the reference compensation coefficient in the reference compensation coefficient set; This indicates the number of the first drift measurement intervals in the first drift measurement interval set; This represents the j-th compensation coefficient in the i-th set of m undetermined compensation coefficient sets; This represents the k-th compensation coefficient in the i-th set of m undetermined compensation coefficients; This represents the first mutual influence degree between the j-th first impact factor and the k-th first impact factor in the first impact factor set; This indicates the number of first impact factors in the set of first impact factors; It represents the sum of the first mutual influence between the j-th first impact factor and the 1-th first impact factor in the first impact factor set, up to the sum of the first mutual influence between the j-th first impact factor and the m-th first impact factor in the first impact factor set.

[0070] Since different ambient temperatures have different effects on the detection accuracy of the spectrometer to be compensated under different influencing factors, it is also necessary to correct the reference compensation coefficients in the reference compensation coefficient set according to the measurement environment information of the spectrometer to be compensated, so as to improve the accuracy of the compensation coefficients corresponding to each first drift measurement interval in the first drift measurement interval set.

[0071] After obtaining the reference compensation coefficient set, the ambient temperature and humidity of the environment where the spectrometer to be compensated is located can be extracted to obtain the measurement environment information; the mutual influence degree between the measurement environment information and each first influence factor in the first influence factor set can be calculated using a general mutual influence degree calculation method to obtain a second mutual influence degree set; the correction coefficient corresponding to each reference compensation coefficient in the reference compensation coefficient set can be determined according to the second mutual influence degree in the second mutual influence degree set to obtain a correction coefficient set; the reference compensation coefficients in the reference compensation coefficient set can be corrected according to the correction coefficients in the correction coefficient set to obtain a first compensation coefficient set.

[0072] In this example, the error type corresponding to the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set, thus obtaining the first type information. Based on the first type information, the influencing factors causing equipment drift in the spectrometer to be compensated are determined, thus obtaining the first influencing factor set. The compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined based on the mutual influence between each influencing factor in the first influencing factor set, thus obtaining the reference compensation coefficient set, thereby improving the accuracy of the obtained reference compensation coefficient set. The reference compensation coefficients in the reference compensation coefficient set are corrected based on the measurement environment information of the spectrometer to be compensated, thus obtaining the first compensation coefficient set, further improving the accuracy of the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set, and consequently improving the accuracy when performing online compensation on the spectrometer to be compensated.

[0073] For examples consistent with the above embodiments, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application, such as... Figure 3 As shown, it includes a processor, an input device, an output device, and a memory, which are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions. The program includes instructions for performing the following steps. The first compensation matrix is ​​obtained by constructing a compensation matrix based on the first absorbance measurement value of the standard solution in the set of first absorbance measurement values ​​of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve; The drift measurement interval corresponding to the spectrometer to be compensated is determined based on the first compensation matrix, thus obtaining the first set of drift measurement intervals; Based on the measurement environment information of the spectrometer to be compensated, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined, and the first compensation coefficient set is obtained; The measured value of the spectrometer to be compensated is corrected according to the first compensation coefficient in the first set of compensation coefficients to obtain the first measured value.

[0074] The above mainly describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the terminal includes the corresponding hardware structure and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0075] This application embodiment can divide the terminal into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0076] For those consistent with the above, please refer to Figure 4 , Figure 4 This application provides a schematic diagram of an online spectral detection compensation system based on a standard solution dilution curve. (See attached diagram.) Figure 4 As shown, the system includes: The construction unit 401 is used to construct a compensation matrix based on the first absorbance measurement value in the first absorbance measurement value set of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, so as to obtain the first compensation matrix; The first determining unit 402 is used to determine the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix, and obtain the first drift measurement interval set; The second determining unit 403 is used to determine the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, so as to obtain the first compensation coefficient set. The correction unit 404 is used to correct the measured value of the spectrometer to be compensated according to the first compensation coefficient in the first compensation coefficient set to obtain the first measured value.

[0077] In one possible implementation, the building unit 401 is specifically used for: Extract the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the second characteristic peak intensity information set; The first compensation matrix is ​​obtained by constructing a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and the preset standard solution dilution curve.

[0078] In one possible implementation, in constructing a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the second characteristic peak intensity information set, and a preset standard solution dilution curve to obtain the first compensation matrix, the construction unit 401 is specifically used for: A first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the second characteristic peak intensity information set. Based on the first fitting curve, the characteristic peak intensities corresponding to different concentrations of the standard solution are determined, and a third set of characteristic peak intensity information is obtained. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; Based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, the drift coefficients of the standard solution at different concentrations are determined to obtain the first drift coefficient set. A drift coefficient matrix is ​​constructed based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; The compensation matrix of the spectrometer to be compensated is determined based on the first drift coefficient matrix, thus obtaining the first compensation matrix.

[0079] In one possible implementation, the first determining unit 402 is specifically used for: The first absorbance measurement value in the first absorbance measurement value set is detected for data anomalies using the first compensation matrix and the preset residual threshold to obtain the second absorbance measurement value set. When the residual of the first absorbance measurement value in the first absorbance measurement value set is greater than the preset residual threshold, the first absorbance measurement value is abnormal data. The preset residual threshold is determined by user input or system default. The second absorbance measurement value is abnormal data in the first absorbance measurement value set. Extract the measurement interval corresponding to each second absorbance measurement value from the second absorbance measurement value set to obtain the first drift measurement interval set.

[0080] In one possible implementation, the second determining unit 403 is specifically used for: The error type of the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set, and the first type information is obtained; Based on the first type of information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is selected from the preset compensation coefficient table to obtain the reference compensation coefficient set; The reference compensation coefficients in the reference compensation coefficient set are corrected using the measurement environment information of the spectrometer to be compensated, to obtain the first compensation coefficient set.

[0081] This application also provides a computer storage medium storing a computer program for electronic data exchange, which causes a computer to perform some or all of the steps of any of the online spectral detection compensation methods based on standard solution dilution curves as described in the above method embodiments.

[0082] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program that causes a computer to perform some or all of the steps of any of the online spectral detection compensation methods based on standard solution dilution curves as described in the above method embodiments.

[0083] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0084] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0087] Furthermore, the functional units in the various embodiments of the application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0088] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0089] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.

[0090] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An online spectral detection compensation method based on standard solution dilution curves, characterized in that, The method is applied to a laser water quality analyzer, the laser water quality analyzer comprising: a spectrometer to be compensated, and the method comprising: A compensation matrix is ​​constructed based on the first absorbance measurement value in the first absorbance measurement set of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, and the first compensation matrix is ​​obtained. The first absorbance measurement value in the first absorbance measurement set includes the measurement value obtained by measuring the absorbance of standard solutions of different concentrations in the spectrometer to be compensated. The drift measurement interval corresponding to the spectrometer to be compensated is determined according to the first compensation matrix. The residual corresponding to the third absorbance measurement value in the third absorbance measurement value set is calculated to obtain the first residual information set. The drift measurement interval corresponding to the spectrometer to be compensated is determined according to the preset residual threshold and the first residual information in the first residual information set to obtain the first drift measurement interval set. The third absorbance measurement value in the third absorbance measurement value set is used to compensate the first characteristic peak intensity information in the first characteristic peak intensity information set using the first compensation matrix. The compensated first characteristic peak intensity information is converted into absorbance using the characteristic peak intensity-absorbance conversion formula. Based on the measurement environment information of the spectrometer to be compensated, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is determined, and the first compensation coefficient set is obtained; The measured value of the spectrometer to be compensated is corrected according to the first compensation coefficient in the first compensation coefficient set to obtain the first measured value; The compensation matrix is ​​constructed based on the first absorbance measurement values ​​of the standard solution in the set of first absorbance measurements of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, resulting in the first compensation matrix, which includes: Extract the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain k sets of second characteristic peak intensity information, where k is the number of first absorbance measurement values ​​in the first absorbance measurement value set; A compensation matrix is ​​constructed based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the k second characteristic peak intensity information sets, and the preset standard solution dilution curve. A first fitting curve is obtained by performing quadratic curve fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets. The drift coefficients corresponding to the standard solution at different concentrations are determined based on the first fitting curve and the preset standard solution dilution curve, resulting in a first drift coefficient set. The compensation matrix corresponding to the spectrometer to be compensated is determined based on the first drift coefficients in the first drift coefficient set, resulting in a first compensation matrix. The compensation coefficients for each first drift measurement interval in the first drift measurement interval set are determined based on the measurement environment information of the spectrometer to be compensated, resulting in a first compensation coefficient set, including: The error type of the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set. By analyzing the distribution pattern and residual size of the measurement interval, the error types are classified into full-range error, partial-range error or segmented concentration error, and the first type information is obtained. Based on the first type of information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is selected from the preset compensation coefficient table to obtain the reference compensation coefficient set; The reference compensation coefficients in the reference compensation coefficient set are corrected using the measurement environment information of the spectrometer to be compensated, to obtain the first compensation coefficient set.

2. The online spectral detection compensation method based on the standard solution dilution curve according to claim 1, characterized in that, The compensation matrix is ​​constructed based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in k second characteristic peak intensity information sets, and a preset standard solution dilution curve. A first fitting curve is obtained by performing quadratic curve fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets. The drift coefficients corresponding to the standard solution at different concentrations are determined based on the first fitting curve and the preset standard solution dilution curve, resulting in a first drift coefficient set. The compensation matrix corresponding to the spectrometer to be compensated is determined based on the first drift coefficients in the first drift coefficient set, resulting in a first compensation matrix, including: A first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets. Based on the first fitting curve, the characteristic peak intensities corresponding to different concentrations of the standard solution are determined, and a third set of characteristic peak intensity information is obtained. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; Based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, the drift coefficients of the standard solution at different concentrations are determined to obtain the first drift coefficient set. A drift coefficient matrix is ​​constructed based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; The compensation matrix of the spectrometer to be compensated is determined based on the first drift coefficient matrix, thus obtaining the first compensation matrix.

3. An online spectral detection compensation system based on a standard solution dilution curve, characterized in that, The system employs the online spectral detection compensation method based on the standard solution dilution curve as described in any one of claims 1-2 to compensate the laser water quality analyzer. The system comprises: The construction unit is used to construct a compensation matrix based on the first absorbance measurement value in the first absorbance measurement value set of the standard solution in the spectrometer to be compensated and the preset standard solution dilution curve, so as to obtain the first compensation matrix. The first absorbance measurement value in the first absorbance measurement set includes the measurement value obtained by measuring the absorbance of standard solutions of different concentrations in the spectrometer to be compensated. The first determining unit is configured to determine the drift measurement interval corresponding to the spectrometer to be compensated based on the first compensation matrix, obtain a first residual information set by calculating the residual corresponding to the third absorbance measurement value in the third absorbance measurement value set, and determine the drift measurement interval corresponding to the spectrometer to be compensated based on the preset residual threshold and the first residual information in the first residual information set, thereby obtaining a first drift measurement interval set. The third absorbance measurement value in the third absorbance measurement value set is used to compensate the first characteristic peak intensity information in the first characteristic peak intensity information set using the first compensation matrix, and the compensated first characteristic peak intensity information is converted into absorbance using the characteristic peak intensity-absorbance conversion formula. The second determining unit is used to determine the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set based on the measurement environment information of the spectrometer to be compensated, so as to obtain the first compensation coefficient set. The correction unit is used to correct the measured value of the spectrometer to be compensated according to the first compensation coefficient in the first compensation coefficient set, so as to obtain the first measured value; The building unit is specifically used for: Extract the characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain the first characteristic peak intensity information set; Extract the historical characteristic peak intensity corresponding to each first absorbance measurement value in the first absorbance measurement value set to obtain a set of k second characteristic peak intensity information; A compensation matrix is ​​constructed based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in the k second characteristic peak intensity information sets, and the preset standard solution dilution curve. A first fitting curve is obtained by performing quadratic curve fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets. The drift coefficients corresponding to the standard solution at different concentrations are determined based on the first fitting curve and the preset standard solution dilution curve, resulting in a first drift coefficient set. The compensation matrix corresponding to the spectrometer to be compensated is determined based on the first drift coefficients in the first drift coefficient set, resulting in a first compensation matrix. The second determining unit is specifically used for: The error type of the spectrometer to be compensated is determined based on the first drift measurement interval in the first drift measurement interval set. By analyzing the distribution pattern and residual size of the measurement interval, the error types are classified into full-range error, partial-range error or segmented concentration error, and the first type information is obtained. Based on the first type of information, the compensation coefficient corresponding to each first drift measurement interval in the first drift measurement interval set is selected from the preset compensation coefficient table to obtain the reference compensation coefficient set; The reference compensation coefficients in the reference compensation coefficient set are corrected using the measurement environment information of the spectrometer to be compensated, to obtain the first compensation coefficient set.

4. The online spectral detection compensation system based on standard solution dilution curves according to claim 3, characterized in that, The construction unit is specifically used to: construct a compensation matrix based on the first characteristic peak intensity information in the first characteristic peak intensity information set, the second characteristic peak intensity information in k second characteristic peak intensity information sets, and a preset standard solution dilution curve; perform quadratic curve fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets to obtain a first fitting curve; determine the drift coefficients of the standard solution at different concentrations based on the first fitting curve and the preset standard solution dilution curve to obtain a first drift coefficient set; and determine the compensation matrix corresponding to the spectrometer to be compensated based on the first drift coefficients in the first drift coefficient set to obtain the first compensation matrix. A first fitting curve is obtained by performing a second fitting on the first characteristic peak intensity information in the first characteristic peak intensity information set and the second characteristic peak intensity information in the k second characteristic peak intensity information sets. Based on the first fitting curve, the characteristic peak intensities corresponding to different concentrations of the standard solution are determined, and a third set of characteristic peak intensity information is obtained. Extract the absorbance values ​​of the standard solution at different concentrations from the preset standard solution dilution curve to obtain a set of reference absorbance values; Based on the reference absorbance values ​​in the reference absorbance value set and the third characteristic peak intensity information in the third characteristic peak intensity information set, the drift coefficients of the standard solution at different concentrations are determined to obtain the first drift coefficient set. A drift coefficient matrix is ​​constructed based on the first drift coefficient in the first drift coefficient set to obtain the first drift coefficient matrix; The compensation matrix of the spectrometer to be compensated is determined based on the first drift coefficient matrix, thus obtaining the first compensation matrix.

5. A laser water quality analyzer, characterized in that, The laser water quality analyzer is used to perform the online spectral detection compensation method based on the standard solution dilution curve as described in any one of claims 1-2. The laser water quality analyzer includes: a laser bombardment unit, a water sample preparation unit, and a detection unit. The laser output from the laser bombardment unit bombards the spots on the water sample preparation area of ​​the water sample preparation unit through the end of the laser bombardment unit. The detection unit monitors the light generated by the laser bombardment unit bombarding the spots.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the online spectral detection compensation method based on a standard solution dilution curve as described in any one of claims 1-2.