Method for carrying out corn quality seed selection by using hyperspectral imaging technology

Through hyperspectral imaging technology combined with continuous wavelet transformation, spectral quality fusion and adaptive optimization model, the problems of multi-dimensional quality feature recognition and grading of corn grains are solved, and the precise grading and automated seed selection of corn grains are achieved.

CN120468040APending Publication Date: 2025-08-12QINGDAO AGRI UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510736363.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing hyperspectral imaging technology cannot accurately identify the multi-dimensional quality characteristics of corn grains and perform accurate grading, resulting in limited development of automated seed selection technology.

Method used

The spectral scanning is performed using hyperspectral imaging equipment, baseline drift and noise interference are removed through a continuous wavelet transformation algorithm, feature peak distribution matrix and quality correlation matrix are constructed, and multi-dimensional quality evaluation is performed using spectral quality fusion function and adaptive spectral feature optimization model, and quality level determination is achieved in combination with the support vector machine classification model.

Benefits of technology

It significantly improves the extraction accuracy and accuracy of the multi-dimensional quality characteristics of corn grains and the determination of quality grades, and realizes the precise grading and automated seed selection of corn grains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120468040A_ABST
    Figure CN120468040A_ABST
Patent Text Reader

Abstract

The invention provides a method for carrying out corn quality seed selection by using a hyperspectral imaging technology, and belongs to the technical field of corn quality seed selection. Corn kernels are subjected to spectrum scanning in a wavelength range of 400nm to 2500nm, spectrum data are preprocessed through a continuous wavelet transform algorithm, baseline drift and noise interference are removed, and a high-quality seed selection result is obtained. And accurately extracting spectral characteristic peaks of protein, starch, grease and moisture. And establishing a characteristic peak distribution matrix to record peak intensity distribution, and calculating a characteristic peak intensity weight coefficient and a position offset. And constructing a characteristic peak quality incidence matrix, establishing a numerical mapping relationship between the spectral characteristics and the quality parameters, and obtaining a peak width parameter and a spectral noise level. The spectral quality fusion function is adopted to process the multi-dimensional characteristic parameters, and the comprehensive quality evaluation index and the single quality evaluation index are calculated, so that the technical problem that the multi-dimensional quality characteristics of the corn kernels cannot be accurately identified and accurately graded is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of corn quality selection, and specifically relates to a method for corn quality selection using hyperspectral imaging technology. Background Art

[0002] In the field of agricultural germplasm resource evaluation, corn quality selection is a key technical step in improving germplasm purity and yield. Traditional corn quality testing relies primarily on chemical analysis methods, such as measuring the protein, starch, oil, and moisture content of kernels using near-infrared spectroscopy or analyzing fatty acid composition using gas chromatography, combined with observation of physical properties for comprehensive evaluation. Hyperspectral imaging technology, an emerging non-destructive testing method, can simultaneously acquire spatial and spectral information and is widely used in food quality testing, including fruit and vegetable maturity testing, meat freshness evaluation, and grain quality analysis.

[0003] However, existing hyperspectral detection technology has significant defects in corn kernel quality evaluation. First, the spectral data preprocessing method is single and cannot effectively remove baseline drift and noise interference, resulting in inaccurate characteristic peak extraction. Secondly, the existing method lacks a comprehensive fusion mechanism for the spectral characteristics of multiple quality components and can only perform quantitative analysis of a single component. In addition, traditional classification algorithms have limited recognition capabilities for complex spectral features and cannot achieve accurate grading of multidimensional quality parameters. These technical limitations make it difficult for existing hyperspectral detection methods to accurately identify multidimensional quality characteristics such as protein, starch, oil and moisture in corn kernels, and it is even more impossible to achieve accurate quality grade division based on these characteristics, which seriously restricts the development and application of automated seed selection technology. In other words, there is a technical problem in the existing technology that hyperspectral imaging technology cannot accurately identify the multidimensional quality characteristics of corn kernels and perform accurate grading. Summary of the Invention

[0004] In view of this, the present invention provides a method for corn quality selection using hyperspectral imaging technology, which can solve the technical problem in the prior art that hyperspectral imaging technology cannot accurately identify the multidimensional quality characteristics of corn kernels and perform accurate grading.

[0005] The present invention is implemented as follows: the present invention provides a method for corn quality selection using hyperspectral imaging technology, comprising: using a hyperspectral imaging device to perform spectral scanning on corn kernels to be tested, obtaining spectral reflectance data covering a wavelength range of 400nm to 2500nm, and forming a corn kernel spectral data matrix; preprocessing the corn kernel spectral data matrix using a continuous wavelet transform algorithm to remove baseline drift and noise interference, and extracting protein spectral characteristic peaks, starch spectral characteristic peaks, oil spectral characteristic peaks, and moisture spectral characteristic peaks; establishing a characteristic peak distribution matrix, recording the peak intensity of each characteristic peak at different wavelength positions, and calculating a characteristic peak intensity weight coefficient and a characteristic peak position offset; constructing a characteristic peak quality correlation matrix, and establishing a numerical mapping relationship between each characteristic peak and a corn quality parameter; processing the peak intensity, characteristic peak position offset, peak width parameter, spectral noise level, and kernel sample quantity using a spectral quality fusion function, calculating a comprehensive quality evaluation index and a single quality evaluation index, and dynamically adjusting each characteristic peak using an adaptive spectral feature optimization model; establishing a support vector machine classification model for quality grade classification; and determining the quality grade of new corn kernels to be selected, thereby completing an automated seed selection process.

[0006] Among them, the characteristic peak distribution matrix is specifically a two-dimensional numerical matrix that records the peak intensity distribution law of protein spectrum characteristic peaks, starch spectrum characteristic peaks, oil spectrum characteristic peaks and moisture spectrum characteristic peaks in the wavelength dimension. The rows represent different grain samples and the columns represent the wavelength positions.

[0007] The characteristic peak intensity weight coefficient is specifically a weight value calculated based on the numerical distribution of the peak intensity in the characteristic peak distribution matrix, and is used to adjust the contribution of different peak intensities to the quality evaluation.

[0008] The characteristic peak position offset is specifically the deviation value of the actual wavelength position of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak relative to the standard wavelength position.

[0009] The characteristic peak quality correlation matrix is a numerical matrix that establishes the quantitative relationship between peak intensity and corn quality parameters, and the correlation coefficient is determined by regression analysis.

[0010] The peak width parameter is specifically the wavelength width value of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak at half peak height.

[0011] The spectral quality fusion function is used to convert peak intensity, characteristic peak position offset, peak width parameter, spectral noise level and grain sample quantity into standardized quality evaluation values.

[0012] The comprehensive quality evaluation index is specifically a comprehensive value of the fused protein content, starch content, oil content and moisture content information output by the spectral quality fusion function.

[0013] The individual quality evaluation index is specifically a numerical evaluation result output by the spectral quality fusion function, which is independently calculated for the four quality indicators of protein, starch, oil and moisture.

[0014] The structure of the adaptive spectral feature optimization model is a multi-layer perceptron architecture based on residual connections, which includes an input feature mapping layer, three hidden processing layers, a gated fusion adjustment layer and an output prediction layer.

[0015] The spectral noise level is specifically the ratio of the signal intensity to the background noise intensity in the corn kernel spectral data matrix.

