Method for establishing rapid prediction of important quality indexes of green soy beans based on near infrared spectrum and deep learning

Through near-infrared spectroscopy and deep learning technology, a deep neural network model is constructed, which solves the problems of long time, high cost and low accuracy of traditional crop detection methods, and achieves rapid and accurate detection of edamame amino acids and starch content, improving the reliability and applicability of the detection.

CN119517204APending Publication Date: 2025-02-25ZHEJIANG UNIV OF TECH

Patent Information

Application Number
CN202411559834.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Traditional crop main component content detection methods have a long time, high cost, high operating skills requirements, and limitations in application in real-time production environments. Mid-infrared spectroscopy technology is interfered by factors such as light scattering, baseline drift and concentration effects in high-precision detection.

Method used

Using near-infrared spectroscopy and deep learning technology, the amino acid and starch content in edamame is quickly predicted through deep neural network models, and feature band selection is used to select near-infrared spectral data, and the training set and test set are divided by a random forest feature importance selection algorithm to construct a DNN model to achieve high-precision detection.

Benefits of technology

It has achieved rapid and accurate detection of important quality indicators of edamame, overcome the shortcomings of traditional methods, improved the reliability and applicability of the detection, and achieved prediction accuracy of more than 98%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517204A_ABST
    Figure CN119517204A_ABST
Patent Text Reader

Abstract

The invention discloses a method for establishing rapid prediction of important quality indexes of crops based on near infrared spectrum and deep learning. The method comprises the following steps: preparing a green soy bean sample; determining the content of amino acid and starch in the green soy bean sample by using a specific instrument; acquiring near infrared spectrum data and preprocessing the spectrum data; constructing a deep neural network model; feature band selection is carried out on the preprocessed near infrared spectrum data, and then a test set and a training set are divided according to the proportion of 7: 3; training a deep neural network model; and inputting near infrared spectrum data on the basis of the deep neural network model trained in the step S6 so as to obtain the amino acid content and the starch content of the corresponding green soy beans. The method can be used for monitoring the content of important quality indexes in the green soy bean production process in real time, the production efficiency and the quality control are improved, a novel and efficient important quality index detection method is provided for the field of agricultural product detection, and the method has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an innovative method for rapidly detecting the amino acid and starch contents of important quality indicators of crops, and specifically to a model method for rapidly predicting important quality indicators of edamame based on near-infrared spectroscopy and deep learning. Background Art

[0002] Edamame (vegetable soybean) is an important agricultural product with high nutritional value and is an important source of human food, feed and industrial applications. Therefore, accurate determination of the content of the main components in edamame is crucial for agricultural production and the food industry. Traditional methods for detecting the content of the main components usually involve chemical analysis, which covers the disadvantages of long time, high cost and high operator skill requirements. In addition, these methods have certain limitations in the application of real-time production environments. Mid-infrared spectroscopy has been widely used to analyze the composition of agricultural products. This technology can provide information about the composition of samples by measuring the mid-infrared spectrum of absorption, reflection or transmission in the sample. However, traditional mid-infrared spectroscopy has limitations in the high-precision content detection of the main components, because the spectral data may be interfered by factors such as light scattering, baseline drift, concentration effect, etc., which reduces the accuracy of the detection. Various classic methods for rapid detection of internal physicochemical indicators of crops using spectral information provide many paradigms. For example, Lu Guoquan et al. used partial least squares (PLS) to construct prediction models for indicators such as amylose content, amylose percentage, total starch content and thermal properties (Reference [1] Lu Guoquan, Sheng Jialian. Application of near-infrared reflectance spectroscopy (NIRS) in sweet potato quality breeding [J]. Chinese Agricultural Science, 1990, 23(1): 6.), Agulheiro Santos et al. used PLS to determine the internal soluble matter content after taking the first-order derivative of the spectrum (Reference [2] Agulheiro-Santos AC, Ricardo-Rodrigues S, Laranjo M et al. Non-destructive prediction of total soluble solids in strawberry by near-infrared spectroscopy [J]. Journal of Food and Agricultural Sciences, 2022, 102(11): 4866-4872.) Among these classic methods, partial least squares (PLS) relies on linear assumptions and may not be able to capture nonlinear relationships in the data. The linear relationship between data information in different bands of spectral data is poor, while deep neural networks can capture complex nonlinear relationships through multi-layer network structures. Song Jinpeng et al. used a deep neural network combined with near-infrared spectroscopy to classify wheat infected with bunt. The model effect was very good and the classification accuracy was very high (Reference [3] Song Jinpeng, Liang Kun, Zhang Chi, et al. Research on classification of wheat grains infected with bunt based on deep learning and visible-near infrared spectroscopy [J]. Journal of Analysis and Testing, 2023, 42(7): 784-793.). Therefore, there is an urgent need to provide a new method to accurately and quickly determine the content of the main components in edamame, overcome the shortcomings of traditional methods, and improve the reliability and applicability of detection. Summary of the invention

