Pumpkin fruit sensory quality detection method based on near infrared spectrum and machine learning

Using near-infrared spectroscopy and machine learning technology, a sensory quality prediction model for pumpkin fruits was constructed, which solved the problem of strong subjectivity in traditional methods, achieved rapid and accurate detection of pumpkin fruit quality, and provided support for pumpkin quality breeding.

CN118641501APending Publication Date: 2024-09-13INST OF VEGETABLES GUANGDONG PROV ACAD OF AGRI SCI +1

Patent Information

Application Number
CN202410758522.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Traditional sensory methods are highly subjective in pumpkin fruit quality evaluation, making it difficult to achieve scientific, objective and rapid quality detection, affecting pumpkin quality breeding and market demand.

Method used

A pumpkin fruit sensory quality detection method based on near-infrared spectroscopy and machine learning is adopted. By collecting near-infrared spectral data, a partial least squares regression or support vector regression model is constructed, and the particle swarm algorithm is used to optimize hyperparameters to predict the sensory quality of pumpkin fruits. .

Benefits of technology

It achieves rapid and accurate detection of the sensory quality of pumpkin fruits, reduces the investment of manpower, material resources and financial resources, provides new technical means for pumpkin quality breeding, and improves the scientificity and objectivity of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118641501A
    Figure CN118641501A
Patent Text Reader

Abstract

The invention relates to a pumpkin fruit sensory quality detection method based on near infrared spectrum and machine learning. The method comprises the following steps: collecting near infrared spectrum data of pumpkin fruits to be detected; constructing a sensory quality near-infrared prediction model based on a partial least squares regression model PLS or a support vector regression model SVR, wherein the near-infrared prediction model is obtained through training of the training set; and inputting near infrared spectrum data of a pumpkin fruit to be detected into the model to obtain a sensory score of the pumpkin fruit. According to the method, rapid detection of the sensory score of the pumpkin fruits is achieved, the operation process is simple, rapid and accurate, a new technical means is provided for sensory evaluation of the pumpkin fruits, and meanwhile, a technical support is provided for quality breeding improvement of pumpkins.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vegetable quality detection, and in particular to a method for detecting the sensory quality of pumpkin fruits based on near infrared spectroscopy and machine learning. Background Art

[0002] With the development of my country's economy, the demand of the consumer market has shifted from pursuing output to pursuing quality, and the demand for characteristic and high-quality agricultural products is growing. At the same time, the focus of scientific research and breeding has also shifted from increasing output to improving quality and nutrition. Pumpkin is an important vegetable and grain crop, rich in nutrients, and China is one of the countries with the highest pumpkin production in the world. People mostly use traditional sensory evaluation methods to evaluate the quality of pumpkin fruits. Although traditional sensory evaluation methods are classic, they are highly professional and easily affected by various factors such as differences in evaluators' preferences, physical condition and environment, resulting in highly subjective results. Therefore, it is very necessary to develop a convenient, scientific, objective and effective method for evaluating pumpkin fruit quality. Summary of the invention

[0003] The purpose of the present invention is to provide a pumpkin fruit sensory quality detection method based on near-infrared spectroscopy and machine learning, so as to realize the rapid detection of the sensory quality of pumpkin fruit. The operation process is simple, fast and accurate, which provides a new technical means for the sensory evaluation of pumpkin fruit and provides technical support for the quality breeding and improvement of pumpkin.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] Pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning, including:

[0006] Collect near infrared spectrum data of pumpkin fruit to be tested;

[0007] A near-infrared prediction model is constructed, and the near-infrared spectrum data of the pumpkin fruit to be tested is input into the near-infrared prediction model to obtain the sensory score of the pumpkin fruit to be tested, wherein the near-infrared prediction model is constructed based on a partial least squares regression model PLS or a support vector regression model SVR, and is obtained by training based on a training set containing sensory evaluation scores and near-infrared spectrum data.

[0008] Optionally, collecting near infrared spectrum data of the pumpkin fruit to be tested includes:

