Near infrared spectroscopy model matching method

By collecting and segmenting near-infrared spectral data, a small-band spectral model library is built, and trend offset is calculated for model matching, the problem of poor consistency of miniaturized near-infrared spectrometer equipment is solved, and the efficiency and accuracy of spectral prediction are achieved, saving Manpower and material resources have promoted the development of technology.

CN115015162BActive Publication Date: 2024-11-26四川启睿克科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210612885.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2024-11-26
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The poor consistency of the miniaturized near-infrared spectrometer equipment leads to inconsistent spectral models, which requires separate modeling of each device, wasting manpower and material resources, and hindered the development of technology.

Method used

A near-infrared spectrometer was used to collect the spectral data of the standard sample for equal segmentation band segmentation, build a small-band spectral model library, calculate the trend offset of the spectral data of the unstandard sample, select the model with the smallest trend offset for matching and prediction, and complete Spectral prediction and average the prediction value.

Benefits of technology

It effectively solves the problems of poor consistency of miniaturized near-infrared spectral equipment and non-universal spectral models, saves manpower and material resources, and improves the efficiency and accuracy of spectral analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115015162B_ABST
    Figure CN115015162B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of near-infrared spectrum processing. In order to simplify the modeling process of different near-infrared spectrum devices of the same model, a near-infrared spectrum model matching method is provided, comprising: 1. using a near-infrared spectrometer to collect labeled sample spectrum data; 2. obtaining labeled small-band spectrum data; 3. constructing an original small-band spectrum model library; 4. using a near-infrared spectrometer of the same model to be matched to collect unlabeled sample spectrum data; 5. obtaining unlabeled small-band spectrum data; 6. calculating the trend offset of the unlabeled small-band spectrum data and each labeled small-band spectrum data respectively; 7. using the small-band spectrum model corresponding to the minimum value of the trend offset as the prediction model of the unlabeled small-band spectrum data; 8. predicting the unlabeled small-band spectrum data, and performing average processing on the predicted value. The above steps are adopted to simplify the modeling process of different near-infrared spectrum devices of the same model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of near infrared spectrum processing, in particular to a near infrared spectrum model matching method. Background Art

[0002] In recent years, near-infrared spectroscopy analysis technology has developed rapidly and has been applied in many fields such as chemical industry, pharmaceutical industry, military industry, food, etc. Near-infrared spectroscopy technology belongs to molecular spectroscopy technology, which can show the composition and properties of substances at the molecular level. It has achieved very high benefits in terms of both economic and social impact and has great development potential.

[0003] However, currently most material composition and property information detection is mainly carried out using large laboratory near-infrared spectroscopic instruments. Although these methods are quantitative, accurate and highly sensitive, the equipment required is bulky and expensive, the sample preparation time is long and the sample preparation method is strict. The detection equipment and sample preparation require professional operation, the detection environment is fixed, and the analysis time is long. They are not suitable for on-site detection and are not easy to promote and use.

[0004] With the development of micro-electromechanical technology, in recent years, miniaturized near-infrared spectrometers have been widely used in various fields such as food, beverages, medicine, coal, etc. Compared with the traditional large-scale Fourier transform spectral analysis system, it has the advantages of simple structure, low cost, easy to carry, and real-time visible results. It has become a popular product in the field of spectroscopy. However, compared with large-scale near-infrared spectroscopy equipment in laboratories, miniaturized near-infrared spectrometers are affected by light sources, detectors, manufacturing processes, usage methods, environmental conditions, etc., and the performance of equipment consistency, stability, reproducibility and other indicators has been significantly reduced, especially equipment consistency. Different miniaturized near-infrared spectroscopy equipment of the same model has poor consistency, and the spectral models established by different equipment are not universal. Therefore, in the actual application of miniaturized near-infrared spectroscopy analysis, for the same type of samples to be tested, each miniaturized near-infrared spectroscopy equipment needs to be modeled separately, which wastes a lot of manpower and material resources and greatly hinders the development of miniaturized near-infrared spectroscopy analysis technology. Summary of the invention

[0005] In order to simplify the modeling process of different miniaturized near-infrared spectroscopy devices of the same model, the present application provides a near-infrared spectroscopy model matching method.

