A near-infrared temperature correction model construction method, device, equipment and medium

By obtaining the physical and chemical indicators and spectral data of the target samples and using characteristic wavelength screening and sample selection algorithms to construct a near-infrared temperature correction model, the influence of temperature on the model prediction results is resolved, and the accuracy and stability of the model are improved.

CN120011708BActive Publication Date: 2025-10-24CHINA TOBACCO HUNAN IND CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510182136.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-10-24
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

Environmental factors such as temperature have a significant impact on the accuracy and stability of near-infrared model prediction results. Especially in real-time on-site detection, how to reduce the impact of temperature on the near-infrared model is a technical problem that needs to be solved urgently.

Method used

By obtaining the target physical and chemical indicators and initial spectral data of the target sample, the spectral data to be eliminated is screened out using the preset characteristic wavelength screening algorithm. After elimination, the spectral data is divided based on the preset sample selection algorithm, and the partial least squares algorithm is used to construct a near-infrared temperature correction model.

Benefits of technology

The output accuracy and stability of the near-infrared model are improved, the reliability and consistency of the model are ensured, and the interference of temperature factors is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011708B_ABST
    Figure CN120011708B_ABST
Patent Text Reader

Abstract

The application discloses a near-infrared temperature correction model construction method and device, equipment and medium, and relates to the technical field of near-infrared detection. The method comprises the following steps: obtaining a target physical and chemical index of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition; screening out to-be-eliminated spectral data from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determining corresponding target spectral data based on the to-be-eliminated spectral data and the initial spectral data; dividing the target spectral data according to a preset sample selection algorithm, and constructing a corresponding target near-infrared temperature correction model based on the divided target spectral data, a preset partial least squares algorithm and the target physical and chemical index. In this way, the application excludes the interference of the temperature factor on the prediction result of the near-infrared model by using the characteristic wavelength screening algorithm, improves the accuracy and stability of the output of the near-infrared model, and thus guarantees the reliability and consistency of the near-infrared model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of near-infrared detection, and particularly relates to a near-infrared temperature correction model construction method, device, equipment and medium. BACKGROUND

[0002] As a rapid and non-destructive detection method, the near-infrared spectroscopy method has been widely and maturely used in non-destructive detection of internal physical and chemical information and quality of food. The combination of chemometrics and near-infrared spectroscopy detection technology is becoming closer and closer, and various algorithms can be used to establish a near-infrared model. However, in practical application, especially in real-time detection on site, environmental factors such as temperature have an influence on the accuracy and stability of the model that cannot be ignored.

[0003] In summary, how to reduce the influence of temperature on the prediction result of the near-infrared model is a technical problem to be solved at present. SUMMARY

[0004] Therefore, the present application aims to provide a near-infrared temperature correction model construction method, device, equipment and medium, which can reduce the influence of temperature on the prediction result of the near-infrared model. The specific solutions are as follows:

[0005] In a first aspect, the present application provides a near-infrared temperature correction model construction method, comprising:

[0006] obtaining a target physicochemical index of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition;

[0007] screening out to-be-eliminated spectral data from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determining corresponding target spectral data based on the to-be-eliminated spectral data and the initial spectral data;

[0008] dividing the target spectral data according to a preset sample selection algorithm, and constructing a corresponding target near-infrared temperature correction model based on the divided target spectral data, a preset partial least squares algorithm and the target physicochemical index.

[0009] Optionally, the obtaining of the target physicochemical index of the target sample comprises:

[0010] collecting an initial physicochemical index of the target sample according to a second preset temperature condition and a preset number of experiments, and performing average processing on the initial physicochemical index based on the preset number of experiments to obtain the target physicochemical index of the target sample.

[0011] Optionally, the collecting of the initial spectral data of the target sample according to the first preset temperature condition comprises:

[0012] The initial spectrum data of the target sample is collected according to a first preset temperature condition and a preset spectrum collection condition; wherein the initial spectrum data is near-infrared spectrum data, and the preset spectrum collection condition comprises a preset spectrum collection mode, a preset wave number, a preset resolution and a preset scanning number.

[0013] Optionally, the preset characteristic wavelength-based screening algorithm screens out to-be-eliminated spectrum data from the initial spectrum data, comprising:

[0014] A target temperature in the first preset temperature condition is determined, and first mutual information between each spectrum data subset of the initial spectrum data and second mutual information between each target temperature and the initial spectrum data are calculated;

[0015] The first mutual information and the second mutual information are respectively subjected to corresponding sorting processing based on a preset sorting method;