[0009] Perform near infrared spectroscopy scanning on the pumpkin fruit to be tested and collect the original near infrared spectrum;

[0010] The original near-infrared spectrum is preprocessed using the optimal spectral transformation to obtain the near-infrared spectrum data of the pumpkin fruit to be tested.

[0011] Optionally, before preprocessing the original near-infrared spectrum using the optimal spectral transformation, the method includes:

[0012] The original near-infrared spectrum is subjected to several preprocessings, and the preprocessed original near-infrared spectrum is subjected to Pearson correlation analysis and independent principal component dimensionality reduction processing to obtain the optimal spectral transformation, wherein multivariate scattering correction is the optimal spectral transformation.

[0013] Optionally, several preprocessing methods include: multivariate scatter correction, normalization, standard normal variate exchange, data centering, and moving average smoothing.

[0014] Optionally, constructing the near infrared prediction model based on a partial least squares regression model PLS or a support vector regression model SVR includes:

[0015] Based on the training set, the partial least squares regression model, and the support vector regression model, a PLS prediction model and an SVR prediction model are constructed;

[0016] The hyperparameters of the PLS prediction model and the SVR prediction model are optimized based on the particle swarm algorithm to obtain the near infrared prediction model.

[0017] Optionally, constructing a PLS prediction model includes:

[0018] Centralizing and standardizing the near-infrared spectral data in the training set, performing singular value decomposition on the processed data, and obtaining a left singular matrix, a singular value matrix, and a right singular matrix;

[0019] Selecting Top-k maximum singular values ​​based on the singular value matrix, and selecting corresponding left singular vectors and right singular vectors in the left singular matrix and the right singular matrix according to the maximum singular values;

[0020] Based on the left singular vector and the right singular vector, the PLS prediction model is constructed.

[0021] Optionally, optimizing the hyperparameters of the PLS prediction model and the SVR prediction model based on a particle swarm algorithm includes:

[0022] The hyperparameters of the PLS prediction model and the SVR prediction model are defined, and then the particle swarm algorithm is used to perform an iterative search to obtain the globally optimal hyperparameter combination of the PLS prediction model and the SVR prediction model.

[0023] Optionally, the sensory evaluation score is a comprehensive sensory score of the pumpkin fruit sample based on five sensory indicators: sweetness, texture, powderiness, glutinousness and aroma.

[0024] The beneficial effects of the present invention are as follows: the present invention firstly conducts subjective evaluation and scoring of pumpkin fruits, and at the same time, collects near-infrared spectra of pumpkin samples, and divides them into calibration sets and validation sets to remove abnormal values; secondly, the collected near-infrared spectra are preprocessed by five preprocessing methods (multiple scattering correction, normalization, standard normal variable exchange, data centering, and moving average smoothing), and the optimal processing method is obtained by using Pearson correlation coefficient and principal component analysis visualization, which is multiple scattering correction; then partial least squares regression (PLS) and support vector regression (SVR) are constructed based on maximum singular value decomposition; finally, near-infrared spectroscopy, machine learning and subjective tasting scores are combined to establish PLS and SVR prediction models for the sensory quality of pumpkin fruits, and particle swarm algorithm is used to effectively optimize the hyperparameters of PLS ​​and SVR models to improve the performance of the model. This model can effectively predict the sensory quality of pumpkin fruits, and its operation is simple, fast and environmentally friendly. Compared with traditional sensory evaluation methods, it greatly reduces the investment of manpower, material resources and financial resources. In addition, the model also provides a new technical means for high-quality pumpkin breeding. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0026] Figure 1 This is a flow chart of a method for detecting sensory quality of pumpkin fruit based on near-infrared spectroscopy and machine learning according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] Near infrared spectroscopy (NIRS) is an advanced analytical technique that can provide chemical and structural analysis for the characterization and classification of organic and biological products. NIRS mainly uses electromagnetic waves in the near infrared range, with wavelengths ranging from 780 to 2500 nanometers. The main advantage of this technology is that it provides fast, safe, and non-destructive analysis, as well as minimal sample preparation and fewer reagent requirements, ultimately minimizing environmental impact. Near infrared spectroscopy has been widely used to evaluate the composition of different substances, identify impurities, determine differences in material composition, and detect unknown substances. If a model is established, it can be used to quickly and efficiently evaluate a large number of samples. Applying machine learning algorithms to data collected by sensors such as near infrared spectrometers can improve data understanding capabilities and the accuracy of quantitative models. Therefore, this embodiment uses near infrared spectroscopy technology and combines machine learning methods to establish a pumpkin fruit sensory quality prediction model, which provides a new method for rapid evaluation of pumpkin fruit sensory quality.