[0006] The technical solution adopted by the present invention to solve the above problems is:

[0007] Near infrared spectroscopy model matching method, including:

[0008] Step 1: Use a near-infrared spectrometer to collect spectral data of labeled samples;

[0009] Step 2: Perform equal-band segmentation on the labeled sample spectral data to obtain labeled small-band spectral data;

[0010] Step 3: construct an original small-band spectrum model library based on the labeled small-band spectrum data;

[0011] Step 4: Use the same model of near-infrared spectrometer to be matched as in step 1 to collect spectral data of unlabeled samples;

[0012] Step 5, performing equal-band segmentation on the unlabeled sample spectral data to obtain unlabeled small-band spectral data;

[0013] Step 6, respectively calculating the trend offset between the unlabeled small-band spectral data and each labeled small-band spectral data;

[0014] Step 7: The small-band spectrum model corresponding to the minimum trend offset is used as the prediction model of the unlabeled small-band spectrum data;

[0015] Step 8: Use the small-band spectrum model to predict the unlabeled small-band spectrum data, and average the predicted values ​​to complete the spectrum prediction of the unlabeled samples.

[0016] Furthermore, in step 1, N near-infrared spectrometers of the same model are used to collect M labeled sample spectral data, and both N and M are greater than or equal to 2.

[0017] Furthermore, the trend offset is calculated as follows: In the formula, k is the number of wavelength points contained in the small-band spectral data, is the normalized value of the light intensity value at each wavelength point of the labeled small-band spectral data, and b is the normalized value of the light intensity value at each wavelength point of the unlabeled small-band spectral data.

[0018] Furthermore, the step 2 of performing equal-band segmentation on the labeled sample spectral data and the step 5 of performing equal-band segmentation on the unlabeled sample spectral data are both divided into three segments.

[0019] Furthermore, after collecting the labeled sample spectral data in step 1 and after collecting the unlabeled sample spectral data in step 4, normalization processing is performed on the collected data.

[0020] Furthermore, in step 1, a plurality of near-infrared spectrometers of different models are used to collect a plurality of labeled sample spectral data.

[0021] Compared with the prior art, the present invention has the following beneficial effects: the method described in the present application first uses multiple miniaturized near-infrared spectrometers of the same model to respectively collect spectral data of labeled and unlabeled samples, and performs equal-band segmentation on the sample spectral data to obtain small-band spectral data, and then constructs an original small-band spectral model library through the labeled sample spectral data, and then calculates the trend offset of the unlabeled sample spectral data compared to the labeled sample spectral data, and finally selects the spectral model corresponding to the minimum trend offset in the original spectral model library for small-band model matching, and after the matching is completed, the spectral data of each small band of the unlabeled sample is predicted, and the predicted value is averaged to complete the spectral prediction of the unlabeled sample. The method matches the original spectral model library for spectral prediction of different miniaturized near-infrared devices, effectively solves the problems of poor consistency of miniaturized near-infrared spectral devices, non-universal spectral models, and the need for separate modeling of single devices, and saves manpower and material resources to a great extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A flowchart of the near infrared spectroscopy model matching method;

[0023] Figure 2 Flow chart corresponding to the embodiment. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. 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.

[0025] like Figure 1 As shown, the near infrared spectroscopy model matching method includes:

[0026] Step 1: Use a near-infrared spectrometer to collect spectral data of labeled samples;

[0027] Step 2: Perform equal-band segmentation on the labeled sample spectral data to obtain labeled small-band spectral data;

[0028] Step 3: construct an original small-band spectrum model library based on the labeled small-band spectrum data;

[0029] Step 4: Use the same model of near-infrared spectrometer to be matched as in step 1 to collect spectral data of unlabeled samples;

[0030] Step 5, performing equal-band segmentation on the unlabeled sample spectral data to obtain unlabeled small-band spectral data;

[0031] Step 6, respectively calculating the trend offset between the unlabeled small-band spectral data and each labeled small-band spectral data;

[0032] Step 7: The small-band spectrum model corresponding to the minimum trend offset is used as the prediction model of the unlabeled small-band spectrum data;