[0016] Among them, the hierarchical fusion weight parameters of the gated fusion adjustment layer are automatically determined by the gated weight function according to three parameters: the coefficient of variation of the spectral characteristic peak intensity, the characteristic peak signal-to-noise ratio and the batch size of the grain sample.

[0017] The coefficient of variation of the spectral characteristic peak intensity is specifically the ratio of the standard deviation to the mean of the peak intensity among different grain samples.

[0018] The characteristic peak signal-to-noise ratio is specifically the ratio of the peak intensity to the spectral noise level.

[0019] Among them, the gating weight function is used to adjust the hierarchical fusion weight parameters of the gated fusion adjustment layer, and the spectral data quality balance value is calculated based on the spectral characteristic peak intensity variation coefficient, characteristic peak signal-to-noise ratio, grain sample batch size and spectral baseline stability.

[0020] The spectral baseline stability is specifically the standard deviation value of the baseline signal in the corn kernel spectral data matrix.

[0021] The present invention effectively solves the key defects of the existing technology by constructing an adaptive spectral feature optimization model and a multi-dimensional quality fusion evaluation system. The method uses a continuous wavelet transform algorithm to perform deep preprocessing on the spectral data, which can accurately remove baseline drift and noise interference, and significantly improve the extraction accuracy of the spectral characteristic peaks of key quality components such as protein, starch, oil and moisture. In response to the problem that the existing technology lacks a comprehensive fusion mechanism, the present invention establishes a characteristic peak quality correlation matrix and a spectral quality fusion function, organically integrates the spectral information of multiple quality components, and realizes a comprehensive quantitative evaluation of grain quality by calculating the characteristic peak intensity weight coefficient and position offset. The adaptive spectral feature optimization model adopts a multi-layer perceptron architecture based on residual connection, combined with a gated fusion adjustment mechanism, which can dynamically adjust the importance weight of each characteristic peak according to the quality of spectral data, significantly enhancing the model's recognition ability for complex spectral features. The introduction of the support vector machine classification model further improves the accuracy of quality grade judgment. Through the dual evaluation system of comprehensive quality evaluation index and single quality evaluation index, accurate grading of corn kernel quality is achieved. In summary, the present invention solves the core technical problem that hyperspectral technology cannot accurately identify multidimensional quality characteristics and perform precise grading, and provides reliable technical support for automated corn seed selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flow chart of the method of the present invention.

[0023] Figure 2 This is a structural diagram of the adaptive spectral feature optimization model involved in the present invention.

[0024] Figure 3 It is a characteristic peak diagram of the present invention; it includes four sub-diagrams, namely (a) protein spectrum characteristic peak, (b) starch spectrum characteristic peak, (c) oil spectrum characteristic peak and (d) moisture spectrum characteristic peak. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0026] like Figure 1 FIG. 1 is a flow chart of a method for selecting corn quality using hyperspectral imaging technology provided by the present invention. The method comprises the following steps:

[0027] S01. Using a hyperspectral imaging device to perform spectral scanning on the corn kernels to be tested, obtaining spectral reflectance data covering a wavelength range of 400 nm to 2500 nm, and forming a corn kernel spectral data matrix;

[0028] S02, preprocessing the corn kernel spectral data matrix by a continuous wavelet transform algorithm to remove baseline drift and noise interference, and extracting protein spectral characteristic peaks, starch spectral characteristic peaks, oil spectral characteristic peaks, and moisture spectral characteristic peaks;

[0029] S03, establishing a characteristic peak distribution matrix, recording the peak intensity of each protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and water spectrum characteristic peak at different wavelength positions, and calculating the characteristic peak intensity weight coefficient and characteristic peak position offset;

[0030] S04, constructing a characteristic peak quality correlation matrix, establishing a numerical mapping relationship between the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak, and moisture spectrum characteristic peak and corn quality parameters, and obtaining peak width parameters and spectral noise levels;

[0031] S05. Processing the peak intensity, characteristic peak position offset, peak width parameter, spectral noise level, and grain sample quantity through a spectral quality fusion function to calculate a comprehensive quality evaluation index and a single quality evaluation index, and dynamically adjusting the protein spectral characteristic peak, starch spectral characteristic peak, oil spectral characteristic peak, and moisture spectral characteristic peak using an adaptive spectral feature optimization model;

[0032] S06. Establishing a support vector machine classification model, using the comprehensive quality evaluation index and the individual quality evaluation index as input features, and training a corn quality grade classifier;

[0033] S07. Repeat steps S01 to S05 for new corn kernels to be selected to obtain the comprehensive quality evaluation index and the individual quality evaluation index, input the trained support vector machine classification model to perform quality grade determination, and complete the automated seed selection process.

[0034] Among them, the protein spectral characteristic peaks are specifically the spectral absorption peaks produced by protein molecules in corn kernels at wavelengths of 1940nm, 2180nm and 2300nm, which reflect the protein content level of the kernels.

[0035] Among them, the characteristic peaks of starch spectrum are specifically the spectral absorption peaks produced by starch molecules in corn kernels at wavelengths of 1450nm, 1930nm and 2100nm, which are used to characterize the distribution of starch content in the kernels.

[0036] Among them, the characteristic peaks of the oil spectrum are specifically the spectral absorption peaks produced by the fat molecules in the corn kernels at wavelengths of 1210nm, 1720nm and 2310nm, indicating the oil content of the kernels.

[0037] Among them, the characteristic peaks of the moisture spectrum are specifically the spectral absorption peaks produced by water molecules in corn kernels at wavelengths of 970nm, 1190nm and 1940nm, which reflect the moisture content level of the kernels.

[0038] Among them, the characteristic peak distribution matrix is specifically a two-dimensional numerical matrix that records the peak intensity distribution law of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak in the wavelength dimension. The rows represent different grain samples and the columns represent the wavelength positions.

[0039] The characteristic peak intensity weight coefficient is specifically a weight value calculated according to the numerical distribution of the peak intensity in the characteristic peak distribution matrix, and is used to adjust the contribution of different peak intensities to the quality evaluation.

[0040] The characteristic peak position offset is specifically the deviation value of the actual wavelength position of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak relative to the standard wavelength position.

[0041] The characteristic peak quality correlation matrix is specifically a numerical matrix that establishes the quantitative relationship between the peak intensity and the corn quality parameters, and the correlation coefficient is determined by regression analysis.

[0042] The peak width parameter is specifically the wavelength width value of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak at half peak height.

[0043] The spectral noise level is specifically the ratio of the signal intensity to the background noise intensity in the corn kernel spectral data matrix.

[0044] The number of kernel samples refers to the total number of individual corn kernels involved in the spectral scanning.

[0045] Among them, the spectral quality fusion function is used to convert the peak intensity, characteristic peak position offset, peak width parameter, spectral noise level and grain sample quantity into standardized quality evaluation values. The input includes the peak intensity, characteristic peak position offset, peak width parameter, spectral noise level and grain sample quantity, and the output is the comprehensive quality evaluation index and the single quality evaluation index.

[0046] The comprehensive quality evaluation index is specifically a comprehensive value of the fused protein content, starch content, oil content and moisture content information output by the spectral quality fusion function.

[0047] The individual quality evaluation index is specifically a numerical evaluation result output by the spectral quality fusion function, which is independently calculated for the four quality indicators of protein, starch, oil and moisture.

