A method, medium, equipment, and product for simultaneous prediction of multi-component content in wheat.

By combining hyperspectral technology and deep learning methods, and employing CNN watershed segmentation and multi-task modeling strategies, the synchronization and efficiency issues in wheat component detection were resolved, enabling rapid and accurate prediction of the content of multiple wheat components, which is suitable for real-time quality control in liquor production.

CN121260293BActive Publication Date: 2026-03-10SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-06
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing methods for detecting wheat component content fail to effectively address the potential relationships between components, making it impossible to simultaneously detect multiple components. Furthermore, traditional methods are inefficient and inaccurate, failing to meet the real-time quality control requirements in liquor production.

Method used

We employ hyperspectral technology combined with deep learning methods, using a CNN-guided watershed multi-step segmentation algorithm to segment wheat grains. We construct a multi-task modeling strategy combining GhostNet and LSTM, establish a synchronous prediction model for the content of multiple wheat components, and utilize the Ghost module and scaling dot product attention mechanism to capture the features and correlations of spectral data.

Benefits of technology

It enables rapid, accurate, and simultaneous prediction of multiple components in wheat, including fat, protein, moisture, and amylose, improving detection efficiency and accuracy and meeting the real-time quality control requirements in liquor production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121260293B_ABST
    Figure CN121260293B_ABST
Patent Text Reader

Abstract

This invention discloses a method, medium, device, and product for simultaneous prediction of multi-component content in wheat, relating to the field of food testing technology. The method includes: acquiring a hyperspectral image of a wheat sample and performing reflectance correction; determining the content of wheat fat, protein, moisture, and amylose as label data; segmenting wheat grains in the hyperspectral image, averaging the spectral information of all pixels within each segmented grain to construct a spectral dataset; and constructing a simultaneous prediction model for multi-component content in wheat, including: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module. The feature extraction module uses GhostNet, and the sequence modeling module includes a three-layer stacked LSTM. This invention achieves rapid, simultaneous, and accurate prediction of multiple components in wheat, including fat, protein, moisture, and amylose.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of food detection, and in particular to a wheat multi-component content synchronous prediction method, medium, device and product. BACKGROUND

[0002] In the liquor brewing industry, the large koji used for producing liquor plays a crucial role in the liquor brewing process, and its main raw material is wheat, and the quality of wheat will directly affect the fermentation of large koji. In liquor brewing, the content of each component of wheat directly affects the flavor and fermentation of liquor, and the changes in the content of fat, protein, moisture and amylose will significantly affect the fermentation process and the flavor of liquor. At present, the detection of the content of these components mainly relies on traditional chemical detection methods, such as Soxhlet extraction method for determining fat and Kjeldahl method for determining protein. However, these traditional chemical methods have long analysis period and are destructive to raw materials, and cannot meet the actual production control requirements in time. The existing rapid non-destructive detection methods (such as near-infrared and hyperspectrum) all use single-task (single-component) detection, i.e. the detection of each component content index needs to establish a model separately, and each component content is detected separately. This method is easy to ignore the potential correlation between components, resulting in poor generalization performance of the model, and the detection efficiency of this modeling method is low, which cannot meet the synchronous timeliness requirements of product control indicators in the production site.

[0003] In the prior art, patent application CN111122470A discloses a single-grain wheat amylose content detection method, which uses a chemical method to simply determine the amylose content in single-grain wheat. However, the method for determining the wheat amylose content disclosed in the invention is a destructive detection method, and has high requirements for sample preparation. In addition, the detection method in the invention has a long period, and cannot realize rapid detection of wheat amylose. In addition, the method in the invention can only obtain the percentage of amylose, and cannot realize the detection of the specific content of amylose.

