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

By screening and eliminating temperature-related spectral data in near-infrared spectral detection, a near-infrared temperature correction model was constructed, which solved the problem of temperature affecting model prediction results and improved the accuracy and stability of the model.

CN120011708AActive Publication Date: 2025-05-16CHINA TOBACCO HUNAN IND CORP
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In near-infrared spectral detection, temperature has a great impact on the model prediction results, resulting in the impact of the accuracy and stability of the model.

Method used

By obtaining the target physical and chemical indexes and initial spectral data of the target sample, the spectral data to be removed are screened based on the preset feature wavelength screening algorithm, and the target near-infrared temperature correction model is constructed to reduce the impact of temperature on the model prediction results.

Benefits of technology

It effectively reduces the impact of temperature on the prediction results of near-infrared model, improves the accuracy and stability of the model, and ensures the reliability and consistency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011708A_ABST
    Figure CN120011708A_ABST
Patent Text Reader

Abstract

The invention discloses a near-infrared temperature correction model construction method and device, equipment and a medium, and relates to the technical field of near-infrared detection.The near-infrared temperature correction model construction method comprises the steps that target physicochemical indexes of a target sample are obtained, and initial spectrum data of the target sample are collected 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; and 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 square algorithm and the target physicochemical indexes. Therefore, interference of temperature factors on the prediction result of the near-infrared model is eliminated through the characteristic wavelength screening algorithm, the accuracy and the stability of output of the near-infrared model are improved, and the reliability and the consistency of the near-infrared model are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of near-infrared detection technology, and in particular to a near-infrared temperature correction model construction method, device, equipment and medium. Background Art

[0002] As a rapid and non-destructive detection method, near-infrared spectroscopy has been widely used and mature in the non-destructive detection of physical and chemical information and quality of food. The combination of chemometrics and near-infrared spectroscopy detection technology is becoming increasingly close, and there are already a variety of algorithms that can be used to establish near-infrared models. However, in practical applications, especially on-site real-time detection, environmental factors such as temperature have a significant impact on the accuracy and stability of the model.

[0003] In summary, how to reduce the impact of temperature on the prediction results of near-infrared models is a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a near-infrared temperature correction model construction method, device, equipment and medium, which can reduce the influence of temperature on the near-infrared model prediction results. The specific scheme is as follows:

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

[0006] Acquiring target physical and chemical indicators of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition;

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

[0008] The target spectral data are 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 physical and chemical indicators.

[0009] Optionally, obtaining target physical and chemical indicators of the target sample includes:

[0010] The initial physical and chemical indicators of the target sample are collected according to a second preset temperature condition and a preset number of experiments, and the initial physical and chemical indicators are averaged based on the preset number of experiments to obtain the target physical and chemical indicators of the target sample.

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

[0012] The initial spectral data of the target sample is collected 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 includes a preset spectral collection mode, a preset wave number, a preset resolution and a preset number of scans.

[0013] Optionally, the filtering out the spectral data to be removed from the initial spectral data based on a preset characteristic wavelength screening algorithm includes:

[0014] Determine a target temperature in the first preset temperature condition, and calculate 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;

[0015] Performing corresponding sorting processing on the first mutual information and the second mutual information respectively based on a preset sorting method;

[0016] determining a minimum redundancy between the spectral data subsets based on the sorted first mutual information, and determining a maximum correlation between the target temperature and the initial spectral data based on the sorted second mutual information;

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

[0018] Optionally, determining corresponding target spectral data based on the spectral data to be removed and the initial spectral data includes:

[0019] The initial spectral data is eliminated based on the spectral data to be eliminated, and the eliminated initial spectral data is preprocessed with preset data to obtain the corresponding target spectral data.

[0020] Optionally, dividing the target spectral data according to a preset sample selection algorithm includes:

[0021] Dividing the target spectral data according to a preset sample selection algorithm to obtain corresponding correction spectral data sets and verification spectral data sets;

[0022] Accordingly, the target near-infrared temperature correction model is constructed based on the divided target spectral data, the preset partial least squares algorithm and the target physical and chemical indicators, including:

[0023] The corresponding target near-infrared temperature correction model is constructed 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.

[0024] Optionally, constructing 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 index includes:

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

[0026] The initial near-infrared temperature correction model is verified using the verification spectral data set, and the initial near-infrared temperature correction model is adjusted based on the verification result to obtain the corresponding 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, used to obtain target physical and chemical indicators of a target sample, and to acquire initial spectrum data of the target sample according to a first preset temperature condition;

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