[0016] The minimum redundancy between the spectrum data subsets is determined based on the sorted first mutual information, and the maximum correlation between the target temperature and the initial spectrum data is determined based on the sorted second mutual information;

[0017] The to-be-eliminated spectrum data in the initial spectrum data is determined according to the minimum redundancy and the maximum correlation.

[0018] Optionally, the corresponding target spectrum data is determined based on the to-be-eliminated spectrum data and the initial spectrum data, comprising:

[0019] The initial spectrum data is subjected to elimination processing based on the to-be-eliminated spectrum data, and the initial spectrum data after elimination is subjected to preset data preprocessing to obtain the corresponding target spectrum data.

[0020] Optionally, the target spectrum data is divided according to a preset sample selection algorithm, comprising:

[0021] The target spectrum data is divided according to a preset sample selection algorithm to obtain a corresponding calibration spectrum data set and a verification spectrum data set;

[0022] Correspondingly, the target near-infrared temperature correction model is constructed based on the divided target spectrum data, a preset partial least squares algorithm and the target physicochemical index, comprising:

[0023] The target near-infrared temperature correction model is constructed based on the calibration spectrum data set, the verification spectrum data set, the preset partial least squares algorithm and the target physicochemical index.

[0024] Optionally, the constructing the target near-infrared temperature correction model based on the correction spectrum data set, the verification spectrum data set, the preset partial least squares algorithm and the target physicochemical index comprises:

[0025] constructing an initial near-infrared temperature correction model based on the correction spectrum data set, the preset partial least squares algorithm and the target physicochemical index;

[0026] verifying the initial near-infrared temperature correction model by using the verification spectrum data set, and adjusting the initial near-infrared temperature correction model based on a verification result to obtain the target near-infrared temperature correction model.

[0027] In a second aspect, the present application provides a near-infrared temperature correction model construction device, comprising:

[0028] an initial spectrum data acquisition module configured to acquire a target physicochemical index of a target sample and acquire initial spectrum data of the target sample according to a first preset temperature condition;

[0029] a target spectrum data determination module configured to filter out to-be-removed spectrum data from the initial spectrum data based on a preset characteristic wavelength filtering algorithm, and determine corresponding target spectrum data based on the to-be-removed spectrum data and the initial spectrum data;

[0030] a target near-infrared temperature correction model construction module configured to divide the target spectrum data according to a preset sample selection algorithm, and construct a corresponding target near-infrared temperature correction model based on the divided target spectrum data, a preset partial least squares algorithm and the target physicochemical index.

[0031] In a third aspect, the present application provides an electronic device, comprising:

[0032] a memory configured to save a computer program;

[0033] a processor configured to execute the computer program to implement the near-infrared temperature correction model construction method described above.

[0034] In a fourth aspect, the present application provides a computer readable storage medium configured to save a computer program; wherein the computer program is executed by a processor to implement the near-infrared temperature correction model construction method described above.

[0035] In the present application, firstly, a target physicochemical index of a target sample is acquired, and initial spectral data of the target sample is collected according to a first preset temperature condition; then, based on a preset characteristic wavelength screening algorithm, to-be-eliminated spectral data is screened from the initial spectral data, and corresponding target spectral data is determined based on the to-be-eliminated spectral data and the initial spectral data; finally, the target spectral data is divided according to a preset sample selection algorithm, and a corresponding target near-infrared temperature correction model is constructed based on the divided target spectral data, a preset partial least squares algorithm and the target physicochemical index. As can be seen from the above, in the present application, firstly, a target physicochemical index and initial spectral data of a target sample are collected, then characteristic wavelengths related to temperature are screened based on a characteristic wavelength screening algorithm, and to-be-eliminated spectral data in the initial spectral data is eliminated based on the screening result to obtain corresponding target spectral data, then the target spectral data is divided, and finally, a target near-infrared temperature correction model is constructed by using the divided target spectral data, the target physicochemical index and the partial least squares algorithm. In this way, by eliminating the to-be-eliminated spectral data in the initial spectral data, the present application can exclude the interference of the temperature factor on the prediction result of the near-infrared model, improve the accuracy and stability of the output of the near-infrared model, and thus ensure the reliability and consistency of the near-infrared model. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.

[0037] Figure 1 A near-infrared temperature correction model construction method flowchart provided by the present application;

[0038] Figure 2 A specific near-infrared spectrum of a target sample at different temperatures provided by the present application;

[0039] Figure 3 A specific near-infrared temperature correction model construction method flowchart provided by the present application;

[0040] Figure 4 A specific near-infrared temperature correction model construction method flowchart provided by the present application;