[0004] Patent application CN112683840A discloses a method for rapidly and non-destructively determining the amylose content of a single wheat grain using near-infrared spectroscopy. The invention includes: collecting single wheat grain samples and acquiring near-infrared diffuse reflectance spectra; determining the total starch content and amylose-amylose ratio of the samples using an enzymatic digestion kit; preprocessing the obtained near-infrared spectral optical data to filter out useless and interfering signals; establishing a mathematical model; constructing a predictive model between the chemical value of amylose content in a single wheat grain and the near-infrared spectrum and conducting verification experiments; acquiring the near-infrared spectrum of the sample to be tested, and rapidly and non-destructively determining the amylose content of the sample using the constructed near-infrared predictive model. However, the method for detecting the amylose content of a single wheat grain in this invention lacks efficiency and accuracy. The near-infrared spectroscopy technology used is a single-point detection method, making it difficult to assess the chemical properties of the entire target by analyzing only one or even a few points; furthermore, the method does not specify which mathematical model is used for the amylose detection; additionally, the mathematical model established by this method can only achieve the detection of a single physicochemical component, requiring the establishment of corresponding mathematical models for different physicochemical indicators, making the modeling process extremely cumbersome.

[0005] Patent application CN114693636A discloses a method for detecting the content of amylopectin and amylose in mixed sorghum. The method includes: acquiring hyperspectral images of mixed sorghum samples using visible light and near-infrared hyperspectral imaging systems, while simultaneously determining the starch content in the samples using chemical analysis methods; segmenting the sorghum grains in the hyperspectral images of the samples, extracting spectral data, and extracting characteristic wavelengths or spectral features; and establishing a model using the feature fusion data to predict the starch content of the mixed sorghum. However, this method for determining the content of amylopectin and amylose in mixed sorghum is a single-task detection method, which is inefficient and requires building a separate model for each component, wasting computational resources. More importantly, it ignores the intrinsic relationships between components, resulting in poor generalization of the learned features and a tendency to overfit. Summary of the Invention

[0006] The purpose of this invention is to address the problem that existing wheat component content detection methods do not consider the potential correlations between components and cannot achieve simultaneous detection of multiple components. Therefore, this invention proposes a method for simultaneous prediction of wheat multi-component content, comprising the following steps:

[0007] S1. Acquire hyperspectral images of wheat samples and perform reflectance correction; determine the fat, protein, moisture, and amylose content of wheat as label data;

[0008] S2. Segment the wheat grains in the hyperspectral image, average the spectral information of all pixels in each segmented wheat grain, and construct a spectral dataset.

[0009] S3. Construct a synchronous prediction model for the multi-component content of wheat, including: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module; the feature extraction module uses GhostNet, the sequence modeling module includes a three-layer stacked LSTM, and the feature weight generation module uses scaled dot product attention; the feature extraction module is used to extract features from spectral data and construct feature maps, the sequence modeling module is used to capture the correlation and dependency between different wavelengths of spectral data based on the feature maps, the output of the sequence modeling module is passed through the feature weight generation module to assign attention weights to the spectral data features, and the output of the feature weight generation module is passed through the output module to obtain the predicted multi-component content of wheat;

[0010] S4. Train the model using spectral dataset and label data, and use the trained model to predict the wheat fat, protein, moisture and amylose content of wheat.

[0011] Furthermore, the hyperspectral images of the wheat samples include hyperspectral images in the visible-near infrared and near-infrared bands.

[0012] Furthermore, the formula for reflectivity correction is as follows:

[0013]

[0014] in, These are corrected hyperspectral image data. It is the raw spectral image data. and These are standard whiteboard image data and blackboard image data with the camera lens covered, respectively.

[0015] Furthermore, a CNN-guided depth-based watershed multi-step segmentation algorithm is used to segment wheat grains in hyperspectral images, specifically including:

[0016] Generate mask images from hyperspectral images using threshold segmentation;

[0017] Wheat grains are separated using H-mini transformation based on mask images, and the effective region of wheat grains is determined by edge processing.

[0018] The shape of each wheat grain is processed morphologically.

[0019] The CNN deep guided algorithm is used to mark the location of each wheat grain, transforming the physical segmentation into countable independent data units. Each wheat grain is used as a ROI to obtain an ROI image.

[0020] Furthermore, GhostNet employs three cascaded Ghost modules.

[0021] Furthermore, the kernels of both the standard convolution and depthwise convolution in the Ghost module are replaced with 5×5 convolutions.

[0022] The present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for simultaneous prediction of wheat multi-component content.