[0030] The target near-infrared temperature correction model construction module is used to divide the target spectral data according to a preset sample selection algorithm, and to construct 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 indicators.

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

[0032] Memory, used to store computer programs;

[0033] A processor is used to execute the computer program to implement the aforementioned near-infrared temperature correction model construction method.

[0034] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned near-infrared temperature correction model construction method is implemented.

[0035] In the present application, the target physicochemical index of the target sample is 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 index. As can be seen from the above, the present application first collects the target physicochemical index and the initial spectral data of the target sample, then screens the characteristic wavelength related to temperature based on the characteristic wavelength screening algorithm, and eliminates the spectral data to be eliminated in the initial spectral data based on the screening result to obtain the corresponding target spectral data, then divides the target spectral data, and finally uses the divided target spectral data, the target physicochemical index and the partial least squares algorithm to construct the target near-infrared temperature correction model. In this way, the present application can eliminate the interference of temperature factors on the prediction results of the near-infrared model by eliminating the spectral data to be eliminated in the initial spectral data, improve the accuracy and stability of the near-infrared model output, and thus ensure the reliability and consistency of the near-infrared model. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0037] Figure 1 A flow chart of a method for constructing a near-infrared temperature correction model provided in this application;

[0038] Figure 2 A near infrared spectrum of a specific target sample provided in this application at different temperatures;

[0039] Figure 3 A flow chart of a specific near-infrared temperature correction model construction method provided in this application;

[0040] Figure 4 A flow chart of a specific near-infrared temperature correction model construction method provided in this application;

[0041] Figure 5 A schematic diagram of a specific original near-infrared model prediction result provided for this application;

[0042] Figure 6 A schematic diagram of prediction results of a specific near-infrared temperature correction model provided in this application;

[0043] Figure 7 A schematic diagram of the structure of a near-infrared temperature correction model construction device provided in this application;

[0044] Figure 8 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] As a rapid and non-destructive detection method, near-infrared spectroscopy has been widely used and mature in the non-destructive detection of physical and chemical information and quality of food. The combination of chemometrics and near-infrared spectroscopy detection technology is becoming increasingly close, and there are already a variety of algorithms that can be used to establish near-infrared models. However, in practical applications, especially on-site real-time detection, environmental factors such as temperature have an impact on the accuracy and stability of the model that cannot be ignored. To this end, the present application provides a near-infrared temperature correction model construction scheme that can reduce the impact of temperature on the prediction results of the near-infrared model.

[0047] See also Figure 1 As shown, the embodiment of the present invention discloses a method for constructing a near-infrared temperature correction model, which may include:

[0048] Step S11, obtaining target physical and chemical indicators of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition.

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

[0050] It should be noted that the above-mentioned acquisition of the initial spectral data of the target sample according to the first preset temperature condition may include: acquiring the initial spectral data of the target sample according to the first preset temperature condition and the preset spectral acquisition condition; wherein the initial spectral data is near-infrared spectral data, and the preset spectral acquisition condition includes a preset spectral acquisition mode, a preset wave number, a preset resolution and a preset number of scans. Specifically, in order to ensure that the optical properties of the target sample are not affected by the container, a 1mm quartz cuvette may be used for spectral acquisition; the transmission mode is used for spectral acquisition, that is, after the light source passes through the target sample, the spectral characteristics of the transmitted light are measured; in order to cover the main area of ​​the near-infrared spectrum, the wave number range may be set to to ; In order to ensure the precision and accuracy of spectral data, the spectral resolution can be set to ; In order to improve the signal-to-noise ratio and repeatability of the spectral data, the target sample can be scanned 64 times. In a specific implementation, the target sample can be placed in a temperature-controlled environment and adjusted to , , , put the target sample into a 1mm quartz cuvette, ensure that the target sample is evenly distributed and free of bubbles, and use a near-infrared spectrometer to collect spectra in transmission mode under the set wavenumber range, resolution, and number of scans. At the same time, it is necessary to save the spectral data collected at each temperature for subsequent analysis and processing, where the temperature can be recorded as (j=1, 2, 3...), the corresponding spectral data can be recorded as (j=1, 2, 3...), the near infrared spectra of the target samples at different temperatures can be found in Figure 2 As shown. It is understandable that during the acquisition process, it is necessary to ensure that the temperature of the target sample remains stable to avoid the influence of temperature changes on the spectral data. At the same time, in order to improve the data quality, the collected initial spectral data can be preprocessed, such as baseline correction, smoothing, mean centering, standardization, etc.