[0041] Figure 5 A specific original near-infrared model prediction result schematic diagram provided by the present application;

[0042] Figure 6 A specific near-infrared temperature correction model prediction result schematic diagram provided by the present application;

[0043] Figure 7 A near-infrared temperature correction model construction device structure schematic diagram provided by the present application;

[0044] Figure 8 An electronic device structure diagram provided by the present application. DETAILED DESCRIPTION

[0045] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0046] As a rapid and non-destructive detection method, near-infrared spectroscopy has been widely and maturely used in non-destructive detection of internal physical and chemical information and quality of food. Chemometrics and near-infrared spectroscopy detection technology are increasingly closely combined, and various algorithms can be used to establish a near-infrared model. However, in practical applications, especially in real-time detection on site, environmental factors such as temperature have an influence on the accuracy and stability of the model that cannot be ignored. Therefore, the present application provides a near-infrared temperature correction model construction scheme, which can reduce the influence of temperature on the prediction results of the near-infrared model.

[0047] Referring to Figure 1 The embodiments of the present application disclose a near-infrared temperature correction model construction method, which can include:

[0048] In step S11, the target physicochemical index of the target sample is obtained, and initial spectral data of the target sample is collected according to a first preset temperature condition.

[0049] In the present embodiment, the above-mentioned obtaining of the target physicochemical index of the target sample can include: collecting an initial physicochemical index of the target sample according to a second preset temperature condition and a preset number of experiments, and performing average processing on the initial physicochemical index based on the preset number of experiments to obtain the target physicochemical index of the target sample. Specifically, first, the physicochemical index to be measured needs to be determined, including but not limited to pH value, relative density, viscosity, conductivity, refractive index, etc. Then, according to the selected physicochemical index, the corresponding experimental equipment and reagents are prepared. At the same time, it is necessary to ensure that all measuring instruments, such as pH meter, density meter, conductivity meter, etc., have been calibrated before use to ensure the accuracy of the measurement results. In one specific embodiment, the initial physicochemical index of the target sample can be obtained by collecting the initial physicochemical index of the target sample according to the second preset temperature condition and the preset number of experiments. The physical and chemical indexes of the target sample are collected. In order to ensure the accuracy of the measurement results of the physical and chemical indexes, the target sample can be measured independently for 3 times, and the stability of the instrument and the target sample should be ensured between each measurement, and the measurement results are recorded in time after each measurement for subsequent data processing. In order to reflect the true physical and chemical index level of the target sample, the results of the three parallel experiments can be averaged to obtain the target physical and chemical index of the target sample.

[0050] It should be noted that the initial spectrum data of the target sample collected according to the first preset temperature condition can include: collecting the initial spectrum data of the target sample according to the first preset temperature condition and the preset spectrum collection condition; wherein the initial spectrum data is near-infrared spectrum data, and the preset spectrum collection condition includes a preset spectrum collection mode, a preset wave number, a preset resolution and a preset scanning number. Specifically, in order to ensure that the optical properties of the target sample are not affected by the container, a 1mm quartz cuvette can be used for spectrum collection; the spectrum collection is carried out in transmission mode, that is, after the light source passes through the target sample, the spectrum characteristics of the transmitted light are measured; in order to cover the main area of the near-infrared spectrum, the wave number range can be set to ; in order to ensure the fineness and accuracy of the spectrum data, the spectrum resolution can be set to ; in order to improve the signal-to-noise ratio and repeatability of the spectrum data, the target sample can be scanned 64 times. In a specific implementation, the target sample can be placed in a temperature controllable environment and adjusted to 、 、 , the target sample is loaded into a 1mm quartz cuvette, ensuring uniform distribution and no bubbles, and the near-infrared spectrometer is used for spectrum collection in transmission mode under the set wave number range, resolution and scanning number. At the same time, the spectrum data collected at each temperature needs to be saved for subsequent analysis and processing, wherein the temperature can be recorded as (j=1, 2, 3...), the corresponding spectrum data can be recorded as (j=1, 2, 3...), and the near-infrared spectrum of the target sample at different temperatures can be seen from Figure 2 It can be understood that the temperature of the target sample needs to be kept stable during the collection process to avoid the influence of temperature change on the spectrum data, and in order to improve the data quality, the collected initial spectrum data can be preprocessed, such as baseline correction, smoothing processing, mean centering, standardization, etc.

[0051] Step S12, filtering out the to-be-removed spectrum data from the initial spectrum data based on a preset characteristic wavelength filtering algorithm, and determining the corresponding target spectrum data based on the to-be-removed spectrum data and the initial spectrum data.​