[0048] Among them, the structure of the adaptive spectral feature optimization model is a multi-layer perceptron architecture based on residual connection, which includes an input feature mapping layer, three hidden processing layers, a gated fusion adjustment layer and an output prediction layer. The model adopts a hierarchical fusion weight mechanism to dynamically adjust the importance weights of the protein spectral characteristic peaks, starch spectral characteristic peaks, oil spectral characteristic peaks and moisture spectral characteristic peaks. The hierarchical fusion weight parameters of the gated fusion adjustment layer are automatically determined by the gated weight function according to the three parameters of the spectral characteristic peak intensity variation coefficient, the characteristic peak signal-to-noise ratio and the grain sample batch size.

[0049] The coefficient of variation of the spectral characteristic peak intensity is specifically the ratio of the standard deviation of the peak intensity among different grain samples to the mean.

[0050] The characteristic peak signal-to-noise ratio is specifically the ratio of the peak intensity to the spectral noise level.

[0051] The kernel sample batch size refers to the number of corn kernel samples processed in a single process.

[0052] The hierarchical fusion weight parameter is specifically a weight value used to adjust the importance of features at different levels in the gated fusion adjustment layer.

[0053] Among them, the steps of establishing a training data set for the adaptive spectral feature optimization model include collecting corn kernel samples of different varieties and different maturity levels for hyperspectral scanning to obtain original spectral data, determining the protein content, starch content, oil content and moisture content of each sample as the true label value through chemical analysis methods, preprocessing the spectral data to extract the protein spectral characteristic peak, starch spectral characteristic peak, oil spectral characteristic peak and moisture spectral characteristic peak information, constructing training sample pairs containing the peak intensity, characteristic peak position offset, peak width parameters and corresponding quality labels, and dividing the data set according to the training set, validation set and test set ratio of 7:2:1.

[0054] Among them, the training steps of the adaptive spectral feature optimization model include initializing the model parameters and setting the Adam optimizer with a learning rate of 0.001, using the mean square error loss function to calculate the difference between the predicted quality evaluation index and the true label, updating the model weight parameters through the back propagation algorithm, using the early stopping mechanism to monitor the validation set loss to avoid overfitting, and using the learning rate decay strategy to reduce the learning rate in the later stage of training to improve convergence stability.

[0055] Among them, the gating weight function is used to adjust the hierarchical fusion weight parameters of the gated fusion adjustment layer, and the spectral data mass balance value is calculated based on four data: the coefficient of variation of the spectral characteristic peak intensity, the characteristic peak signal-to-noise ratio, the grain sample batch size and the spectral baseline stability. When the spectral data mass balance value is in the range of 0.8 to 1.0, a linear increasing weight adjustment function is adopted; when the spectral data mass balance value is in the range of 0.5 to 0.8, a uniform distribution weight adjustment function is adopted; when the spectral data mass balance value is in the range of 0.2 to 0.5, a robust weight adjustment function is adopted; and when the spectral data mass balance value is lower than 0.2, a conservative weight adjustment function is adopted.

[0056] The spectral baseline stability is specifically the standard deviation value of the baseline signal in the corn kernel spectral data matrix.

[0057] The spectral data quality balance value is specifically a comprehensive evaluation value calculated by the gated weight function based on the coefficient of variation of the spectral characteristic peak intensity, the characteristic peak signal-to-noise ratio, the batch size of the grain sample and the spectral baseline stability.

[0058] Among them, the linear increasing weight adjustment function is specifically a weight calculation method used by the gated weight function when the mass balance value of the spectral data is in the range of 0.8 to 1.0, which is used to increase the contribution weight of high-quality characteristic peaks.

[0059] The uniform distribution weight adjustment function is specifically a weight calculation method used by the gated weight function when the mass balance value of the spectral data is in the range of 0.5 to 0.8, and is used to balance the weight distribution of each characteristic peak.

[0060] Among them, the robust weight adjustment function is specifically a weight calculation method used by the gated weight function when the mass balance value of the spectral data is in the range of 0.2 to 0.5, which is used to reduce the influence of noise characteristic peaks and enhance the weight of stable characteristic peaks.

[0061] Among them, the conservative weight adjustment function is specifically a weight calculation method used by the gated weight function when the mass balance value of the spectral data is lower than 0.2, which is used to significantly reduce the weights of all characteristic peaks and enable a data quality warning mechanism.

[0062] The specific implementation of the above steps is described in detail below.

[0063] The specific implementation of step S01 is to perform full-band spectral scanning and acquisition of corn kernels using a hyperspectral imaging device. First, the corn kernels to be tested are evenly arranged on the scanning platform, ensuring that the distance between kernels is at least 5 mm to avoid spectral interference. The hyperspectral camera is then activated for line-by-line scanning, with a scanning speed set to 10 lines per second and a spectral resolution of 2.5 nm. Continuous spectral data is collected within the wavelength range of 400 nm to 2500 nm. The system automatically records the spectral reflectance value corresponding to each pixel point, forming a three-dimensional spectral data cube, where the spatial dimension corresponds to the two-dimensional position coordinates of the kernel, and the spectral dimension corresponds to the reflectance intensity at different wavelengths. Ultimately, a corn kernel spectral data matrix containing kernel position information and spectral feature information is constructed.

[0064] The specific implementation of step S02 is to use a continuous wavelet transform algorithm to preprocess and extract features from the raw spectral data. First, the Mexican hat wavelet is selected as the mother wavelet function, and the scale parameter range is set to 1 to 128. The spectral data matrix is subjected to multi-scale decomposition, and the significant peak positions in the spectrum are identified by the local maximum detection method of the wavelet coefficient. Then, wavelet denoising technology is used to remove high-frequency noise components, retaining effective spectral information with wavelengths greater than 10nm, and a baseline correction algorithm is used to eliminate spectral baseline drift. According to the spectral absorption characteristics of biomolecules, the spectral characteristic peaks of protein, starch, oil and water are extracted within a preset wavelength range. Among them, the protein characteristic peak is located near 1940nm, 2180nm and 2300nm, the starch characteristic peak is located near 1450nm, 1930nm and 2100nm, the oil characteristic peak is located near 1210nm, 1720nm and 2310nm, and the water characteristic peak is located near 970nm, 1190nm and 1940nm.

[0065] The specific implementation method of step S03 is to construct a numerical matrix that describes the distribution law of characteristic peaks. First, a two-dimensional characteristic peak distribution matrix is established with grain samples as rows and wavelength positions as columns, and the peak intensity value of each characteristic peak at the corresponding wavelength position is recorded. Then the characteristic peak intensity weight coefficient is calculated. By normalizing the peak intensity, the intensity value is mapped to the range of 0 to 1 using the maximum and minimum value standardization method. The weight coefficient is determined according to the relative position of the intensity value in the overall distribution. The larger the intensity value, the higher the corresponding weight coefficient. At the same time, the characteristic peak position offset is calculated. The wavelength difference between the actual detected peak position and the standard position is measured based on the standard reference wavelength. The calculation accuracy of the offset is set to 0.1nm. When the offset exceeds 5nm, it is marked as abnormal data and needs to be remeasured.