[0051] Step S12: Filter out the spectral data to be eliminated from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determine corresponding target spectral data based on the spectral data to be eliminated and the initial spectral 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 according to the minimum redundancy and the maximum correlation. Specifically, the characteristic wavelength screening algorithm is an important technology in spectral data processing, and characteristic screening can extract characteristic wavelengths with representativeness and discrimination from a large amount of spectral data. According to 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, represents the feature, S represents the feature subset, and c represents the target classification. D represents the maximum correlation, and R represents the 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 determination of the corresponding target spectral data based on the spectral data to be eliminated and the initial spectral data may include: performing elimination processing on the initial spectral data based on the spectral data to be eliminated, and performing preset data preprocessing on the eliminated initial spectral data to obtain the corresponding target spectral data. Specifically, the spectral data to be eliminated is screened out from the initial spectral data according to a preset characteristic wavelength screening algorithm, and the spectral data to be eliminated is eliminated from the initial spectral data, and then the eliminated initial spectral data is subjected to data preprocessing. In order to improve the smoothness of the target spectral data, the noise can be removed by a moving average method, so as to perform smoothing processing on the eliminated initial spectral data; in order to make the target spectral data have a consistent scale, the eliminated initial spectral data can be standardized by normalization processing; in order to enhance the features in the target spectral data, the eliminated initial spectral data can be subjected to derivative processing. After obtaining the target spectral data, the target spectral data can be stored again for subsequent use.

[0058] Step S13, 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 indicators.

[0059] In this embodiment, the above-mentioned dividing the target spectral data according to the preset sample selection algorithm may include: dividing the target spectral data according to the preset sample selection algorithm to obtain corresponding correction spectral data sets and verification spectral data sets. Specifically, in this embodiment, the near-infrared spectral data related to temperature is selected by the preset characteristic wavelength screening algorithm, and it is removed from the initial spectral data. After obtaining the corresponding target spectral data, the target spectral data can be divided by the Kennard-Stone algorithm, so that the target spectral data is divided into a correction spectral data set and a verification spectral data set, wherein the correction spectral data set can be used to establish a model, and the verification spectral data set can be used to evaluate the performance of the model. When the target spectral data is divided by the Kennard-Stone algorithm, the two farthest points can be randomly selected from the target spectral data as initial samples, and 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 largest minimum distance to the selected sample point is selected as a new sample point, and this step is repeated until the required number of samples is reached. Correspondingly, the above-mentioned construction of a corresponding target near-infrared temperature correction model based on the divided target spectral data, the preset partial least squares algorithm and the target physicochemical index may include: constructing a 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. It can be understood that since the partial least squares method can construct a prediction model based on dimensionality reduction technology, the use of the partial least squares method can improve the interpretability and prediction performance of the model. Therefore, in this embodiment, the partial least squares method (Partial Least Squares, i.e., PLS algorithm) can be used to establish a target near-infrared temperature correction model based on the correction spectral data set, the verification 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 spectral data set, the verification spectral data set, the preset partial least squares algorithm and the target physical and chemical index may include: constructing an initial near-infrared temperature correction model based on the correction spectral data set, the preset partial least squares algorithm and the target physical and chemical index; using the verification spectral data set to verify the initial near-infrared temperature correction model, 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, firstly, 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 spectral data set as the independent variable and the target physical and chemical index as the dependent variable. The verification spectral 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 prediction performance of the model cannot reach the preset target, the model building stage can be returned to, and the target near-infrared temperature correction model can be obtained by increasing the number of samples in the correction spectral data set, improving the preprocessing method of the spectral data, adjusting the parameters of the partial least squares algorithm, or reselecting the algorithm. It can be seen that compared with the traditional temperature calibration method, this embodiment can reduce the large amount of data and computing resources required by the traditional temperature calibration method.

[0061] As can be seen from the above, in this embodiment, the target physicochemical index and initial spectral data of the target sample are first obtained, and the initial spectral data of the target sample are collected according to the first preset temperature condition; then, the spectral data to be eliminated are screened out from the initial spectral data based on the preset characteristic wavelength screening algorithm, and the corresponding target spectral data are determined based on the spectral data to be eliminated and the initial spectral data; finally, the target spectral data are 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 index. As can be seen from the above, in this embodiment, the target physicochemical index 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 result 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 index 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 prediction results of the near-infrared model can be eliminated, the accuracy and stability of the near-infrared model output can be improved, thereby ensuring the reliability and consistency of the near-infrared model.