[0030] like Figure 1 As shown, the present invention discloses a pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning, comprising:

[0031] Collect near infrared spectrum data of pumpkin fruit to be tested;

[0032] Specifically, collecting the near-infrared spectrum data of the pumpkin fruit to be tested includes: performing near-infrared reflection on the pumpkin fruit to be tested and collecting the original near-infrared spectrum; and preprocessing the original near-infrared spectrum using optimal spectral transformation to obtain the near-infrared spectrum data of the pumpkin fruit to be tested.

[0033] Specifically, before using the optimal spectral transformation to preprocess the original near-infrared spectrum, the method includes: performing several preprocessing steps on the original near-infrared spectrum, using Pearson correlation analysis and independent principal component dimensionality reduction processing on the preprocessed original near-infrared spectrum to obtain the optimal spectral transformation, wherein multivariate scattering correction is the optimal spectral transformation.

[0034] A near infrared prediction model is constructed, and the near infrared spectrum data of the pumpkin fruit to be tested is input into the near infrared prediction model to obtain the sensory score of the pumpkin fruit to be tested, wherein the near infrared prediction model is constructed based on a partial least squares regression model PLS or a support vector regression model SVR, and is obtained based on training of a training set.

[0035] Specifically, constructing the near-infrared prediction model based on the partial least squares regression model PLS or the support vector regression model SVR includes: constructing a PLS prediction model and an SVR prediction model based on the training set, the partial least squares regression model, and the support vector regression model; optimizing the hyperparameters of the PLS prediction model and the SVR prediction model based on the particle swarm algorithm to obtain the near-infrared prediction model.

[0036] Furthermore, obtaining the near infrared prediction model includes:

[0037] (1) Collection and processing of pumpkin fruit samples: Different pumpkin varieties were collected from all over the country, and varieties with large differences in regional background were selected. The collected pumpkin samples of different varieties were peeled and the pulp was removed, and they were cut into 30 mm samples using a mold.

[0038] (2) Sensory evaluation of pumpkin fruit samples: 12 trained evaluators (6 males and 6 females, aged 20-40 years), mainly laboratory students and teachers with more than 2 years of experience in fruit and vegetable flavor and nutritional quality research, gave a comprehensive sensory evaluation of pumpkin fruit based on five aspects: sweetness, texture, powderiness, glutinousness, and aroma. The full score is 100 points, and the better the sensory quality, the higher the score.

[0039] (3) Near-infrared spectral acquisition: A PerkinElmer FT-NIR Fourier transform near-infrared spectrometer was used to obtain near-infrared spectral data of pumpkin samples.

[0040] (4) Preprocessing of pumpkin near-infrared spectra: The near-infrared spectra were preprocessed using five different methods through MATLAB programming, and the Pearson correlation coefficient and PCA were used for significance analysis.