[0052] In this embodiment, in order to reduce the sensitivity of the near-infrared model prediction results to temperature, the above-mentioned screening algorithm based on the preset characteristic wavelength screens out the spectral data to be eliminated from the initial spectral data, which may include: determining the target temperature in the first preset temperature condition, and calculating the first mutual information between each spectral data subset of the initial spectral data and the second mutual information between each target temperature and the initial spectral data; sorting the first mutual information and the second mutual information respectively based on a preset sorting method; determining the minimum redundancy between the spectral data subsets based on the sorted first mutual information, and determining the maximum correlation between the target temperature and the initial spectral data based on the sorted second mutual information; determining the spectral data to be eliminated in the initial spectral data based on the minimum redundancy and the maximum correlation. Specifically, the characteristic wavelength screening algorithm is an important technology in spectral data processing. Feature screening can extract representative and discriminative characteristic wavelengths from a large amount of spectral data. Based on the measured temperature data and spectral data, with spectral data as the characteristic variable and temperature as the target variable, the preset characteristic wavelength screening algorithm can be expressed as:

[0053] ;

[0054] ;

[0055] ;

[0056] in, Denotes features, S denotes feature subsets, and c denotes target classification. D denotes maximum relevance, and R denotes minimum redundancy. represents the mutual information between all features and the target classification, represents the mutual information between features, represents the combination of D and R. In this embodiment, the spectral data to be eliminated can be determined from the initial spectral data according to the calculated minimum redundancy and maximum correlation.

[0057] It can be understood that the determining the corresponding target spectrum data based on the to-be-removed spectrum data and the initial spectrum data can include: performing a removal processing on the initial spectrum data based on the to-be-removed spectrum data, and performing a preset data preprocessing on the removed initial spectrum data to obtain the corresponding target spectrum data. Specifically, the to-be-removed spectrum data is screened from the initial spectrum data according to a preset characteristic wavelength screening algorithm, and the to-be-removed spectrum data is removed from the initial spectrum data, and then the removed initial spectrum data is preprocessed. In order to improve the smoothness of the target spectrum data, the moving average method can be used to remove noise, so as to perform smoothing processing on the removed initial spectrum data; in order to make the target spectrum data have a consistent scale, the removed initial spectrum data can be standardized through normalization processing; in order to enhance the characteristics in the target spectrum data, the removed initial spectrum data can be subjected to derivative processing. After obtaining the target spectrum data, the target spectrum data can be stored again for subsequent use.

[0058] In step S13, the target spectrum data is divided according to a preset sample selection algorithm, and a target near-infrared temperature correction model is constructed based on the divided target spectrum data, a preset partial least squares algorithm and the target physicochemical index.

[0059] In the embodiment, the dividing the target spectral data according to the preset sample selection algorithm can include: dividing the target spectral data according to the preset sample selection algorithm to obtain a corresponding calibration spectral data set and a validation spectral data set. Specifically, after the near-infrared spectral data related to temperature is selected by the preset characteristic wavelength screening algorithm and removed from the initial spectral data to obtain the corresponding target spectral data, the Kennard-Stone algorithm can be used to divide the target spectral data, so as to divide the target spectral data into the calibration spectral data set and the validation spectral data set, wherein the calibration spectral data set can be used to establish a model, and the validation spectral data set can be used to evaluate the performance of the model. When the Kennard-Stone algorithm is used to divide the target spectral data, two farthest points in the target spectral data can be first randomly selected as initial samples, then the minimum distance between each remaining point in the target spectral data and the selected sample point is calculated, and the point with the maximum minimum distance from the selected sample point is selected as a new sample point, and the step is repeated until the required number of samples is reached. Correspondingly, the constructing the target near-infrared temperature correction model based on the divided target spectral data, the preset partial least squares algorithm and the target physicochemical index can include: constructing the target near-infrared temperature correction model based on the calibration spectral data set, the validation spectral data set, the preset partial least squares algorithm and the target physicochemical index. It can be understood that the partial least squares method can be used to construct a prediction model based on dimensionality reduction technology, and the use of the partial least squares method can improve the interpretability and prediction performance of the model. Therefore, in the embodiment, the partial least squares method (Partial Least Squares, PLS algorithm) can be used to establish the target near-infrared temperature correction model based on the calibration spectral data set, the validation spectral data set and the physicochemical index.