[0033] Step 8: Use the small-band spectrum model to predict the unlabeled small-band spectrum data, and average the predicted values ​​to complete the spectrum prediction of the unlabeled samples.

[0034] Preferably, in step 1, N near-infrared spectrometers of the same model are used to collect M pieces of labeled sample spectral data, and both N and M are greater than or equal to 2.

[0035] The trend offset is calculated as follows: In the formula, k is the number of wavelength points contained in the small-band spectral data, is the normalized value of the light intensity value at each wavelength point of the labeled small-band spectral data, and b is the normalized value of the light intensity value at each wavelength point of the unlabeled small-band spectral data.

[0036] Considering the efficiency of spectral analysis and the matching accuracy of spectral data, the spectral data of the labeled samples are equally divided into three segments in step 2 and the spectral data of the unlabeled samples are equally divided into three segments in step 5. After collecting the spectral data of the labeled samples in step 1 and collecting the spectral data of the unlabeled samples in step 4, the collected data are normalized.

[0037] Furthermore, in step 1, a plurality of near-infrared spectrometers of different models are used to collect a plurality of labeled sample spectral data.

[0038] Example

[0039] like Figure 2 As shown, step 101 is to use multiple miniaturized near-infrared spectrometers of the same model to respectively collect spectral data of labeled samples and unlabeled samples. Multiple miniaturized near-infrared spectrometers of the same model are divided into two types of equipment, one is the original small-band spectrum model library establishment equipment, and the samples collected are samples with known calibration values; the other is the spectrum model equipment to be matched, and the samples collected are samples with unknown calibration values. Direct prediction is performed by directly matching the model in the original spectrum model library, without the need for a separate spectrum modeling process.

[0040] In this embodiment, multiple miniaturized near-infrared spectrometers of the same model are specifically classified as (N+1), where N devices are original spectral database establishment devices, and 1 device is a spectral model device to be matched. In specific practical applications, the number of spectral model devices to be matched can be (1 to +∞). The specific number of labeled samples and unlabeled samples is (M+1), where there are M labeled samples and 1 unlabeled sample. In specific practical applications, the number of unlabeled samples can be (1 to +∞). The specific collection method is: use N devices to collect M labeled samples respectively, and a single device collects M spectral data, and a total of (M×N) spectral data are collected; use 1 spectral model device to be matched to collect spectral data of 1 unlabeled sample to obtain a single spectral data.

[0041] Furthermore, since there are certain differences between the spectral data collected by the spectral model device to be matched and the spectral data collected by the device for establishing the original spectral database, in order to reduce the prediction error and improve the accuracy of spectral analysis, the spectral data collected by the two types of miniaturized near-infrared spectrometers are calculated and matched under the same reference conditions. First, the spectral data collected by the miniaturized near-infrared device needs to be normalized. On the basis of retaining the trend of the spectral data, the difference in the numerical value of the spectral data is eliminated. The specific calculation formula for normalization is:

[0042]

[0043] Among them, x 归一化 is the value after the spectral data is normalized, x 原始 is the light intensity value at each wavelength point of the spectral data, x max is the maximum light intensity value at each wavelength point in the spectral data, x min is the minimum light intensity value at each wavelength point in the spectral data. The spectral data mentioned in the subsequent steps are all spectral normalized data obtained after the original spectral data is normalized and calculated.

[0044] Step 102 is to perform an even-band segmentation on the sample spectral data to obtain small-band spectral data. The entire sample spectral data is evenly segmented into multiple small-band spectral data, and then each small-band spectral data is matched one by one. Compared with the overall matching of the original spectral data, small-band matching can more effectively improve the spectral data matching accuracy.

[0045] In this embodiment, the wavelength point arrangement mode of the miniaturized near-infrared spectroscopy device is an even distribution type, the spectral band range is 1200nm to 1550nm, and the resolution is 10nm. Then, it can be calculated that the number of wavelength points contained in the miniaturized near-infrared spectroscopy device is M=1+(1550-1200) / 10=36, and the entire sample spectrum data is evenly divided into multiple small-band spectrum data. If the number of divisions is large, it will affect the efficiency of spectral analysis, and if a single small-band spectrum data contains too few spectral wavelength points, it is easy to cause overfitting of the spectrum model, thereby affecting the spectrum prediction ability; if the number of divisions is small, it will affect the matching accuracy of the spectrum data. Therefore, this embodiment adopts a three-segment equal division method to divide the entire sample spectral data, and divides the 36 wavelength points contained in the miniaturized near-infrared spectral device into three small bands, each of which contains 12 wavelength points. The band range of small band 1 is 1200nm~1310nm, and the band ranges corresponding to the 12 wavelength points are (1200nm, 1210nm,...1320nm). Similarly, the band range of small band 2 is 1320nm~1430nm, and the band range of small band 3 is 1440nm~1550nm.