[0023] The present invention also proposes an electronic device, including a processor and a memory, wherein the processor and the memory are interconnected, the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to execute the above-described method for simultaneous prediction of wheat multi-component content.

[0024] The present invention also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described method for simultaneous prediction of wheat multi-component content.

[0025] The beneficial effects of the technical solution provided by this invention are:

[0026] This invention utilizes visible-near-infrared and near-infrared hyperspectral technologies combined with deep learning methods and multi-task modeling strategies. It employs a CNN-guided watershed multi-step segmentation algorithm (DG-WS) to achieve high-precision segmentation of wheat grain images and constructs a synchronous prediction model for the content of multiple wheat components. The Ghost module for feature extraction builds information-rich feature maps, and LSTM captures the sequence correlations between spectral wavelengths as well as local and global features. A nonlinear mapping relationship is established between spectral features and the content of multiple components in the analyte, enabling rapid, synchronous, and accurate prediction of multiple components in wheat, including fat, protein, moisture, and amylose. This provides an efficient method for real-time detection of raw material quality and quality control of brewing raw materials in baijiu production. Attached Figure Description

[0027] Figure 1 This is a flowchart of the wheat multi-component content synchronous prediction method according to an embodiment of the present invention;

[0028] Figure 2 This is a flowchart of the multi-step segmentation process for sticky wheat grains according to an embodiment of the present invention;

[0029] Figure 3 This is a structural diagram of the GLSNet model for simultaneous prediction of wheat multi-component content according to an embodiment of the present invention;

[0030] Figure 4 These are the prediction results of the GLSNet model (the model constructed in this invention) based on visible-near infrared (VIS-NIR) in the embodiments of this invention.

[0031] Figure 5 These are the prediction results of the GLSNet model constructed based on near-infrared (NIR) spectroscopy in this embodiment of the invention;

[0032] Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0034] The flowchart of the wheat multi-component content simultaneous prediction method of this invention is as follows: Figure 1 Specifically, it includes the following steps:

[0035] S1. Obtain hyperspectral images of wheat samples and perform reflectance correction; determine the fat, protein, moisture and amylose content of wheat as label data.

[0036] In this embodiment of the invention, 11 different brewing wheat varieties were selected, specifically: Cotton Wheat (variety number 827), Cotton Wheat (variety number 161), Cotton Wheat (variety number 51), Cotton Wheat (variety number 367), Cotton Wheat (variety number 907), Cotton Wheat (variety number 312), Sichuan Wheat (variety number 88), Sichuan Wheat (variety number 1247), Sichuan Agricultural Wheat (variety number 30), Southern Wheat (variety number 660), and Sichuan Wheat (variety number 830). During sample preparation, 20 samples were prepared for each variety, totaling 220 samples (11 varieties × 20 samples). Each sample contained 100 wheat grains, evenly spread in an 80mm petri dish for subsequent hyperspectral data acquisition.

[0037] This example uses two hyperspectral acquisition systems to acquire data. The visible-near-infrared (VIS-NIR) acquisition system consists of a hyperspectral camera (Specim FX10, Finland), two 160W halogen light sources, an electrically controlled moving platform, and a computer loaded with Lumo-scanner scanning software. This system can continuously acquire hyperspectral images of 448 wavelength channels in the 400-1000nm band, with a spatial resolution of 1024×632 and a spectral resolution of 5nm. The system is preheated for 10 minutes before acquisition to ensure stability. The optimal parameters are set as follows: exposure frequency of 50Hz, exposure time of 8ms, and platform scanning speed of 0.84mm / s. The near-infrared (NIR) system is equipped with a near-infrared hyperspectral camera (Specim FX17, Finland), four 55W halogen lamps, a standard calibration plate, and a computer with SpacVIEW data acquisition software. The camera's spectral acquisition range is 886-1735nm, including 512 continuous bands, with a spatial resolution of 660×640 and a spectral resolution of 5nm. The system parameters are set as follows: motor start position 0.55cm, scanning distance 1cm, forward speed 0.075cm / s, backward speed 0.2cm / s, and exposure time 2ms.

