Near infrared spectroscopy calibration method, system, device and medium based on standard substances
By using a near-infrared spectroscopy calibration method based on standard substances, the spectrum is calibrated in different regions, which solves the problem of the influence of environmental factors on spectral data, improves the measurement accuracy and stability of near-infrared spectrometers, and is suitable for diverse field detection conditions.
Patent Information
- Application Number
- CN202311529497.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-11-16
AI Technical Summary
Existing technologies struggle to effectively reduce the impact of environmental factors on spectral data under diverse near-infrared rapid on-site detection conditions, resulting in unstable measurement results and poor accuracy, which limits the widespread application of near-infrared instruments.
A near-infrared spectroscopy calibration method based on standard substances is adopted. By dividing the spectral changes of standard substances under different environments into regions, correction parameter values are obtained, and the spectra of the test samples are corrected in different regions to eliminate the interference of environmental factors.
It improves the accuracy and stability of near-infrared spectrometers in different environments, simplifies the operation process, expands the application range, and is suitable for rapid on-site detection.
Smart Images

Figure CN117554327B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of spectrum calibration technology, and in particular to a near-infrared spectrum calibration method, system, electronic device and computer-readable storage medium based on standard substances. Background Art
[0002] In order to reduce or eliminate the spectral drift caused by environmental factors such as instrument aging and temperature, and to improve the stability and accuracy of spectra collected by near-infrared spectrometers, some researchers have controlled the external environment to minimize the impact of environmental factors on spectral data, thereby improving the stability of spectral data. However, the use conditions of near-infrared on-site rapid detection instruments are diverse and there are many uncertain factors, which makes it very difficult to control the stability of the external environment. This leads to deviations in the measurement results, which in turn makes it difficult to promote near-infrared instruments. Summary of the invention
[0003] The present invention provides a near-infrared spectrum calibration method based on a standard substance, comprising:
[0004] Obtaining a standard near infrared spectrum diagram of the standard substance before and after the environmental change and a standard near infrared spectrum diagram after the environmental change;
[0005] Dividing the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change into a plurality of regions according to the horizontal axis;
[0006] Obtaining the correction parameter value of each area according to the changes in each area of the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change;
[0007] Obtaining an initial near-infrared spectrum of the sample to be tested, and dividing the initial near-infrared spectrum into a plurality of regions identical to the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change corresponding to the standard substance;
[0008] Correcting the initial near-infrared spectrum by using corresponding correction parameter values according to the regions to obtain a corrected near-infrared spectrum;
[0009] The corrected near-infrared spectrum of the sample to be tested is imported into the measurement model to obtain the measurement value of the sample to be tested. The measurement model input is the horizontal coordinate and the vertical coordinate of the corrected near-infrared spectrum, and the output is the measurement index, which includes one or more of kinematic viscosity, freezing point, flash point, density and distillation range.
[0010] According to one aspect of the present invention, the step of correcting the initial near-infrared spectrum by corresponding correction parameter values according to the regions comprises:
[0011] Obtain the average of the vertical coordinate differences in each region of the standard infrared spectrum of the standard substance after the change and the standard infrared spectrometer before the change as the correction parameter value;
[0012] In each area, the difference between the initial near-infrared spectrum of the sample to be tested and the corrected parameter value of the standard substance is calculated.
[0013] According to one aspect of the present invention, before the step of obtaining the standard near-infrared spectrum of the standard substance before and after the environmental change and the standard near-infrared spectrum of the standard substance after the environmental change, the step further includes:
[0014] Select standard substances with similar near-infrared spectra to those of the samples to be tested.
[0015] According to one aspect of the present invention, the step of selecting a standard substance with a near infrared spectrum similar to that of the sample to be tested comprises:
[0016] Select standard substances with similar response trends in the near-infrared band as the samples to be tested;
[0017] The step of selecting a standard substance having a similar response trend to the sample to be tested in the near infrared band comprises:
[0018] A standard substance is selected that has a position and a response trend similar to that of the sample to be tested in the near-infrared band, wherein the response trend includes one or more of an increased response, a decreased response, and a response gradient.
[0019] According to one aspect of the present invention, the step of dividing the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change into a plurality of regions according to the horizontal axis comprises:
[0020] Divide the regions according to the changes in the response trend of the near infrared spectrum;
[0021] Preferably, the step of dividing the regions according to the change of the response trend of the near infrared spectrum includes:
[0022] Divide the response peaks and response troughs into different regions;
[0023] When the response trend changes, the near infrared spectrum before the response trend changes is divided into one region, and the near infrared spectrum after the response trend changes is divided into another region.
[0024] According to one aspect of the present invention, the step of obtaining a standard near-infrared spectrum of a standard substance before and after an environmental change and a standard near-infrared spectrum of a standard substance after an environmental change comprises:
[0025] Determine whether the environment at the time of detection has changed;
[0026] When the environment changes at the moment of detection, the near-infrared spectrum of the standard substance is measured to obtain the standard near-infrared spectrum after the change.
[0027] According to one aspect of the present invention, the step of determining whether the environment at the detection time has changed comprises:
[0028] Determine whether the ambient temperature change exceeds a temperature change threshold, if the ambient temperature change exceeds the temperature change threshold; or / and
[0029] Aging of near infrared spectrometer to determine environmental changes; or / and
[0030] Replace components of the NIR spectrometer to determine environmental changes; or / and
[0031] If the entire NIR spectrometer is replaced, the environment is determined to have changed; or / and
[0032] If the relative standard deviation of the near infrared spectrum of the standard substance at the time of detection relative to the near infrared spectrum before the change exceeds the deviation threshold, it is determined that the environment has changed.
[0033] According to one aspect of the present invention, the step of obtaining a standard near-infrared spectrum of a standard substance before and after an environmental change and a standard near-infrared spectrum of a standard substance after an environmental change comprises:
[0034] The near infrared spectrometer is preheated to measure the near infrared spectrum of the standard substance as the standard near infrared spectrum before the change;
[0035] After the near-infrared spectrometer is preheated to measure the near-infrared spectrum of the standard substance, the near-infrared spectrum of the standard substance measured at the detection time is used as the changed standard near-infrared spectrum.
[0036] According to one aspect of the present invention, the standard substance is a stable substance, and the stable substance is a substance whose material composition changes less than a change threshold within a set time period.
[0037] The present invention also provides a near-infrared spectrum calibration system based on a standard substance, comprising:
[0038] An acquisition module, which acquires the standard near-infrared spectra of the standard substances before and after the environmental changes, and the initial near-infrared spectra of the samples to be tested after the environmental changes;
[0039] A region division module, which divides the standard near-infrared spectrum before the change, the standard near-infrared spectrum after the change, and the initial near-infrared spectrum collected by the collection module according to the horizontal axis;
[0040] The correction module obtains the correction parameter value of each region based on the changes of the standard near-infrared spectrum of the standard substance before and after the change divided by the region division module, and corrects the initial near-infrared spectrum of the sample to be tested divided by the region division module according to the corresponding correction parameter value according to the region, so as to obtain the corrected near-infrared spectrum of the sample to be tested;
[0041] A measurement module, which imports the corrected near-infrared spectrum of the sample to be tested obtained by the correction module into a measurement model to obtain a measurement value of the sample to be tested, wherein the measurement model inputs the abscissa and ordinate of the corrected near-infrared spectrum and outputs a measurement index, wherein the measurement index includes one or more of a freezing point, a density and a distillation range;
[0042] Preferably, the correction module comprises:
[0043] The correction parameter value obtaining unit obtains the average of the vertical coordinate difference between the standard infrared spectrum of the standard substance after the change and the standard infrared spectrometer before the change in each area as the correction parameter value
[0044] The difference unit calculates the difference between the initial near-infrared spectrum of the sample to be tested and the correction parameter value of the standard substance in each area;
[0045] Preferably, it also includes a standard substance determination module, which uses a stable substance with a near-infrared spectrum similar to that of the sample to be tested as a standard substance;
[0046] More preferably, it also includes an environment change judgment module to judge whether the environment at the detection time has changed.
[0047] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory comprises a near-infrared spectrum calibration program based on standard substances, and when the near-infrared spectrum calibration program based on standard substances is executed by the processor, the steps of the above-mentioned near-infrared spectrum calibration method based on standard substances are implemented.
[0048] The present invention provides a computer-readable storage medium, which includes a near-infrared spectrum calibration program based on standard substances. When the near-infrared spectrum calibration program based on standard substances is executed by a processor, the steps of the near-infrared spectrum calibration based on standard substances are implemented.
[0049] The present invention divides the near-infrared spectrum of the standard substance into regions, reflects the environmental changes through the changes in the near-infrared spectrum of the standard substance, and obtains the correction parameters based on this to achieve regional correction, which can accurately reflect the influence of environmental factors on the spectral data under different environments. In the correction process, the difference is obtained from the data of different regions, and the difference is averaged, which is combined with the near-infrared spectrum to be measured to complete the correction. The use of this partition correction method can avoid excessive correction of the bands that are not affected by the environment, and at the same time ensure that the appropriate correction parameters are used for the bands that are greatly affected by environmental factors, so as to ensure the accuracy of the correction degree, thereby improving the accuracy of the measurement results.
[0050] The present invention also selects a substance with a near-infrared spectrum similar to that of the sample to be tested as a standard substance to simulate the spectral response variation trend of the sample to be tested, thereby improving the credibility of the calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of an embodiment of the near infrared spectrum calibration method based on standard substances of the present invention;
[0052] Figure 2 It is a schematic diagram of an embodiment of the method for selecting a standard substance with a near infrared spectrum similar to that of a sample to be tested according to the present invention;
[0053] Figure 3 is a schematic diagram of an embodiment of the electronic device of the present invention;
[0054] Figure 4 It is a schematic diagram of a block diagram of an embodiment of a near-infrared spectrum calibration system based on standard substances according to the present invention;
[0055] Figure 5 is a schematic diagram of the regional division of a specific embodiment of the present invention;
[0056] Among them, the electronic device 1, the near-infrared spectrum calibration program based on standard substances 10, the memory 11, the processor 12, the communication bus 13, the network interface 14, the standard substance determination module 110, the environmental change judgment module 120, the acquisition module 130, the area division module 140, the correction module 150, the correction parameter value acquisition unit 151, the difference unit 152, and the measurement module 160.
[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0059] In order to eliminate the spectrum shift phenomenon caused by the influence of external environmental factors and the aging and replacement of instrument detection components, to ensure the stability of the spectrum collected by the near-infrared spectrometer, and to improve the accuracy and long-term effectiveness of the near-infrared spectrum on-site rapid detection model, the present invention proposes a near-infrared spectrum calibration method based on standard substances, which uses the spectrum diagram of a stable substance measured multiple times in different environments as a benchmark, and performs difference correction on the sample spectrum shift phenomenon caused by the influence of instrument and environmental factors, so as to improve the accuracy and stability of the near-infrared on-site rapid detection instrument.
[0060] Figure 1 FIG. 1 is a flow chart of an embodiment of the near infrared spectrum calibration method based on standard substances of the present invention, as shown in FIG. Figure 1 As shown, the near infrared spectrum calibration method comprises:
[0061] S2, obtaining a standard near-infrared spectrum of the standard substance before and after the environmental change and a standard near-infrared spectrum of the standard substance after the environmental change;
[0062] S3, dividing the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change into a plurality of regions according to the horizontal axis;
[0063] S4, obtaining a correction parameter value for each region according to changes in the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change in each region;
[0064] S5, obtaining an initial near-infrared spectrum of the sample to be tested, and dividing the initial near-infrared spectrum into a plurality of regions that are identical to the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change corresponding to the standard substance;
[0065] S6, correcting the initial near-infrared spectrum according to the region by using the corresponding correction parameter value to obtain a corrected near-infrared spectrum;
[0066] S7, importing the corrected near-infrared spectrum of the sample to be tested into the measurement model to obtain the measurement value of the sample to be tested, wherein the measurement model input is the horizontal coordinate and the vertical coordinate of the corrected near-infrared spectrum, and the output is the measurement index, which includes one or more of kinematic viscosity, freezing point, flash point, density and distillation range.
[0067] The near infrared spectrum calibration method (spectral spectrum standardization method) based on standard substances can effectively correct the spectrum of the sample to be tested and eliminate the interference of environmental factors. The traditional method of controlling the environment is not only difficult to implement, but also has low reliability and cannot guarantee the quality of the spectrum. And it has strong limitations and is more suitable for laboratory operation. Compared with the traditional method, the present invention is easy to operate, has strong executability, and its scope of application is not limited to the laboratory, which is helpful for the promotion of the current near infrared spectrum on-site rapid detection instrument.
[0068] In some embodiments of the present invention, Figure 1 As shown, before step S2, it also includes:
[0069] S1, select standard substances with similar near-infrared spectra to the samples to be tested.
[0070] In some embodiments of the present invention, step S1 comprises:
[0071] Select a standard substance that has a similar response trend to the sample to be tested in the near-infrared band. A similar response trend means that the position where the standard substance and the sample to be tested produce responses and the trend of response change (increase, decrease, slope, etc.) are similar. For example, the standard substance and the sample to be tested have similar chemical compositions and similar responses appear at similar wavelengths on the near-infrared spectrum.
[0072] In some embodiments of the present invention, the step of selecting a standard substance having a similar response trend to the sample to be tested in the near-infrared band comprises:
[0073] A standard substance is selected that has a position and a response trend similar to that of the sample to be tested in the near-infrared band, wherein the response trend includes one or more of an increased response, a decreased response, and a response gradient.
[0074] Figure 2 FIG. 1 is a schematic diagram of an embodiment of the method for selecting a standard substance with a near infrared spectrum similar to that of a sample to be tested according to the present invention. Figure 2 As shown, the step of selecting a standard substance having a similar response trend to the sample to be tested in the near infrared band includes:
[0075] The near infrared spectrum of the standard substance and the near infrared spectrum of the sample are set in the same coordinates;
[0076] Place the near infrared spectrum of the standard material and the near infrared spectrum of the sample in the same coordinate on the same baseline;
[0077] Select the response (ordinate, such as intensity) at the same horizontal coordinate (such as wavelength) of the near infrared spectrum of the standard substance and the near infrared spectrum of the sample with the same baseline as the center of the circle, and take the maximum difference in the horizontal coordinate (maximum difference in wavelength, for example, Figure 2 The setting ratio of the wavelength (from 800nm to 1800nm, with a maximum wavelength difference of 1000nm) is used as the diameter to make the sample circle and the standard circle respectively;
[0078] Take the intersection of the sample circle and the standard circle as the starting point, construct a vector with the center of the sample circle and the center of the standard circle, and get the angle θ between the two vectors. The smaller the angle θ is, the more similar the position and response trend of the standard substance and sample response are.
[0079]
[0080] Among them, t i is the vector from the intersection of the standard circle and the sample circle to the near-infrared spectrum of the sample, r i is the vector from the intersection of the standard circle and the sample circle to the near-infrared spectrum of the standard substance,
[0081] The above-mentioned similar judgment method can effectively reduce the situation where the accuracy of the calculation result is affected by the size of the response value.
[0082] Preferably, the step of placing the near infrared spectrum of the standard substance and the near infrared spectrum of the sample in the same coordinate on the same baseline comprises:
[0083] The ordinate of the near infrared spectrum of the standard substance minus the minimum ordinate value of the near infrared spectrum of the standard substance;
[0084] The ordinate of the sample's near-infrared spectrum minus the minimum ordinate value of the sample's near-infrared spectrum.
[0085] Preferably, in the step of taking the ratio of the maximum difference in the horizontal coordinate as the diameter, the set ratio is 1 / 5, which conforms to a larger wavelength range.
[0086] In some embodiments of the present invention, the standard substance is a stable substance, and the stable substance is a substance whose material composition changes less than a change threshold within a set time period.
[0087] In some embodiments of the present invention, step S2 comprises:
[0088] Determine whether the environment at the time of detection has changed;
[0089] When the environment changes at the moment of detection, the near-infrared spectrum of the standard substance is measured to obtain the standard near-infrared spectrum after the change.
[0090] In some embodiments of the present invention, the step of determining whether the environment at the detection time has changed includes:
[0091] Determine whether the ambient temperature change exceeds a temperature change threshold (eg, 2°C), if the ambient temperature change exceeds the temperature change threshold, determine whether the ambient temperature change exceeds the temperature change threshold; or / and
[0092] Aging of near infrared spectrometer to determine environmental changes; or / and
[0093] Replace components of the NIR spectrometer to determine environmental changes; or / and
[0094] If the entire NIR spectrometer is replaced, the environment is determined to have changed; or / and
[0095] If the relative standard deviation of the near infrared spectrum of the standard substance at the time of detection relative to the near infrared spectrum before the change exceeds the deviation threshold, it is determined that the environment has changed.
[0096] In some embodiments of the present invention, step S2 comprises:
[0097] The near infrared spectrometer is preheated to measure the near infrared spectrum of the standard substance as the standard near infrared spectrum before the change;
[0098] The near-infrared spectrum of the standard substance measured at the time of detection after the near-infrared spectrometer is preheated is used as the standard near-infrared spectrum after the change. The near-infrared spectrum of the standard substance measured before the measurement after the near-infrared spectrometer is preheated is the standard near-infrared spectrum before the change of the day. The spectra of the standard substances collected thereafter can be regarded as the standard near-infrared spectra after the change affected by the environment, and therefore need to be calibrated.
[0099] In some embodiments of the present invention, step S3 includes:
[0100] The regions are divided according to the change of the response trend of the near infrared spectrum, for example, the regions are divided according to the change of the responsivity in the near infrared spectrum as the wavelength increases.
[0101] Preferably, the step of dividing the regions according to the change of the response trend of the near infrared spectrum includes:
[0102] Divide the response peaks and response troughs into different regions;
[0103] When the response trend changes, the near infrared spectrum before the response trend changes is divided into one region, and the near infrared spectrum after the response trend changes is divided into another region.
[0104] In some embodiments of the present invention, step S6 includes:
[0105] Obtain the average of the vertical coordinate differences in each region of the standard infrared spectrum of the standard substance after the change and the standard infrared spectrometer before the change as the correction parameter value;
[0106] In each area, the difference between the initial near-infrared spectrum of the sample to be tested and the corrected parameter value of the standard substance is calculated.
[0107] The present invention uses the spectrum difference of the standard sample before and after the environmental change to perform correction. The difference is the basis of correction, and the mean is to minimize the influence caused by random errors.
[0108] The near infrared spectrum calibration based on standard substances in the above-mentioned embodiments can be applied to electronic devices, which can be terminal equipment with computing functions such as servers, smart phones, tablet computers, portable computers, and desktop computers.
[0109] Figure 3 is a schematic diagram of an embodiment of the electronic device of the present invention, such as Figure 3 As shown, the electronic device 1 includes a memory 11 and a processor 12, wherein the memory 11 includes a near-infrared spectrum calibration program 10 based on standard substances, and when the near-infrared spectrum calibration program 10 based on standard substances is executed by the processor 12, the steps of the near-infrared spectrum calibration method based on standard substances of the above-mentioned embodiments are implemented.
[0110] The memory 11 includes at least one type of computer-readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of the electronic device, such as a hard disk of the electronic device. In other embodiments, the computer-readable storage medium may also be an external memory of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0111] In some embodiments, the processor 12 may be a central processing unit (CPU), a microprocessor or other data processing chip for running program codes stored in a memory or processing data.
[0112] In some embodiments of the present invention, the electronic device 1 also includes a communication bus 13 and a network interface 14. The network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device and other electronic devices. For example, the near-infrared spectrum measured by the near-infrared spectrometer can be transmitted to the electronic device via the network; the communication bus 13 is used to realize the connection and communication between the components.
[0113] Figure 3 The electronic device is shown for exemplary purposes only, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0114] In some embodiments of the present invention, the near infrared spectrum calibration program 10 based on standard substances can also be divided into one or more modules, one or more modules are stored in the memory and executed by the processor to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions. Figure 3 As shown, Figure 2 Functional module diagram of a preferred embodiment of a near-infrared spectroscopy calibration procedure based on standard substances.
[0115] Figure 4 FIG. 1 is a schematic diagram of a block diagram of an embodiment of a near infrared spectrum calibration system based on a standard substance according to the present invention. Figure 4 The near-infrared spectrum calibration system comprises:
[0116] The acquisition module 130 acquires the standard near-infrared spectra of the standard substances before and after the environmental changes and the initial near-infrared spectra of the samples to be tested after the environmental changes;
[0117] A region division module 140 divides the standard near-infrared spectrum before the change, the standard near-infrared spectrum after the change, and the initial near-infrared spectrum collected by the collection module 130 according to the horizontal axis;
[0118] The correction module 150 obtains the correction parameter value of each region based on the changes of the standard near-infrared spectrum of the standard substance before and after the change divided by the region division module 140, and corrects the initial near-infrared spectrum of the sample to be tested divided by the region division module according to the corresponding correction parameter value according to the region, so as to obtain the corrected near-infrared spectrum of the sample to be tested;
[0119] The measurement module 160 imports the corrected near-infrared spectrum of the sample to be tested obtained by the correction module 150 into the measurement model to obtain the measurement value of the sample to be tested. The measurement model input is the horizontal coordinate and the vertical coordinate of the corrected near-infrared spectrum, and the output is the measurement index, which includes one or more of kinematic viscosity, freezing point, flash point, density and distillation range.
[0120] Preferably, the correction module 150 includes:
[0121] The correction parameter value obtaining unit 151 obtains the average of the vertical coordinate difference values of the standard infrared spectrometer in each area after the change of the standard material and before the change as the correction parameter value.
[0122] The difference unit 152 performs difference calculation between the initial near infrared spectrum of the sample to be tested and the correction parameter value of the standard substance in each region.
[0123] In some embodiments of the present invention, the near-infrared spectrum calibration system further includes a standard substance determination module 110, which uses a stable substance having a near-infrared spectrum similar to that of the sample to be tested as a standard substance.
[0124] In some embodiments of the present invention, the near-infrared spectrum calibration system further includes an environment change determination module 120 for determining whether the environment at the detection time has changed.
[0125] The functions or operation steps implemented by the above modules are similar to those above and will not be described in detail here.
[0126] In a specific embodiment of the present invention, according to the standard method specified in "GB 6537-2018 No. 3 Jet Fuel", a 3# jet fuel was randomly selected as the sample to be tested, and 11 physical and chemical properties were measured, including: initial distillation point, 10% distillation range, 20% distillation range, 50% distillation range, 90% distillation range, final distillation point, 20°C density, 20°C kinematic viscosity, -20°C kinematic viscosity, flash point and freezing point. The spectrometer was preheated for 30 minutes, and the wavelength resolution of 12nm and the wavelength range of 800nm to 1700nm were set for spectral acquisition. The test was carried out with air as the background, and the sample to be tested was tested 5 times. The uncorrected spectral measurement values and reference values of the sample to be tested are shown in Table 1
[0127] Table 1
[0128]
[0129]
[0130] The carbon number of D60 sample is concentrated in C10 to C12, which is similar to the carbon number distribution of 3# jet fuel. At the same time, the main responses are CH bonds, and there is a similar response trend in the near-infrared band. The physical and chemical properties of D60 are stable and not easy to change. The D60 sample of China National Institute of Metrology was selected as the standard substance.
[0131] In a short time, the indoor temperature was changed from 22°C to 27°C by adjusting the air conditioning temperature to simulate the change of ambient temperature. The long-term change was after a two-month interval, when the natural environment changed as a whole. The D60 samples measured twice, from 1 to 4, showed a high response peak in the near-infrared spectrum, but there were two weak responses. Therefore, it was divided into 4 sections, and the convex and concave responses reflected in the spectrum were divided. Sections 5 to 8 were for dividing the response peaks. In the area where the peak change trend changed significantly (the rising trend suddenly slowed down, the falling trend suddenly increased, etc.), it was divided into 4 sections. For the peak position, the peak tip was guaranteed not to be divided as much as possible, and its spectrum was divided into 21 areas (see Figure 5): 1st section 900nm-945nm; 2nd section 945nm-1004nm; 3rd section 1004nm-1078nm; 4th section 1078nm-1137nm; 5th section 1137nm-1180nm; 6th section 1180nm-1202nm; 7th section 1202nm-1223nm; 8th section 1223nm-1307nm; 9th section 1307nm-1350nm; 10th section 1350nm-1370nm; 11th section 1370nm-1397nm; 12th section 1397nm-1406nm ; 13th section 1406nm-1417nm; 14th section 1417nm-1429nm; 15th section 1429nm-1450nm; 16th section 1450nm-1479nm; 17th section 1479nm-1521nm; 18th section 1521nm-1599nm; 19th section 1599nm-1653nm; 20th section 1653nm-1688nm; 21st section 1688nm-1700nm; The correction parameter value of each interval is the difference between the response intensities of D60 twice in the interval, and the correction parameters of each area are obtained. These correction parameters are applied to the spectrum of the sample to be tested, and the correction processing is performed on it. The measured values after correction are detailed in Table 2:
[0132] Table 2
[0133]
[0134]
[0135] Relative Standard Deviation (RSD) is a statistical indicator used to evaluate the degree of dispersion between each data point in a data set and its average value. It can be used to measure the accuracy and repeatability of data. The smaller the relative standard deviation value, the higher the accuracy and repeatability of the measured value.
[0136] Table 3 records the error and relative standard deviation between the measured values obtained by two measurements in a short period of time and the reference value, as well as the error and relative standard deviation between the long-term measured values and the reference value after 10 measurements of the sample within 2 months, as shown in Table 3 below:
[0137] Table 3
[0138]
[0139] After the spectral data were corrected in sections using standard substances, compared with the measured values obtained using uncorrected spectra, the errors between the measured values of -20℃ kinematic viscosity and 20℃ kinematic viscosity and the reference values were reduced from 0.386 and 0.07 to 0.045 and 0.002, respectively, and the relative standard deviations were also reduced from 1.96% and 17.90% to 0.72% and 2.33%. The errors of the initial distillation point, 10% distillation range, 20% distillation range, 50% distillation range, 90% distillation range and final distillation point were reduced from 1.6, 4.7, 1.8, 11.2, 1.9 and 9.6 to 1.1, 1.3, 1.0, 0.4, 1.1 and 0.5, respectively. The relative standard deviation was also reduced from 3.57%, 5.70%, 6.43%, 3.45%, 6.31% and 9.30% to 0.39%, 0.57%, 0.84%, 1.58%, 3.71% and 3.83%. The errors of the measured values of freezing point and flash point were reduced from 9.4 and 2.8 to 0.1 and 0.9 respectively. The relative standard deviation was also reduced from 14.46% and 11.65% to 2.36% and 1.25%. The error of the density measurement value was reduced from 1.3 to 0.2, and the relative standard deviation was also reduced from 1.52% to 0.11%. According to the results, compared with the measured values predicted using the uncorrected spectrum, the spectrum corrected by the segmented standard material can improve the accuracy by at least 43%, and the relative standard deviation can be reduced by at least 69%. This shows that the correction of spectral data can significantly improve the accuracy and stability of the prediction results.
[0140] After 10 measurements of the samples over a two-month period, the error between the long-term measured values and the reference values of the 11 indicators ranged from 0.022 to 1.3, and the relative standard deviation ranged from 0.11% to 2.20%. At the same time, the error and relative standard deviation between the long-term measured values and the short-term measured values ranged from 0 to 0.1 and 0.01% to 3.23%. The results show that the segmented correction method of standard substances exhibits high stability and accuracy during long-term use.
[0141] The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the near-infrared spectrum calibration method and electronic device based on standard substances described above, and will not be described in detail herein.
[0142] Compared with the uncorrected measured data, the present invention uses standard substances to correct the spectral data, and the measurement accuracy is improved by more than 43%, and its relative deviation is reduced by more than 69%. It shows that this method can reduce the influence of external factors such as the environment and improve the accuracy and stability of the measurement. At the same time, in the long-term experimental process, the method shows strong long-term effectiveness, and the change of the measured value caused by the influence of time on accuracy and stability is within 3.23%.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0144] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. Through the description of the above implementation modes, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0145] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A near infrared spectrum calibration method based on standard substances, characterized in that: include: Select standard substances with similar near-infrared spectra to the samples to be tested; Obtaining a standard near infrared spectrum diagram of the standard substance before and after the environmental change and a standard near infrared spectrum diagram after the environmental change; Dividing the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change into a plurality of regions according to the horizontal axis; Obtaining the correction parameter value of each area according to the changes in each area of the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change; Obtaining an initial near-infrared spectrum of the sample to be tested, and dividing the initial near-infrared spectrum into a plurality of regions identical to the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change corresponding to the standard substance; Correcting the initial near-infrared spectrum by using corresponding correction parameter values according to the regions to obtain a corrected near-infrared spectrum; Importing the corrected near infrared spectrum of the sample to be tested into the measurement model to obtain the measurement value of the sample to be tested, wherein the measurement model inputs the abscissa and ordinate of the corrected near infrared spectrum and outputs the measurement index, wherein the measurement index includes one or more of kinematic viscosity, freezing point, flash point, density and distillation range; Wherein, the step of selecting a standard substance having a near infrared spectrum similar to that of the sample to be tested comprises: selecting a standard substance having a similar response trend in the near infrared band as that of the sample to be tested; The step of selecting a standard substance having a similar response trend to the sample to be tested in the near infrared band comprises: The near infrared spectrum of the standard substance and the near infrared spectrum of the sample are set in the same coordinates; Place the near infrared spectrum of the standard material and the near infrared spectrum of the sample in the same coordinate on the same baseline; Select the response at the same horizontal coordinate of the near infrared spectrum of the standard substance and the near infrared spectrum of the sample with the same baseline as the center of the circle, and use the set ratio of the maximum difference of the horizontal coordinates as the diameter to make the sample circle and the standard circle respectively; Take the intersection of the sample circle and the standard circle as the starting point, construct a vector with the center of the sample circle and the center of the standard circle, and obtain the angle θ between the two vectors; The step of obtaining the standard near-infrared spectrum of the standard substance before and after the environmental change and the standard near-infrared spectrum of the standard substance after the environmental change comprises: Determine whether the environment at the time of detection has changed; When the environment changes at the time of detection, the near-infrared spectrum of the standard substance is measured to obtain the standard near-infrared spectrum after the change; The step of determining whether the environment at the detection time has changed comprises: Determine whether the ambient temperature change exceeds a temperature change threshold, if the ambient temperature change exceeds the temperature change threshold; or / and Aging of near infrared spectrometer to determine environmental changes; or / and Replace components of the NIR spectrometer to determine environmental changes; or / and If the entire NIR spectrometer is replaced, the environment is determined to have changed; or / and If the relative standard deviation of the near infrared spectrum of the standard substance at the time of detection relative to the near infrared spectrum before the change exceeds the deviation threshold, it is determined that the environment has changed; The step of dividing the standard near-infrared spectrum before the change and the standard near-infrared spectrum after the change into a plurality of regions according to the horizontal axis comprises: Divide the regions according to the changes in the response trend of the near infrared spectrum; The step of dividing the regions according to the change of the response trend of the near infrared spectrum comprises: Divide the response peaks and response troughs into different regions; When the response trend changes, the near infrared spectrum before the response trend changes is divided into one region, and the near infrared spectrum after the response trend changes is divided into another region; The step of correcting the initial near-infrared spectrum by using corresponding correction parameter values according to the regions includes: Obtain the average of the vertical coordinate differences in each region of the standard infrared spectrum of the standard substance after the change and the standard infrared spectrometer before the change as the correction parameter value; In each area, the difference between the initial near-infrared spectrum of the sample to be tested and the corrected parameter value of the standard substance is calculated.
2. The near-infrared spectrum calibration method based on standard substances according to claim 1, characterized in that: The step of selecting a standard substance having a similar response trend to the sample to be tested in the near infrared band comprises: A standard substance is selected that has a position and a response trend similar to that of the sample to be tested in the near-infrared band, wherein the response trend includes one or more of an increased response, a decreased response, and a response gradient.
3. The near infrared spectrum calibration method based on standard substances according to claim 1, characterized in that: The step of obtaining the standard near-infrared spectrum of the standard substance before and after the environmental change and the standard near-infrared spectrum of the standard substance after the environmental change comprises: The near infrared spectrometer is preheated to measure the near infrared spectrum of the standard substance as the standard near infrared spectrum before the change; After the near-infrared spectrometer is preheated to measure the near-infrared spectrum of the standard substance, the near-infrared spectrum of the standard substance measured at the detection time is used as the changed standard near-infrared spectrum.
4. The near-infrared spectrum calibration method based on standard substances according to claim 1, characterized in that: The standard substance is a stable substance, and the stable substance is a substance whose material composition changes within a set time period less than a change threshold.
5. A calibration system based on the near infrared spectrum calibration method according to any one of claims 1 to 4, characterized in that: include: An acquisition module, which acquires the standard near-infrared spectra of the standard substances before and after the environmental changes, and the initial near-infrared spectra of the samples to be tested after the environmental changes; A region division module, which divides the standard near-infrared spectrum before the change, the standard near-infrared spectrum after the change, and the initial near-infrared spectrum collected by the collection module according to the horizontal axis; The correction module obtains the correction parameter value of each region based on the changes of the standard near-infrared spectrum of the standard substance before and after the change divided by the region division module, and corrects the initial near-infrared spectrum of the sample to be tested divided by the region division module according to the corresponding correction parameter value according to the region, so as to obtain the corrected near-infrared spectrum of the sample to be tested; The measurement module imports the corrected near-infrared spectrum of the sample to be tested obtained by the correction module into the measurement model to obtain the measurement value of the sample to be tested. The measurement model inputs the horizontal and vertical coordinates of the corrected near-infrared spectrum, and outputs measurement indicators, which include one or more of kinematic viscosity, freezing point, flash point, density and distillation range.
6. The calibration system according to claim 5, characterized in that The correction module comprises: The correction parameter value obtaining unit obtains the average of the vertical coordinate differences in each area between the standard infrared spectrum of the standard substance after the change and the standard infrared spectrometer before the change as a correction parameter value difference unit. In each area, the difference between the initial near-infrared spectrum of the sample to be tested and the correction parameter value of the standard substance is calculated.
7. The calibration system according to claim 6, characterized in that It also includes a standard substance determination module, which uses a stable substance with a near-infrared spectrum similar to that of the sample to be tested as a standard substance.
8. The calibration system according to claim 7, characterized in that It also includes an environment change judgment module to judge whether the environment at the detection time has changed.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory comprises a near-infrared spectrum calibration program based on a standard substance, and when the near-infrared spectrum calibration program based on a standard substance is executed by the processor, the steps of the near-infrared spectrum calibration method based on a standard substance as described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a near-infrared spectrum calibration program based on a standard substance. When the near-infrared spectrum calibration program based on a standard substance is executed by a processor, the steps of the near-infrared spectrum calibration based on a standard substance as claimed in any one of claims 1 to 4 are implemented.