[0003] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide an advanced method using DNN neural network technology to improve the accuracy and efficiency of content detection of important indicators of edamame.

[0004] The technical solution adopted by the present invention to achieve the above-mentioned purpose is as follows:

[0005] A method for quickly predicting important quality indicators of edamame based on near infrared spectroscopy and machine learning, comprising the following steps:

[0006] S1: Preparation of edamame samples;

[0007] S2: Determine the amino acid and starch content of edamame samples using specific instruments;

[0008] S3: collect near infrared spectral data and preprocess the spectral data;

[0009] S4: Build a deep neural network model;

[0010] S5: Feature band selection is performed on the pre-processed near infrared spectral data obtained in step S3, and then the test set and the training set are divided according to a ratio of 7:3.

[0011] S6: Training deep neural network model;

[0012] S7: Based on the deep neural network model trained in S6, the near infrared spectral data is input to obtain the amino acid and starch content of the corresponding edamame.

[0013] Preferably, step S1 specifically includes: the vegetable soybean material is provided by the vegetable soybean research group of the Vegetable Research Institute of Zhejiang Academy of Agricultural Sciences. The group contains 336 materials, which are planted in March each year, harvested in June of the same year, and field phenotypic traits are identified. According to the completely randomized block design, the field fertilizer and water management is consistent with production.

[0014] For each material, several fresh seeds of vegetable soybeans that were in a relatively consistent commercial maturity period were taken, frozen in liquid nitrogen, and then dried in a freeze dryer (LABCONCO, USA) for 96 hours to remove moisture. They were then ground into fine powder using a Shanghai Jingxin brand JXFSTPRP-24L model fully automatic sample rapid grinder for standby use.

[0015] Preferably, step S2 specifically comprises: numbering the 336 core germplasm populations of edamame in S1, and it can be known from step S1 that each numbered sample is divided into three parts, in the first part, we dissolve the sample in hydrochloric acid, perform derivatization treatment, and then use high performance liquid chromatography (HPLC) to separate and detect the amino acid content of the sample; in the second part, after the edamame sample is extracted, amylase is added for hydrolysis, and the generated glucose is detected by colorimetry or high performance liquid chromatography to obtain the starch content in the edamame sample;

[0016] Furthermore, the step S3 includes the following steps:

[0017] S3.1: Collect near infrared spectroscopy data:

[0018] The instrument used for near-infrared spectral data collection in the experiment is the near-infrared hyperspectral camera of Hangzhou Caipu Technology Co., Ltd., model: FS-15. The wavelength range of the collected near-infrared is between 900nm and 1700nm. The freeze-dried powder of edamame is placed at the sampling port of the spectrometer for spectral data collection. After running the spectrometer, the mid-infrared spectral data within this wavelength range is obtained;

[0019] S3.2: Load the third portion of the sample into a sample cup with a diameter of 5 cm and a height of about 1.5 cm. The thickness and compaction of the sample are kept consistent to minimize the measurement error caused by uneven sample loading. Each sample is scanned three times and the average absorption spectrum is calculated as the spectral value. The near-infrared spectral information of all samples is collected and stored.