[0038] To reduce the impact of noise, camera dark current, and uneven illumination on spectral data, reflectance correction is required for the acquired wheat hyperspectral image data. Black and white correction is performed using a black and white image covering the camera lens background and a uniform white board as the black and white image. The correction formula is as follows:

[0039]

[0040] in, These are corrected hyperspectral image data. It is the raw spectral image data. and These are standard whiteboard image data and blackboard image data with the camera lens covered, respectively.

[0041] The near-infrared hyperspectral camera acquired a spectral range of 886-1735 nm, comprising 512 bands. However, strong spectral vibrations and severe information distortion occurred at the beginning and end of the spectral range, likely due to instrument and environmental noise. To improve the signal-to-noise ratio of the spectral data, this invention removed 8 bands with poor signal-to-noise ratios at the beginning and 19 bands at the end of the original spectral range, retaining 485 bands in the 900.96-1705 nm range for subsequent modeling and analysis. All bands in the visible light spectrum were retained.

[0042] Furthermore, spectral preprocessing can eliminate interference factors such as environmental noise, baseline drift, and radio scattering, enhancing spectral characteristics and thus improving model prediction accuracy. Multivariate scattering correction (MSC) can reduce baseline drift and spectral scattering, while the first derivative (1st) can achieve baseline correction. This invention employs a combination of multivariate scattering correction (MSC) and the first derivative (1st) (MSC-1st) for spectral data preprocessing. After preprocessing, the samples are divided into calibration and test sets at a 4:1 ratio based on the joint XY distance (SPXY).

[0043] In this embodiment of the invention, the fat content in wheat samples was determined using the Soxhlet extraction method (GB 5009.3-2016), the protein content was determined using the Kjeldahl method according to GB 5009.5-2016, the moisture content was determined using the direct drying method (GB5009.3-2016), and the amylose content was determined using a colorimetric method according to GB / T15683-2008. To avoid the influence of experimental errors, three parallel experiments were set up for each component determination, and the average value was taken as the determination result after removing outlier results.

[0044] S2. Segment the wheat grains in the hyperspectral image, average the spectral information of all pixels in each segmented wheat grain, and construct a spectral dataset.

[0045] Hyperspectral images contain wheat grains and irrelevant background information, and the wheat grains may be adhered together, which is detrimental to subsequent accurate data analysis. This invention employs a CNN-based Depth Guided Watershed Segmentation (DG-WS) algorithm to segment wheat grains in hyperspectral images to obtain the precise location of all wheat grains. A flowchart of the wheat grain segmentation process using the CNN-based Depth Guided Watershed Segmentation (DG-WS) algorithm is provided in the following embodiment. Figure 2 Specifically, it includes:

[0046] First, a grayscale image is generated from the hyperspectral image through band extremum mapping. Based on this grayscale image, a binarized image is obtained using the Otsu thresholding method. Edge processing is performed on the binarized image to determine the effective regions of wheat grains, and morphological operations are used to ensure that the segmented regions maintain consistency with the actual shape of the wheat grains. Subsequently, background removal is performed on the binarized image, and adhering wheat grains are segmented based on minimum transformation. A CNN algorithm is used to detect and label the location of each wheat grain, transforming the physical segmentation into independently countable individual data units. After obtaining the precise location of each wheat grain, it is used as an independent Region of Interest (ROI), and the corresponding ROI image is extracted. The spectral information of all pixels within each ROI is averaged, and finally, the average spectrum of all wheat grains in the sample is used as the spectral feature data of this variety.

[0047] S3. Construct a simultaneous prediction model for the content of multiple wheat components. Since there are inherent correlations among the components of wheat raw materials, the multi-task modeling strategy, through a shared feature extraction layer, can capture these correlations, thereby achieving parallel prediction of the content of multiple components and improving the model's generalization ability. Based on the multi-task modeling strategy (MT), the structure diagram of the simultaneous prediction model for the content of multiple wheat components in this embodiment of the invention is shown in the GLISNet diagram. Figure 3 The system includes: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module. The feature extraction module uses GhostNet, the sequence modeling module includes a three-layer stacked LSTM, and the feature weight generation module uses scaled dot product attention. The feature extraction module is used to extract features from spectral data and construct feature maps. The sequence modeling module is used to capture the correlation and dependency between different wavelengths of spectral data based on the feature maps. The output of the sequence modeling module is passed through the feature weight generation module to assign attention weights to the spectral data features. The output of the feature weight generation module is then passed through the output module to obtain the predicted multi-component content of wheat.