[0041] (5) Pumpkin fruit sensory score prediction model: A near-infrared prediction model was established by partial least squares regression (PLS) or support vector regression model (SVR) combined with the absolute content of pumpkin fruit sensory evaluation indicators. The sensory evaluation values ​​in the model were determined by cross-validation. The cross-validation correlation coefficient (R 2 cV), prediction correlation coefficient (R 2 The best model is screened by using the root mean square error of cross validation (RMSECV) and the root mean square error of prediction (RMSEP). The closer Rc and Rp are to 1, the lower RMSECV and RMSEP are, and the better the predictive ability and stability of the model are. The establishment and evaluation of the above algorithms and the final model are completed through the built-in functions of the sklearn package in Python language.

[0042] (6) A particle swarm algorithm is used to optimize the hyperparameters of the near-infrared prediction model and to predict the scores of the pumpkin samples to be tested: near-infrared spectral data of the pumpkin samples to be tested are collected according to the method of steps (2)-(3), the spectral data are preprocessed according to step (4), and then the pumpkin fruit sensory score prediction model of step (5) is used to quickly predict the sensory score of the pumpkin fruit.

[0043] Furthermore, in the step (1), the pumpkin sample is processed by dividing the sample into two parts, one for sensory tasting and the other for near-infrared spectroscopy scanning.

[0044] Furthermore, in step (3), near infrared spectroscopy data is collected and the pumpkin sample is scanned under the following conditions: the sampling method is integrating sphere solid sampling, and the collection condition is a resolution of 4 cm -1 , Scan times 32, Scan range 4000~12000cm -1 (833-2500nm). The obtained spectral data are saved in .sp format.

[0045] Furthermore, in step (5), the five near-infrared spectra preprocessing methods are: multivariate scatter correction (MSC), normalization, standard normal variate transformation (SNV), center transform, and moving average smoothing (Window Smoothing). Through Pearson correlation analysis, the correlation coefficient between the spectral data is calculated to find the wavelength with strong correlation. Then, independent principal component analysis (PCA) is used to reduce the dimension of the spectral data and extract the most important features. Then, through visual analysis, the optimal spectral transformation is determined to obtain an optimal multivariate scatter correction (MSC) preprocessing.

[0046] Furthermore, in step (6): firstly collect the near infrared spectrum data of the pumpkin sample, and at the same time, perform sensory tasting scores on the corresponding samples. Then, construct partial least squares regression (PLS) based on maximum singular value decomposition, and the specific steps include: data preprocessing: centering and standardizing the near infrared spectrum data after multivariate scattering correction to eliminate the scale differences between different variables; singular value decomposition (SVD): performing SVD decomposition on the preprocessed data matrix to obtain a left singular matrix, a singular value matrix and a right singular matrix; selecting the maximum singular value: selecting the top-k maximum singular values ​​from the singular value matrix, and selecting the corresponding left singular vector and right singular vector in the left singular matrix and the right singular matrix according to the maximum singular value; constructing a PLS model: constructing a PLS model using the selected left singular vector and right singular vector to realize the mapping relationship between X and Y, that is, to realize the mapping relationship between the near infrared spectrum data and the sensory quality score. Further construct a support vector regression (SVR) model. The PLS model based on maximum singular value decomposition has better robustness, feature extraction ability and computational efficiency, and has better prediction performance than the traditional PLS model. After model training and verification, the model with better performance was selected to predict the sensory evaluation scores of new pumpkin samples. Finally, a pumpkin sensory evaluation prediction model based on near-infrared spectral data was established to evaluate the quality and characteristics of pumpkin.

[0047] Specifically, in step (6), optimizing the hyperparameters of the PLS prediction model and the SVR prediction model based on the particle swarm algorithm includes: defining the hyperparameters of the PLS prediction model and the SVR prediction model respectively, and performing iterative search using the particle swarm algorithm to obtain the globally optimal hyperparameter combination of the PLS prediction model and the SVR prediction model.

[0048] Furthermore, in step (6): based on the particle swarm algorithm (PSO), the hyperparameters of the PLS and SVR models are optimized. First, the hyperparameters of the PLS model are defined, including the number of components to be retained n_component, whether to scale the data n_scale, and the maximum number of iterations n_iter. Then, the hyperparameters of the SVR model are defined, including the kernel function type {'linear', 'poly', 'rbf, 'sigmoid', 'precomputed'}, the regularization coefficient C, the coefficient gamma of the RBF, polynomial, Sigmoid kernel function, and the maximum number of iterations n_iter. Finally, the particle representation, population initialization, fitness function, and particle update rule are defined. The particle swarm algorithm finds the global optimal combination of PLS ​​and SVR hyperparameters through iterative search. During the iteration process, the particle swarm algorithm continuously updates the position and velocity of the particles until the stopping condition is met, such as the maximum number of iterations or the fitness function value reaches a threshold. Finally, the global optimal combination of PLS ​​and SVR hyperparameters is output, that is, the optimal solution of the particle swarm algorithm. This step can improve the prediction accuracy and robustness of the model and provide an optimized hyperparameter combination for subsequent model training and prediction.

[0049] Finally, it was verified that the PLS and SVR models optimized by PSO using the multivariate scatter correction (MSC) preprocessing method based on the above optimized technology were better than the other four preprocessing methods. 2 p were 0.670 and 0.402, respectively. R of PLS ​​and SVR models of preprocessing method MSC 2 The p values ​​were 0.757 and 0.773, respectively, indicating that the model has good predictive performance.

[0050] Finally, the cross-validation correlation coefficient (R 2 cv)=1, prediction correlation coefficient (R 2 p)=0.757, cross validation mean square error (RMSECV)=0.083 points, prediction mean square error (RMSEP)=3.17 points; SVR prediction model cross validation correlation coefficient (R 2 cv)=0.895, prediction correlation coefficient (R 2 p)=0.773, cross validation mean square error (RMSECV)=2.36 points, prediction mean square error (RMSEP)=3.06 points.

[0051] Example

[0052] Pumpkin fruit sensory quality detection methods based on near-infrared spectroscopy and machine learning include:

[0053] (1) Sample collection and processing:

[0054] Different pumpkin fruit varieties were selected, peeled and pulped, and the pulp was cut into slices with a thickness of about 30 mm. These slices were divided into two batches. The first batch was used for near-infrared spectroscopy scanning, and the samples were divided into two sets: training set and test set. The test set samples were used to test the robustness of the training set model. The second batch was used for sensory tasting and scoring.

[0055] (2) Near infrared spectrum acquisition:

[0056] The first batch of pumpkin slices collected in (1) were dried and ground into powder, and placed in a near-infrared spectrometer for spectral acquisition. The spectra were acquired using a PerkinElmer FT-NIR Fourier transform near-infrared spectrometer; sampling method: integrating sphere solid sampling; acquisition conditions: resolution 4 cm -1 , scanning times 32 times, scanning range 4000~12000cm -1 (i.e. 833~2500nm).

[0057] (3) Data preprocessing:

[0058] For the spectra collected in (2), the data format was finally directly imported into the Python Scikit-learn package for further analysis. Five methods, including multivariate scatter correction, normalization, standard normal variable exchange, data centering, and moving average smoothing, were used for preprocessing to eliminate the spectral differences caused by different scattering levels, thereby enhancing the correlation between the spectrum and the data. Then, Pearson correlation analysis and independent principal component (PCA) dimensionality reduction visualization analysis were used to obtain the spectrum transformation into multivariate scatter correction (MSC) as the optimal candidate preprocessing scheme.

[0059] Further, by comparing the cross-validation correlation coefficient R of the model 2 cv, predicted correlation coefficient R 2 p, cross-validation root mean square error RMSECVL and prediction root mean square error RMSEP to screen the best model. As shown in Table 1, the results of the five preprocessing methods are as follows: multivariate scatter correction (MSC) data preprocessing, the cross-validation correlation coefficient (R) of the partial least squares (PLS) prediction model of pumpkin sensory quality is established. 2 cv)=1, prediction correlation coefficient (R 2 p)=0.757, cross validation mean square error (RMSECV)=0.083 points, prediction mean square error (RMSEP)=3.17 points; support vector regression (SVR) prediction model cross validation correlation coefficient (R 2 cv)=0.895, prediction correlation coefficient (R2 p)=0.773, cross validation mean square error (RMSECV)=2.36 points, prediction mean square error (RMSEP)=3.06 points. However, the improvement effect of other preprocessing methods is not good. This shows that MSC preprocessing can effectively reduce interference signals and reduce adverse phenomena such as spectrum baseline drift and translation. Therefore, in this embodiment, all spectral data are analyzed after MSC preprocessing.

[0060] Table 1

[0061]

[0062] R 2 cv: cross-validation determination coefficient; R 2 p: prediction determination coefficient; RMSECV: root mean square error of cross-validation; RMSEP: root mean square error of prediction.

[0063] (4) Pumpkin fruit sensory evaluation score:

[0064] The pumpkin fruit samples with a thickness of 30 mm in (1) were boiled in boiling water for 15 minutes under normal pressure, cooled to about 40°C, and then placed in a tray. Each sample was randomly numbered, and each expert evaluator (laboratory students and teachers with more than 2 years of research on the flavor and nutritional quality of fruits and vegetables) independently evaluated and scored at room temperature. After evaluating each sample, rinsed the mouth with clean water, and evaluated the next sample after an interval of 1.5 minutes. The five sensory indicators of sweetness, texture, powderiness, glutinousness and aroma of the pumpkin fruit samples were comprehensively scored on a scale of 1-100. Among them, the higher the score, the better the quality of the pumpkin and the more popular it is with consumers. On the contrary, a lower score indicates that the quality of the pumpkin is poor and is not easily accepted by consumers.

[0065] (5) Hyperparameter optimization of machine learning prediction model based on particle swarm algorithm

[0066] The particle swarm algorithm (PSO) is used to optimize the hyperparameters of PLS: the number of components retained n_component, ranging from {2, 20}, whether to scale the data n_scale, ranging from {0, 1}, the maximum number of iterations n_iter, ranging from {50, 150}, and the hyperparameters of SVR: kernel function type {'linear', 'poly', 'rbf, 'sigmoid', 'precomputed'}, regularization coefficient C, ranging from {0.001, 0.01, 0.1, 1, 10}, the maximum number of iterations n_iter, ranging from {50, 150}, etc. The particle representation, population initialization, fitness function, particle update and iteration are defined until the stopping condition is met. The optimal PLS parameters are n_component=2, n_scale=0, and the maximum number of iterations is 120; the optimal values ​​of the SVR hyperparameters are kernel function "rbf", regularization coefficient C=0.01, and the maximum number of iterations n_iter=150.

[0067] (6) Model construction and prediction of pumpkin fruit sensory quality

[0068] The data format was finally directly imported into Python's Scikit-learn package for further analysis. The sensory quality of 24 pumpkin samples was predicted. The actual scores of the 24 pumpkin samples and the predicted scores under the PLS model and SVR model are shown in Table 2. The prediction results show that the cross-validation correlation coefficient (R 2 c)=1.00, prediction correlation coefficient (R 2 p)=0.757, cross validation mean square error (RMSECV)=0.083 points, prediction mean square error (RMSEP)=3.17 points; support vector regression (SVR) prediction model cross validation correlation coefficient (R 2 cv)=0.895, prediction correlation coefficient (R 2 p) = 0.773, cross validation mean square error (RMSECV) = 2.36 points, prediction mean square error (RMSEP) = 3.06 points. By comparison, it can be seen that the prediction of the PLS model in this embodiment is more accurate, so the PLS model is selected as the prediction model.

[0069] Table 2

[0070]

[0071] (7) Evaluation of sensory quality of pumpkin fruit

[0072] For pumpkin fruits that need to be sensory evaluated, near-infrared reflectance spectra are collected according to the method in (2), and then the spectral data are preprocessed according to the method in (3). Finally, the preprocessed spectral data are imported into the prediction model based on PLS to obtain the tasting score of pumpkin fruits and realize the rapid evaluation of the sensory quality of pumpkin fruits.

[0073] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for detecting the sensory quality of pumpkin fruit based on near infrared spectroscopy and machine learning, characterized in that: include: Collect near infrared spectrum data of pumpkin fruit to be tested; A near-infrared prediction model is constructed, and the near-infrared spectrum data of the pumpkin fruit to be tested is input into the near-infrared prediction model to obtain the sensory score of the pumpkin fruit to be tested, wherein the near-infrared prediction model is constructed based on a partial least squares regression model PLS or a support vector regression model SVR, and is obtained by training based on a training set containing sensory evaluation scores and near-infrared spectrum data.

2. The pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning according to claim 1, characterized in that: The near infrared spectrum data of pumpkin fruit to be tested are collected including: Perform near infrared spectroscopy scanning on the pumpkin fruit to be tested and collect the original near infrared spectrum; The original near-infrared spectrum is preprocessed using the optimal spectral transformation to obtain the near-infrared spectrum data of the pumpkin fruit to be tested.

3. The pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning according to claim 2, characterized in that: Before preprocessing the original near infrared spectrum using the optimal spectrum transformation, the method includes: The original near-infrared spectrum is subjected to several preprocessings, and the preprocessed original near-infrared spectrum is subjected to Pearson correlation analysis and independent principal component dimensionality reduction processing to obtain the optimal spectral transformation, wherein multivariate scattering correction is the optimal spectral transformation.

4. The pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning according to claim 1, characterized in that: Several preprocessing methods were used including: multivariate scatter correction, normalization, standard normal variate exchange, data centering, and moving average smoothing.

5. The pumpkin fruit sensory quality detection method based on near infrared spectroscopy and machine learning according to claim 1, characterized in that: The near infrared prediction model is constructed based on the partial least squares regression model PLS or the support vector regression model SVR, including: Based on the training set, the partial least squares regression model, and the support vector regression model, a PLS prediction model and an SVR prediction model are constructed; The hyperparameters of the PLS prediction model and the SVR prediction model are optimized based on the particle swarm algorithm to obtain the near infrared prediction model.

6. The method for detecting pumpkin fruit sensory quality based on near infrared spectroscopy and machine learning according to claim 5, characterized in that: Building a PLS prediction model includes: Centralizing and standardizing the near-infrared spectral data in the training set, performing singular value decomposition on the processed data, and obtaining a left singular matrix, a singular value matrix, and a right singular matrix; Selecting Top-k maximum singular values ​​based on the singular value matrix, and selecting corresponding left singular vectors and right singular vectors in the left singular matrix and the right singular matrix according to the maximum singular values; Based on the left singular vector and the right singular vector, the PLS prediction model is constructed.

7. The method for detecting pumpkin fruit sensory quality based on near infrared spectroscopy and machine learning according to claim 5, characterized in that: Optimizing the hyperparameters of the PLS prediction model and the SVR prediction model based on the particle swarm algorithm includes: The hyperparameters of the PLS prediction model and the SVR prediction model are defined, and then the particle swarm algorithm is used to perform an iterative search to obtain the globally optimal hyperparameter combination of the PLS prediction model and the SVR prediction model.

8. The method for detecting pumpkin fruit sensory quality based on near infrared spectroscopy and machine learning according to claim 1, characterized in that: The sensory evaluation score is a comprehensive sensory score of the pumpkin fruit sample based on five sensory indicators: sweetness, texture, powderiness, glutinousness and aroma.

Citation Information

Patent Citations

  • Strawberry sensory quality grade evaluation method based on near infrared spectrum

    CN112098357A

  • Pumpkin fruit quality parameter detection method and device and computer equipment

    CN112525855A

  • Method and device for predicting aroma amount of tobacco sample and computer readable medium

    CN112801300A

  • Tobacco mellowing judgment method based on near infrared spectrum

    CN114295579A

  • Rapid evaluation method for sensory quality of pumpkins

    CN117740722A

Cited By

  • Fruit quality detection method based on two-dimensional data fusion

    CN119377884A

  • Melon and fruit quality prediction method based on spectrum technology, conductivity measurement and machine learning

    CN119782696A

  • A melon and fruit quality prediction method based on spectral technology, conductivity measurement and machine learning

    CN119782696B