[0020] S3.3: Processing near infrared spectroscopy data:

[0021] In order to eliminate the background, noise and interference caused by instrument and position changes during data acquisition, it is necessary to preprocess the raw spectra. The raw spectral data can be preprocessed by applying the multiple scattering correction (MSC) and standard normalized variable (SNV) methods to eliminate the interference of noise and baseline drift. MSC correction corrects the influence of multiple scattering by constructing the ratio of the sample spectrum to the reference spectrum. Multiple scattering will lead to an increase in optical path length and a decrease in signal intensity. The basic formula for MSC correction is as follows:

[0022] MSC = (R sample -R min ) / (R ref -R min ), (1)

[0023] Among them, R sample is the sample spectrum, R ref is the reference spectrum, R min It is the minimum value of the spectrum. The purpose of MSC correction is to remove the residual scattering components in the spectrum and improve the accuracy and comparability of the sample spectrum.

[0024] MSC can eliminate the spectral differences caused by different scattering levels during spectral measurement (different spectra are different due to the measurement location, light during measurement, etc.), and enhance the correlation between the spectrum and the data. In order to eliminate the spectral differences caused by different scattering levels (i.e., to correct the baseline shift and offset of the spectral data), this method needs to use the "ideal spectrum" (the change in the spectrum and the content of the components in the sample meet a direct linear relationship) for correction. Since the "ideal spectrum" is difficult to obtain, the average value of all spectral data is used in this algorithm instead of the "ideal spectrum".

[0025] Further, the step S4 includes the following steps:

[0026] S4.1: Construct the input layer:

[0027] The input layer inputs the near-infrared spectrum data in the wavelength range of 900nm to 1700nm collected by the near-infrared spectrum equipment, and each row of data except the first column (label column) is used as the input layer of the network structure.

[0028] S4.2: Construct hidden layer:

[0029] A deep neural network model contains multiple hidden layers, each of which has a different number of neurons.

[0030] The first hidden layer has 250 neurons;

[0031] The second hidden layer has 500 neurons;

[0032] The third hidden layer has 1000 neurons;

[0033] The last two hidden layers have 500 and 250 neurons respectively.

[0034] S4.3: construct output layer;

[0035] The output layer includes one neuron, which is used to predict the target value, which is a content of the principal component.

[0036] S4.4: activation function;

[0037] All hidden layers use ReLU (Rectified Linear Unit) activation function to process input data.

[0038] The output layer has no activation function because this is a regression task and the output is a real value.

[0039] S4.5: Construct Dropout layer;

[0040] 'nn.Dropout(0.05)' is added after each hidden layer to reduce fitting by randomly turning off some neurons.

[0041] Overall, this DNN model is a feedforward neural network consisting of multiple hidden layers, each hidden layer is followed by a ReLU activation function and a Dropout layer, and finally an output layer.

[0042] Preferably, the step S5 specifically includes:

[0043] S5.1: Based on the Random Forest (RF) feature importance selection algorithm, Random Forest itself is an integrated learning method that improves the performance and stability of the model by combining the prediction results of multiple decision trees. The feature importance selection algorithm utilizes the inherent characteristics of random forests and can effectively evaluate the contribution of each feature to model prediction.

[0044] S5.2: After extracting the characteristic bands, the near-infrared spectral data were randomly divided into training set and test set in a ratio of 7:3. In total, 235 training samples and 101 test samples were used.

[0045] Further, the step S6 includes the following steps:

[0046] S6.1: Model training process:

[0047] During the training process, the ratio of the training set to the test set is 7:3. The mean squared error loss function (MSE) is selected as the loss function of the model in the deep neural network model. The Adam optimizer is selected in the model, and the learning rate is set to 0.0001 to update the model parameters. 64 samples are used in each iteration to calculate the loss and update the model parameters. 2000 training cycles are defined in the deep neural network model. Each training cycle is a traversal of the entire training data set. The results are then visualized and the predicted values ​​are compared with the actual values.

[0048] Further, the step S7 includes the following steps:

[0049] Preferably, step S7 specifically includes: using the training set in S5 to train the prediction model in S4, and using the test set in S5 to test the performance of the model in S4. And based on the determination coefficient R between the predicted value and the actual value of the test set 2 And RMSE are used as indicators to determine the effectiveness of the model.

[0050]

[0051] Experimental results:

[0052] The prediction accuracy for amino acids and starch is above 98%.

[0053] The technical concept of the present invention is to establish a rapid prediction model for important quality indicators of crops based on near-infrared spectroscopy and machine learning, and to improve accuracy by using near-infrared spectral data. Traditional principal component detection methods usually involve complex experimental procedures, while near-infrared spectroscopy technology has been widely used in the field of food analysis. The present invention uses deep neural network (DNN) technology to quickly detect important quality indicators in edamame.

[0054] The beneficial effects of the present invention are: 1) using a deep convolutional network model to quickly detect important quality indicators in edamame, giving full play to the self-learning advantages of deep learning, the machine automatically learns good features, eliminating some disadvantages of traditional detection methods, simplifying the process and saving time; 2) the constructed deep learning model can well predict important quality indicators of edamame. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Schematic diagram of the method of the present invention.

[0056] Figure 2 It is the result of spectral data preprocessing of the present invention.

[0057] Figure 3 Schematic diagram of the deep neural network structure of the present invention.

[0058] Figure 4 Feature extraction diagram for RF-based feature extraction algorithm

[0059] Figure 5.1 and Figure 5.2 is the experimental result of the present invention, wherein Figure 5.1 This is the starch prediction result diagram. Figure 5.2 This is the free amino acid prediction result diagram. DETAILED DESCRIPTION

[0060] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings.

[0061] Example 1

[0062] Reference Figure 1 As shown in Figure 5, a rapid prediction model for important quality indicators of edamame is established based on near infrared spectroscopy and machine learning, including the following steps:

[0063] S1: Preparation of edamame samples;

[0064] The edible soybean materials used in this experiment were provided by the edible soybean research group of the Vegetable Research Institute of Zhejiang Academy of Agricultural Sciences. This group contains 336 materials, with the most varieties in Northeast my country. There are 206 varieties in Northeast my country, 60 varieties in Zhejiang, 7 varieties in Taiwan, and 5 varieties in Jiangsu; 33 varieties in Japan and 23 varieties in the United States. This group was planted in the Haining Yangdu Research and Innovation Base of Zhejiang Academy of Agricultural Sciences for two consecutive years in 2022 / 2023. Planting began in March each year, and it was harvested in June of the same year and field phenotypic traits were identified. According to the completely randomized block design, deep furrows and high ridges, ridge width of 0.9-1.1m, 2 rows, row spacing of 40-45cm, hole spacing of 25-30cm, 3-5 seeds per hole, and field fertilizer and water management were consistent with production.

[0065] For each material, several fresh seeds of vegetable soybeans that were in a relatively consistent commercial maturity period were taken, frozen in liquid nitrogen, and then dried in a freeze dryer (LABCONCO, USA) for 96 hours to remove moisture. They were then ground into fine powder using a Shanghai Jingxin brand JXFSTPRP-24L model fully automatic sample rapid grinder for standby use.

[0066] S2: Determine the amino acid and starch content of edamame samples using specific instruments, including:

[0067] After numbering the 336 core germplasm populations of edamame in S1, each numbered sample is divided into three parts for processing and testing according to step S1: Take out the first part of the numbered sample and dissolve it in a hydrochloric acid solution of a certain concentration to ensure that the sample is completely dissolved and evenly distributed. The dissolved sample is derivatized. Derivatization is to make amino acids easier to detect and separate, and appropriate reagents are usually used for chemical reactions. The derivatized sample is injected into a high-performance liquid chromatograph for separation and detection. HPLC can accurately separate different amino acids and measure their content through a detector, and finally obtain the amino acid content data of the sample. Take out the second part of the numbered sample and extract the starch in the sample by an appropriate extraction method (such as water or buffer solution extraction). Add amylase to the extracted sample for enzymatic hydrolysis. Amylase will break down starch into glucose for subsequent detection. The glucose content generated after enzymatic hydrolysis is detected by colorimetry or high-performance liquid chromatography (HPLC). The colorimetric method measures the absorbance change of the sample solution through a colorimeter to calculate the glucose content; HPLC obtains more accurate starch content data by separating and detecting glucose molecules.