[0046] Step 103 is to establish an original small-band spectrum model library through the labeled sample spectrum data. The entire sample spectrum data is divided into multiple small-band spectrum data, and then the small-band spectrum data is matched with the calibration value one by one to establish a spectrum prediction model to form a small-band original spectrum model library. Compared with the overall modeling of the original spectrum data, the spectrum model established by the segmented small-band spectrum data is more accurate. By matching multiple small-band spectrum data, and then calling each small-band spectrum model for prediction, the error can be effectively reduced and the prediction accuracy can be improved.

[0047] In this embodiment, taking a single device N1 among N devices as an example, the miniaturized near-infrared spectroscopy device N1 collects and obtains M marked sample spectral data, and first divides it into three equal segments, and divides the M marked sample spectral data into 3M small band spectral data, where small bands 1, 2, and 3 all contain M spectral data. Taking small band 1 as an example, the M small band spectral data are matched one by one with their sample calibration values, and then spectral modeling is performed to obtain the spectral model X1 corresponding to small band 1. Similarly, the same calibration value correspondence and spectral modeling are performed on small bands 2 and 3, and spectral models X2 and X3 corresponding to small bands 2 and 3 are obtained. Thus, a single device establishes three spectral models after segmentation and modeling. Similarly, the same processing method is performed on the remaining (N-1) devices to obtain (3N-3) small band spectral models. A total of 3N small band spectral models are established through the above method, that is, the original small band spectral model library contains 3N spectral models.

[0048] Step 104 is to calculate the trend offset of the unlabeled sample spectral data compared to the labeled sample spectral data. The spectral model device to be matched needs to match the small-band spectral data before calling the spectral model in the small-band original spectral model library. The trend judgment is performed by calculating the trend offset between the small-band spectral data of the unlabeled sample and the small-band spectral data of the labeled sample, and the small-band spectral data with the same trend are selected for one-by-one matching.

[0049] In this embodiment, taking small band 1 as an example, its band range is 1200nm~1310nm. Since the number of labeled samples is M, a single device collects and obtains M pieces of small band 1 spectral data, performs normalized value averaging processing on the M pieces of small band 1 spectral data, obtains a single normalized value, and further calculates the trend offset with the normalized value of the unlabeled sample spectral data. The specific implementation process is: for a single device, taking the wavelength range of 1200nm as an example, set the normalized values ​​of M samples in this wavelength range to (x1, x2, ... x M ), perform averaging on it, and obtain the mean of M spectral normalized data in this wavelength range for:

[0050]

[0051] Similarly, the same data processing method is performed on the wavelength ranges (1210nm, 1220nm, ... 1310nm) to obtain the corresponding spectral normalized data means under these wavelength ranges: From the above, for a single original spectral database, the equipment is established, and the normalized data mean corresponding to the 12 light intensity value points under the small band 1 is

[0052] For a single unlabeled sample, the spectral data of small band 1 collected by the matching spectral model device is normalized to obtain its normalized value (b1, b2, ... b 12 ), the trend offset c1 of the unlabeled sample spectrum data compared to the labeled sample spectrum data is further calculated as:

[0053]

[0054] Similarly, the trend offsets of the unlabeled sample spectral data collected by the equipment to be matched with the spectral model compared with the labeled sample spectral data collected by the equipment to establish the N original spectral databases are calculated respectively (c1, c2, ... c N ). Use the same method to calculate the trend offset of small band 2 and small band 3 to obtain the corresponding trend offset value.