[0060] It should be pointed out that the construction of the corresponding target near-infrared temperature correction model based on the correction spectrum data set, the verification spectrum data set, the preset partial least squares algorithm and the target physical and chemical indicators may include: constructing an initial near-infrared temperature correction model based on the correction spectrum data set, the preset partial least squares algorithm and the target physical and chemical indicators; verifying the initial near-infrared temperature correction model using the verification spectrum data set, and adjusting the initial near-infrared temperature correction model based on the verification result to obtain the corresponding target near-infrared temperature correction model. Specifically, first, the partial least squares model, that is, the number of principal components in the target near-infrared temperature correction model, can be determined by cross-validation. Then, the initial near-infrared temperature correction model is constructed using the partial least squares algorithm with the correction spectrum data set as the independent variable and the target physical and chemical indicators as the dependent variable. The verification spectrum data set can then be used to verify the initial near-infrared temperature correction model to evaluate the prediction performance of the model. Commonly used evaluation indicators include but are not limited to root mean square error (RMSE), coefficient of determination ( ) etc. If the model's predictive performance fails to meet the preset target, the model can be re-established and optimized by increasing the number of samples in the calibration spectral dataset, improving the spectral data preprocessing method, adjusting the parameters of the partial least squares algorithm, or reselecting a new algorithm to obtain the target near-infrared temperature calibration model. This demonstrates that, compared to traditional temperature calibration methods, this embodiment can reduce the large amount of data and computing resources required.

[0061] As can be seen from the above, in this embodiment, the target physicochemical indicators of the target sample are first obtained, and the initial spectral data of the target sample is collected according to the first preset temperature condition; then, the spectral data to be eliminated is screened out from the initial spectral data based on the preset characteristic wavelength screening algorithm, and the corresponding target spectral data is determined based on the spectral data to be eliminated and the initial spectral data; finally, the target spectral data is divided according to the preset sample selection algorithm, and the corresponding target near-infrared temperature correction model is constructed based on the divided target spectral data, the preset partial least squares algorithm and the target physicochemical indicators. As can be seen from the above, in this embodiment, the target physicochemical indicators and initial spectral data of the target sample are first collected, and then the characteristic wavelength related to temperature is screened based on the characteristic wavelength screening algorithm, and the spectral data to be eliminated in the initial spectral data is eliminated based on the screening results to obtain the corresponding target spectral data, and then the target spectral data is divided, and finally, the target near-infrared temperature correction model is constructed using the divided target spectral data, the target physicochemical indicators and the partial least squares algorithm. In this way, in this embodiment, by eliminating the spectral data to be eliminated in the initial spectral data, the interference of temperature factors on the near-infrared model prediction results can be eliminated, the accuracy and stability of the near-infrared model output can be improved, and the reliability and consistency of the near-infrared model can be ensured.

[0062] Referring to Figure 3 In one embodiment, the near-infrared temperature correction model construction process can be as follows:

[0063] (1) Collecting sample physicochemical indexes: Collect the physicochemical indexes of the sample at a standard temperature, denoted as .

[0064] (2) Collecting sample near-infrared spectrum: After optimizing the collection conditions of the near-infrared spectrometer, collect the near-infrared spectrum data of the sample at different temperatures. Denote the temperature in step (2) as (j = 1, 2, 3,...), and the corresponding spectrum data as (j = 1, 2, 3,...).

[0065] (3) Screening data points: According to the measured data and , use the characteristic wavelength screening algorithm to screen the data points related to temperature in the near-infrared spectrum data.

[0066] (4) Eliminating data points: According to the characteristic wavelength screening results, eliminate the corresponding characteristic data points from the near-infrared spectrum data.

[0067] (5) Establishing a temperature correction model: Obtain the near-infrared spectrum data after temperature correction, perform data preprocessing, divide the data set by the Kennard-Stone algorithm, and use the partial least squares algorithm and physicochemical indexes to establish a near-infrared temperature correction model.

[0068] Referring to Figure 4 The embodiments of the present application further provide a process for evaluating the near-infrared temperature correction model construction method. Specifically, 10 flavoring samples are selected for study in the present embodiment. The following steps are followed for detection:

[0069] (1) Collecting the physicochemical indexes of the flavoring sample.

[0070] (2) Collecting the near-infrared spectrum data of the flavoring sample:

[0071] a. Turn on the near-infrared spectrometer and preheat for 30 min, then set the spectrum collection conditions: transmission mode; wave number ; resolution ; scan number 64 scans.

[0072] b. Use a dropper to drop the flavoring sample into a 1 mm quartz cuvette, wipe the surface of the cuvette with a lens paper, and place it in the sample cell.

[0073] c. Set the temperature of the near-infrared spectrometer to , start collecting; each flavor sample is tested in parallel 3 times. Then set the temperature to 、 , repeat the above steps, and finally collect 90 flavor sample spectral data, each spectrum has 4562 data points.