[0068] S3: Use a near infrared analyzer to scan the gourd sample to obtain near infrared spectrum data, including:

[0069] The present invention uses a near-infrared hyperspectral camera of Hangzhou Caipu Technology Co., Ltd., model: FS-15. The wavelength range of the collected near-infrared is between 900nm and 1700nm. The freeze-dried powder of edamame is placed at the sampling port of the spectrometer for spectral data collection. After running the spectrometer, mid-infrared spectral data within this wavelength range is obtained; the sample is loaded into a sample cup with a diameter of 5 cm and a height of about 1.5 cm. The thickness and compaction of the sample are kept consistent to minimize the measurement error caused by uneven sample loading. Each sample is scanned three times, and the average absorption spectrum is calculated as the spectral value. The near-infrared spectral information of all samples is collected and stored.

[0070] The stored near-infrared spectral data are visualized, such as Figure 2 As shown in the near-infrared (NIR) reflectance spectrum of 336 edamame core germplasm populations, in this study, the absorption peak of starch is around 6700 cm^-1 (1492 nm), while for amino acids, the absorption peaks are concentrated around 4700 cm^-1 (2127) and 5100 cm^-1 (1960 nm).

[0071] In order to eliminate the background, noise and interference caused by instrument and position changes during data acquisition, it is necessary to preprocess the raw spectra. The raw spectral data can be preprocessed by applying the multiple scattering correction (MSC) and standard normalized variable (SNV) methods to eliminate the interference of noise and baseline drift. MSC correction corrects the influence of multiple scattering by constructing the ratio of the sample spectrum to the reference spectrum. Multiple scattering will lead to an increase in optical path length and a decrease in signal intensity. The basic formula for MSC correction is as follows:

[0072] MSC = (R sample -R min ) / (R ref -R min ), (1)

[0073] Among them, R sample is the sample spectrum, R ref is the reference spectrum, R min It is the minimum value of the spectrum. The purpose of MSC correction is to remove the residual scattering components in the spectrum and improve the accuracy and comparability of the sample spectrum.

[0074] MSC can eliminate the spectral differences caused by different scattering levels during spectral measurement (different spectra will have differences in measurement position, light during measurement, etc.), and enhance the correlation between the spectrum and the data. In order to eliminate the spectral differences caused by different scattering levels (i.e., to correct the baseline shift and offset of the spectral data), this method needs to use an "ideal spectrum" (the change in the spectrum and the content of the components in the sample satisfy a direct linear relationship) for correction. Since the "ideal spectrum" is difficult to obtain, the average value of all spectral data is used instead of the "ideal spectrum" in this algorithm. The specific results are as follows. Figure 2 Shown

[0075] S5: Select feature bands from the pre-processed near infrared spectral data obtained in S3, and then divide the test set and training set into a ratio of 7:3. Specifically, it includes:

[0076] The feature importance selection algorithm based on random forest (RF) is used. Random forest itself is an integrated learning method that improves the performance and stability of the model by combining the prediction results of multiple decision trees. The feature importance selection algorithm utilizes the inherent characteristics of random forest and can effectively evaluate the contribution of each feature to model prediction.

[0077] After extracting the characteristic bands, the near-infrared spectral data were randomly divided into training set and test set in a ratio of 7:3. In total, 235 training samples and 101 test samples were used.

[0078] In this study, significant feature bands were extracted using a random forest (RF)-based feature importance selection algorithm. Figure 4 The distribution of these characteristic bands is shown.

[0079] S4: First, construct the input layer. The input layer inputs the near-infrared spectrum data in the wavelength range of 900nm to 1700nm collected by the near-infrared spectrum equipment. Each row of data except the first column (label column) is used as the input layer of the network structure.