[0066] The specific implementation method of step S04 is to establish a quantitative relationship model between spectral characteristics and quality parameters through regression analysis. First, corn kernel samples with known quality parameters are collected as standard samples, and the true values of protein content, starch content, oil content and moisture content of each sample are determined by chemical analysis method. Then the spectral characteristic peak parameters of these standard samples are extracted, including peak intensity, peak position and peak width, and a multiple linear regression algorithm is used to establish a mathematical mapping relationship between characteristic peak parameters and quality parameters. The peak width parameter is obtained by measuring the wavelength width of the characteristic peak at half peak height, and the calculation accuracy is set to 0.5nm. The spectral noise level is determined by signal-to-noise ratio calculation, and the wavelength range without absorption peak is selected as the noise benchmark. The ratio of signal intensity to noise intensity is calculated. When the signal-to-noise ratio is lower than 20, it is considered that the data quality does not meet the requirements.

[0067] The specific implementation method of step S05 is to realize multi-parameter comprehensive evaluation through spectral quality fusion function. The fusion function uses a weighted summation method to convert peak intensity, characteristic peak position offset, peak width parameter, spectral noise level and grain sample quantity into a standardized evaluation index. First, each parameter is standardized to eliminate the influence of dimensional differences, and then the corresponding weight coefficient is assigned according to the importance of each parameter to the quality evaluation, where the peak intensity weight is 0.35, the position offset weight is 0.25, the peak width weight is 0.20, the noise level weight is 0.15, and the sample quantity weight is 0.05. The comprehensive quality evaluation index is calculated by weighted average of the four nutritional component indices, and the single quality evaluation index is calculated independently for protein, starch, oil and moisture. The adaptive spectral feature optimization model adopts a multi-layer perceptron with a residual connection structure, and dynamically adjusts the importance weight of each characteristic peak through a gated fusion adjustment layer.

[0068] The specific implementation method of step S06 is to construct a corn quality classification model based on a support vector machine. First, the comprehensive quality evaluation index and the single quality evaluation index are input as feature vectors, the radial basis function is set as the kernel function, the kernel function parameter is set to 0.1, the penalty parameter is set to 100, and the model hyperparameters are optimized by the grid search method. The training data set contains no less than 1,000 grain samples with marked quality grades. The quality grades are divided into four categories: excellent, good, qualified and unqualified, corresponding to evaluation index ranges of 0.8 to 1.0, 0.6 to 0.8, 0.4 to 0.6 and 0 to 0.4, respectively. The model training adopts the cross-validation method to evaluate the classification performance, requiring the classification accuracy to be no less than 85%. When the accuracy does not meet the requirements, it is necessary to adjust the feature parameters or increase the number of training samples.

[0069] The specific implementation method of step S07 is to perform a complete quality evaluation process on the new corn kernels to be selected. According to the operating procedures of steps S01 to S05, the kernels to be selected are subjected to spectral scanning, data preprocessing, feature extraction, and quality index calculation to obtain the corresponding comprehensive quality evaluation index and single quality evaluation index. The calculated evaluation index is input into the trained support vector machine classification model, and the model outputs the quality grade determination result and confidence value. When the confidence level is lower than 80%, manual review and confirmation is recommended. The system automatically records the quality grade and evaluation index of each kernel, generates a seed selection report, and realizes the automated grading and seed selection of corn kernel quality.

[0070] The adaptive spectral feature optimization model utilizes a multi-layer perceptron architecture based on residual connections, comprising an input feature mapping layer, three hidden processing layers, a gated fusion adjustment layer, and an output prediction layer. The input feature mapping layer receives raw features such as peak intensity, characteristic peak position offset, and peak width parameters, and uses linear transformations to unify the feature dimensions to 128 dimensions. The three hidden processing layers contain 256, 512, and 256 neurons, respectively. Each layer utilizes a rectified linear unit activation function and batch normalization techniques, with residual connections between layers to prevent vanishing gradients. The gated fusion adjustment layer employs an attention mechanism to dynamically adjust the importance weights of different characteristic peaks. The weight parameters are automatically determined through a gated weight function based on the coefficient of variation of the spectral characteristic peak intensity, the characteristic peak signal-to-noise ratio, and the batch size of the grain sample. The output prediction layer contains four neurons that output quality evaluation indices for protein, starch, oil, and moisture, respectively.

[0071] The steps for establishing the training data set include four stages: sample collection, chemical analysis, spectral acquisition, and data preprocessing. In the sample collection stage, a total of 5,000 corn kernel samples were collected from different origins, different varieties, and different harvest periods to ensure the representativeness and diversity of the samples. In the chemical analysis stage, the Kjeldahl method was used to determine the protein content, the iodine colorimetry method was used to determine the starch content, the Soxhlet extraction method was used to determine the oil content, and the drying method was used to determine the moisture content. Each sample was measured three times in parallel and the average value was taken as the true label. In the spectral acquisition stage, all samples were hyperspectrally scanned to collect complete spectral data in the wavelength range of 400nm to 2500nm. In the data preprocessing stage, various characteristic peak information was extracted to construct training sample pairs containing spectral features and quality labels. The training set, validation set, and test set were divided into training set, validation set, and test set in a ratio of 7:2:1.

[0072] Characteristic peaks were identified through comparative experiments with reference materials. Protein characteristic peaks were identified through spectral scanning of pure protein powder, with distinct absorption peaks observed at 1940 nm, 2180 nm, and 2300 nm, corresponding to the harmonic and summed absorption of amide bonds in protein molecules. Starch characteristic peaks were identified through spectral analysis of pure starch samples, with characteristic absorption peaks detected at 1450 nm, 1930 nm, and 2100 nm, reflecting the vibrational absorption of C-H and OH bonds in starch molecules. Oil characteristic peaks were determined through near-infrared spectroscopy of vegetable oil samples, with characteristic absorption peaks of fat molecules detected at 1210 nm, 1720 nm, and 2310 nm, corresponding to the stretching vibration of C-H bonds in fatty acid chains. Moisture characteristic peaks were identified through comparative experiments with samples of varying moisture contents, with characteristic absorption peaks of water molecules observed at 970 nm, 1190 nm, and 1940 nm, corresponding to different vibrational modes of the OH bond in water molecules. The positions of these characteristic peaks were verified by comparison with a standard spectral database to ensure accurate and reproducible identification.

[0073] Specifically, to obtain various characteristic peaks, it is first necessary to establish a complete standard material control experimental system, and determine the characteristic absorption position of each nutrient in the near-infrared spectrum through systematic experimental design. During the experimental preparation stage, it is necessary to purchase analytically pure standard substances, including protein standards such as casein and gluten, starch standards such as corn starch and potato starch, vegetable oil standards such as corn germ oil and soybean oil, and deionized water as a moisture standard. In order to simulate the actual matrix environment of corn kernels, it is also necessary to prepare corn matrix materials that do not contain target ingredients, and remove protein, starch, oil and water separately through chemical extraction methods to obtain a relatively pure cellulose matrix. During the experiment, a precision electronic balance was used to prepare standard samples with different concentration gradients. The protein content was set at five concentration levels of 5%, 10%, 15%, 20%, and 25%, the starch content was set at five concentration levels of 30%, 40%, 50%, 60%, and 70%, the oil content was set at five concentration levels of 2%, 4%, 6%, 8%, and 10%, and the moisture content was set at five concentration levels of 10%, 15%, 20%, 25%, and 30%. Three parallel samples were prepared for each concentration level to ensure the reproducibility and statistical significance of the experimental results.

