Rice producing area identification method based on dynamic characteristic screening and weighted integration model
Through wavelet denoising and improved SNV correction methods combined with dynamic feature screening and multi-stage mixed classification model, the problem of fluctuations in the accuracy and low computational efficiency of the mid-infrared spectroscopic rice production identification method is solved, and high-precision and rapid rice production identification is achieved.
Patent Information
- Application Number
- CN202510884668.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-06-30
AI Technical Summary
The existing mid-infrared spectroscopic rice production identification methods have problems such as large fluctuations in accuracy, poor model mobility, and low computing efficiency. Especially when the production areas in neighboring provinces have small differences, the classification specificity is significantly reduced.
The wavelet denoising and improved SNV correction method are used for spectral preprocessing, combined with dynamic feature screening and multi-level mixed classification model, and the feature subset optimization and model integration are achieved through dynamic weight sets, and a dynamic feature screening and weighted integration model is constructed.
The accuracy and stability of the mid-infrared spectroscopic rice origin identification is improved, the computing time is reduced, the model's mobility and computing efficiency are enhanced, the feature retention rate and noise reduction effect are significantly improved, and the cross-device accuracy fluctuates by less than 1.5%.
Smart Images

Figure CN120408341A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of agricultural product traceability, and particularly relates to the technical field of intelligent identification of rice production areas. Background Art
[0002] In recent years, due to the characteristic of being able to sensitively reflect the vibration information of organic molecules, mid-infrared spectroscopy (MIR) technology has been gradually applied to the field of agricultural product origin traceability. In the prior art, the method for identifying rice production areas based on mid-infrared spectroscopy usually follows the conventional process of "spectrum acquisition - preprocessing - feature extraction - classification modeling", but there are still some technical bottlenecks in practical applications.
[0003] Traditional preprocessing methods (such as single standard normal variate SNV or multiplicative scatter correction MSC) have limited effects on eliminating the baseline drift and stray light interference unique to mid-infrared spectra. For example, although conventional SNV processing can eliminate the scattering effect, it will overcorrect the weak characteristic peaks related to the production area (such as the bending vibration signal of the C - O - H bond), resulting in the loss of effective chemical information. In addition, there is a lack of targeted algorithms for removing high-frequency noise in mid-infrared spectra (mainly from the contact fluctuations between the ATR crystal and the sample), which directly affects the accuracy of subsequent analysis.
[0004] Existing methods mostly use full-spectrum analysis or simple threshold methods to screen characteristic wavelengths, without fully considering the synergistic effect between variables. For example: the dimensionality reduction method based on principal component analysis (PCA) is prone to ignoring the key discriminant information in minor components, and the variable importance projection (VIP) algorithm is directly transplanted from near-infrared analysis without adjusting the threshold strategy according to the characteristics of high-dimensional and high collinearity of mid-infrared spectra. This results in the model being vulnerable to interference from redundant variables, especially when the production area differences are small (such as production areas in adjacent provinces), and the classification specificity is significantly reduced.
[0005] Existing technologies mostly use a single classifier (such as support vector machine SVM or random forest), and their performance is limited by the inherent defects of the algorithms. SVM is sensitive to kernel function parameters and is prone to overfitting in small-sample scenarios. Although random forest has noise resistance, its ability to distinguish weak difference features is insufficient.
[0006] In addition, traditional cross-validation methods are difficult to effectively balance the model complexity and generalization ability, resulting in poor reproducibility of data from different instruments or batches in practical applications (the relative standard deviation RSD often exceeds 5%).
[0007] The dimensionality of mid-infrared spectral data is generally high (a typical spectral region contains more than 2000 data points), and existing methods often use a serial computing mode in the feature extraction and model training stages. Experiments show that the traditional method takes 2 - 3 seconds to process a single sample, which is difficult to meet the requirements of real-time detection.
[0008] The above technical deficiencies lead to prominent problems in existing mid-infrared spectroscopy identification methods, such as large fluctuations in accuracy (85%-92%), poor model transferability, and low operation efficiency. Therefore, it is necessary to develop a new mid-infrared spectroscopy analysis method that takes into account both high precision and high efficiency to achieve rapid and accurate identification of rice production areas. Summary of the Invention
[0009] To solve the prominent problems in existing mid-infrared spectroscopy identification methods, such as large fluctuations in accuracy (85%-92%), poor model transferability, and low operation efficiency, the present invention provides a method for identifying rice production areas based on dynamic feature screening and weighted integration model. The method includes the following steps: S1. Use a mid-infrared spectrometer equipped with an ATR accessory to collect the spectra of rice flour samples and perform spectral normalization. S2. Use wavelet denoising and improved SNV correction method to denoise and correct the normalized spectra to obtain denoised and corrected spectra. S3. Perform dynamic feature screening on the denoised and corrected spectra to obtain an optimized feature subset with low redundancy and high independence. S4. Through the optimized feature subset, integrate several classification models into a multi-level hybrid classification model by means of dynamic weight aggregation. S5. Use the multi-level hybrid classification model to identify the production areas of rice flour samples.
[0010] Further, the spectral normalization is performed by: wherein, represents the spectral intensity vector after normalization, represents the original spectral intensity vector, represents taking the minimum / maximum value of the spectral vector.
[0011] Further, the improved SNV correction method is specifically: introducing a baseline protection factor in the SNV correction method, wherein, [[ID=�5]]represents the wavenumber position of the spectrum, unit: , and the value range is consistent with the collected spectral range, represents the permitted range, and the value range is 0.1−0.3, represents the central wavenumber of the characteristic peak concentration region, represents the standard deviation of the wavenumber distribution in the characteristic peak region. After introducing the baseline protection factor , the correction formula of the improved SNV correction method is: ; wherein, represents the spectral intensity value after improved SNV correction, represents the absorbance value of the spectrum at and are the mean and standard deviation of the spectral vectors, respectively.
[0012] Furthermore, the dynamic feature screening is specifically as follows: S31. Quantify the contribution of each variable to the classification model through the variable projection importance analysis method, denoted as ; the variable represents the spectral intensity value of a single wavenumber point of the noise-reduced and corrected spectrum; S32. Use a sliding window to calculate the dynamic threshold, and obtain the threshold of the current window through the dynamic threshold function , represents the central wavenumber value of the th window, where and represent the permitted range, , ; S33. Conduct dynamic feature screening through collinearity elimination, and set the conditions for retaining variables: Condition 1: > and + Condition 2: The correlation coefficient of adjacent variables , and screen the variables; Among them, represents the peak significance at the th wavenumber point, represents the standard deviation of the noise region, , represents the normalized spectral intensity value at the th wavenumber point, represents the average spectral intensity of the baseline region.
[0013] Furthermore, in step S4, construct the training set and the validation set by optimizing the feature subset, train each classification model using the training set, adjust the weights of each classification model in the dynamic weight set using the validation set, and perform decision fusion on the prediction results of each classification model through the weights of each classification model to obtain the final rice origin identification result.
[0014] Furthermore, the classification model set includes the SVM model, the RF model, the LightGBM model, and the 1D-CNN model.
[0015] Further, when training the SVM model, all features of the training set are input; when training the RF model, all features of the training set are input, and all features of the training set are compressed to 50 dimensions using PCA before input; when training the LightGBM model, all features of the training set are input; when training the 1D-CNN model, the spectrogram after standardization processing is input.
[0016] Further, when adjusting the weights of each classification model in the dynamic weight set using the validation set, the specific weights of each classification model are as follows: By the weight calculation formula Adjust the weights of each classification model, where represents the dynamic weight of the th branch model, represents the macro of the th branch model on the validation set, and 1.5 represents the weight adjustment index.
[0017] Further, make a decision fusion on the prediction results of each classification model through the weights of each classification model to obtain the final rice origin identification result, through: is implemented, represents the final predicted origin category label, represents discrimination from rice origin categories, represents the th branch model's prediction probability for the rice origin category , represents taking the category that makes the weighted probability sum the largest.
[0018] The beneficial effects of the method of the present invention are as follows: (1) Composite preprocessing technology: The tandem structure of wavelet denoising and improved SNV is pioneered, and the problem of overcorrection of traditional SNV is solved through the baseline protection factor; (2) Dynamic VIP screening mechanism: A wave number adaptive VIP threshold function is proposed, breaking through the bottleneck of feature omission caused by fixed thresholds; (3) Heterogeneous feature hybrid model: The full features and compressed features are processed separately by multiple models, and complementary advantages are realized through dynamic weights.
[0019] (4) Incorporate the model training time into the Bayesian optimization objective function to balance accuracy and efficiency. Description of the Drawings
[0020] Figure 1 is the flow chart of the rice origin identification method based on the dynamic feature screening and weighted integration model in the embodiment of the present invention; Figure 2 is the construction diagram of the multi-level hybrid classification model in the embodiment of the present invention. Detailed implementation manners
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] Embodiment 1 This embodiment provides a method for identifying the origin of rice based on dynamic feature screening and weighted integration model, as Figure 1 shown. The method includes the following steps: S1. Use a mid-infrared spectrometer equipped with an ATR accessory to collect the spectra of rice flour samples and perform spectral normalization processing; S2. Use wavelet denoising and improved SNV correction methods to denoise and correct the spectra after normalization processing to obtain denoised and corrected spectra; S3. Perform dynamic feature screening on the denoised and corrected spectra to obtain an optimized feature subset with low redundancy and high independence; S4. Through the optimized feature subset, integrate several classification models into a multi-level hybrid classification model by means of dynamic weight aggregation; S5. Use the multi-level hybrid classification model to identify the origin of rice flour samples and output the prediction results.
[0023] Embodiment 2 This embodiment is a further limitation of Embodiment 1. Use a mid-infrared spectrometer equipped with an ATR accessory to collect the spectra of rice flour samples, and the parameter control is specifically: Wavenumber range: 4000 - 400 ; Resolution: 0.09 ; Number of scans: 32 times (permissible range 16 - 64 times).
[0024] The spectral normalization processing is carried out by: , where represents the spectral intensity vector after normalization processing, represents the original spectral intensity vector, represents taking the minimum / maximum value of the spectral vector.
[0025] Embodiment 3 This embodiment is a further limitation of Embodiment 1.
[0026] The decomposition parameters of wavelet denoising are specifically: Wavelet basis: Daubechies5 (permissible range db3 - db10); Decomposition level: 6 levels (permissible range 5 - 8 levels).
[0027] The threshold processing of wavelet denoising is specifically as follows: The SURE (Stein's Unbiased Risk Estimate) threshold method is used for threshold processing: ; Among them, represents the wavelet coefficient threshold of the th layer; : The standard deviation of the noise of this layer (estimated by Median Absolute Deviation); : The number of detail coefficients of the th layer.
[0028] The specific improvement of the SNV correction method is: introducing a baseline protection factor , , among which, represents the wavenumber position of the spectrum, unit: , and the value range is consistent with the collected spectrum range, represents the permissible range, and the value range is 0.1 - 0.3, represents the central wavenumber of the characteristic peak concentration region, represents the standard deviation of the wavenumber distribution of the characteristic peak region. After introducing the baseline protection factor , the correction formula of the improved SNV correction method is: ; among which, represents the spectral intensity value after the improved SNV correction, represents the absorbance value of the spectrum at , and are the mean and standard deviation of the spectral vector respectively.
[0029] Example 4, This example further limits Example 1. The specific dynamic feature screening is as follows: S31. By the variable projection importance analysis method, quantify the contribution degree of each variable to the classification model, denoted as ; The variable represents the spectral intensity value of a single wavenumber point of the noise-reduced and corrected spectrum; For example, for the spectral range 4000 - 600 (step size 2 ), then there are 1701 variables ( Corresponding to 4000 , Corresponding to 600 ).
[0030] S32. Perform dynamic threshold calculation using a sliding window, and obtain the threshold of the current window through the dynamic threshold function , where , represents the central wavenumber value of the th window, with the unit of . Among them and represent the permitted range, , ; For example, in the th window, if the window range is 1700 - 1650 , then = 1675 . The sliding window is applied to the noise reduction and correction spectral number axis. A variable corresponds to a . Through the dynamic threshold at the central wavenumber of the current window, all variables within this window are screened out .
[0031] S33. Perform dynamic feature screening through collinearity elimination, and set the conditions for retaining variables: Condition 1: > and + Condition 2: The correlation coefficient of adjacent variables , and the variables are screened; Among them, represents the peak significance at the th wavenumber point, represents the standard deviation of the noise region, , represents the normalized spectral intensity value at the th wavenumber point, represents the average spectral intensity of the baseline region.
[0032] Example 5 This example further limits Example 1. In step S4, the training set and the validation set are constructed by optimizing the feature subset. Each classification model is trained using the training set, and the weights of each classification model are adjusted using the validation set when adjusting the dynamic weight set. The prediction results of each classification model are decision - fused through the weights of each classification model to obtain the final rice origin identification result.
[0033] Such as Figure 2As shown, the classification model set includes an SVM model, an RF model, a LightGBM model, and a 1D-CNN model.
[0034] The optimization objective function is defined as: ; : The macro F1-score of the validation set (range 0-1); : The time taken for a single training (seconds), is its coefficient; : The model complexity penalty term, is its coefficient, and the calculation formula is: ; : The number of support vectors of the support vector machine; : The number of decision trees in the random forest; N: The number of samples in the training set; Dataset: The rice spectral data of 12 production areas in Jilin Province (N = 1200, training set: validation set: test set = 7:1.5:1.5); The number of optimization iterations: 50 times.
[0035] The optimization parameter trajectory is shown in Table 1: Table 1:
[0036] The comparison of the optimal parameter performance is shown in Table 2: Table 2:
[0037] When training the SVM model, it is as follows: [[ID=5)) Input: All features of the training set; Kernel function: RBF (Radial Basis Function) kernel function; Regularization parameter: , whose role is to balance the classifier complexity and the training error tolerance. If the kernel function is too large ( ): It strictly fits the training data and may overfit. If the kernel function is too small ( ): It allows more misclassifications and improves generalization; Kernel function width parameter : , whose role is to control the distribution of data mapped to the high-dimensional space. If the kernel function width parameter is too large ( ): The influence range of a single sample is small and the decision boundary is complex. If the kernel function width parameter is too small ( ): A single sample has a large influence range, and the decision boundary is smooth.
[0038] When training the RF model, the specific steps are as follows: Input: All features of the training set. Before input, all features of the training set are compressed to 50 dimensions using PCA (the permitted range is 30 - 70 dimensions); Parameters: Number of trees = 100 (the permitted range is 50 - 200), maximum depth = 15 (the permitted range is 10 - 20).
[0039] When training the LightGBM model, the specific steps are as follows: Input: All features of the training set; Parameters: Number of leaves = 128, learning rate = 0.05.
[0040] When training the 1D - CNN model, the specific steps are as follows: Input: The spectrogram after standardization; Structure: From input to output, it is successively: 3 convolutional layers (kernel size is 5), max - pooling, and fully - connected layers. When adjusting the dynamic weights of each classification model using the validation set, the weights of each classification model are specifically: By the weight calculation formula Adjust the weights of each classification model, where represents the dynamic weight of the th branch model, represents the macro F1 - score of the th branch model on the validation set, and 1.5 represents the weight adjustment index, which is used to amplify the contribution of the model with a high F1 - score.
[0041] Make a decision fusion on the prediction results of each classification model through the weights of each classification model to obtain the final rice origin identification result, through: implemented, represents the final predicted origin category label, represents selecting from rice origin categories for identification, represents the th branch model's prediction probability for the rice origin category , [[ID=(50)]] represents taking the category that makes the weighted probability sum the largest .
[0042] Example 6, This example further limits Example 1. To accelerate the output of the prediction result, the model training can be carried out using the GPU - accelerated method, such as Figure 1As shown, parallelization is performed using the MATLAB 2023a Bayesian Optimization Toolbox, and the specific parameters are as follows: Dataset: Rice spectral data from 12 production areas in Jilin Province (N = 1200, training set: validation set: test set = 7:1.5:1.5) Number of sample blocks: ( is the total number of samples); Number of threads: 80% of the maximum number of GPU threads (permissible range 70 - 90%); If the maximum output probability < 0.7, trigger the manual review process and record low-confidence samples for model iteration.
[0043] Objective function: ; Based on the global optimization in Example 5, the time penalty coefficient is verified separately for its impact on efficiency - accuracy. In Example 6, by refining the efficiency penalty term in the objective function, the energy efficiency ratio (F1 / Time) of the global optimization result in Example 5 is further improved. The discrimination of the combined model in adjacent production areas will be further enhanced.
[0044] The specific implementation effects verified through examples are shown in Table 3: Table 3:
[0045] In addition, the technical advantages of the present invention are as follows: For the first time, a double breakthrough in the feature retention rate (98.2%) and noise reduction effect (SNR ≥ 35 dB) in mid-infrared spectrum processing is achieved; the capture rate of key discriminant features (such as the amide II band at 1580 cm⁻¹) is increased to 99.3% by dynamic VIP screening; the robustness of the hybrid model to differences in spectrometer models is significantly enhanced (the accuracy fluctuation across devices < 1.5%).
Claims
1. A method for identifying the origin of rice based on dynamic feature screening and weighted integration model, characterized in that The method includes the following steps: S1. Collect the spectra of rice flour samples using a mid-infrared spectrometer equipped with an ATR accessory, and perform spectral normalization processing; S2. Use wavelet denoising and an improved SNV correction method to denoise and correct the spectra after normalization processing to obtain denoised and corrected spectra; S3. Perform dynamic feature screening on the denoised and corrected spectra to obtain an optimized feature subset with low redundancy and high independence; S4. Through the optimized feature subset, integrate several classification models into a multi-level hybrid classification model in the form of a dynamic weight set; S5. Use the multi-level hybrid classification model to identify the origin of rice flour samples.
2. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 1, wherein The spectral normalization process is carried out by: wherein, represents the spectral intensity vector after normalization processing, represents the original spectral intensity vector, represents taking the minimum / maximum value of the spectral vector.
3. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 2, wherein The specific improvement of the SNV correction method is as follows: a baseline protection factor is introduced into the SNV correction method , , where represents the wavenumber position of the spectrum, unit: , and the value range is consistent with the collected spectrum range, represents the permission range, and the value range is 0.1 - 0.3, represents the central wavenumber of the characteristic peak concentration region, represents the standard deviation of the wavenumber distribution in the characteristic peak region. After introducing the baseline protection factor , the correction formula of the improved SNV correction method is: ; where represents the spectral intensity value after the improved SNV correction, represents the absorbance value of the spectrum at , and are the mean and standard deviation of the spectral vector respectively.
4. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 3, characterized in that The specific dynamic feature screening is as follows: S31. Quantify each variable through the variable projection importance analysis method, and denote it as the contribution degree to the classification model; The variable represents the spectral intensity value of a single wavenumber point of the noise-reduced and corrected spectrum; S32. Perform dynamic threshold calculation using a sliding window, and obtain the threshold of the current window through a dynamic threshold function obtain the threshold of the current window , denote the central wave value of the th window, where and denote the allowable range, , ; S33. Perform dynamic feature screening through collinearity elimination, and set the conditions for retaining variables: Condition 1: > and + Condition 2: The correlation coefficient of adjacent variables , and screen the variables; Among them, represents the peak significance at the th wavenumber point, represents the standard deviation of the noise region, , represents the normalized spectral intensity value at the th wavenumber point, represents the average spectral intensity of the baseline region.
5. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 4, wherein In step S4, construct a training set and a validation set through the optimized feature subset, use the training set to train each classification model, use the validation set to adjust the weights of each classification model when adjusting the dynamic weight set, and make a decision fusion on the prediction results of each classification model through the weights of each classification model to obtain the final identification result of the rice origin.
6. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 5, wherein The classification model set includes an SVM model, an RF model, a LightGBM model, and a 1D-CNN model.
7. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 6, wherein, When training the SVM model, input all the features of the training set; When training the RF model, input all the features of the training set, and compress all the features of the training set to 50 dimensions using PCA before input; when training the LightGBM model, input all the features of the training set; When training the 1D-CNN model, input the spectra after normalization processing.
8. The rice origin identification method based on dynamic feature screening and weighted integration model according to claim 7, characterized in that, The specific method of using the validation set to adjust the weights of each classification model in the dynamic weight set is: through the weight calculation formula Adjust the weights of each classification model, where, represents the dynamic weight of the -th branch model, represents the macro of the -th branch model on the validation set, and 1.5 represents the weight adjustment index.
9. The rice origin identification method based on the dynamic feature screening and weighted integration model according to claim 8, wherein Making a decision fusion on the prediction results of each classification model through the weights of each classification model to obtain the final rice origin identification result, by: implemented represents the origin category label of the final prediction represents selecting from rice origin categories for identification represents the th branch model's prediction probability for the rice origin category represents taking the category that makes the weighted probability sum the largest .
Citation Information
Patent Citations
Traceable method for rice origin and application thereof
CN105021562A
Method and system for identifying geology of traditional Chinese medicinal materials and computer readable medium
CN114624207A
Feature extraction method, model training method, detection method of fruit spectrum
US20230083101A1
Soil organic matter prediction method and apparatus based on nonlinear memory-based learning and spectroscopy
WO2025035633A1
Cited By
Fuel damage monitoring analysis method and system, computer equipment and storage medium
CN121858948A
Soybean producing area traceability detection method based on near infrared spectrum technology
CN122016714A