[0074] (3) Establishing the original near-infrared model

[0075] Specifically, the Kennard-Stone algorithm was first used to divide the data set into a 3:2 ratio, where 54 sample data were used as the calibration set and the remaining sample data were used as the prediction set. Then, the Savitzky-Golay filter was used to filter and smooth the calibration set data and the validation set data respectively. Finally, a partial least squares model was established with spectral data as the independent variable and physical and chemical indicators as the dependent variable.

[0076] (4) Characteristic wavelength selection

[0077] Taking temperature as the characteristic variable and using the characteristic wavelength screening algorithm, the mutual information between features and the mutual information between features and spectral data are calculated, and the results are sorted to find spectral data points with a high correlation with temperature.

[0078] (5) Establishing a near-infrared temperature correction model

[0079] According to the sorting results, the first two spectral data points that were highly correlated with temperature were eliminated to obtain the corrected near-infrared spectral data. A partial least squares model was established with physical and chemical indicators as dependent variables.

[0080] See also Figure 5 and Figure 6 As shown in the figure, according to the model results, the slope of the calibration set of the original near-infrared model is about 0.9480, the intercept is about 0.0566, the root mean square error is about 0.0185, The value is about 0.9480, the prediction set slope of the original near infrared model is about 0.9978, the intercept is about 0.0002, the root mean square error is about 0.0140, The value is about 0.9815. The effect of the near-infrared temperature correction model has been significantly improved. The slope of the calibration set of the near-infrared temperature correction model is about 0.9995, the intercept is about 0.000008, the root mean square error is about 0.0013, The value is about 0.9995, the prediction set slope of the near-infrared temperature correction model is about 1.0008, the intercept is about -0.0001, and the root mean square error is about 0.0011. The value is approximately 0.9997.

[0081] Accordingly, see Figure 7As shown, the embodiment of the present application further provides a near-infrared temperature correction model construction device, which can comprise:

[0082] An initial spectrum data acquisition module 11 is configured to acquire a target physicochemical index of a target sample and collect initial spectrum data of the target sample according to a first preset temperature condition;

[0083] A target spectrum data determination module 12 is configured to filter out to-be-removed spectrum data from the initial spectrum data based on a preset characteristic wavelength filtering algorithm and determine corresponding target spectrum data based on the to-be-removed spectrum data and the initial spectrum data;

[0084] A target near-infrared temperature correction model construction module 13 is configured to divide the target spectrum data according to a preset sample selection algorithm and construct a corresponding target near-infrared temperature correction model based on the divided target spectrum data, a preset partial least squares algorithm and the target physicochemical index.

[0085] As can be seen from the above, in the present application, a target physicochemical index of a target sample is first acquired, and initial spectrum data of the target sample is collected according to a first preset temperature condition; then to-be-removed spectrum data is filtered out from the initial spectrum data based on a preset characteristic wavelength filtering algorithm, and corresponding target spectrum data is determined based on the to-be-removed spectrum data and the initial spectrum data; finally, the target spectrum data is divided according to a preset sample selection algorithm, and a corresponding target near-infrared temperature correction model is constructed based on the divided target spectrum data, a preset partial least squares algorithm and the target physicochemical index. As can be seen from the above, in the present application, a target physicochemical index and initial spectrum data of a target sample are first collected, then characteristic wavelengths related to temperature are filtered out based on a characteristic wavelength filtering algorithm, and to-be-removed spectrum data in the initial spectrum data is removed based on the filtering result to obtain corresponding target spectrum data, then the target spectrum data is divided, and finally a target near-infrared temperature correction model is constructed by using the divided target spectrum data, the target physicochemical index and a partial least squares algorithm. In this way, by removing to-be-removed spectrum data in the initial spectrum data, the present application can exclude the interference of temperature factors on the prediction results of the near-infrared model, improve the accuracy and stability of the output of the near-infrared model, and thus ensure the reliability and consistency of the near-infrared model.

[0086] In some specific embodiments, the initial spectrum data acquisition module 11 can comprise:

[0087] A target physicochemical index determination unit is configured to collect initial physicochemical indexes of the target sample according to a second preset temperature condition and a preset number of experiments, and perform average processing on the initial physicochemical indexes based on the preset number of experiments to obtain the target physicochemical index of the target sample.

[0088] In some embodiments, the initial spectrum data acquisition module 11 can include:

[0089] An initial spectrum data acquisition unit is configured to acquire the initial spectrum data of the target sample according to a first preset temperature condition and a preset spectrum acquisition condition, wherein the initial spectrum data is near-infrared spectrum data, and the preset spectrum acquisition condition includes a preset spectrum acquisition mode, a preset wave number, a preset resolution, and a preset scanning number.