[0074] Characteristic protein peaks were obtained by mixing a pure protein standard with a corn matrix. First, analytically pure casein powder and deproteinized corn matrix were uniformly mixed in a predetermined mass ratio and ground in an agate mortar to a fine powder with a particle size of less than 100 μm to ensure uniform distribution of the components. The mixed sample was then dried in a constant-temperature drying oven at 60°C for 24 hours to remove excess moisture introduced during sample preparation. After equilibration at room temperature for 2 hours, a hyperspectral scan was performed. Spectral comparison of samples with varying protein contents revealed a distinct absorption peak at 1940 nm, corresponding to the second harmonic absorption of the NH stretching vibration of the amide group in the protein molecule. The peak intensity exhibited a good linear relationship with protein content, with a correlation coefficient exceeding 0.95. Another characteristic absorption peak was observed at 2180 nm, attributable to the combined absorption of the C=O stretching and NH bending vibrations of the amide bond in the protein molecule. This peak is sensitive to changes in protein structure and can reflect protein secondary structure information. A third protein characteristic peak was detected at a wavelength of 2300 nm, corresponding to the complex vibration mode of the amide group. The appearance of this peak further confirmed the existence of the protein and provided supplementary information on the protein content.

[0075] The identification of starch characteristic peaks was achieved through a series of control experiments using pure starch standards. Corn starch was used as the primary standard material, and potato starch and wheat starch samples were prepared for cross-validation to ensure the universality and reliability of the identified characteristic peaks. Different types of starch powder were mixed with a corn matrix from which the starch had been removed in a predetermined ratio and treated with ultrasonic dispersion for 30 minutes to ensure uniform distribution of starch granules within the matrix. The samples were then dried under vacuum to minimize the effects of heat treatment on the starch molecular structure. Spectral scanning results revealed a significant starch characteristic absorption peak at 1450 nm, attributed to the stretching vibration of the C-H bond within the starch molecule. The peak intensity showed a high positive correlation with starch content. Another important starch characteristic peak was observed at 1930 nm, corresponding to the stretching vibration of the hydroxyl group (OH) within the starch molecule. This peak reflects the crystallinity and degree of polymerization of the starch molecule. A third starch characteristic peak was detected at 2100 nm, attributed to the combined absorption of the C-H and C-C stretching vibrations. This peak is sensitive to the molecular weight distribution and branching structure of starch and provides important spectral information for starch quality evaluation.

[0076] The oil and moisture characteristic peaks were obtained using similar standard substance control experimental methods. The oil characteristic peak experiment used corn germ oil as the standard substance. Samples with different oil contents were prepared by solvent extraction. Characteristic absorption peaks corresponding to different vibration modes of the C-H bond in fatty acid molecules were detected at wavelengths of 1210nm, 1720nm, and 2310nm, respectively. The absorption peak at 1720nm corresponds to the stretching vibration of the C=O carbonyl group of the fatty acid and is an important marker peak for quantitative analysis of oil content. The moisture characteristic peak experiment was obtained by controlling the moisture content of the sample. Characteristic absorption peaks of the OH bond of water molecules were observed at wavelengths of 970nm, 1190nm, and 1940nm, corresponding to the different forms of free water, bound water, and structural water, respectively. The combination of these characteristic peaks can fully reflect the content and distribution of water in the sample.

[0077] The entire characteristic peak acquisition process also includes the standardization and verification of spectral data. The obtained spectral data is subjected to dimensionality reduction processing through principal component analysis to identify the wavelength range that is most sensitive to each nutrient. Then, the partial least squares regression method is used to establish a quantitative calibration model between the spectral characteristics and the chemical component content. In order to verify the accuracy and reliability of the identified characteristic peaks, an independent verification sample set is used for cross-validation, requiring that the correlation coefficient between the predicted value and the true value is not less than 0.90, and the prediction standard error is not more than twice the measurement error of the reference method. At the same time, a spectral database is established to record the precise wavelength position, peak intensity range, peak width parameters and spectral environment information of each characteristic peak, providing a reliable reference standard for subsequent spectral identification and quality analysis, ensuring the accuracy and stability of the entire corn quality detection system.

[0078] It should be noted that the first core technical idea of the present invention is the synchronous extraction technology of multi-component spectral features based on continuous wavelet transform. Traditional spectral analysis methods usually adopt a single preprocessing algorithm, such as simple smoothing filtering or first-order derivative transformation. These methods are often unable to effectively separate overlapping absorption peaks when processing complex biological sample spectra, resulting in low feature extraction accuracy. The continuous wavelet transform has good time-frequency localization characteristics and can simultaneously analyze the frequency domain and spatial domain information of spectral signals at different scales. It can effectively identify weak characteristic peaks hidden in the noise through multi-scale decomposition and accurately locate the characteristic absorption position of each component. This method can not only improve the signal-to-noise ratio, but also simultaneously extract the spectral characteristics of four key nutrients: protein, starch, oil and water, realize multi-target synchronous detection, and significantly improve the utilization efficiency of spectral information and the accuracy of feature extraction.

[0079] The second core technical idea of the present invention is to construct an adaptive spectral feature optimization model with dynamic weight adjustment. Most existing spectral analysis models use a linear combination method with fixed weights, which cannot be adaptively adjusted according to changes in sample characteristics and spectral quality. When faced with corn samples of different varieties and different maturity, the model is prone to insufficient generalization ability. The present invention adopts a multi-layer perceptron architecture based on residual connections, combined with a gated fusion adjustment mechanism, which can automatically adjust the importance weight of each feature according to quality indicators such as the coefficient of variation of spectral characteristic peak intensity, characteristic peak signal-to-noise ratio and sample batch size. This adaptive mechanism enables the model to maintain stable prediction performance under different data quality conditions, effectively solves the limitations of traditional fixed weight models in processing heterogeneous samples, and greatly improves the robustness and adaptability of the model.

[0080] The third core technical idea of the present invention is to establish a comprehensive evaluation system driven by a spectral quality fusion function. Traditional quality evaluation methods usually use a single indicator or a simple linear weighting method, which cannot fully consider the interactions and synergistic effects between the various nutrients, resulting in deviations between the evaluation results and the actual quality. The present invention uses a spectral quality fusion function to nonlinearly fuse multi-dimensional information such as peak intensity, characteristic peak position offset, peak width parameters, and spectral noise level. It not only outputs a comprehensive quality evaluation index reflecting the overall nutritional value, but also provides an independent evaluation index for each individual component, realizing a technological leap from single-dimensional evaluation to multi-dimensional comprehensive evaluation, and providing a more scientific and reliable evaluation basis for the accurate grading of corn quality.

[0081] The synergistic effect of these three core technical ideas has formed a complete intelligent corn quality evaluation technology system, which has significant technical advantages over traditional methods. Continuous wavelet transform technology provides a high-quality spectral feature data foundation for subsequent feature optimization and quality evaluation. The adaptive optimization model ensures the optimal allocation of feature weights under different conditions, and the fusion evaluation system realizes the effective integration of multi-dimensional information. The three work together not only to solve the technical bottlenecks of traditional methods in complex spectral signal processing, but also to achieve a transition from passive data processing to active intelligent analysis, and to build a new corn quality evaluation model with self-learning and adaptive capabilities, providing important technological innovations and methodological breakthroughs in the field of agricultural product quality testing.

[0082] Specifically, the principle behind this invention is that it can address the core technical issue of hyperspectral imaging technology's inability to accurately identify the multidimensional quality characteristics of corn kernels and accurately grade them. This fundamental principle lies in the construction of a comprehensive system for spectral feature extraction, fusion, and classification. Organic molecules in corn kernels, such as protein, starch, oil, and water, exhibit unique spectral absorption properties at specific wavelengths. The vibrational and rotational energy level transitions of these molecules form characteristic absorption peaks in the near-infrared spectral region. By scanning the 400nm to 2500nm wavelength range with hyperspectral imaging equipment, the spectral fingerprint information of these molecules can be captured.