[0048] GhostNet employs three cascaded Ghost modules. These modules utilize a division of labor between main convolutions and low-cost operations, leveraging redundancy between feature maps to generate feature representations equivalent to traditional convolutions with lower computational cost. The main convolution uses standard convolution operations to generate some core feature maps, while the low-cost operations use depthwise convolutions to perform linear transformations or local convolutions on the main features, generating the remaining auxiliary feature maps. The main and auxiliary feature maps are then concatenated along the channel dimension to form a more information-rich and complete output feature map. High redundancy often exists between adjacent correlated bands in the spectral spectrum. The Ghost modules exploit and utilize this inherent redundancy to further improve the model's efficiency and expressive power. This mechanism not only reduces computation but also maintains the model's representational ability, making it suitable for processing spectral data with local correlations. In this invention, the kernels of the standard and depthwise convolutions in the Ghost modules are replaced with 5×5 convolutions to expand the receptive field and more fully capture the correlated features of local patterns in the spectrum. Meanwhile, the stride and padding in the standard convolution are set to 2 to achieve downsampling, further compressing the size of the feature map and providing more efficient input for subsequent LSTM and attention mechanisms.

[0049] After feature extraction, the model performs sequence modeling using a three-layer stacked LSTM network. The gating mechanism and memory units of LSTM effectively capture complex cross-wavelength correlation patterns in the spectral data, helping the model identify global and local features. Following LSTM, GLSNet introduces a Scaled Dot-Product Attention (SDPA) mechanism. This mechanism adaptively assigns importance weights to features by calculating attention scores. The attention mechanism dynamically captures the importance of different wavelength regions and cross-wavelength global correlations in the spectral sequence through the correlation between query, key, and value vectors, providing contextual information to the model.

[0050] The attention mechanism uses the output of the last time step of the LSTM as the query vector, and the complete LSTM output sequence as the key and value vectors. Through this mechanism, the model can dynamically capture the importance of different wavelength regions in the spectral sequence and their global correlations across wavelengths. Compared to the memory mechanism of LSTM, the attention mechanism focuses more on capturing features at key positions in the sequence. This mechanism complements the sequential modeling capabilities of LSTM, enabling the model to exhibit stronger robustness and predictive ability when dealing with the nonlinear characteristics of spectral data.

[0051] The output module uses a fully connected layer to output the predicted wheat fat, protein, moisture, and amylose content.

[0052] S4. The model is trained using the spectral dataset and label data, with the cross-entropy loss function. The response of spectral reflectance to the chemical bond interactions in the content of various wheat components is analyzed. The trained model is then used to predict the wheat fat, protein, moisture, and amylose content.