[0062] See also Figure 3 As shown, in a specific implementation, the near-infrared temperature correction model construction process can be specifically:

[0063] (1) Sample physical and chemical index collection: The physical and chemical indexes of the samples were collected at standard temperature and recorded as .

[0064] (2) Sample near-infrared spectrum acquisition: After optimizing the acquisition conditions of the near-infrared spectrometer, the sample is subjected to near-infrared spectrum data acquisition at different temperatures. The temperature in step (2) is recorded as (j=1, 2, 3...), the corresponding spectral data is recorded as (j=1, 2, 3...).

[0065] (3) Filter data points: Based on the measured data and ,The characteristic wavelength screening algorithm is used to screen the temperature-related data points in the near-infrared spectral data.

[0066] (4) Eliminate data points: Eliminate corresponding characteristic data points from the near-infrared spectral data based on the characteristic wavelength screening results.

[0067] (5) Establishing a temperature correction model: Obtain temperature-corrected near-infrared spectral data, perform data preprocessing, divide the data set using the Kennard-Stone algorithm, and establish a near-infrared temperature correction model using the partial least squares algorithm and physical and chemical indicators.

[0068] See also Figure 4 As shown, the present application example further provides a process for evaluating the near infrared temperature correction model construction method. Specifically, in this example, 10 blended essence samples were selected for research. The test was performed according to the following steps:

[0069] (1) Collect the physical and chemical indicators of flavor samples.

[0070] (2) Collecting near-infrared spectral data of flavor samples:

[0071] a. Turn on the near-infrared spectrometer and preheat for 30 minutes, then set the spectrum acquisition conditions: transmission mode; wave number ; Resolution ; Number of scans: 64scans.

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

[0073] c. Set the near infrared spectrometer temperature 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 spectrum 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, in which 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 utilizing the characteristic wavelength screening algorithm, the mutual information between features and 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, and a partial least squares model was established with the 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, the root mean square error is about 0.0011, The value is about 0.9997.

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

[0082] An initial spectrum data acquisition module 11 is used to obtain target physical and chemical indicators of a target sample and to acquire initial spectrum data of the target sample according to a first preset temperature condition;

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

[0084] The target near-infrared temperature correction model construction module 13 is used to divide the target spectral data according to a preset sample selection algorithm, and to construct 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 indicators.

[0085] As can be seen from the above, in the present application, the target physicochemical indexes 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 index. As can be seen from the above, the present application first collects the target physicochemical indexes and initial spectral data of the target sample, then screens the characteristic wavelengths related to temperature based on the characteristic wavelength screening algorithm, and eliminates the spectral data to be eliminated in the initial spectral data based on the screening results to obtain the corresponding target spectral data, then divides the target spectral data, and finally uses the divided target spectral data, the target physicochemical index and the partial least squares algorithm to construct the target near-infrared temperature correction model. In this way, the present application can eliminate the interference of temperature factors on the prediction results of the near-infrared model by eliminating the spectral data to be eliminated in the initial spectral data, improve the accuracy and stability of the near-infrared model output, and thus ensure the reliability and consistency of the near-infrared model.

[0086] In some specific implementations, the initial spectrum data acquisition module 11 may include:

[0087] The target physicochemical index determination unit is used to collect the initial physicochemical index of the target sample according to the second preset temperature condition and the preset number of experiments, and average the initial physicochemical index based on the preset number of experiments to obtain the target physicochemical index of the target sample.

[0088] In some specific implementations, the initial spectrum data acquisition module 11 may include:

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

[0090] In some specific implementations, the target spectrum data determination module 12 may include:

[0091] a mutual information calculation unit, configured to determine a target temperature in the first preset temperature condition, and calculate 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;

[0092] A mutual information sorting unit, configured to sort the first mutual information and the second mutual information respectively based on a preset sorting method;

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

[0094] The spectral data to be removed determining unit is configured to determine the spectral data to be removed in the initial spectral data according to the minimum redundancy and the maximum correlation.

[0095] In some specific implementations, the target spectrum data determination module 12 may include:

[0096] The target spectrum data determining unit is used to perform a removal process 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 the corresponding target spectrum data.

[0097] In some specific implementations, the target near-infrared temperature correction model building module 13 may include:

[0098] A target spectrum data division submodule, used for dividing the target spectrum data according to a preset sample selection algorithm to obtain corresponding correction spectrum data set and verification spectrum data set;

[0099] Accordingly, the target near-infrared temperature correction model building module 13 may include:

[0100] The target near-infrared temperature correction model construction submodule is used to construct 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.

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

[0102] An initial near-infrared temperature correction model construction unit, used 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 used to perform verification processing on the initial near-infrared temperature correction model using the verification spectrum data set, and adjust the initial near-infrared temperature correction model based on the verification result to obtain the corresponding target near-infrared temperature correction model.

[0104] Furthermore, the present application also discloses an electronic device. Figure 8 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input and output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the near-infrared temperature correction model construction method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment can specifically be an electronic computer.

[0105] In this 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 a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

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

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

[0108] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned near-infrared temperature correction model construction method is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.

[0109] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0111] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may 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 should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0113] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for constructing a near-infrared temperature correction model, characterized in that: include: Acquiring target physical and chemical indicators of a target sample, and collecting initial spectral data of the target sample according to a first preset temperature condition; Filtering out the spectral data to be eliminated from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determining corresponding target spectral data based on the spectral data to be eliminated and the initial spectral data; The target spectral data are 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 physical and chemical indicators.

2. The near-infrared temperature correction model construction method according to claim 1, characterized in that: The target physical and chemical indicators of the target sample are obtained, including: The initial physical and chemical indicators of the target sample are collected according to a second preset temperature condition and a preset number of experiments, and the initial physical and chemical indicators are averaged based on the preset number of experiments to obtain the target physical and chemical indicators of the target sample.

3. The near-infrared temperature correction model construction method according to claim 1, characterized in that: The collecting of initial spectrum data of the target sample according to the first preset temperature condition comprises: The initial spectral data of the target sample is collected 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 includes 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 claim 1, characterized in that: The step of screening out the spectral data to be removed from the initial spectral data based on a preset characteristic wavelength screening algorithm includes: Determine a target temperature in the first preset temperature condition, and calculate 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; Performing corresponding sorting processing on the first mutual information and the second mutual information respectively based on a preset sorting method; determining a minimum redundancy between the spectral data subsets based on the sorted first mutual information, and determining a maximum correlation between the target temperature and the initial spectral data based on the sorted second mutual information; The spectral data to be eliminated in the initial spectral data is determined according to the minimum redundancy and the maximum correlation.

5. The near-infrared temperature correction model construction method according to claim 1, characterized in that: The determining corresponding target spectral data based on the spectral data to be eliminated and the initial spectral data includes: The initial spectral data is eliminated based on the spectral data to be eliminated, and the eliminated initial spectral data is preprocessed with preset data to obtain the corresponding target spectral data.

6. The near-infrared temperature correction model construction method according to any one of claims 1 to 5, characterized in that: The dividing the target spectral data according to a preset sample selection algorithm includes: Dividing the target spectral data according to a preset sample selection algorithm to obtain corresponding correction spectral data sets and verification spectral data sets; Accordingly, the target near-infrared temperature correction model is constructed based on the divided target spectral data, the preset partial least squares algorithm and the target physical and chemical indicators, including: The corresponding target near-infrared temperature correction model is constructed 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.

7. The near-infrared temperature correction model construction method according to claim 6, characterized in that: The method of constructing 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 includes: Constructing an initial near-infrared temperature correction model based on the correction spectral data set, the preset partial least squares algorithm and the target physicochemical index; The initial near-infrared temperature correction model is verified using the verification spectral data set, and the initial near-infrared temperature correction model is adjusted based on the verification result to obtain the corresponding target near-infrared temperature correction model.

8. A near-infrared temperature correction model construction device, characterized in that: include: An initial spectrum data acquisition module, used to obtain target physical and chemical indicators of a target sample, and to acquire initial spectrum data of the target sample according to a first preset temperature condition; a target spectral data determination module, configured to filter out spectral data to be removed from the initial spectral data based on a preset characteristic wavelength screening algorithm, and determine corresponding target spectral data based on the spectral data to be removed and the initial spectral data; The target near-infrared temperature correction model construction module is used to divide the target spectral data according to a preset sample selection algorithm, and to construct 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 indicators.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory; wherein the memory is used 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 as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the near-infrared temperature correction model construction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Spectrum wave number selection method

    CN105630743A

  • Prediction method and prediction device

    US20230375472A1