[0083] The application of the continuous wavelet transform (CWT) algorithm is a key technical step in addressing spectral data quality issues. This algorithm possesses excellent time-frequency localization, enabling analysis of local signal characteristics at different scales and effectively separating useful information from noise components within the spectral signal. By convolving the wavelet basis functions with the original spectral signal, the characteristic peak positions of each quality component can be precisely located while simultaneously removing interference from baseline drift and random noise, laying the data foundation for subsequent feature extraction.

[0084] The establishment of a characteristic peak quality correlation matrix embodies the core innovation of this invention, namely, establishing a quantitative mapping between spectral physical information and chemical quality parameters. Regression analysis determines the mathematical relationship between peak intensity, peak position offset, and peak width parameters and actual quality content, effectively transforming spectral features into quality assessment. The spectral quality fusion function further standardizes and weights multidimensional feature information to generate a comprehensive quality assessment index.

[0085] The adaptive spectral feature optimization model is the core component of the present invention's technical solution. Its residual-connected multilayer perceptron architecture effectively handles the nonlinear characteristics of high-dimensional spectral data. The gated fusion adjustment layer dynamically adjusts the importance of different features using a gated weight function. The weight adjustment strategy is adaptively selected based on the spectral data quality balance, ensuring that the model maintains stable recognition performance under varying data quality conditions. The introduction of this adaptive mechanism provides the model with strong generalization and robustness.

[0086] The support vector machine classification model, the final decision-making component, utilizes a kernel function to map the low-dimensional feature space to a high-dimensional space, where it searches for the optimal separating hyperplane to accurately classify different quality grades. The entire technical solution forms a complete chain from raw spectral data to final quality grading, ensuring the achievement of the technical goals of multi-dimensional quality feature identification and precise grading.

[0087] A specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows.

[0088] In step S01, the construction of the corn kernel spectral data matrix S is specifically expressed as follows:

[0089]

[0090] Where S i,j is the spectral reflectance value of the i-th spatial pixel at the j-th wavelength; n is the total number of spatial pixels; λ is the total number of wavelength sampling points, corresponding to spectral data in the range of 400nm to 2500nm, with a typical value of 840 sampling points. Spectral reflectance S i,j Calculated by the following formula:

[0091]

[0092] Where, I sample (i, j) is the light intensity of the sample at the i-th pixel and the j-th wavelength; I reference (i, j) is the light intensity of the standard white board; I dark (i, j) is the dark current intensity.

[0093] In step S02, the mathematical expression of the continuous wavelet transform algorithm is specifically expressed as follows:

[0094]

[0095] Where W(a, b) is the wavelet transform coefficient; f(t) is the input spectral signal; ψ(t) is the mother wavelet function; ψ * (t) is the complex conjugate of the mother wavelet function; a is the scale parameter, ranging from 1 to 128; b is the translation parameter; t is the time variable. The mother wavelet function is the Mexican hat wavelet, and its expression is:

[0096]

[0097] Where t is the normalized time variable. Characteristic peak detection is achieved by identifying local maximum values, and the judgment condition is:

[0098] |W(a,b)|>θ and

[0099] Where θ is the detection threshold, which is 3 times the RMS value of the signal.

[0100] In step S03, the construction of the characteristic peak distribution matrix P is specifically expressed as follows:

[0101]

[0102] Where, P i,jis the peak intensity of the i-th grain sample at the j-th wavelength position; m is the total number of grain samples; n is the number of wavelength sampling points. Characteristic peak intensity weight coefficient w i,j The calculation process is described in detail as follows:

[0103]

[0104] Where, P max is the maximum peak intensity in the matrix P; P min is the minimum peak intensity in the matrix P. Characteristic peak position offset Δλ k The calculation expression is:

[0105] Δλ k =λ measured,k -λ standard,k ;

[0106] Where λ measured,k is the actual measured wavelength position of the kth characteristic peak; standard,k is the standard reference wavelength position of the kth characteristic peak.

[0107] In step S04, the characteristic peak quality correlation matrix Q is established by multiple linear regression, and its mathematical expression is specifically expressed as follows:

[0108] C = Q·F+E;

[0109] Where C is the quality parameter vector, including protein content, starch content, oil content, and moisture content; F is the characteristic peak parameter vector, including peak intensity, peak position offset, and peak width parameters; E is the error vector; and Q is the correlation coefficient matrix. The correlation coefficient matrix Q is solved by the least squares method:

[0110] Q=(F T F) -1 F T C;

[0111] Where, F T is the transpose of the characteristic peak parameter matrix. Peak width parameter W k The calculation expression at half peak height is:

[0112] W k =|λ r,k -λ l,k |;

[0113] Where λ r,k and λ l,k are the wavelength positions corresponding to the half-peak heights on the left and right sides of the k-th characteristic peak. The calculation process of the spectral noise level SNR is described in detail as follows:

[0114]

[0115] Where, I signal is the root mean square value of the signal strength; I noise is the RMS value of the noise intensity.

[0116] In step S05, the spectrum quality fusion function F fusion The mathematical expression of is as follows:

[0117] Q comprehensive =F fusion (P intensity , Δλ, W peak , SNR, N sample );

[0118] Q comprehensive =α1·P normalized +α2·Δλ normalized +α3·W normalized +α4·SNR normalized +α5·N normalized ;

[0119] Where Q comprehensive is the comprehensive quality evaluation index; P intensity is the peak intensity; Δλ is the characteristic peak position offset; W peak is the peak width parameter; N sample is the number of grain samples; α1, α2, α3, α4, and α5 are weight coefficients, which are 0.35, 0.25, 0.20, 0.15, and 0.05, respectively; the subscript normalized indicates the parameters that have been normalized. The calculation process of normalization is:

[0120]

[0121] Where X is the original parameter value; μ X is the mean of parameter X; σ X is the standard deviation of parameter X. Single quality evaluation index Q single,j The calculation expression is:

[0122] Q single,j =β j,1 ·P j,normalized +β j,2 ·Δλ j,normalized +β j,3 W j,normalized +ε j ;

[0123] Where, j represents the type of nutrients, including protein, starch, oil and water; β j,1 , β j,2 , β j,3is the weight coefficient corresponding to the jth component; ε j is the error term, ranging from 0.02 to 0.08.

[0124] In the adaptive spectral feature optimization model, the gating weight function G gate The mathematical expression of is as follows:

[0125] G gate =f(CV intensity , SNR peak , N batch , B.S. stability );

[0126] Where, CV intensity is the coefficient of variation of the intensity of the spectral characteristic peak; SNR peak is the characteristic peak signal-to-noise ratio; N batch is the batch size of grain samples; BS stability The spectral baseline stability. The coefficient of variation of the spectral characteristic peak intensity CV intensity The calculation process is described in detail as follows:

[0127]

[0128] Where, σ intensity is the standard deviation of the peak intensity; μ intensity is the mean of the peak intensity. Characteristic peak signal-to-noise ratio SNR peak The calculation expression is:

[0129]

[0130] Where, P peak is the characteristic peak intensity; N level is the spectral noise level. Spectral baseline stability BS stability The calculation process is:

[0131]

[0132] Where, σ baseline is the standard deviation of the baseline signal. The mass balance value Q of the spectral data balance Calculated by weighted average:

[0133] Q balance =γ1·CV intensity +γ2·SNR peak +γ3·n batch +γ4·BS stabiltiy ;

[0134] In the formula, γ1, γ2, γ3, and γ4 are weight coefficients, which are 0.3, 0.4, 0.2, and 0.1 respectively. balanceThe gating weight function adopts the piecewise function form:

[0135] When 0.8≤Q balance When ≤1.0, w gate =k1·Q balance +b1;

[0136] When 0.5≤Q balance When w<0.8, gate =k2;

[0137] When 0.2≤Q balance <0.5,

[0138] When Q balance <0.2,

[0139] Wherein, k1 is the slope coefficient of the linear increasing weight adjustment function, which is 1.2; k2 is the constant value of the uniform distribution weight adjustment function, which is 0.65; k3 is the amplitude coefficient of the robust weight adjustment function, which is 0.8; k4 is the quadratic term coefficient of the conservative weight adjustment function, which is 0.4; b1 is the intercept term of the linear function, which is -0.31; σ3 is the standard deviation parameter of the Gaussian function, which is 0.15.

[0140] In the adaptive spectral feature optimization model, the hierarchical fusion weight parameter W level,k The calculation is specifically expressed as follows:

[0141] W level,k =G gate (CV intensity,k , SNR peak,k , N batch , B.S. stability )·ω base,k ;

[0142] Where W level,k is the fusion weight parameter of the kth layer; ω base,k is the basic weight parameter obtained through neural network training, with initial values of 0.4, 0.35, and 0.25 respectively; k is the level number, ranging from 1 to 3. The constraints of the level fusion weight parameter are:

[0143] And W level,k ≥0;

[0144] This constraint ensures the normalization and non-negativity of the weight parameters. The output weight value w of the gated weight function is gate Dynamic adjustment conditions must be met:

[0145]

[0146] Where, is the weight value of the t+1th iteration; is the weight value of the tth iteration; w computed is the currently calculated weight value; η is the learning rate parameter, which ranges from 0.1 to 0.3.

[0147] The specific implementation of step S06 is the same as above and will not be described in detail here.

[0148] The specific implementation of step S07 is the same as above and will not be described in detail here.

[0149] To better understand and implement the present invention, Example 2, a specific application scenario, is provided below: Researchers at an agricultural science research institute conducted research on corn quality selection technology, employing the present method to perform quality testing and grading of corn kernels from different varieties. Three major corn varieties—Zhengdan 958, Xianyu 335, and Denghai 605—were selected as research subjects. 500 kernel samples were collected from each variety, for a total of 1,500 kernel samples, which were then analyzed using hyperspectral imaging.

[0150] The experiment first used a hyperspectral imaging device, the HySpex VNIR-1800, to scan corn kernels. The device was set to a spectral resolution of 2.5 nm and a scanning speed of 10 lines per second, acquiring complete spectral data from a wavelength range of 400 nm to 2500 nm. The spectral data matrix S was constructed with a total number of spatial pixels n of 320,000 and a total number of wavelength sampling points λ of 840, resulting in a 320,000 × 840 spectral data matrix. Dark current correction and whiteboard calibration were used to calculate standardized spectral reflectance data, with reflectance values ranging from 0.02 to 0.89.

[0151] During the continuous wavelet transform preprocessing stage, the researchers selected the Mexican hat wavelet as the mother wavelet function, set the scale parameter a in the range of 1 to 128, and set the detection threshold θ to three times the signal's root mean square value, approximately 0.08. After wavelet transform processing, the spectral characteristic peak information of four nutritional components was successfully extracted. Protein characteristic peaks exhibited distinct absorption peaks at wavelengths of 1940 nm, 2180 nm, and 2300 nm, with peak intensities of 0.24, 0.31, and 0.18, respectively. Starch characteristic peaks exhibited significant absorption peaks at wavelengths of 1450 nm, 1930 nm, and 2100 nm, with peak intensities of 0.42, 0.38, and 0.29, respectively. Oil characteristic peaks exhibited characteristic absorption peaks at wavelengths of 1210 nm, 1720 nm, and 2310 nm, with peak intensities of 0.15, 0.22, and 0.13, respectively. The characteristic absorption peaks of moisture were detected at wavelengths of 970nm, 1190nm, and 1940nm, with peak intensities of 0.35, 0.28, and 0.31, respectively.

[0152] During the construction of the characteristic peak distribution matrix P, the matrix dimension is 1500×840, which records the peak intensity information of each grain sample at each wavelength position. The calculation results of the characteristic peak intensity weight coefficient show that the maximum peak intensity P max is 0.68, the minimum peak intensity P min The weight coefficient ranged from 0 to 1. The analysis of the characteristic peak position offset showed that the average offset of the protein characteristic peak was ±2.3 nm, the average offset of the starch characteristic peak was ±1.8 nm, the average offset of the oil characteristic peak was ±3.1 nm, and the average offset of the moisture characteristic peak was ±2.7 nm.

[0153] In the process of establishing the quality correlation matrix, researchers used chemical analysis methods to determine the true nutrient content of 200 standard samples. As shown in Table 1:

[0154] Table 1 Statistics of nutrient content of standard samples

[0155] Nutritional Information Minimum value (%) Maximum value (%) average value(%) Standard deviation (%) Protein content 7.2 12.8 9.6 1.4 Starch content 58.3 75.2 67.8 4.2 Oil content 2.8 6.4 4.1 0.9 Moisture content 12.5 18.7 15.2 1.8

[0156] Through multiple linear regression analysis, a quantitative relationship model between characteristic peak parameters and quality parameters was established. Calculation of the correlation coefficient matrix Q showed that the correlation coefficient between protein content and the characteristic peak intensity at 1940 nm was 0.92, the correlation coefficient between starch content and the characteristic peak intensity at 1450 nm was 0.89, the correlation coefficient between oil content and the characteristic peak intensity at 1720 nm was 0.86, and the correlation coefficient between moisture content and the characteristic peak intensity at 970 nm was 0.91. Peak width parameter measurements revealed that the average peak width of the protein characteristic peak was 8.2 nm, the average peak width of the starch characteristic peak was 12.5 nm, the average peak width of the oil characteristic peak was 6.8 nm, and the average peak width of the moisture characteristic peak was 9.3 nm. Spectral noise level analysis demonstrated that the average signal-to-noise ratio (SNR) was 45.6, meeting high-precision detection requirements.

[0157] During the spectral quality fusion function processing phase, the weight coefficients were set to α1 = 0.35, α2 = 0.25, α3 = 0.20, α4 = 0.15, and α5 = 0.05. After standardization and weighted fusion calculation, the comprehensive quality evaluation index and individual quality evaluation index were obtained. As shown in Table 2:

[0158] Table 2 Comparison of quality evaluation index of different varieties of corn

[0159] Variety name Comprehensive quality index Protein Index Starch index Oil index Moisture Index Zhengdan 958 0.82 0.78 0.85 0.76 0.83 Xianyu 335 0.75 0.72 0.79 0.74 0.77 Denghai 605 0.88 0.86 0.91 0.82 0.89

