Method, system, electronic device and storage medium for detecting starch content in agricultural products
Through confocal microscopy Raman spectroscopy technology and machine learning algorithms, a rice starch content detection model was established, which solved the problems of long time and pollution in traditional detection methods, and achieved rapid, accurate and environmentally friendly detection effects.
Patent Information
- Application Number
- CN202211424946.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-11-14
AI Technical Summary
The traditional rice starch content detection method has the disadvantages of long detection time, cumbersome testing process and harmful substances, and requires a fast, stable and low contaminant detection method.
Confocal micro Raman spectroscopy technology is used to combine gray wolf optimization algorithm and support vector regression algorithm to establish a starch content detection model for agricultural products. By acquiring and processing Raman spectral data of agricultural product flake samples, the starch content is quickly and quantitatively detected.
It realizes rapid and accurate detection of rice starch content, avoids the problems of long detection time and pollution in traditional methods, and is characterized by high efficiency, stability and environmental protection.
Smart Images

Figure CN115711874B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of starch content, and in particular to a method, system, electronic equipment and storage medium for detecting starch content in agricultural products based on confocal micro-Raman spectroscopy. Background Art
[0002] Rice is one of the main agricultural products for human survival and is rich in nutrients. The determination of rice starch content is of great significance for the quality analysis of rice, so rice starch content is an important indicator for measuring rice quality. With the development of globalization, higher requirements have been put forward for the detection method of rice starch content. Traditional starch content detection methods have the disadvantages of long detection time, cumbersome test process and the generation of harmful substances. Therefore, it is necessary to study a fast, stable and less polluting rice starch content detection method. Summary of the invention
[0003] The purpose of the present invention is to provide a method, system, electronic equipment and storage medium for detecting starch content in agricultural products based on confocal micro-Raman spectroscopy, which has the advantages of being fast, stable and not generating additional pollutants.
[0004] To achieve the above object, the present invention provides the following solutions:
[0005] In a first aspect, the present invention provides a method for detecting starch content in agricultural products, comprising:
[0006] Acquire Raman spectrum data of the agricultural product slice sample to be tested collected by a confocal micro-Raman spectrometer;
[0007] Processing the Raman spectrum data of the agricultural product slice sample to be detected to obtain processed Raman spectrum data of the agricultural product slice sample to be detected;
[0008] Inputting the Raman spectrum data of the processed agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product;
[0009] The agricultural product starch content detection model is established after training a support vector regression algorithm based on sample data and the Gray Wolf Optimization Algorithm; the sample data includes Raman spectral data of multiple processed agricultural product slice samples required for model training and the label starch content corresponding to the Raman spectral data of each processed agricultural product slice sample.
[0010] In a second aspect, the present invention provides a system for detecting starch content in agricultural products, comprising:
[0011] A Raman spectrum data acquisition module is used to acquire Raman spectrum data of the agricultural product slice sample to be tested collected by a confocal micro-Raman spectrometer;
[0012] A Raman spectrum data processing module is used to process the Raman spectrum data of the agricultural product slice sample to be detected to obtain the processed Raman spectrum data of the agricultural product slice sample to be detected;
[0013] A starch content prediction module, used for inputting the Raman spectrum data of the processed agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product;
[0014] The agricultural product starch content detection model is obtained by training a support vector regression algorithm based on sample data and the Gray Wolf Optimization Algorithm; the sample data includes Raman spectral data of multiple processed agricultural product slice samples required for model training and the label starch content corresponding to the Raman spectral data of each processed agricultural product slice sample.
[0015] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for detecting starch content in agricultural products according to the first aspect.
[0016] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for detecting starch content in agricultural products described in the first aspect.
[0017] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0018] Confocal Raman microscopy is a fusion of confocal technology, Raman spectroscopy technology and microscopy technology. It can perform Raman hyperspectral imaging of agricultural products in a micrometer-scale space to analyze the chemical composition of agricultural products. Confocal technology can effectively filter out stray light and improve the signal-to-noise ratio. When collecting confocal Raman microscopy, compared with traditional Raman spectroscopy, the range of selectable agricultural product detection positions is larger, which is more conducive to the small and light preparation of agricultural product samples. At the same time, it effectively avoids problems such as inaccurate spectral data caused by defects in agricultural products themselves. Compared with traditional starch content detection methods such as enzymatic hydrolysis and acid hydrolysis, the detection of starch content in agricultural products is fast and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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.
[0020] Figure 1 The figure is a schematic diagram of the process of the method for detecting starch content in agricultural products of the present invention;
[0021] Figure 2 is the Raman spectrum of the experimental sample of the present invention;
[0022] Figure 3 It is a structural schematic diagram of the starch content detection system of agricultural products of the present invention. DETAILED DESCRIPTION
[0023] 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.
[0024] 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.
[0025] Traditional methods for detecting starch content have disadvantages such as long detection time, cumbersome testing process and the generation of harmful substances. Therefore, it is necessary to develop a fast, stable and less polluting method for detecting starch content in agricultural products. With the in-depth study of spectral technology, near-infrared and other spectral technologies have been applied to the detection of agricultural products and food quality. Although a variety of spectral technologies have been used in the detection of agricultural products and food quality, there are relatively few related research reports on the detection of a specific component in agricultural products by confocal micro-Raman spectroscopy.
[0026] Raman spectroscopy is a scattering spectrum, which has the characteristics of being fast, not easily disturbed by water, and no need for additional sample pretreatment. Confocal Raman microscopy is a fusion of confocal technology, Raman spectroscopy technology, and microscopy technology. It can perform Raman hyperspectral imaging of samples in a micron-scale space to analyze the chemical composition of samples. Confocal Raman microscopy is a fusion of confocal technology, Raman spectroscopy technology, and microscopy technology. It can perform Raman hyperspectral imaging of agricultural products in a micron-scale space to analyze the chemical composition of agricultural products. Confocal technology can effectively filter out stray light and improve the signal-to-noise ratio. When collecting confocal Raman microscopy, compared with traditional Raman spectroscopy, the range of selectable agricultural product detection positions is larger, which is more conducive to the small and light agricultural products. At the same time, it effectively avoids problems such as inaccurate spectral data caused by defects in agricultural products themselves. Compared with traditional starch content detection methods such as enzymatic hydrolysis and acid hydrolysis, the detection of starch content in agricultural products is fast and efficient.
[0027] The main advantage of confocal micro-Raman spectroscopy in detecting the starch content of agricultural products is that the detection position of suitable agricultural product samples can be intuitively screened during the Raman spectrum acquisition stage, effectively solving the problem of inaccurate spectral data caused by the defects of agricultural products themselves. At the same time, during the spectrum acquisition process, it also avoids considering the relationship between the spot and the size of the agricultural product sample, which is a potential method for detecting the starch content of agricultural products. There have been some related studies on the detection of the content of ingredients in agricultural products and foods by Raman spectroscopy, but so far no related research and patents on the detection of starch content in agricultural products by confocal micro-Raman spectroscopy have been published. Therefore, the method, system, electronic device and storage medium for detecting the starch content of agricultural products based on confocal micro-Raman spectroscopy proposed in the present invention still have important practical significance.
[0028] Embodiment 1
[0029] like Figure 1 As shown, this embodiment provides a method for detecting starch content in agricultural products, comprising:
[0030] Step 100: Obtain Raman spectrum data of the agricultural product slice sample to be tested collected by a confocal micro-Raman spectrometer.
[0031] Step 200: Processing the Raman spectrum data of the agricultural product slice sample to be detected to obtain processed Raman spectrum data of the agricultural product slice sample to be detected.
[0032] Step 300: inputting the Raman spectrum data of the processed agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product.
[0033] The agricultural product starch content detection model is obtained by training a support vector regression algorithm based on sample data and the Gray Wolf Optimization Algorithm; the sample data includes Raman spectral data of multiple processed agricultural product slice samples required for model training and the label starch content corresponding to the Raman spectral data of each processed agricultural product slice sample.
[0034] In this embodiment, before executing step 100, the method further includes:
[0035] Firstly, the agricultural products to be tested are crushed using a ball mill and filtered through a sieve to obtain the agricultural products powder to be tested; secondly, an appropriate amount of the agricultural products powder to be tested is poured into a spatially positioned aluminum mold box and pressurized to obtain a thin slice sample of the agricultural products to be tested.
[0036] In step 100, the system parameters of the confocal Raman microscope are 10 seconds exposure time, 785 nm excitation wavelength, 381-1533 cm -1 Scanning range, 30mW laser power and 1 accumulation.
[0037] In this embodiment, step 100 specifically includes:
[0038] The data acquisition software WIRE 5.3 was used to control the confocal micro-Raman spectrometer to collect Raman spectral data of the agricultural product slices to be tested.
[0039] In this embodiment, step 200 specifically includes:
[0040] The interval partial least squares method is used to screen the spectral range of the Raman spectral data of the agricultural product slice sample to be detected, and the screened spectral range is automatically scaled; wherein the spectral range after the automatic scaling process is the processed Raman spectral data of the agricultural product slice sample to be detected.
[0041] Furthermore, the use of interval partial least squares method to screen the spectral region of the Raman spectrum data of the agricultural product slice sample to be detected specifically includes:
[0042] Firstly, the Raman spectrum data of the agricultural product slice sample to be tested is divided into a number of equal-width sub-intervals with a fixed width; secondly, a partial least squares regression modeling algorithm is used to process each sub-interval to obtain a local correction model corresponding to the sub-interval, and a cross-validation root mean square error is used as an evaluation index of each local correction model; then, the sub-interval where the local correction model with the smallest cross-validation root mean square error is located is selected as the first selected frequency interval; finally, with the first selected frequency interval as the center, the sub-interval where the local correction model with the cross-validation root mean square error less than the set value is located is expanded unidirectionally or bidirectionally to obtain an optimal spectral range; wherein, the optimal spectral range is the screened spectral range.
[0043] In this embodiment, the determination process of the agricultural product starch content detection model is as follows:
[0044] (1) Determine Raman spectral data of a plurality of processed agricultural product slice samples and the labeled starch content corresponding to the Raman spectral data of each processed agricultural product slice sample; the Raman spectral data of the processed agricultural product slice samples are obtained by processing the Raman spectral data of the agricultural product slice samples collected by a confocal micro-Raman spectrometer as required for model training using the interval partial least squares method.
[0045] (2) The Raman spectral data of the processed agricultural product slice samples are input into a support vector regression algorithm based on the Grey Wolf Optimization Algorithm, and a starch content detection model for agricultural products is established to obtain the predicted starch content corresponding to the Raman spectral data of the processed agricultural product slice samples; wherein the ratio of the number of samples in the calibration set to that in the prediction set is 3:1.
[0046] (3) Calculating the prediction set correlation coefficient (Rp) of the current agricultural product starch content detection model based on the predicted starch content and the labeled starch content corresponding to the Raman spectrum data of the processed agricultural product slice sample.
[0047] (4) Determine whether the prediction set correlation coefficient Rp of the current agricultural product starch content detection model meets the preset conditions.
[0048] (5) If so, the current agricultural product starch content detection model is determined as the agricultural product starch content detection model that meets the expected.
[0049] (6) If not, adjust and optimize the penalty parameter c and kernel function parameter g of the support vector regression algorithm based on the Grey Wolf Optimization Algorithm, return to input the Raman spectrum data of the processed agricultural product slice sample into the support vector regression algorithm based on the Grey Wolf Optimization Algorithm, establish an agricultural product starch content detection model, and obtain the predicted starch content step corresponding to the Raman spectrum data of the processed agricultural product slice sample, until the stop condition is met.
[0050] The stopping condition is: the stopping condition is: the prediction set correlation coefficient Rp of the current agricultural product starch content detection model meets the preset condition slice sample.
[0051] In step (1), it specifically includes:
[0052] 1): Collect agricultural product samples of the same type from different origins. Determine the starch content in the agricultural product samples according to GB 5009.9-2016. Weigh 30g of each batch of agricultural product samples for subsequent experiments.
[0053] 2): Use a spatially positioned aluminum mold and a tablet press to quickly prepare agricultural product flake samples. Each agricultural product flake sample is a certain number of flake samples with a smooth surface and no damage.
[0054] 3): A confocal Raman microscope is used to collect Raman spectra of agricultural product slice samples, and the Raman spectrum data of agricultural product slice samples are obtained through the supporting software of the confocal Raman microscope.
[0055] In this experiment, a confocal Raman microscope (Renishaw, United Kingdom / Via-Reflex 532 / XYZ) was used. The system parameters were 10 s exposure time, 785 nm excitation wavelength, 381-1533 cm -1 Scanning range, 30mW laser power and 1 accumulation. The agricultural product slice samples were focused by a 20x objective lens, and 1 spectral signal was randomly collected for each agricultural product slice sample. Eight agricultural product slice samples were collected from each origin of agricultural product samples, and a total of 160 Raman spectral data were obtained. The data acquisition software WIRE 5.3 (Renishaw, United Kingdom) was used to control the system and collect and process Raman spectra. During the entire experiment, the laboratory room temperature was controlled at 25°C.
[0056] 4): Interval partial least squares (IPLS) is used to screen the Raman spectral data of agricultural product slice samples, and the appropriate modeling spectral interval is selected, and the Raman spectral data after IPLS spectral area screening is spectrally preprocessed.
[0057] In this embodiment, the spectral range of 400-1500 cm-1 is selected for the Raman spectrum of the agricultural product slice sample content detection, such as Figure 2 As shown, each spectrum line has 965 spectral points. Interval partial least squares (IPLS) is used to screen the spectral region of Raman spectral data. First, the full spectrum area is divided into several equal-width sub-intervals with a fixed width. Secondly, partial least squares regression (PLSR) algorithm modeling is performed on each sub-interval, and a local correction model is established in each sub-interval. The root mean square error of cross validation (RMSECV) is used as the evaluation index of each model. The sub-interval where the local correction model with the highest accuracy (the smallest RMSECV value) is located is selected as the first selected frequency interval. Afterwards, with the selected sub-interval as the center, the frequency interval is expanded unidirectionally or bidirectionally to select a sub-interval with higher accuracy (lower RMSECV value). Finally, an optimal spectral range (735-776, 819-839 and 861-902cm) is obtained. -1 ), automatically scale the Raman spectra after IPLS screening.
[0058] In the modeling process, the Greywolf optimizer (GWO) was used to determine the optimal parameter combination of the penalty parameter c and the kernel function parameter g of the support vector regression (SVR) model, so that the optimized agricultural product starch content detection model can obtain a higher Rp, lower root mean square error of prediction set (RMSEP) and mean relative error (MRE). The SVR kernel function uses the radial basis kernel function (RBF).
[0059] The obtained agricultural product starch content detection model was used to quantitatively detect the starch of agricultural products. The predicted verification results of the agricultural product starch content detection model were compared with the actual starch content of agricultural product samples to obtain the Rp, RMSEP and MRE of the agricultural product starch content detection model. The verification results Rp, RMSEP, MRE were 0.8914, 1.0268%, and 1.0806%, respectively.
[0060] Embodiment 2
[0061] This embodiment provides a method for detecting rice starch content based on confocal micro-Raman spectroscopy, comprising:
[0062] (1) Collection of rice samples;
[0063] Rice samples from 20 origins were obtained from different provinces in China. All rice samples were collected by trained and certified laboratory personnel. The starch content in rice samples from different origins was determined using GB 5009.9-2016.
[0064] (2) Preparation of experimental thin slice samples;
[0065] 30g of each type of rice was weighed as the rice sample for this experiment, with a total of 20 portions. First, the rice samples were crushed using a ball mill, and all rice samples were filtered through a sieve with a pore size of 74μm to obtain the experimental sample powder. Then, the experimental sample powder was accurately weighed using a precision balance, and the experimental sample powder was poured into a spatially positioned aluminum mold box. Finally, the experimental sample powder was pressed into a thin sheet under a pressure of 20MPa. The use of a mold can ensure the success rate of the experimental thin sheet samples and improve the efficiency of preparing the experimental thin sheet samples. The surface of the experimental thin sheet samples should be smooth. Eight experimental thin sheet samples were prepared for each rice sample, and a total of 160 experimental thin sheet samples were prepared.
[0066] (3) Raman spectrum acquisition
[0067] In this experiment, a confocal Raman microscope (Renishaw, United Kingdom / Via-Reflex 532 / XYZ) was used. The system parameters were 10 s exposure time, 785 nm excitation wavelength, 381-1533 cm -1 Scanning range, 30mW laser power and 1 accumulation. The experimental slice samples were focused by a 20x objective lens, and 1 spectral signal was randomly collected for each experimental slice sample. Eight experimental slice samples were collected from each rice sample origin, and a total of 160 Raman spectral data were obtained. The data acquisition software WIRE 5.3 (Renishaw, United Kingdom) was used to control the system and collect and process Raman spectra. During the entire experiment, the laboratory room temperature was controlled at 25°C.
[0068] (4) Spectral screening algorithm and spectral preprocessing
[0069] In this embodiment, the spectral range of 400-1500 cm-1 is selected for the Raman spectrum of rice starch content detection, such as Figure 2As shown, each spectrum line has 965 spectral points. Interval partial least squares (IPLS) is used to screen the spectral region of Raman spectral data. First, the full spectrum area is divided into several equal-width sub-intervals with a fixed width. Secondly, PLSR algorithm modeling is performed on each sub-interval), a local correction model is established in each sub-interval, and RMSECV is used as the evaluation index of each model. The sub-interval where the local correction model with the highest accuracy (the smallest RMSECV value) is located is selected as the first selected frequency interval. Afterwards, with the selected sub-interval as the center, the frequency interval is expanded unidirectionally or bidirectionally to select a sub-interval with higher accuracy (lower RMSECV value). Finally, an optimal spectral range (735-776, 819-839 and 861-902cm) is obtained. -1 ), automatically scale the Raman spectra after IPLS screening.
[0070] (5) Establishment of GWO-SVR rice starch content detection model
[0071] The Raman spectral data of the treated experimental thin slice samples were used as the input for modeling, and Grey Wolf Optimizer-Support Vector Regression (GWO-SVR) was used as the modeling algorithm for the rice starch content detection model. In the Raman spectral data of 160 treated experimental thin slice samples, the ratio of the prediction set and the calibration set was divided into 1:3. The first experimental thin slice sample was selected as the first sample in the prediction set, and then every 3 experimental thin slice samples, the next experimental thin slice sample was divided into the prediction set. The Raman spectral data of 40 treated experimental thin slice samples became the prediction set, and the Raman spectral data of the remaining treated experimental thin slice samples became the calibration set. In this embodiment, the RBF loss function epsilon was set to 0.001, and the parameters c and g were optimized and screened by GWO. The GWO-SVR rice starch content detection model was established through the calibration set, and the prediction set predicted and verified the GWO-SVR rice starch content detection model. Finally, after IPLS and automatic scaling processing, the GWO-SVR rice starch content detection model obtained better quantitative detection results. Its verification results Rp, RMSEP, and MRE were 0.8914, 1.0268%, and 1.0806%, respectively.
[0072] (6) The starch content of the rice sample to be tested.
[0073] According to the above steps (1)-(4), the Raman spectrum data of the processed rice sample to be tested is obtained and input into the GWO-SVR rice starch content detection model to obtain the starch content of the rice sample.
[0074] The advantage of the rice starch content detection method based on confocal micro-Raman spectroscopy provided in this embodiment is that the experimental samples are quickly prepared by spatial positioning aluminum molds and tablet presses. Although the confocal micro-Raman spectrometer can directly collect the Raman spectrum of solid powder, the powdered sample has obvious disadvantages such as easy to scatter, difficult to clean and recycle, and easy to contaminate the instrument. The spatial positioning sample preparation method can well avoid these shortcomings, and the success rate of this method is significantly improved compared with the traditional tableting sample preparation method, and the preparation efficiency is improved by about 10 times. Secondly, confocal micro-Raman spectroscopy is a new type of Raman spectroscopy technology, and research on quantitative detection of starch in rice by this spectral technology has not been reported yet. Secondly, this embodiment uses a spectral screening algorithm-IPLS to perform scientific and effective spectral screening on the original high-dimensional Raman spectral data (including redundant information and noise information, etc.), and then combines GWO-SVR to establish a rice starch content detection model with better prediction performance. IPLS is a spectral interval selection algorithm. GWO is a new type of cluster intelligence optimization algorithm with a simple structure and few parameters formed by simulating the hunting behavior process of wolves. It is usually superior to other swarm intelligence algorithms in terms of convergence accuracy and convergence speed. The algorithm achieves global optimization based on the hierarchical division of the gray wolf population and the task allocation in the predation process (encirclement, pursuit and attack). During the predation process, the gray wolf individuals are marked as α, β, δ and ω according to their levels. α is the leader in the predation process and plays a role in decision-making and management of the wolf pack. β and δ are the individuals with the second best fitness in the group, and the other wolf individuals are marked as ω. They jointly complete the hunting process of prey (optimal solution). According to the fitness function, the positions of wolves of each level are updated, and the individuals with the best fitness are retained, thereby obtaining the optimal c and g. Therefore, when GWO performs the SVR parameter selection task, it can often achieve global optimization according to the reasonable allocation of tasks during the wolf pack's predation process, thereby establishing a better rice starch content detection model.
[0075] Embodiment 3
[0076] In order to execute the method corresponding to the above-mentioned embodiment 1 and realize the corresponding functions and technical effects, a system for detecting starch content in agricultural products is provided below.
[0077] like Figure 3 As shown, this embodiment provides a system for detecting starch content in agricultural products, comprising:
[0078] The Raman spectrum data acquisition module 10 is used to acquire the Raman spectrum data of the agricultural product slice sample to be detected collected by the confocal micro-Raman spectrometer.
[0079] The Raman spectrum data processing module 20 is used to process the Raman spectrum data of the agricultural product slice sample to be detected to obtain the processed Raman spectrum data of the agricultural product slice sample to be detected.
[0080] The starch content prediction module 30 is used to input the processed Raman spectrum data of the agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product.
[0081] The agricultural product starch content detection model is obtained by training a support vector regression algorithm based on sample data and a gray wolf optimization algorithm; the sample data includes Raman spectrum data of multiple processed agricultural product slice samples and the label starch content corresponding to the Raman spectrum data of each processed agricultural product slice sample.
[0082] Embodiment 4
[0083] An embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for detecting starch content in agricultural products of embodiment 1.
[0084] Optionally, the above-mentioned electronic device may be a server.
[0085] In addition, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for detecting starch content in agricultural products of embodiment 1.
[0086] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0087] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for detecting starch content in agricultural products, characterized in that: include: Acquire Raman spectrum data of the agricultural product slice sample to be tested collected by a confocal micro-Raman spectrometer; Processing the Raman spectrum data of the agricultural product slice sample to be detected to obtain processed Raman spectrum data of the agricultural product slice sample to be detected; Inputting the Raman spectrum data of the processed agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product; The agricultural product starch content detection model is obtained by training the support vector regression algorithm according to the sample data and the gray wolf optimization algorithm; the sample data includes a plurality of Raman spectrum data of the processed agricultural product slice samples required for model training and the label starch content corresponding to the Raman spectrum data of each processed agricultural product slice sample; Before the step of acquiring Raman spectrum data of the agricultural product slice sample to be detected collected by the confocal micro-Raman spectrometer, the method further includes: The agricultural product to be tested is crushed by a ball mill, and filtered through a sieve to obtain the agricultural product powder to be tested; Pour an appropriate amount of the agricultural product powder to be tested into a spatially positioned aluminum mold box and pressurize it to obtain a thin slice sample of the agricultural product to be tested; The processing of the Raman spectrum data of the agricultural product slice sample to be detected to obtain the processed Raman spectrum data of the agricultural product slice sample to be detected specifically includes: The Raman spectrum data of the agricultural product slice sample to be tested are screened for spectral regions by using interval partial least squares method, and the screened spectral regions are automatically scaled; The spectral region after automatic scaling processing is the processed Raman spectral data of the agricultural product slice sample to be tested; The spectral region screening of the Raman spectral data of the agricultural product slice sample to be detected specifically includes: Dividing the Raman spectrum data of the agricultural product slice sample to be tested into a plurality of equal-width sub-intervals with a fixed width; The partial least squares regression modeling algorithm is used to process each sub-interval to obtain the local correction model corresponding to the sub-interval, and the cross-validation root mean square error is used as the evaluation index of each local correction model; The subinterval where the local correction model with the smallest cross-validation root mean square error is located is selected as the first selected frequency interval; Taking the first selected frequency interval as the center, the subinterval where the local correction model with the cross-validation root mean square error less than the set value is located is expanded unidirectionally or bidirectionally to obtain an optimal spectral range; Wherein, the optimal spectral range is the screened spectral range; The determination process of the agricultural product starch content detection model is as follows: Determine Raman spectral data of a plurality of processed agricultural product slice samples and the labeled starch content corresponding to the Raman spectral data of each processed agricultural product slice sample; the Raman spectral data of the processed agricultural product slice samples are obtained by processing the Raman spectral data of the agricultural product slice samples collected by a confocal micro-Raman spectrometer as required for model training using interval partial least squares method; Inputting the Raman spectrum data of the processed agricultural product slice sample into a support vector regression algorithm based on the Grey Wolf Optimization Algorithm, establishing an agricultural product starch content detection model, and obtaining the predicted starch content corresponding to the Raman spectrum data of the processed agricultural product slice sample; wherein the ratio of the number of samples in the calibration set to the number of samples in the prediction set is 3:1; Calculating the prediction set correlation coefficient of the current agricultural product starch content detection model according to the predicted starch content and the labeled starch content corresponding to the Raman spectrum data of the processed agricultural product slice sample; Determine whether the prediction set correlation coefficient of the current agricultural product starch content detection model meets the preset conditions; If yes, the current agricultural product starch content detection model is determined as the agricultural product starch content detection model that meets the expected; If not, the penalty parameter c and the kernel function parameter g of the support vector regression algorithm based on the gray wolf optimization algorithm are adjusted and optimized, and the Raman spectrum data of the processed agricultural product slice sample is input into the support vector regression algorithm based on the gray wolf optimization algorithm to establish an agricultural product starch content detection model, and obtain the predicted starch content step corresponding to the Raman spectrum data of the processed agricultural product slice sample, until the stop condition is met; The stopping condition is: the prediction set correlation coefficient of the current agricultural product starch content detection model meets the preset conditions.
2. A method for detecting starch content in agricultural products according to claim 1, characterized in that: The system parameters of the confocal Raman microscope are 10 seconds exposure time, 785nm excitation wavelength, 381-1533cm -1 Scanning range, 30mW laser power and 1 accumulation.
3. A method for detecting starch content in agricultural products according to claim 1, characterized in that: The obtaining of Raman spectrum data of the agricultural product slice sample to be tested collected by the confocal micro-Raman spectrometer specifically includes: The data acquisition software WIRE 5.3 was used to control the confocal micro-Raman spectrometer to collect Raman spectral data of the agricultural product slice samples to be tested.
4. A system for detecting starch content in agricultural products, characterized in that: include: A Raman spectrum data acquisition module is used to acquire Raman spectrum data of the agricultural product slice sample to be tested collected by a confocal micro-Raman spectrometer; A Raman spectrum data processing module is used to process the Raman spectrum data of the agricultural product slice sample to be detected to obtain the processed Raman spectrum data of the agricultural product slice sample to be detected; The starch content prediction module is used to input the Raman spectrum data of the processed agricultural product slice sample to be detected into the agricultural product starch content detection model to obtain the starch content in the agricultural product.
5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for detecting starch content in agricultural products according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the method for detecting starch content in agricultural products as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and system for detecting starch content in corn kernels
CN110530843A
Coumarin food additive identification method based on terahertz time-domain spectroscopy
CN113504200A