[0090] In some embodiments, the target spectrum data determination module 12 can include:

[0091] An mutual information calculation unit is configured to determine a target temperature in the first preset temperature condition, and calculate a first mutual information between each spectrum data subset of the initial spectrum data and a second mutual information between each target temperature and the initial spectrum data.

[0092] An mutual information sorting unit is configured to perform corresponding sorting processing on the first mutual information and the second mutual information based on a preset sorting method, respectively.

[0093] A maximum correlation determination unit is configured to determine a minimum redundancy between the spectrum data subsets based on the sorted first mutual information, and determine a maximum correlation between the target temperature and the initial spectrum data based on the sorted second mutual information.

[0094] A spectrum data to be removed determination unit is configured to determine the spectrum data to be removed in the initial spectrum data according to the minimum redundancy and the maximum correlation.

[0095] In some embodiments, the target spectrum data determination module 12 can include:

[0096] A target spectrum data determination unit is configured to perform removal processing on the initial spectrum data based on the spectrum data to be removed, and perform a preset data preprocessing on the removed initial spectrum data to obtain corresponding target spectrum data.

[0097] In some embodiments, the target near-infrared temperature correction model construction module 13 can include:

[0098] A target spectrum data division sub-module is configured to divide the target spectrum data according to a preset sample selection algorithm to obtain a correction spectrum data set and a verification spectrum data set.

[0099] Correspondingly, the target near-infrared temperature correction model construction module 13 can include:

[0100] The target near-infrared temperature correction model construction submodule is configured to construct the target near-infrared temperature correction model based on the correction spectrum data set, the verification spectrum data set, the preset partial least squares algorithm and the target physicochemical index.

[0101] In some embodiments, the target near-infrared temperature correction model construction submodule can include:

[0102] The initial near-infrared temperature correction model construction unit is configured to construct an initial near-infrared temperature correction model based on the correction spectrum data set, the preset partial least squares algorithm and the target physicochemical index.

[0103] The target near-infrared temperature correction model construction unit is configured to verify the initial near-infrared temperature correction model by using the verification spectrum data set, and adjust the initial near-infrared temperature correction model based on a verification result to obtain the target near-infrared temperature correction model.

[0104] Further, the present application also discloses an electronic device, Figure 8 is an electronic device 20 structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation to the use range of the present application. The electronic device 20, specifically can include: at least one processor 21, at least one memory 22, power supply 23, communication interface 24, input output interface 25 and communication bus 26. Wherein, the memory 22 is used to store computer program, the computer program is loaded and executed by the processor 21, to realize the related steps in the near-infrared temperature correction model construction method disclosed in any preceding embodiment. In addition, the electronic device 20 in the embodiment specifically can be electronic computer.

[0105] In the embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create data transmission channel between the electronic device 20 and external device, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not specifically limited herein.

[0106] In addition, the memory 22 as the carrier of resource storage can be read-only memory, random access memory, disk or optical disk, etc., and the resources stored thereon can include operating system 221, computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0107] The operating system 221 is configured to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of performing the near-infrared temperature correction model construction method disclosed in any of the preceding embodiments by the electronic device 20, the computer program 222 can further include computer programs capable of performing other specific tasks.

[0108] Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the near-infrared temperature correction model construction method disclosed in the preceding embodiments. For the specific steps of the method, please refer to the corresponding content disclosed in the preceding embodiments, which will not be repeated here.

[0109] The embodiments in the present specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same or similar parts between the embodiments, please refer to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and please refer to the method part for the relevant content.

[0110] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0111] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0112] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.