[0080] Constructing hidden layers: Include multiple hidden layers in the deep neural network model, where each hidden layer has a different number of neurons. The first hidden layer has 250 neurons, the second hidden layer has 500 neurons, the third hidden layer has 1000 neurons, and the last two hidden layers have 500 and 250 neurons respectively.

[0081] Construct the output layer: The output layer includes a neuron, which is used to predict the target value, which is the content of the principal component.

[0082] Activation function: All hidden layers use ReLU (Rectified Linear Unit) activation function to process input data. All hidden layers use ReLU (Rectified Linear Unit) activation function to process input data.

[0083] Construct Dropout layer: 'nn.Dropout(0.05)' is added after each hidden layer to reduce fitting by randomly turning off some neurons.

[0084] In general, this DNN model is a feedforward neural network, which includes multiple hidden layers, each hidden layer is followed by a ReLU activation function and a Dropout layer, and finally an output layer. Figure 3 as shown.

[0085] S6: Training model:

[0086] During the training process, the ratio of the training set to the test set is 7:3. The mean squared error loss function (MSE) is selected as the loss function of the model in the deep neural network model. The Adam optimizer is selected in the model, and the learning rate is set to 0.0001 to update the model parameters. 64 samples are used in each iteration to calculate the loss and update the model parameters. 2000 training cycles are defined in the deep neural network model. Each training cycle is a traversal of the entire training data set. The results are then visualized and the predicted values ​​are compared with the actual values.

[0087] S7: Use the training set in S5 to train the prediction model in S4, and use the test set in S5 to test the performance of the model in S4. And based on the determination coefficient R between the predicted value and the actual value of the test set 2 And RMSE are used as indicators to determine the effectiveness of the model.

[0088]

[0089] like Figure 5.1 and Figure 5.2 ,As shown in Tables 1 and 2, the prediction model of starch and amino acid content based on ,the deep neural network model has a good fitting effect with the observed data (test set).,It can be clearly seen from the figures and tables that the deep neural network has ,an obvious advantage in the performance of the test set.

[0090] Table 1 Results of starch prediction model

[0091]

[0092] Table 2 Results of amino acid prediction model

[0093]

[0094] This method can be used to monitor the content of important quality indicators in the edamame production process in real time, improve production efficiency and quality control, and provide a new and efficient detection method for important quality indicators in the field of agricultural product testing, which has broad application prospects.

[0095] Example 2

[0096] The present embodiment relates to a gourd quality prediction device based on spectral technology and machine learning, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the rapid prediction of important quality indicators of edamame based on near-infrared spectroscopy and deep learning in Example 1.

[0097] Example 3

[0098] The present embodiment relates to a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for quickly predicting important quality indicators of edamame based on near-infrared spectroscopy and deep learning of Example 1 is implemented.

[0099] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A method for rapid prediction of important quality indicators of edamame is established based on near-infrared spectroscopy and deep learning. Taking edamame samples as an example, the following steps are included: S1: Preparation of edamame samples; S2: Determine the amino acid and starch content of edamame samples using specific instruments; S3: near infrared spectral data collection and spectral data preprocessing; S4: Build a deep neural network model; S5: Select feature bands from the preprocessed near-infrared spectral data obtained in S3, and then divide the data into a test set and a training set in a ratio of 7:3; S6: Training deep neural network model; S7: Based on the deep neural network model trained in S6, the near infrared spectrum data is input to obtain the amino acid and starch content of the corresponding edamame.

2. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The vegetable soybean material selected in step S1; the group includes 336 materials, which are planted in March each year, harvested in June of the same year and subjected to field phenotypic trait identification; a completely randomized block design is used, and field fertilizer and water management is consistent with production; for each material, several fresh seeds of vegetable soybeans that are in a relatively consistent commercial maturity period are taken, frozen in liquid nitrogen, and then dried in a freeze dryer for 96 hours to remove moisture, and then ground into fine powder.

3. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The 336 core germplasm groups of edamame in S1 are numbered. According to step S1, each numbered sample is divided into three parts. In the first part, the sample is dissolved in hydrochloric acid, derivatized, and then separated and the amino acid content of the sample is detected by high performance liquid chromatography (HPLC); in the second part, the edamame sample is extracted, and then amylase is added for hydrolysis, and the generated glucose is detected by colorimetry or high performance liquid chromatography to obtain the starch content in the edamame sample; The following steps are involved: S3.1: Collect near infrared spectroscopy data: The wavelength range of the collected near-infrared light is between 900nm and 1700nm. The freeze-dried powder of edamame is placed at the sampling port of the spectrometer to collect spectrum data. After running the spectrometer, mid-infrared spectrum data within this wavelength range is obtained. S3.2: The third part of the sample is loaded into a sample cup with a diameter of 5 cm and a height of about 1.5 cm; the thickness and compaction of the sample are kept consistent to minimize the measurement error caused by uneven sample loading; each sample is scanned three times, and the average absorption spectrum is calculated as the spectral value; the near-infrared spectral information of all samples is collected and stored; S3.3: Near infrared spectroscopy data processing: The raw spectral data is preprocessed by applying the multiple scattering correction MSC and the standard normalized variable SNV method to eliminate the interference of noise and baseline drift; MSC correction corrects the influence of multiple scattering by constructing the ratio of the sample spectrum to the reference spectrum; multiple scattering will lead to an increase in optical path length and a decrease in signal intensity. The basic formula of MSC correction is as follows: MSC = (R sample - R min ) / (R ref - R min ), (1) Among them, R sample is the sample spectrum, R ref is the reference spectrum, R min It is the minimum value of the spectrum; the purpose of MSC correction is to remove the residual scattering components in the spectrum and improve the accuracy and comparability of the sample spectrum; The MSC correction algorithm uses the average value of all spectral data instead of the ideal spectrum.

4. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The step S3 uses a near-infrared hyperspectral camera to scan the third part of the sample in step S2 to obtain near-infrared spectral data, wherein the preprocessing step includes spectral multivariate scatter correction (MSC) processing to ensure that the mean of each spectral data point is zero and the standard deviation is one.

5. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The deep neural network model built in step S4, wherein the DNN model adopts a neural network structure with five hidden layers, and this DNN model is a feedforward neural network, including multiple hidden layers, each hidden layer is followed by a ReLU activation function and a Dropout layer, and finally an output layer to process the complex relationship of spectral data, thereby improving the prediction accuracy of the main component content of edamame.

6. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The step S5 uses a random forest RF feature importance selection algorithm to screen out characteristic bands of edamame for different internal physical and chemical indicators.

7. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The step S6 transforms the training data set and the training labels into different shapes to match the input requirements of the deep neural network model.

8. The method for rapidly predicting important quality indicators of edamame based on near infrared spectroscopy and deep learning as claimed in claim 1, characterized in that: The step S7 uses the test set in S5 to train the prediction model in S4, and uses the test set in S4 to test the performance of the model in S6; and based on the determination coefficient R between the predicted value and the actual value of the test set 2 And RMSE are used as indicators to determine the effectiveness of the model.

9. A gourd quality prediction device based on spectral technology and machine learning, characterized in that: It includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the rapid prediction of important quality indicators of edamame based on near-infrared spectroscopy and deep learning as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for quickly predicting important quality indicators of edamame based on near-infrared spectroscopy and deep learning as described in any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Method for detecting amino acid content in grain by use of terahertz frequency-domain spectrum technology

    CN104330384A

  • Method for rapidly detecting quality of special wheat flour based on near infrared spectrum

    CN118566159A

  • Method for detecting rabbit meat grade based on hyperspectral imaging technology

    CN118583791A

  • Method for detecting content of resistant starch based on near infrared spectrum

    CN118641502A

  • Tea water content detection model construction method, detection method, equipment and medium

    CN118794919A

Cited By

  • Soybean producing area traceability detection method based on near infrared spectrum technology

    CN122016714A