[0053] This invention uses the calibration set determination coefficient ( ) and the coefficient of determination of the prediction set ( The model's overall capability is evaluated using five metrics: root mean square error of calibration (RMSEC), root mean square error of prediction (RMSEP), and residual prediction bias (RPD). and RPD (Revised Probability Difference) measures the correlation between model predictions and actual values; a value closer to 1 indicates a higher good fit. RMSEC and RMSEP measure the model's prediction accuracy; lower values ​​indicate better prediction performance. RPD is an important indicator for evaluating model predictability and robustness. Generally, an RPD value between 1.5 and 2.0 indicates poor model prediction performance; between 2.0 and 2.5 indicates the model can make effective quantitative predictions; and greater than 2.5 indicates high predictive ability. A reliable model should have a high RPD. , And RPD value, while RMSEC and RMSEP values ​​should be kept at a low level. The formulas for calculating these parameters are as follows:

[0054]

[0055]

[0056]

[0057]

[0058]

[0059] In the formula, and It represents the predicted and measured component content of the i-th wheat sample. and It is the average content of wheat sample components in the calibration set and the prediction set. and These are the number of samples in the calibration set and the prediction set, respectively.

[0060] Based on both visible-near-infrared and near-infrared spectra, and under a multi-task (MT) modeling strategy, a one-dimensional convolutional neural network (1DCNN) and a bidirectional convolutional fusion network (GLSNet) prediction model were constructed. The mapping relationship between effective spectral data and wheat fat, protein, moisture, and amylose was quantitatively analyzed. A traditional partial least squares (PLSR) deep learning model, CLNet, was used as a comparative model. Performance comparisons of each model are shown in Table 1.

[0061] Table 1

[0062]

[0063] Table 1 shows the prediction results of the MT prediction models based on visible-near-infrared (VNIIR) and near-infrared (NIIR) spectral data for multiple wheat components. As can be seen from the table, the modeling results of the MT prediction models based on VNIIR and NIIR are similar. MT-GLSNet has the highest prediction accuracy and the best model stability, followed by MT-CLNet, while MT-PLSR performs the worst. Specifically, among the MT prediction models using VNIIR, the fusion network MT-GLSNet, compared to MT-CLNet, has a higher average prediction accuracy for the content of each wheat component. The average RPD increased by 0.5799, an increase of 0.0927; compared with MT-PLSR, the average prediction of wheat components improved. The average RPD was improved by 0.1944 and 0.8824, respectively; in the wheat multi-task prediction model based on NIR, MT-GLSNet improved the average RPD of wheat components compared with MT-CLNet and MT-PLSR. The improvements were 0.0807 and 0.2013, respectively, and the average RPD improved by 5.5145 and 6.609, respectively. Although CLNet can meet certain detection requirements, its structure limits its ability to capture key position sequences, and there is still room for improvement. PLSR performs poorly in multi-task regression, mainly because its linear characteristics and uniform feature space limit its ability to model heterogeneity and complex nonlinear relationships between tasks. The above results fully demonstrate that the GLSNet model has outstanding performance in balancing prediction performance, stability, and efficiency, and is better able to meet the needs of simultaneous prediction of multi-component content in wheat in practical applications.

[0064] By comparing the modeling results of the two spectra, it can be seen that the model... Similar to RPD changes, but modeling results based on near-infrared spectroscopy are superior to those based on visible-near-infrared spectroscopy. The optimal prediction model, MT-GLSNet, shows better predictions for fats, proteins, water, and amylose. The values ​​were 0.9729, 0.9702, 0.9607, and 0.9775, respectively; the RPD values ​​were 6.0732, 8.6194, 6.2370, and 15.1575, respectively. These results indicate that the near-infrared spectral range is more suitable for predicting the content of internal components in wheat than the visible-near-infrared spectral range.

[0065] Furthermore, to effectively evaluate model performance, this invention uses scatter plots to visually demonstrate the performance of the GLSNet model in simultaneously predicting the content of four wheat components (fat, protein, moisture, and amylose). The prediction results of the GLSNet model constructed based on visible-near-infrared (VIS-NIR) and near-infrared (NIR) spectra are shown below. Figure 4 As shown and Figure 5 As shown, blue represents the prediction results for the calibration set, and orange represents the prediction results for the prediction set. In contrast, Figure 4 The Chinese model based on visible-near-infrared spectroscopy is slightly inferior in fitting accuracy to... Figure 5 Mid-to-near infrared spectral models, but Figure 4 The predictive performance remains good, still possessing strong predictive ability, with predictive determination coefficients for each component ( ). All values ​​are above 0.81, and the residual prediction deviation (RPD) is above 2.42, basically meeting the requirements of practical applications. Figure 5 As can be seen, when using NIR spectral data, the calibration curves and predicted curves of the GLSNet model for the four components are in high agreement with the measured values, showing a near-perfect fit, with data points closely distributed near the ideal fitting line. In summary, the GLSNet model can stably and accurately capture the complex relationship between wheat spectral features and component content across different spectral ranges, demonstrating excellent generalization ability and predictive performance.

[0066] Effects after implementation

[0067] This invention establishes a rapid and accurate method for the simultaneous detection of wheat fat, protein, moisture, and amylose by combining HSI with the MT-GLSNet multi-task prediction model. A deep-guided watershed multi-step segmentation algorithm (DG-WS) based on CNN is used to segment individual wheat grains, ensuring an image segmentation accuracy of ≥99.9%. This invention employs hyperspectral imaging (HSI) technology with different spectral ranges (VIS-NIR: 400-1000nm and NIR: 900-1700nm) to simultaneously predict the content of these four components in wheat. Based on single-task (ST) and multi-task (MT) modeling strategies, a hybrid model (GLSNet) combining a one-dimensional convolutional neural network (1DCNN) and a bidirectional long short-term memory neural network (BiLSTM) is developed. The results are compared between a least squares regression (PLSR) model preprocessed with MSC-1st and the 1DCNN deep learning model. The results show that the multi-task MT-GLSNet model performs best within the NIR spectral range, achieving an average accuracy (Rp2) of 0.9703 and an average RPD of 9.0218 for simultaneous prediction of wheat fat, protein, moisture, and amylose. These results demonstrate that the combination of HSI and the MT-GLSNet model can simultaneously and accurately predict the content of these four wheat components, providing an efficient method for the quality detection of raw materials for baijiu (Chinese liquor).

[0068] This invention proposes a novel deep learning regression model, "GLSNet". This model employs a cascaded architecture design, using multi-level feature extraction and modeling strategies to process high-dimensional spectral sequence data. The GLSNet model combines feature extraction, sequence modeling, and attention mechanisms, enabling efficient handling of complex spectral patterns. Using the average spectral data of 11 wheat varieties as the input for target index prediction, the model automatically performs convolutional learning to establish an accurate mapping between wavelength and component content. Through time-series processing, it achieves accurate prediction of the multi-component content of wheat. Specifically, it includes:

[0069] (1) Based on the integration of hyperspectral imaging and image, this invention proposes a new method for grain segmentation based on image adhesion to address the problem of severe grain adhesion when wheat is piled up. It is the first to use the watershed multi-step segmentation algorithm (DG-WS) based on CNN depth guidance to segment individual wheat grain images. By using the improved watershed algorithm and combining it with the marker point detection of grain coordinate position based on CNN depth guidance algorithm, the wheat image is segmented to achieve a grain segmentation accuracy of ≥99.9%.

[0070] (2) To address the problems of low computational efficiency, difficulty in variable selection and interpretation, and thus impact on model prediction capabilities when capturing complex nonlinear relationships in hyperspectral data, this invention innovatively integrates the advantages of GhostNet, LSTM, and Scaled Dot-Product Attention to construct a GLSNet combined architecture model, targeting the spatial-spectral characteristics and strong inter-band correlations of hyperspectral data. Its Ghost module constructs a more information-rich feature map by introducing a division of labor mechanism between main convolution and inexpensive operations; the three-layer stacked LSTM can effectively capture complex cross-wavelength correlation patterns in spectral data, helping the model better identify global and local features in the spectral data; the Attention module can dynamically capture the importance of different wavelength regions in the spectral sequence and the global correlation across wavelengths. The organic combination of these three modules can effectively handle the nonlinear characteristics of spectral data while capturing the wavelength correlation of different internal component contents, achieving simultaneous prediction of wheat multi-component content.

[0071] (3) This invention combines hyperspectral technology with a multi-task modeling strategy. The multi-task modeling strategy is based on the principle of "inductive bias". Through the shared representation learning mechanism, it utilizes complementary information between tasks to optimize related tasks at the same time. Since there is a certain intrinsic correlation between the components of wheat raw materials, the multi-task modeling strategy can capture these correlations by sharing the feature extraction layer, thereby realizing the parallel prediction of the content of multiple components and improving the generalization ability of the model. Based on the multi-task modeling strategy (MT), a multi-task hybrid model (MT-GLSNet) was developed by integrating GhostNet, LSTM and Scaled Dot-Product Attention modules. MT-GLSNet has the highest prediction accuracy and the best model stability, realizing efficient and accurate synchronous detection of wheat fat, protein, moisture and amylose.

[0072] (4) This invention utilizes visible-near-infrared (VIS-NIR) and near-infrared (NIR) hyperspectral technologies combined with deep learning methods and multi-task modeling strategies to establish a deep learning network model (MT-GLSNet). The study analyzes the response of spectral reflectance to the chemical bond interactions in the content of various components in wheat and finds that the model performs best in the NIR spectral range. This indicates that the MT-GLSNet algorithm is more suitable for predicting the content of internal components in wheat in the NIR spectral range than in the VIS spectral range.

[0073] (5) The method for simultaneous detection of wheat fat, protein, moisture and amylose established in this invention has a prediction accuracy of Rp2=0.9703 and an average RPD=9.0218, achieving excellent prediction accuracy and stability. The HSI combined with the MT-GLSNet multi-task hybrid model can simultaneously and accurately predict the content of the four components in wheat, providing a multi-component accurate and efficient prediction method for rapid and non-destructive detection of multiple components in wheat.

[0074] In one exemplary embodiment, a computer-readable storage medium is included, which stores a computer program that, when executed by a processor, implements the above-described method for simultaneous prediction of wheat multi-component content.

[0075] Please see Figure 6 In one exemplary embodiment, the device further includes an electronic device including at least one processor, at least one memory, and at least one communication bus.

[0076] The memory stores a computer program, which includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned method for synchronous prediction of wheat multi-component content.

[0077] In one exemplary embodiment, a computer program product is proposed, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method for simultaneous prediction of wheat multi-component content.

[0078] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for simultaneous prediction of multiple components content of wheat, characterized in that, The method comprises the following steps: S1, obtaining a hyperspectral image of a wheat sample and performing reflectance correction; determining the fat, protein, moisture and amylose content of the wheat as label data; the hyperspectral image of the wheat sample comprises a hyperspectral image in the visible-near infrared and near infrared band range; S2, segmenting the wheat kernels in the hyperspectral image, using a CNN deep guided watershed multi-step segmentation algorithm to segment the wheat kernels in the hyperspectral image, specifically comprising: generating a mask image from the hyperspectral image through threshold segmentation; separating the wheat kernels based on the mask image using H-minimum transformation, and determining the effective area of the wheat kernels through edge processing; processing the shape of each wheat kernel through morphological processing; using a CNN deep guided algorithm to mark the position of each wheat kernel, converting physical segmentation into countable independent data units, taking each wheat kernel as an ROI, and obtaining an ROI image; averaging the spectral information of all pixel elements in each segmented wheat kernel to construct a spectral data set; S3, constructing a wheat multi-component content synchronous prediction model, comprising: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module; the feature extraction module uses GhostNet, the sequence modeling module includes three layers of stacked LSTM, and the feature weight generation module uses scaled dot-product attention; the feature extraction module is used to extract the features of the spectral data and construct a feature map, the sequence modeling module is used to capture the correlation and dependence between different wavelengths of the spectral data according to the feature map, the output of the sequence modeling module is allocated attention weights for the spectral data features through the feature weight generation module, and the output of the feature weight generation module is obtained through the output module to obtain the predicted wheat multi-component content; S4, using the spectral data set and the label data to train the model, and using the trained model to predict the fat, protein, moisture and amylose content of the wheat.

2. The method according to claim 1, wherein, The formula for reflectance correction is as follows: wherein, is the corrected hyperspectral image data, is the original spectral image data, and are standard whiteboard image data and cover camera lens blackboard image data, respectively.

3. The method according to claim 1, wherein, GhostNet adopts three cascaded Ghost modules.

4. The method according to claim 1, wherein, The convolution kernels of the standard convolution and the depth convolution of the Ghost module are both replaced with 5x5 convolution.

5. A computer readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to realize the method of any one of claims 1-4.

6. An electronic device, comprising: The computer program is executed by the processor to realize the method of any one of claims 1-4.

7. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to realize the steps of the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Single-grain wheat amylose content detection method

    CN111122470A

  • Method for rapidly and nondestructively measuring amylose content of single wheat grain by utilizing near infrared spectrum technology

    CN112683840A

  • Wheat grain quality nondestructive testing method and device, electronic equipment and medium

    CN116660262A

  • Automated stereology for determining tissue characteristics

    US20220058369A1