[0055] Step 105 is to select the spectral model corresponding to the minimum trend offset in the original spectral model library for small band model matching. The smaller the trend offset of the small band spectral data of the labeled sample and the unlabeled sample, the more consistent the trend between the two spectral data is, and it can be known that their small band spectral models are also consistent. Therefore, the two segments of spectral data with the smallest trend offset between the two are selected for matching, and then the model established by the small band spectrum of the labeled sample is further applied to the prediction of the unlabeled sample.

[0056] In this embodiment, for small band 1, the trend offset (c1, c2, ... c1) of the unlabeled sample spectral data collected by the device to be matched with the spectral model is compared with the N sets of original spectral databases to establish the device to collect the labeled sample spectral data. N ), select the model with the smallest offset value as the original matching model.

[0057] Similarly, for small bands 2 and 3, the same method is used to match the spectral model.

[0058] Step 106 is to predict the spectral data of each small band of the unlabeled sample after matching, and average the predicted values ​​to complete the spectral prediction of the unlabeled sample. After completing the spectral model matching, for each small band spectral data, the matched original small band spectral model is used to predict it, and multiple predicted values ​​are obtained, and then the predicted values ​​are further averaged to obtain a single predicted value, which is the component prediction value of the unlabeled sample. The model matching and unlabeled sample component prediction are completed through the above steps.

[0059] In this embodiment, after the spectral model matching device to be matched completes the spectral model matching, for three small band ranges, which include three spectral models, three spectral matching models are used to predict the three small band spectral data of the unlabeled sample, and three predicted values ​​Y1, Y2, and Y2 are obtained. Then, the three predicted values ​​are averaged to obtain a single predicted value Y:

[0060] Y=(Y1+Y2+Y3) / 3

[0061] This single prediction value is the composition prediction value of the unlabeled sample. The above steps complete the model matching and unlabeled sample composition prediction.

[0062] In this example, the original small-band spectrum model library is set up in the cloud so that the near-infrared spectrometer to be matched can be used for model matching. In addition, the original small-band spectrum model library corresponding to various models of near-infrared spectrometers can also be set up in the cloud. In actual use, the device model is matched first, and then the prediction model is matched.

Claims

1. Near infrared spectroscopy model matching method, It is characterized in that include: Step 1: Use a near-infrared spectrometer to collect spectral data of labeled samples; Step 2: Perform equal-band segmentation on the labeled sample spectral data to obtain labeled small-band spectral data; Step 3: construct an original small-band spectrum model library based on the labeled small-band spectrum data; Step 4: Use the same model of near-infrared spectrometer to be matched as in step 1 to collect spectral data of unlabeled samples; Step 5, performing equal-band segmentation on the unlabeled sample spectral data to obtain unlabeled small-band spectral data; Step 6: Calculate the trend offset of the unlabeled small-band spectrum data and each labeled small-band spectrum data respectively; the trend offset is calculated as follows: In the formula, k is the number of wavelength points contained in the small-band spectral data, is the normalized value of the light intensity value at each wavelength point of the marked small band spectral data, and b is the normalized value of the light intensity value at each wavelength point of the unmarked small band spectral data; Step 7: The small-band spectrum model corresponding to the minimum trend offset is used as the prediction model of the unlabeled small-band spectrum data; Step 8: Use the small-band spectrum model to predict the unlabeled small-band spectrum data, and average the predicted values ​​to complete the spectrum prediction of the unlabeled samples.

2. The near infrared spectroscopy model matching method according to claim 1, It is characterized in that In the step 1, N near-infrared spectrometers of the same model are used to collect M labeled sample spectral data, and N and M are both greater than or equal to 2.

3. The near infrared spectroscopy model matching method according to claim 1, It is characterized in that The step 2 performs equal band segmentation on the labeled sample spectral data and the step 5 performs equal band segmentation on the unlabeled sample spectral data, both of which are divided into three segments.

4. The near infrared spectroscopy model matching method according to claim 1, It is characterized in that After collecting the labeled sample spectral data in step 1 and after collecting the unlabeled sample spectral data in step 4, normalization processing is performed on the collected data.

5. The near infrared spectroscopy model matching method according to any one of claims 1 to 4, It is characterized in that In step 1, a plurality of near-infrared spectrometers of different models are used to collect a plurality of labeled sample spectral data.