[0113] The above detailed description of the technical solutions provided by the present application has been provided, and the principles and implementation modes of the present application have been described by applying specific examples. The above description of the examples is only for the purpose of helping to understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description of the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for constructing a near-infrared temperature correction model, characterized in that, The method comprises the following steps: acquiring a target physicochemical index of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition; screening out to-be-removed spectral data from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determining corresponding target spectral data based on the to-be-removed spectral data and the initial spectral data; dividing the target spectral data according to a preset sample selection algorithm, and constructing a corresponding target near-infrared temperature correction model based on the divided target spectral data, a preset partial least squares algorithm and the target physicochemical index; wherein the step of screening out to-be-removed spectral data from the initial spectral data based on the preset characteristic wavelength screening algorithm comprises the following steps: determining a target temperature in the first preset temperature condition, and calculating first mutual information between each spectral data subset of the initial spectral data and second mutual information between each target temperature and the initial spectral data; respectively performing corresponding sorting processing on the first mutual information and the second mutual information based on a preset sorting method; determining minimum redundancy between the spectral data subsets based on the sorted first mutual information, and determining maximum correlation between the target temperatures and the initial spectral data based on the sorted second mutual information; determining the to-be-removed spectral data in the initial spectral data according to the minimum redundancy and the maximum correlation; the step of determining corresponding target spectral data based on the to-be-removed spectral data and the initial spectral data comprises the following steps: performing removal processing on the initial spectral data based on the to-be-removed spectral data, and performing preset data preprocessing on the removed initial spectral data to obtain corresponding target spectral data. 2.The method of claim 1, wherein, The step of acquiring a target physicochemical index of a target sample comprises the following steps: collecting initial physicochemical indexes of the target sample according to a second preset temperature condition and a preset number of experiments, and performing average processing on the initial physicochemical indexes based on the preset number of experiments to obtain the target physicochemical index of the target sample. 3.The method of claim 1, wherein, The step of collecting initial spectral data of the target sample according to a first preset temperature condition comprises the following steps: collecting the initial spectral data of the target sample according to a first preset temperature condition and a preset spectral collection condition; wherein the initial spectral data is near-infrared spectral data, and the preset spectral collection condition comprises a preset spectral collection mode, a preset wave number, a preset resolution and a preset number of scans.

4. The near-infrared temperature correction model construction method according to any one of claims 1 to 3, characterized in that, The step of dividing the target spectral data according to a preset sample selection algorithm comprises the following steps: dividing the target spectral data according to a preset sample selection algorithm to obtain a corresponding correction spectral data set and a verification spectral data set; correspondingly, the step of constructing a corresponding target near-infrared temperature correction model based on the divided target spectral data, a preset partial least squares algorithm and the target physicochemical index comprises the following steps: constructing the corresponding target near-infrared temperature correction model based on the correction spectral data set, the verification spectral data set, the preset partial least squares algorithm and the target physicochemical index. 5.The method of claim 4, wherein, The target near-infrared temperature correction model is constructed based on the correction spectrum data set, the preset partial least squares algorithm, and the target physicochemical index. An initial near-infrared temperature correction model is constructed based on the correction spectrum data set, the preset partial least squares algorithm, and the target physicochemical index. The initial near-infrared temperature correction model is verified by using the verification spectrum data set, and the initial near-infrared temperature correction model is adjusted based on the verification result to obtain the target near-infrared temperature correction model.

6. A near-infrared temperature correction model construction apparatus characterized by comprising: It comprises: An initial spectrum data acquisition module is configured to obtain a target physicochemical index of a target sample and acquire initial spectrum data of the target sample under a first preset temperature condition; A target spectrum data determination module is configured to filter out to-be-removed spectrum data from the initial spectrum data based on a preset characteristic wavelength filtering algorithm, and determine corresponding target spectrum data based on the to-be-removed spectrum data and the initial spectrum data; A target near-infrared temperature correction model construction module is configured to divide the target spectrum data according to a preset sample selection algorithm, and construct a corresponding target near-infrared temperature correction model based on the divided target spectrum data, a preset partial least squares algorithm, and the target physicochemical index; The target spectrum data determination module comprises: An mutual information calculation unit is configured to determine a target temperature in the first preset temperature condition, and calculate first mutual information between each spectrum data subset of the initial spectrum data and second mutual information between each target temperature and the initial spectrum data; An mutual information sorting unit is configured to sort the first mutual information and the second mutual information based on a preset sorting method, respectively; A maximum correlation determination unit is configured to determine minimum redundancy between the spectrum data subsets based on the sorted first mutual information, and determine maximum correlation between the target temperatures and the initial spectrum data based on the sorted second mutual information; A to-be-removed spectrum data determination unit is configured to determine the to-be-removed spectrum data in the initial spectrum data based on the minimum redundancy and the maximum correlation; The target spectrum data determination module comprises: A target spectrum data determination unit is configured to remove the to-be-removed spectrum data from the initial spectrum data based on the to-be-removed spectrum data, and perform preset data preprocessing on the removed initial spectrum data to obtain corresponding target spectrum data.

7. An electronic device, comprising: The electronic device comprises a processor and a memory; wherein the memory is configured to store a computer program, and the computer program is loaded and executed by the processor to implement the near-infrared temperature correction model construction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is stored, and the computer program is executed by a processor to implement the near-infrared temperature correction model construction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Spectrum wave number selection method

    CN105630743A

  • Prediction method and prediction device

    US20230375472A1