[0160] During the training process of the adaptive spectral feature optimization model, the researchers collected 5,000 corn kernel samples of different varieties and different maturity to establish a training data set. The training set, validation set, and test set are divided in a ratio of 7:2:1, containing 3,500, 1,000, and 500 samples respectively. The model adopts a multi-layer perceptron architecture based on residual connection. The input feature mapping layer dimension is 128, and the number of neurons in the three hidden processing layers is 256, 512, and 256 respectively. The gated fusion adjustment layer automatically adjusts the feature weight according to the quality of the spectral data, and the coefficient of variation CV of the spectral feature peak intensity is 0. intensity The average value is 0.18, and the characteristic peak signal-to-noise ratio SNR peak The average value is 42.3, and the grain sample batch size N batch Set to 64, spectral baseline stability BS stability The average value is 0.86.

[0161] The mass balance value Q of the spectral data calculated by the gating weight function balance is 0.76, and the uniform distribution weight adjustment function is adopted according to the piecewise function rule, and the weight value w gate Set to 0.65. The level fusion weight parameters are W level,1 =0.42, W level,2 =0.35, W level,3=0.23, satisfying the normalization constraint. The model was trained using the Adam optimizer with a learning rate of 0.001. After 200 training cycles, convergence was achieved, and the mean squared error loss on the validation set was reduced to 0.012.

[0162] During the establishment of the support vector machine classification model, the radial basis function kernel parameter was set to 0.1 and the penalty parameter was set to 100. The comprehensive quality evaluation index and the individual quality evaluation index were used as feature vectors to classify corn quality into four grades: excellent, good, qualified, and unqualified. This is shown in Table 3.

[0163] Table 3 Statistics of corn quality classification results

[0164]

[0165] The model achieved an overall classification accuracy of 92.1% on the test set, and confusion matrix analysis demonstrated good classification performance across all levels. During the new sample testing process, 500 candidate corn kernels underwent a complete quality evaluation process, with an average testing time of 3.2 seconds per kernel, significantly improving testing efficiency. Confidence analysis showed that 86.4% of the samples achieved a confidence level exceeding 80%, demonstrating high reliability of the test results.

[0166] Traditional corn quality selection methods rely primarily on manual sensory evaluation and chemical analysis. Manual sensory evaluation involves observing kernel appearance, color, size, and other superficial characteristics for preliminary screening, but this method is highly subjective, lacks consistency, and has low accuracy. While chemical analysis offers high accuracy, it requires destructive sampling, resulting in long testing cycles and high costs, making rapid large-scale testing impossible. Traditional chemical analysis methods require four to six hours to determine the complete nutritional composition of a sample and consume large amounts of chemical reagents.

[0167] Compared with traditional methods, the present invention uses hyperspectral imaging technology combined with an adaptive spectral feature optimization model to achieve non-destructive, rapid and accurate detection of corn quality. In terms of detection accuracy, the quality prediction correlation coefficient of the present invention reaches 0.89 to 0.92, which is about 15% higher than the correlation coefficient of 0.65 to 0.75 of the traditional manual evaluation method. In terms of detection efficiency, the detection time of a single grain is shortened to 3.2 seconds, which improves the detection efficiency by more than 99% compared with the 4 to 6 hours of the traditional chemical analysis method. In terms of detection cost, the consumption of chemical reagents and sample damage losses are eliminated, reducing the detection cost. The present invention realizes the simultaneous extraction of multi-component features through continuous wavelet transform, which solves the limitation of single indicator evaluation of traditional methods. The adaptive weight adjustment mechanism dynamically optimizes the feature weight according to the quality of spectral data, overcoming the problem of insufficient generalization ability of traditional fixed weight models. The spectral quality fusion function establishes a multi-dimensional comprehensive evaluation system, which is more scientific and accurate than the traditional single-dimensional evaluation method, and provides important technical support for the accurate grading and efficient seed selection of corn quality.

[0168] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A method for corn quality selection using hyperspectral imaging technology, characterized in that: include: A hyperspectral imaging device is used to perform spectral scanning on the corn kernels to obtain spectral reflectance data covering a wavelength range of 400 nm to 2500 nm, forming a corn kernel spectral data matrix. The corn kernel spectral data matrix is preprocessed using a continuous wavelet transform algorithm to remove baseline drift and noise interference, and extract protein spectral characteristic peaks, starch spectral characteristic peaks, oil spectral characteristic peaks, and moisture spectral characteristic peaks. Establish a characteristic peak distribution matrix, record the peak intensity of each characteristic peak at different wavelength positions, and calculate the characteristic peak intensity weight coefficient and characteristic peak position offset; Construct a characteristic peak quality correlation matrix and establish a numerical mapping relationship between each characteristic peak and corn quality parameters; The peak intensity, characteristic peak position offset, peak width parameters, spectral noise level and number of kernel samples are processed through the spectral quality fusion function to calculate the comprehensive quality evaluation index and single quality evaluation index. The adaptive spectral feature optimization model is used to dynamically adjust each characteristic peak. A support vector machine classification model is established to classify the quality grades. The quality grade of new corn kernels to be selected is determined to complete the automated seed selection process.

2. The method according to claim 1, characterized in that The characteristic peak distribution matrix is specifically a two-dimensional numerical matrix that records the peak intensity distribution rules of protein spectrum characteristic peaks, starch spectrum characteristic peaks, oil spectrum characteristic peaks and moisture spectrum characteristic peaks in the wavelength dimension, with rows representing different grain samples and columns representing wavelength positions.

3. The method according to claim 2, characterized in that The characteristic peak intensity weight coefficient is specifically a weight value calculated based on the numerical size distribution of the peak intensity in the characteristic peak distribution matrix, and is used to adjust the contribution of different peak intensities to the quality evaluation.

4. The method according to claim 3, characterized in that The characteristic peak position offset is specifically the deviation value of the actual wavelength position of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak relative to the standard wavelength position.

5. The method according to claim 4, characterized in that The characteristic peak quality correlation matrix is specifically a numerical matrix that establishes the quantitative relationship between peak intensity and corn quality parameters, and the correlation coefficient is determined by regression analysis.

6. The method according to claim 5, characterized in that The peak width parameter is specifically the wavelength width value of the protein spectrum characteristic peak, starch spectrum characteristic peak, oil spectrum characteristic peak and moisture spectrum characteristic peak at half peak height.

7. The method according to claim 6, characterized in that The spectral quality fusion function is used to convert peak intensity, characteristic peak position offset, peak width parameter, spectral noise level and kernel sample quantity into standardized quality evaluation values.

8. The method according to claim 7, characterized in that The comprehensive quality evaluation index is specifically a comprehensive value of the fused protein content, starch content, oil content and moisture content information output by the spectral quality fusion function.

9. The method according to claim 8, characterized in that The individual quality evaluation index is specifically a numerical evaluation result output by the spectral quality fusion function, which is independently calculated for the four quality indicators of protein, starch, oil and moisture.

10. The method according to claim 9, characterized in that The structure of the adaptive spectral feature optimization model is a multi-layer perceptron architecture based on residual connections, which includes an input feature mapping layer, three hidden processing layers, a gated fusion adjustment layer and an output prediction layer.

Citation Information

Cited By

  • AI-based euryale ferox processing process quality control system

    CN120802888A

  • An AI-based processing process quality control system for gordon euryale seeds

    CN120802888B

  • Corn variety screening method based on corn quality evaluation system model

    CN121094320A

  • Database-driven spectrum identification method and device, equipment and medium

    CN121558652A