Cereal fatty acid value detection method and device
By constructing a grain fatty acid value detection model based on near-infrared spectrogram, the problem of low detection efficiency in the existing technology is solved, and rapid, automated and environmentally friendly grain fatty acid value detection is achieved.
Patent Information
- Application Number
- CN202510449191.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the detection efficiency of grain fatty acid values is low, time-consuming and labor-intensive, and it is difficult to achieve efficient detection.
Using a method based on the near-infrared spectrum and the grain fatty acid value detection model, a grain fatty acid value detection model is constructed and used to detect it using this model.
The inspection process is simplified, the inspection efficiency is improved, and the rapid and automated inspection is realized, reducing the risk of human error and environmental pollution.
Smart Images

Figure CN120334172A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grain and oil quality inspection, and particularly to a method and device for detecting the fatty acid value of grains. Background Art
[0002] The fatty acid value of grains (such as corn and paddy rice, etc.) can be used to judge the storage quality of grains. Therefore, the detection of the fatty acid value of grains is very important.
[0003] The common detection means for the fatty acid value of grains are: manual titration or automatic instrument titration, and the automatic instrument titration is further divided into 2 types: photometric titration and potentiometric titration. However, the detection efficiency of both manual titration and automatic instrument titration is not high, which is time-consuming and laborious. Summary of the Invention
[0004] The present invention provides a method and device for detecting the fatty acid value of grains, so as to solve the defect of low detection efficiency of the fatty acid value of grains in the prior art, and realize the improvement of the detection efficiency of the fatty acid value of grains.
[0005] The present invention provides a method for detecting the fatty acid value of grains, including: Obtaining the fatty acid value of the to-be-detected grain based on the near-infrared spectrogram of the to-be-detected grain and the fatty acid value detection model of grains; Wherein, the fatty acid value detection model of grains is constructed based on the actual fatty acid value of grain samples and the preferred wavelengths in the near-infrared spectrograms of the grain samples.
[0006] In some embodiments, the method further includes: Based on a variety of different wavelength selection algorithms, respectively performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample to obtain the preferred wavelengths corresponding to each wavelength selection algorithm; Based on a variety of different modeling algorithms, respectively constructing models for the preferred wavelengths corresponding to each wavelength selection algorithm and the actual fatty acid value of the grain sample; Taking the model with the best fatty acid value detection effect as the fatty acid value detection model of grains.
[0007] In some embodiments, the performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample includes: Performing one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrogram of the grain sample.
[0008] In some embodiments, before the step of, based on a variety of different wavelength selection algorithms, respectively performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample to obtain the preferred wavelengths corresponding to each wavelength selection algorithm, the method further includes: A variety of different preprocessing algorithms are used to preprocess the near-infrared spectrogram of the cereal sample.
[0009] In some embodiments, before using a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the cereal sample, it further includes: Collect the near-infrared spectrogram of the cereal sample in different forms to obtain the near-infrared spectrogram of the cereal sample in each form.
[0010] In some embodiments, the variety of different wavelength selection algorithms include: correlation coefficient method, analysis of variance method, stepwise regression method, interval partial least squares method, uninformative variable elimination method, Monte Carlo uninformative variable elimination method, genetic algorithm, moving window partial least squares regression, competitive adaptive reweighted sampling method.
[0011] The present invention also provides a device for detecting the fatty acid value of cereals, including: A first acquisition module for obtaining the fatty acid value of the cereal to be detected based on the near-infrared spectrogram of the cereal to be detected and the cereal fatty acid value detection model; Wherein, the cereal fatty acid value detection model is constructed based on the actual fatty acid value of the cereal sample and the preferred wavelengths in the near-infrared spectrogram of the cereal sample.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the cereal fatty acid value detection method as described in any one of the above.
[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the cereal fatty acid value detection method as described in any one of the above.
[0014] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the cereal fatty acid value detection method as described in any one of the above.
[0015] The cereal fatty acid value detection method and device provided by the present invention simplify the detection process and improve the detection efficiency of the cereal fatty acid value by optimizing the wavelengths in the near-infrared spectrogram of the cereal sample, constructing a cereal fatty acid value detection model using the optimized wavelengths and the actual fatty acid value of the cereal sample, and then using the constructed cereal fatty acid value detection model to detect the fatty acid value of the cereal to be detected. Description of the Drawings
[0016] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 is a schematic flowchart of the method for detecting the fatty acid value of grains provided by the present invention; Figure 2 is a flowchart for modeling the fatty acid value detection model of grains provided by the present invention; Figure 3 is an error graph of the detection result of the fatty acid value of paddy rice provided by the present invention; Figure 4 is an error graph of the detection result of the fatty acid value of corn provided by the present invention; Figure 5 is a schematic structural diagram of the device for detecting the fatty acid value of grains provided by the present invention; Figure 6 is a schematic structural diagram of the electronic device provided by the present invention. Specific Embodiments
[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0019] Figure 1 is a schematic flowchart of the method for detecting the fatty acid value of grains provided by the present invention. As Figure 1 shown, the present invention provides a method for detecting the fatty acid value of grains, including: Step 110: Obtain the fatty acid value of the grain to be detected based on the near-infrared spectrum diagram of the grain to be detected and the fatty acid value detection model of the grain; wherein, the fatty acid value detection model of the grain is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrum diagram of the grain sample.
[0020] Specifically, the near-infrared spectrum reflects the overtones and combination frequencies of the fundamental vibrations of molecules. The spectral information is complex, the spectral peaks are relatively broad and seriously overlapped. The spectral data contains thousands of wavelength points, but not all wavelength variables are related to the target components. Therefore, it is necessary to select important wavelengths representing the sample information from the collected wavelength variables and delete redundant wavelengths. Appropriate wavelength selection can simplify the model, enhance the interpretability of the model, and improve the prediction accuracy of the model; eliminate irrelevant or non-linear variables, so as to obtain a calibration model with stronger prediction ability and greater robustness.
[0021] The present invention optimizes the wavelengths of the near-infrared spectrogram of cereal samples, and constructs a cereal fatty acid value detection model based on the actual fatty acid value of the cereal samples and the optimized wavelengths in the near-infrared spectrogram of the cereal samples.
[0022] Obtain the near-infrared spectrogram of the cereal to be detected, and input the optimized wavelengths in the near-infrared spectrogram of the cereal to be detected into the cereal fatty acid value detection model to obtain the fatty acid value of the cereal to be detected.
[0023] The cereal fatty acid value detection method provided by the present invention simplifies the detection process and improves the detection efficiency of the cereal fatty acid value by optimizing the wavelengths in the near-infrared spectrogram of cereal samples, constructing a cereal fatty acid value detection model using the optimized wavelengths and the actual fatty acid value of the cereal samples, and then using the constructed cereal fatty acid value detection model to detect the fatty acid value of the cereal to be detected.
[0024] The cereal fatty acid value detection method provided by the present invention has the following specific advantages: Simple and fast: It omits the weighing, extraction, filtration, titration, calculation, cleaning of utensils, preparation and calibration of standard solutions in the traditional method. During the detection process, only need to put the cereal samples into the sample cup and press the instrument scanning key, and the detection result can be obtained in less than 1 minute, effectively solving the problems of complex pretreatment process, time-consuming and laborious operation, and low efficiency in the traditional method.
[0025] Objective and fair: It can realize automatic on-line detection, effectively prevent the problem of false reports, effectively prevent the problem of favoritism in grain, help prevent the problem of cycling grain, and save human resource costs to a large extent, reduce human errors, and prevent favoritism data.
[0026] Environmentally friendly: It omits the use of chemical reagents such as potassium hydroxide, potassium hydrogen phthalate, ethanol, and phenolphthalein in the traditional method, reduces the risk of environmental pollution, and reduces the laboratory safety risk.
[0027] In some embodiments, the cereal fatty acid value detection method provided by the present invention further includes: Based on a variety of different wavelength selection algorithms, the wavelengths in the near-infrared spectrogram of the cereal sample are respectively optimized to obtain the optimized wavelengths corresponding to each wavelength selection algorithm. Based on a variety of different modeling algorithms, models are respectively constructed for the optimized wavelengths corresponding to each wavelength selection algorithm and the actual fatty acid value of the cereal sample. The model with the best detection effect for the fatty acid value is used as the cereal fatty acid value detection model.
[0028] Specifically, different wavelength optimization results can be obtained by using different wavelength selection algorithms, and different detection effects for the fatty acid value can be obtained by the models constructed with different modeling algorithms.
[0029] In order to achieve the best detection effect for the fatty acid value, a variety of different wavelength selection algorithms (such as analysis of variance, correlation component analysis, wavelet transform, etc.) are used to respectively optimize the wavelengths in the near-infrared spectrogram of the cereal sample to obtain the optimized wavelengths corresponding to each wavelength selection algorithm; a variety of different modeling algorithms (such as multiple linear regression, principal component regression, partial least squares regression, support vector machine and other algorithms) are used to respectively construct models for the optimized wavelengths corresponding to each wavelength selection algorithm and the actual fatty acid value of the cereal sample.
[0030] The fatty acid value detection verification is carried out on the constructed multiple models. The wavelength selection algorithm corresponding to the model with the best detection effect for the fatty acid value is confirmed as the best wavelength selection algorithm, the modeling algorithm corresponding to the model with the best detection effect for the fatty acid value is confirmed as the best modeling algorithm, the optimized wavelength corresponding to the model with the best detection effect for the fatty acid value is confirmed as the best optimized wavelength, and the model with the best detection effect for the fatty acid value is used as the cereal fatty acid value detection model.
[0031] The cereal fatty acid value detection method provided by the present invention realizes the improvement of the detection accuracy of the cereal fatty acid value detection model by using a variety of different wavelength selection algorithms for wavelength optimization, using a variety of different modeling algorithms for model construction, and using the model with the best detection effect for the fatty acid value as the cereal fatty acid value detection model.
[0032] In some embodiments, the wavelength optimization for the wavelengths in the near-infrared spectrogram of the cereal sample includes: Performing one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrogram of the cereal sample.
[0033] Specifically, wavelength selection is mainly divided into three categories: wavelength point selection, band selection, and wavelength point variable weighting.
[0034] The wavelength point selection methods include methods based on intelligent optimization algorithms, methods based on statistics, and methods such as correlation coefficients. The band selection methods mainly include interval partial least squares, moving window partial least squares, and their derivative methods, etc. The variable weighting method is the development and expansion of the wavelength selection method. Although it uses all wavelength points, it assigns different weights to each wavelength variable. There are methods such as variable-weighted partial least squares (PLS) and variable-weighted support vector regression (SVR).
[0035] Optimize the wavelengths in the near-infrared spectrogram of the grain sample, that is, perform one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrogram of the grain sample.
[0036] The grain fatty acid value detection method provided by the present invention realizes obtaining the optimal selected wavelengths by performing one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrogram, and further improves the detection accuracy of the grain fatty acid value detection model.
[0037] In some embodiments, a variety of different wavelength selection algorithms include: correlation coefficient method, analysis of variance method, stepwise regression method, interval partial least squares method, uninformative variable elimination method, Monte Carlo uninformative variable elimination method, genetic algorithm, moving window partial least squares regression, competitive adaptive reweighted sampling method.
[0038] In some embodiments, before respectively optimizing the wavelengths in the near-infrared spectrogram of the grain sample based on a variety of different wavelength selection algorithms to obtain the optimal wavelengths corresponding to each wavelength selection algorithm, it further includes: Use a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the grain sample.
[0039] Specifically, since different preprocessing algorithms have different effects on the detection of fatty acid values, therefore, use a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the grain sample, and confirm the optimal preprocessing algorithm according to the fatty acid value detection effects of the multiple constructed models.
[0040] For example, use preprocessing algorithms such as smoothing, derivative calculation, and multiplicative scatter correction to process the near-infrared spectrogram of the grain sample.
[0041] The grain fatty acid value detection method provided by the present invention uses a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the grain sample, confirms the optimal preprocessing algorithm, and further improves the detection accuracy of the grain fatty acid value detection model.
[0042] In some embodiments, before preprocessing the near-infrared spectrogram of a cereal sample using multiple different preprocessing algorithms, the following steps are also included: Collect the near-infrared spectrograms of cereal samples in different forms to obtain the near-infrared spectrograms of cereal samples in each form.
[0043] Specifically, the near-infrared spectrograms collected from cereal samples in different forms (such as granular and powdery) are different, and the final detection effect of the fatty acid value is also different. Therefore, collect the near-infrared spectrograms of cereal samples in different forms to obtain the near-infrared spectrograms of cereal samples in each form.
[0044] The method for detecting the fatty acid value of cereals provided by the present invention enriches the data set for modeling by collecting the near-infrared spectrograms of cereal samples in different forms, and further improves the detection accuracy of the detection model for the fatty acid value of cereals.
[0045] The method for detecting the fatty acid value of cereals provided by the present invention is introduced as follows: 1. Working principle: Utilize the overtone vibration or rotation of chemical bonds such as C-H, O-H, and C=O in cereal fatty acid molecules to obtain their absorption spectra in the near-infrared region in a diffuse reflection or transmission manner. Adopt multivariate calibration methods, such as principal component regression, partial least squares method, artificial neural network and other chemometric methods, to establish a linear or nonlinear calibration model between the near-infrared spectrum of cereal samples and the fatty acid value content, so as to realize the rapid calculation of the fatty acid value content of cereal samples.
[0046] 2. Technical requirements for near-infrared analyzers: (1) Accuracy requirement: The situation where it is ≤ 3 mg / 100 g compared with the detection result of the national standard method reaches more than 90%; (2) Stability requirement: Within 24 hours, the same instrument measures the same sample every 3 hours, and the range is not greater than 2 mg / 100 g; (3) Inter-instrument difference requirement: Randomly select 2 near-infrared analyzers of the same brand and model to detect the same sample, and the difference is not greater than 2 mg / 100 g; (4) Requirements for other performance indicators: Performance indicators such as spectral resolution, wavenumber or wavelength accuracy, wavenumber or wavelength repeatability, stray light, absorbance noise, background spectral energy distribution, and environmental adaptability should meet the requirements specified in the technical documents of the equipment manufacturer; Other technical requirements also include remote upgrade, surface coating quality, assembly, castings, sheet metal components, plate steel components, raw materials, outsourced parts, externally coordinated parts, safety requirements, etc., which should meet the relevant national standards; (5) Technical requirement description: The first three technical requirements are achieved by manufacturing high-level instruments, improving mathematical models, and enhancing application levels.
[0047] 3. Other equipment requirements: (1) Crusher: Hammer type cyclone mill, with adjustable air damper and self-cleaning function to avoid sample residue and blockage of the sample outlet pipe. When crushing the sample, the heating of the grinding chamber should be avoided. (2) Electric powder sieve: Meeting the requirements of GB / T 5507; (3) Grain sorting sieve: Meeting the requirements of relevant national standards.
[0048] 4. Sample preparation requirements: (1) Sample collection and sub-sampling shall be carried out in accordance with the provisions of GB / T 5491. (2) The experimental sample shall be not less than 2 kg; (3) The sample shall be mixed evenly, about 300 g of the sample shall be taken, and impurities shall be removed in accordance with the relevant provisions of GB / T 5494, and it can be directly used for detection; (4) The sample can be detected after being crushed. When crushing is required, the grain sample shall be crushed with a hammer type cyclone mill, and more than 95% of the crushed sample shall pass through the CQ16 (equivalent to 40 mesh) sieve at one time. The crushed sample (all sieve ranges of the sample above and below the sieve) shall be fully mixed and then filled into a ground glass bottle for detection.
[0049] 5. Measurement operation requirements: (1) Control the environmental temperature at 20°C ± 5°C. (2) Turn on and preheat the instrument until it passes the self-check of the instrument; (3) Detection parameter setting: Select granular sample or powder sample for the sample type. The origin of domestic samples shall be accurate to the province or the grain storage ecological area; the origin of imported samples shall be accurate to the country; (4) The sample to be tested shall be mixed evenly, filled evenly, gently shaken, and measured with a near-infrared analyzer, and the measurement data shall be recorded; (5) Quality control samples can be randomly inserted during the measurement process. The absolute difference between the measurement results of the fatty acid value content of the same quality control sample and the initial measurement result shall not be greater than 2 mg / 100 g; if it is greater than 2 mg / 100 g, the reason shall be found by oneself.
[0050] 6. Result expression requirements: For each sample, 2 parallel samples are taken for measurement. When the absolute value of the difference between the 2 measurement results meets the repeatability requirements, the average value is taken as the measurement result; when it does not meet the repeatability requirements, it shall be processed in accordance with the relevant provisions of GB / T 5490. The calculation result shall be retained to 3 significant figures.
[0051] 7. Repeatability requirements: In the same laboratory, by the same operator using the same instrument, according to the same test method, the absolute difference between two independent test results obtained by independently testing the same test object shall not exceed 2 mg / 100 g.
[0052] 8. Requirements for the preparation of quality control samples: (1) Select samples with relatively single sources, and conduct parallel determinations on the samples using the instrumental methods specified in GB / T 29405 or LS / T 6105. Take the average value as the determination result of the instrumental method; (2) Conduct parallel determinations on the samples using the manual method specified in GB / T 20570. Take the average value as the determination result of the manual method; (3) When the absolute difference between the determination results of the instrumental method and the manual method is not greater than 2 mg / 100 g, take the average value as the final result (reference value) of the sample; (4) Use a near-infrared analyzer to determine the fatty acid value of the sample. Samples with an absolute difference ≤ 2 mg / 100 g compared with the reference value can be used as quality control samples; (5) Quality control samples should be stored in a low-temperature and dry environment at ≤ 5 °C. If the determination results of the quality control samples do not meet the requirements or there are problems such as insect infestation or contamination, they should be re-prepared.
[0053] Figure 2 is the modeling flowchart of the grain fatty acid value detection model provided by the present invention. As Figure 2 shown, first, collect grain samples, and collect representative grain samples by variety (indica rice, japonica rice, corn, imported corn) and by region (domestic grains are counted by province, and imported corn is counted by country). For each variety and each region in the main production areas, about 1500 samples are collected. The number of samples in non-main production areas can be appropriately reduced as appropriate. The total number of samples nationwide is about 30,000.
[0054] Conduct the first spectral collection on granular grain samples, then mill the granular grain samples into powder to obtain powdered grain samples, and conduct the second spectral collection on the powdered grain samples. Conduct spectral analysis on the first spectral collection and the second spectral collection.
[0055] Next, determine the fatty acid value content (dry basis) of the grain samples according to the automatic titration analyzer method in the standard method. While eliminating human errors in this process, it is necessary to minimize the differences between instrument platforms and between institutions. Since the fatty acid value detection needs to eliminate the influence caused by moisture in the grain samples, therefore, in the fatty acid value determination, subtract the fatty acid value corresponding to the moisture in the prepared samples to obtain the fatty acid value dry basis content result.
[0056] When modeling, import the near-infrared spectrograms obtained by spectral analysis and the fatty acid value results one by one into the automatic modeling software. Use preprocessing methods such as multivariate calibration methods, vector normalization, and smoothing, and use chemometric methods such as partial least squares method, principal component regression, and artificial neural network. After automatic spectral analysis, calculation, and elimination of outliers by the software, establish a grain fatty acid value detection model, so as to realize the rapid calculation of the fatty acid value content of grain samples.
[0057] Finally, optimize the grain fatty acid value detection model.
[0058] In the process of developing a detection model for the fatty acid value of grains, accidental errors and systematic errors are inevitable. In the initial stage of model building, most accidental errors can be eliminated by removing outliers, but the degree of influence of systematic errors cannot be identified. It is necessary to identify and further correct and optimize the established mathematical model through later verification, and finally achieve applications in more than 20 provinces and cities. The verification is divided into the following situations: (1)Local verification. Each experimental site independently collects 50 samples from the regions it is responsible for and verifies the mathematical model it has established.
[0059] (2)Mutual verification. First, each experimental site verifies with each other, asking other experimental sites to verify its mathematical model; its mathematical model can be transferred to the instruments of other experimental sites by instrument engineers. Second, each experimental site collects samples from its responsible area and mails them to other experimental sites for verification. The number of samples sent by each experimental site is: 50 for each region and each variety.
[0060] (3)Verification within the system. First, verification is carried out in quality inspection centers that have not participated in the calibration work and have automatic titrators. Instrument engineers are required to provide near-infrared analyzers. Second, each experimental site collects samples from its responsible area and mails them to other quality inspection centers for verification. The number of samples sent by each quality inspection center is: 50 for each region and each variety.
[0061] (4)Verification outside the system. First, verification is carried out in units outside the system that have participated in the drafting of the standards for this project, or in other grain and oil quality inspection institutions. Instrument engineers are required to provide near-infrared analyzers. Second, each experimental site collects samples from its responsible area and mails them to designated grain and oil quality inspection institutions for verification. The number of samples sent by each quality inspection institution is: 50 for each region and each variety.
[0062] (5)Through verification within the system and verification outside the system, the systematic error level of the mathematical model is statistically obtained, so as to optimize the mathematical models of each variety and each origin in a targeted manner, and further improve the adaptability and accuracy of the models.
[0063] The method provided by the present invention and the standard method (manual titration or instrument automatic titration) are respectively used to detect the fatty acid value of paddy rice, and the error between the two detection results is calculated. Figure 3 This is the error graph of the detection result of the fatty acid value of paddy rice provided by the present invention. As Figure 3 shown, the horizontal axis is the error value (unit: mg / 100g), the vertical axis is the frequency (i.e., the number of times the error value appears), and N in the figure represents the number of detection samples. Statistical error results show that the proportion of errors ≤ 2mg / 100g is 78%; the proportion of errors ≤ 3mg / 100g is 92%.
[0064] The method provided by the present invention and the standard method (manual titration or automatic instrumental titration) were respectively used to detect the fatty acid value of corn, and the error between the two detection results was calculated. Figure 4 is the error graph of the detection result of the fatty acid value of corn provided by the present invention, as Figure 4 shown. The horizontal axis is the error value (unit: mg / 100g), and the vertical axis is the frequency (i.e., the number of times the error value appears). N in the figure represents the number of detection samples. It was found by statistically analyzing the error results that the proportion of errors ≤ 2 mg / 100g is 64%; the proportion of errors ≤ 3 mg / 100g is 82%.
[0065] Next, the grain fatty acid value detection device provided by the present invention will be described. The grain fatty acid value detection device described below can be correspondingly referred to the grain fatty acid value detection method described above.
[0066] Figure 5 is the structural schematic diagram of the grain fatty acid value detection device provided by the present invention, as Figure 5 shown. The present invention provides a grain fatty acid value detection device, including: A first acquisition module 510, configured to obtain the fatty acid value of the to-be-detected grain based on the near-infrared spectrum diagram of the to-be-detected grain and the grain fatty acid value detection model; wherein, the grain fatty acid value detection model is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrum diagram of the grain sample.
[0067] In some embodiments, the device further includes: A wavelength optimization module, configured to respectively perform wavelength optimization on the wavelengths in the near-infrared spectrum diagram of the grain sample based on a variety of different wavelength selection algorithms to obtain the preferred wavelengths corresponding to each wavelength selection algorithm; A modeling module, configured to respectively perform model construction on the preferred wavelengths corresponding to each wavelength selection algorithm and the actual fatty acid value of the grain sample based on a variety of different modeling algorithms; A second acquisition module, configured to use the model with the best fatty acid value detection effect as the grain fatty acid value detection model.
[0068] In some embodiments, the wavelength optimization module is specifically configured to: perform one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrum diagram of the grain sample.
[0069] In some embodiments, the device further includes: A preprocessing module, configured to preprocess the near-infrared spectrum diagram of the grain sample by using a variety of different preprocessing algorithms.
[0070] In some embodiments, the device further comprises: a collection module, configured to collect near-infrared spectrograms of the cereal samples in different forms, so as to obtain the near-infrared spectrograms of the cereal samples in each form.
[0071] In some embodiments, the multiple different wavelength selection algorithms include: inverse interval partial least squares, uninformative variable elimination, Monte Carlo-uninformative variable elimination, and competitive adaptive reweighted sampling.
[0072] It should be noted here that the above-mentioned cereal fatty acid value detection device provided by the present invention can implement all the method steps implemented by the above method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be specifically described herein.
[0073] Figure 6 is a schematic structural diagram of an electronic device provided by the present invention. As Figure 6 shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communication interface 620, and the memory 630 complete mutual communication through the communication bus 640. The processor 610 may call logic instructions in the memory 630 to execute a cereal fatty acid value detection method, and the method includes: obtaining the fatty acid value of the cereal to be detected based on the near-infrared spectrogram of the cereal to be detected and a cereal fatty acid value detection model; wherein, the cereal fatty acid value detection model is constructed based on the actual fatty acid value of the cereal sample and the preferred wavelengths in the near-infrared spectrogram of the cereal sample.
[0074] In addition, when the logic instructions in the above-mentioned memory 630 are implemented in the form of software function units and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs that can store program codes.
[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the grain fatty acid value detection method provided by the above-mentioned various methods. The method includes: obtaining the fatty acid value of the grain to be detected based on the near-infrared spectrogram of the grain to be detected and the grain fatty acid value detection model; wherein, the grain fatty acid value detection model is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrogram of the grain sample.
[0076] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the grain fatty acid value detection method provided by the above-mentioned various methods. The method includes: obtaining the fatty acid value of the grain to be detected based on the near-infrared spectrogram of the grain to be detected and the grain fatty acid value detection model; wherein, the grain fatty acid value detection model is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrogram of the grain sample.
[0077] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0078] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solutions, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting the fatty acid value of grains, characterized in that, Including: Based on the near-infrared spectrogram of the grain to be detected and the grain fatty acid value detection model, obtaining the fatty acid value of the grain to be detected; Wherein, the grain fatty acid value detection model is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrogram of the grain sample.
2. The method for detecting the fatty acid value of grains according to claim 1, wherein The method further includes: Based on a variety of different wavelength selection algorithms, respectively performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample to obtain the preferred wavelengths corresponding to each wavelength selection algorithm; Based on a variety of different modeling algorithms, respectively constructing models for the preferred wavelengths corresponding to each wavelength selection algorithm and the actual fatty acid value of the grain sample; Taking the model with the best fatty acid value detection effect as the grain fatty acid value detection model.
3. The method for detecting the fatty acid value of grains according to claim 2, wherein, The performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample includes: Performing one or more of wavelength point selection, band selection, and wavelength point variable weighting on the wavelengths in the near-infrared spectrogram of the grain sample.
4. The method for detecting the fatty acid value of grains according to claim 2, wherein Before performing wavelength optimization on the wavelengths in the near-infrared spectrogram of the grain sample based on a variety of different wavelength selection algorithms to obtain the preferred wavelengths corresponding to each wavelength selection algorithm, it further includes: Using a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the grain sample.
5. The method for detecting the fatty acid value of grains according to claim 4, wherein, Before using a variety of different preprocessing algorithms to preprocess the near-infrared spectrogram of the grain sample, it further includes: Collecting the near-infrared spectrograms of the grain samples in different forms to obtain the near-infrared spectrograms of the grain samples in each form.
6. The method for detecting the fatty acid value of grains according to claim 2, characterized in that, The variety of different wavelength selection algorithms include: correlation coefficient method, analysis of variance method, stepwise regression method, interval partial least squares method, uninformative variable elimination method, Monte Carlo uninformative variable elimination method, genetic algorithm, moving window partial least squares regression, competitive adaptive reweighted sampling method.
7. A device for detecting the fatty acid value of grains, characterized in that, Including: A first acquisition module, configured to obtain the fatty acid value of the grain to be detected based on the near-infrared spectrogram of the grain to be detected and the grain fatty acid value detection model; Wherein, the grain fatty acid value detection model is constructed based on the actual fatty acid value of the grain sample and the preferred wavelengths in the near-infrared spectrogram of the grain sample.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the grain fatty acid value detection method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the grain fatty acid value detection method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the grain fatty acid value detection method according to any one of claims 1 to 6.