A nutrient composition detection method for high-quality fruits and vegetables based on a grading evaluation system model
Through the hierarchical evaluation system model, the concentration of nutrient components of fruits and vegetables is calculated using near-infrared spectroscopy technology, which solves the problem of insufficient sensitivity of the detection method in complex structures, and realizes accurate detection and grading evaluation of nutrient components of fruits and vegetables.
Patent Information
- Application Number
- CN202510157936.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The existing methods for detecting nutrient components of fruits and vegetables are insufficiently sensitive when facing internal complex structures, resulting in some components being unable to be effectively detected, affecting the accuracy of the evaluation results.
Using the grading evaluation system model method, the near-infrared spectral curve is obtained, the preliminary estimate and calibration value of the maximum concentration of the absorption peak is calculated, and the region is divided and adaptive decomposition is carried out, the actual concentration of fruits and vegetables is calculated based on the contribution degree, and the grade is divided according to the grading standards.
Accurate detection of the nutrient components of fruits and vegetables is achieved, the accuracy and reliability of the detection is improved, and the classification can be made according to the concentration of different nutrient components, supporting fruit and vegetable quality assessment and market decision-making.
Smart Images

Figure CN119619048B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fruit and vegetable nutrient component analysis, and in particular to a high-quality fruit and vegetable nutrient component detection method oriented to a grading evaluation system model. Background Art
[0002] As global consumers' health awareness increases, food safety and nutritional value are increasingly becoming the focus of market attention. Especially in the fruit and vegetable industry, consumers pay more and more attention to its nutritional content and food safety. Therefore, the development of scientific and accurate fruit and vegetable nutritional content testing methods is of great significance to ensure food quality, promote the development of the fruit and vegetable industry, and meet consumer needs.
[0003] Currently, the main method for evaluating the nutritional content of high-quality fruits and vegetables is through non-destructive testing technologies, such as near-infrared spectroscopy and hyperspectral imaging. These technologies can quickly and accurately evaluate the internal quality and nutritional content of fruits and vegetables. However, when faced with the complex nutritional structure inside fruits and vegetables, existing testing methods often have the problem of insufficient sensitivity; this may result in some components not being effectively detected, resulting in missed tests, and ultimately affecting the accuracy of the evaluation results. Summary of the invention
[0004] The present invention aims to overcome the problem of insufficient sensitivity of existing fruit and vegetable nutrient component detection methods when facing the complex nutrient component structure inside fruits and vegetables, which may result in failure to effectively detect some components, thereby causing detection omissions and thus affecting the accuracy of evaluation results. A high-quality fruit and vegetable nutrient component detection method for a graded evaluation system model is provided.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for detecting high-quality fruit and vegetable nutritional components based on a grading evaluation system model, the method comprising the following steps:
[0007] Obtaining a near-infrared spectrum curve of the fruit and vegetable sample, wherein absorption peaks of different wavelengths in the near-infrared spectrum curve represent nutrients of different concentrations in the fruit and vegetable;
[0008] According to the absorption wavelength range corresponding to different nutrients, calculate the preliminary estimated value of the maximum concentration of the nutrients corresponding to the absorption peak in the near-infrared spectrum curve;
[0009] According to the longitudinal offset and lateral offset of the target absorption peak in the near-infrared spectrum curve, the maximum concentration calibration value of the band where the target absorption peak is located is calculated;
[0010] According to the preliminary estimated value of the maximum concentration and the calibrated value of the maximum concentration, the estimated value of the maximum concentration after calibration of the band where the target absorption peak is located is calculated;
[0011] The band where the target absorption peak is located is divided into regions, and the regional component chaos scale of similar fluctuation regions is calculated, so as to calculate the adaptive decomposition scale of different regions in the band where the absorption peak is located;
[0012] The obtained adaptive decomposition scale is used to decompose the near infrared spectrum curve of fruit and vegetable samples to obtain the decomposition sub-data of different nutrients and their corresponding contribution degrees;
[0013] The actual concentration of different nutrients in fruits and vegetables is obtained by combining the decomposition sub-data of different nutrients and their corresponding contribution, and the maximum concentration estimate after calibration of the band where the target absorption peak is located;
[0014] According to the grading standards of each nutrient, the actual concentrations of different nutrients in fruits and vegetables are graded to complete the test.
[0015] Preferably, obtaining the near infrared spectrum curve of the fruit and vegetable sample includes the following:
[0016] Under preset environmental conditions, a near-infrared spectrometer is used to scan fruit and vegetable samples of a preset size from the fruits and vegetables to be tested according to preset spectral resolution and scanning speed to obtain original near-infrared spectral data of multiple fruit and vegetable samples;
[0017] The original near-infrared spectral data were preprocessed by linear fitting, smoothing, detrending and standard normal transformation to obtain the near-infrared spectral data corresponding to the fruit and vegetable samples.
[0018] The near-infrared spectrum data were fitted by polynomial fitting to obtain the near-infrared spectrum curve.
[0019] Preferably, according to the absorption wavelength ranges corresponding to different nutrients, a preliminary estimated value of the maximum concentration of the nutrient component corresponding to the absorption peak in the near-infrared spectrum curve is calculated, including:
[0020] The peak detection algorithm is used to obtain all absorption peaks in the near infrared spectrum curve of fruit and vegetable samples;
[0021] Determine the absorption wavelength range of each nutrient based on the known fruit and vegetable spectrum database;
[0022] The absolute value of the difference between all peak values and the minimum value of the peak in any absorption peak is calculated, and the absolute value of the difference is used as a preliminary estimate of the maximum concentration of the nutrient component corresponding to the absorption peak.
[0023] Preferably, the maximum concentration calibration value of the band where the target absorption peak is located is calculated based on the longitudinal offset and the lateral offset of the target absorption peak in the near-infrared spectrum curve, including:
[0024] Based on the near-infrared spectrum curve of the fruit and vegetable samples, first fitting curve functions of the lower envelope and the upper envelope of the near-infrared spectrum curve are respectively obtained by fitting;
[0025] According to the slope of any data point on the upper envelope and the lower envelope, the longitudinal offset of the band where the target absorption peak is located is calculated;
[0026] The first fitting curve function of the lower envelope and the upper envelope is converted into frequency domain data by using a fast Fourier transform algorithm;
[0027] The phase information of the upper and lower envelope frequency domain data is obtained respectively, and the phase information is converted into data using trigonometric functions;
[0028] Calculate the absolute value of the difference between the phase information of the upper and lower envelope frequency domain data after conversion, and use the absolute value of the difference as the lateral offset of the band where the target absorption peak is located;
[0029] According to the obtained longitudinal offset and lateral offset of the target absorption peak, the maximum concentration calibration value of the band where the target absorption peak is located is calculated.
[0030] Furthermore, based on the near infrared spectrum curve of the fruit and vegetable samples, the first fitting curve functions of the lower envelope and the upper envelope of the near infrared spectrum curve are fitted respectively, including:
[0031] Obtaining each segment of spectral data in the near-infrared spectral curve of the fruit and vegetable sample, and fitting it using a quadratic polynomial to obtain a first fitting function;
[0032] Calculating the extreme value of the first fitting function, wherein the extreme value includes a minimum value and a maximum value, and obtaining an envelope shape of the extreme value;
[0033] Traverse the entire near-infrared spectrum curve, gradually calculate the extreme value of each section of spectrum data, and form the upper and lower envelopes;
[0034] The first fitting curve functions of the lower envelope and the upper envelope are obtained respectively by using polynomial fitting.
[0035] Furthermore, according to the slope of any data point on the upper envelope and the lower envelope, the longitudinal offset of the band where the target absorption peak is located is calculated, including:
[0036] According to the first fitting curve function of the upper envelope line, a first slope corresponding to any data point on the upper envelope line is obtained; according to the first fitting curve function of the lower envelope line, a second slope corresponding to any data point on the lower envelope line is obtained;
[0037] Based on the first slope, the second slope, and the acquired data point set of the wavelength band where the target absorption peak is located, the longitudinal offset of the wavelength band where the target absorption peak is located is calculated.
[0038] Preferably, the band where the target absorption peak is located is divided into regions, and the regional component disorder scale of the similar fluctuation region is calculated, including:
[0039] Obtaining a second fitting curve function of the band where the target absorption peak is located and band width data of the target absorption peak;
[0040] According to the preset window area, the band where the target absorption peak is located is divided into window areas;
[0041] Obtaining the slope aggregate variance of all extreme value points in each window region on the second fitting curve function in the band where the target absorption peak is located, and the occurrence frequency of the extreme value points in the second fitting curve function;
[0042] According to the obtained slope set variance and occurrence frequency, the spectral fluctuation characteristics of different data points are calculated, thereby obtaining the spectral fluctuation characteristics of all data points in the band where the absorption peak is located;
[0043] Calculate the absolute value of the difference between the spectral fluctuation characteristics of adjacent data points;
[0044] The data points whose absolute value of the difference of the spectral fluctuation characteristics of adjacent data points is less than the preset area threshold are divided into similar fluctuation areas; otherwise, the area division is interrupted and re-divided until the entire band where the target absorption peak is located is traversed;
[0045] The mean of the spectral fluctuation characteristics of all data points in all similar fluctuation regions is calculated, and the mean of the spectral fluctuation characteristics of all data points is used as the regional component chaos scale of the similar fluctuation region.
[0046] Preferably, the adaptive decomposition scales of different regions within the wavelength band where the absorption peak is located are calculated, including:
[0047] The traditional signal decomposition scale of the band where the target absorption peak is located is obtained, and the adaptive decomposition scales of different regions in the band where the absorption peak is located are calculated by combining the regional component chaos scales of similar fluctuation regions.
[0048] Preferably, the obtained adaptive decomposition scale is used to decompose the near infrared spectrum curve of the fruit and vegetable sample to obtain decomposition sub-data of different nutritional components and corresponding contribution degrees, including:
[0049] The RLMD algorithm is used to decompose the near-infrared spectral curves of fruit and vegetable samples through an adaptive decomposition scale, thereby decomposing the local spectral data of different nutrients in the target absorption peak into multiple spectral decomposition sub-data sequences, where each decomposition sub-data in the spectral decomposition sub-data sequence represents a nutrient component;
[0050] The contribution of each spectral decomposition sub-data in the near-infrared spectral curve of the fruit and vegetable samples is calculated to obtain a contribution sequence corresponding to the spectral decomposition sub-data sequence.
[0051] Preferably, the actual concentrations of different nutrients in fruits and vegetables are graded according to the grading standards of each nutrient component, and the test is completed, including:
[0052] According to different nutrient concentration ranges, a first concentration threshold and a second concentration threshold are set, wherein the first concentration threshold is less than the second concentration threshold;
[0053] If the actual concentration of the nutrient component is less than the first concentration threshold, it is classified as low concentration;
[0054] If the actual concentration of the nutrient is greater than and equal to the first concentration threshold, and less than or equal to the second concentration threshold, it is classified as medium concentration;
[0055] If the actual concentration of the nutrient component is greater than the second concentration threshold, it is classified as high concentration.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] The invention calculates a preliminary estimated value of the maximum concentration of the nutrient component corresponding to the absorption peak in the near-infrared spectrum curve according to the absorption wavelength range corresponding to different nutrient components, and calculates the maximum concentration estimated value after calibration of the band where the target absorption peak is located in combination with the maximum concentration calibration value obtained according to the longitudinal offset and the lateral offset of the target absorption peak in the near-infrared spectrum curve; furthermore, the band where the target absorption peak is located is divided into regions, and the regional component chaos scale of the similar fluctuation region is calculated, so as to calculate the adaptive decomposition scale of different regions in the band where the absorption peak is located; the near-infrared spectrum curve of the fruit and vegetable sample is decomposed by the adaptive decomposition scale to obtain decomposition sub-data of different nutrient components and corresponding contribution degrees; finally, the decomposition sub-data of different nutrient components and the corresponding contribution degrees and the estimated value of the maximum concentration after calibration of the band where the target absorption peak is located are combined to obtain the actual concentration of different nutrient components of the fruits and vegetables; thereby, the actual concentration of different nutrient components of the fruits and vegetables is graded, and the detection is completed, so as to realize the accurate nutrient component detection of high-quality fruits and vegetables. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of the steps of the high-quality fruit and vegetable nutrient component detection method oriented to the grading evaluation system model of the present invention.
[0059] Figure 2 This is the near-infrared spectral data of 60 fruit and vegetable samples.
[0060] Figure 3 It is a schematic diagram of the upper and lower envelopes formed on the near-infrared spectrum curve.
[0061] Figure 4 It is a schematic block diagram of a computer system provided by the present invention. DETAILED DESCRIPTION
[0062] 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 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. The present invention is described in detail below in combination with the drawings and specific implementation methods.
[0063] It should be understood that when used in this specification, the terms "include" and "comprising" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0064] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms.
[0065] It should be further understood that the term “and / or” used in the specification of the present invention refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0066] Example
[0067] Near-infrared spectroscopy (NIS) is a non-destructive testing technology that evaluates the nutritional content of fruits and vegetables by analyzing their absorption characteristics of near-infrared light. However, the molecular vibration frequencies of certain nutrients in fruits and vegetables (such as water, fat and sugar) may be similar, causing resonance in their absorption peaks within the same wavelength range, that is, the absorption signals of different components may overlap or cover, causing traditional testing methods to produce erroneous values, affecting the accuracy of fruit and vegetable nutritional assessment.
[0068] In order to optimize the logic of detecting nutrients and improve the accuracy of detecting nutrients, such as Figure 1 As shown, the present invention provides a method for detecting the nutritional components of high-quality fruits and vegetables based on a grading evaluation system model, and the method comprises the following steps:
[0069] Obtaining a near-infrared spectrum curve of the fruit and vegetable sample, wherein absorption peaks of different wavelengths in the near-infrared spectrum curve represent nutrients of different concentrations in the fruit and vegetable;
[0070] According to the absorption wavelength range corresponding to different nutrients, calculate the preliminary estimated value of the maximum concentration of the nutrients corresponding to the absorption peak in the near-infrared spectrum curve;
[0071] According to the longitudinal offset and lateral offset of the target absorption peak in the near-infrared spectrum curve, the maximum concentration calibration value of the band where the target absorption peak is located is calculated;
[0072] According to the preliminary estimated value of the maximum concentration and the calibrated value of the maximum concentration, the estimated value of the maximum concentration after calibration of the band where the target absorption peak is located is calculated;
[0073] The band where the target absorption peak is located is divided into regions, and the regional component chaos scale of similar fluctuation regions is calculated, so as to calculate the adaptive decomposition scale of different regions in the band where the absorption peak is located;
[0074] The obtained adaptive decomposition scale is used to decompose the near infrared spectrum curve of fruit and vegetable samples to obtain the decomposition sub-data of different nutrients and their corresponding contribution degrees;
[0075] The actual concentration of different nutrients in fruits and vegetables is obtained by combining the decomposition sub-data of different nutrients and their corresponding contribution, and the maximum concentration estimate after calibration of the band where the target absorption peak is located;
[0076] According to the grading standards of each nutrient, the actual concentrations of different nutrients in fruits and vegetables are graded to complete the test.
[0077] In a specific embodiment, obtaining a near infrared spectrum curve of a fruit and vegetable sample includes the following steps:
[0078] Under preset environmental conditions, a near-infrared spectrometer is used to scan fruit and vegetable samples of a preset size selected from the fruits and vegetables to be tested according to preset spectral resolution and scanning speed to obtain original near-infrared spectral data of multiple fruit and vegetable samples.
[0079] In this embodiment, fruit and vegetable samples with a size of 1*1cm are cut from the surface of the fruits and vegetables to be tested for analysis, that is, the preset size is 1*1cm; under certain sampling temperature, humidity and light conditions (pre-set greenhouse environmental parameters), a near-infrared spectrometer is used to scan the spectral data of the fruit and vegetable samples, and the near-infrared band with a wavelength range of 800-2500 nm is usually selected for measurement.
[0080] The near-infrared spectrometer is set to a spectral resolution of 1.0 nm, and the scanning speed is adjusted as needed, usually performing multiple scans between 0.1 and 10 seconds; the scanning results are obtained, such as Figure 2 As shown, the spectral data of fruit and vegetable samples selected from different positions of the same fruit and vegetable are tested by a near-infrared spectrometer. Figure 2In the figure, the horizontal axis represents the wavelength of the spectral data; the vertical axis represents the absorbance (the degree of absorption of light of a specific wavelength by fruit and vegetable samples, calculated by measuring the ratio of the intensity of light passing through the sample to the intensity of the incident light).
[0081] The original near-infrared spectral data were preprocessed by linear fitting, smoothing, detrending and standard normal transformation to obtain the near-infrared spectral data corresponding to the fruit and vegetable samples.
[0082] In this embodiment, since the raw near-infrared spectral data may be affected by factors such as noise, instrument drift and sample variation, the raw near-infrared spectral data is preprocessed to reduce these interferences and improve data quality, thereby providing more accurate spectral information for subsequent analysis.
[0083] The near-infrared spectrum data were fitted by polynomial fitting to obtain the near-infrared spectrum curve.
[0084] In a specific embodiment, since different types of nutrients in fruits and vegetables have different absorption characteristics for near-infrared light, different absorption peaks and absorption bands will be generated in the near-infrared spectrum curve of fruits and vegetables, that is, the peak values of different bands represent different concentrations of nutrients in fruits and vegetables.
[0085] According to the absorption wavelength range corresponding to different nutrients, the maximum concentration of nutrients corresponding to the absorption peak in the near-infrared spectrum curve is calculated, including:
[0086] The peak detection algorithm is used to obtain all absorption peaks in the near infrared spectrum curve of fruit and vegetable samples;
[0087] Determine the absorption wavelength range of each nutrient based on the known fruit and vegetable spectrum database;
[0088] The absolute value of the difference between all peak values and the minimum value of the peak in any absorption peak is calculated, and the absolute value of the difference is used as a preliminary estimate of the maximum concentration of the nutrient component corresponding to the absorption peak.
[0089] In this embodiment, since different nutrients (such as sugars, fats, etc.) in fruits and vegetables have specific wavelength ranges for the absorption of near-infrared spectra, a preliminary estimation of the concentration of each nutrient in fruits and vegetables is achieved based on the absorption peaks of different bands of the near-infrared spectrum curve.
[0090] In a specific embodiment, the maximum concentration calibration value of the band where the target absorption peak is located is calculated based on the longitudinal offset and the lateral offset of the target absorption peak in the near-infrared spectrum curve, including:
[0091] Based on the near-infrared spectrum curve of the fruit and vegetable samples, first fitting curve functions of the lower envelope and the upper envelope of the near-infrared spectrum curve are respectively obtained by fitting;
[0092] According to the slope of any data point on the upper envelope and the lower envelope, the longitudinal offset of the band where the target absorption peak is located is calculated;
[0093] The first fitting curve function of the lower envelope and the upper envelope is converted into frequency domain data by using a fast Fourier transform algorithm;
[0094] The phase information of the upper and lower envelope frequency domain data is obtained respectively, and the phase information is converted into data using trigonometric functions;
[0095] Calculate the absolute value of the difference between the phase information of the upper and lower envelope frequency domain data after conversion, and use the absolute value of the difference as the lateral offset of the band where the target absorption peak is located;
[0096] According to the obtained longitudinal offset and lateral offset of the target absorption peak, the maximum concentration calibration value of the band where the target absorption peak is located is calculated.
[0097] In some cases, the absorption peaks of multiple nutrients in fruits and vegetables overlap, causing the near-infrared spectral curve to become complicated, resulting in absorption peak shift, peak shape deformation or amplitude change, that is, lateral and longitudinal displacement of the absorption peak, thus affecting the accurate estimation based on the spectral peak.
[0098] In this embodiment, based on the near infrared spectrum curve of the fruit and vegetable sample, the first fitting curve function of the lower envelope and the upper envelope of the near infrared spectrum curve is fitted respectively, including:
[0099] Obtain each segment of spectral data in the near-infrared spectral curve of the fruit and vegetable sample (usually three adjacent data points are taken as one segment of spectral data), and use quadratic polynomial fitting to obtain a first fitting function;
[0100] Calculating the extreme value of the first fitting function, wherein the extreme value includes a minimum value and a maximum value, and obtaining an envelope shape of the extreme value;
[0101] Traverse the entire near-infrared spectrum curve, gradually calculate the extreme value of each section of spectrum data, and form the upper and lower envelopes, such as Figure 3 As shown;
[0102] The first fitting curve functions of the lower envelope and upper envelope are obtained by polynomial fitting, which are recorded as .
[0103] In this embodiment, the longitudinal offset of the band where the target absorption peak is located is calculated according to the slope of any data point on the upper envelope and the lower envelope, including:
[0104] According to the first fitting curve function of the upper envelope line, a first slope corresponding to any data point on the upper envelope line is obtained; according to the first fitting curve function of the lower envelope line, a second slope corresponding to any data point on the lower envelope line is obtained;
[0105] Based on the first slope, the second slope, and the acquired data point set of the wavelength band where the target absorption peak is located, the longitudinal offset of the wavelength band where the target absorption peak is located is calculated.
[0106] The calculation formula for calculating the longitudinal offset of the band where the target absorption peak is located is provided in this embodiment as follows:
[0107]
[0108] In the formula, Indicates the longitudinal offset of the band where the target absorption peak is located; A set of data points representing the wavelength band where the target absorption peak is located; Represents a collection of data points The data points; represents the upper envelope, represents the lower envelope, Indicates The first slope of the data point on the upper envelope, Indicates The second slope of the data point on the lower envelope; The greater the difference between the value and 1, the more it means that there are multiple data points in the band where the target absorption peak is located, and the slopes corresponding to the upper and lower envelope lines are significantly different, indicating that there is a significant longitudinal offset in the band where the target absorption peak is located.
[0109] In the detection of nutritional components of fruits and vegetables, the nutrients overlap and overlap, and the absorption peak of the spectrum curve can only have longitudinal or lateral offset and diffusion. Therefore, the error caused by the longitudinal and lateral offset of the absorption peak band will only increase the maximum concentration estimate of the nutrients;
[0110]
[0111] in, Indicates the maximum concentration calibration value of the band where the target absorption peak is located; Indicates the longitudinal offset of the band where the target absorption peak is located; The absolute value of the difference between the phase information of the upper and lower envelope frequency domain data converted, the larger the absolute value of the difference, the greater the displacement difference between the corresponding points of the upper and lower envelopes, that is, the greater the lateral offset of the absorption peak.
[0112] In this embodiment, the maximum concentration estimation value after calibration of the band where the target absorption peak is located is calculated based on the maximum concentration preliminary estimation value and the maximum concentration calibration value. The specific calculation formula is as follows:
[0113]
[0114] In the formula, It indicates the maximum estimated concentration value after calibration of the band where the target absorption peak is located, which is regarded as the concentration limiting factor. This value indicates the sum of the accurate component concentrations in the subsequent analysis of a single absorption peak band. In the subsequent analysis, it is only necessary to analyze the proportion of each nutrient in the mixed absorption peak band of the components to obtain the accurate types of nutrients and corresponding concentrations of fruits and vegetables. It represents the absolute value of the difference between all peak values and the minimum value of the peak in any absorption peak.
[0115] In a specific embodiment, since there are multiple nutrients in fruits and vegetables that are intertwined and overlapped, not only does the absorption peak shift to varying degrees, but the absorption peak of a single band cannot accurately distinguish the specific concentrations of each component, affecting the subsequent grading evaluation of the nutrients of high-quality fruits and vegetables.
[0116] The signal matrix decomposition (RLMD) algorithm is a low-rank matrix decomposition algorithm designed to recover the true nutrient signal from overlapping mixed signals;
[0117] In the spectral data of fruits and vegetables, different nutrients have different specific absorption bands, which makes the types and contribution ratios of nutrients contained in different bands of mixed absorption peaks different. Therefore, it is necessary to set different signal decomposition scales for different bands of absorption peaks to ensure the accuracy of the decomposition results.
[0118] In this embodiment, the waveband where the target absorption peak is located is divided into regions, and the regional component disorder scale of the similar fluctuation region is calculated, including:
[0119] Get the second fitting curve function of the band where the target absorption peak is located , the band width data of the target absorption peak.
[0120] In this embodiment, the wavelength width of the target absorption peak refers to the difference between the starting wavelength and the ending wavelength of the wavelength band where the absorption peak is located. , regarded as the band width data of the target absorption peak.
[0121] According to the preset window area, the band where the target absorption peak is located is divided into window areas.
[0122] In this embodiment, the window region is constructed with any data point as the starting point and a step length of 9 data points; when the data points are insufficient, the remaining data points are regarded as the same region. By dividing the window region, the local window region characteristics can be obtained and the component confusion coefficient of the local data can be evaluated.
[0123] Obtain the slope aggregate variance of the second fitting curve function of all extreme points in each window area in the band where the target absorption peak is located , and the frequency of occurrence of extreme points in the second fitting curve function;
[0124] According to the obtained slope set variance and occurrence frequency, the spectral fluctuation characteristics of different data points are calculated, thereby obtaining the spectral fluctuation characteristics of all data points in the band where the absorption peak is located;
[0125] Calculate the absolute value Q of the difference between the spectral fluctuation characteristics of adjacent data points;
[0126] The absolute value of the difference in the spectral fluctuation characteristics of adjacent data points is less than the preset regional threshold (such as the regional threshold ) data points are divided into similar fluctuation areas; otherwise, the area division is interrupted and re-divided until the entire band where the target absorption peak is located is traversed;
[0127] Calculate the mean of the spectral fluctuation characteristics of all data points in all similar fluctuation regions , the mean of the spectral fluctuation characteristics of all data points is taken as the regional component disorder scale of similar fluctuation regions.
[0128] In this embodiment, the spectral fluctuation characteristics of different data points are calculated according to the obtained slope set variance and occurrence frequency, thereby obtaining the spectral fluctuation characteristics of all data points in the band where the absorption peak is located, and the calculation formula is as follows:
[0129]
[0130] In the formula, Indicates the first data points, Indicates The slope set variance of all extreme points in the window area corresponding to the data point; represents the slope set variance of all extreme value points in each window region on the second fitting curve function of the band where the target absorption peak is located, and U represents the set of all extreme value points in each window region; Indicates The data points correspond to the set of all extreme points in the window area. Represents the set of all extreme points Middle data extreme points, Indicates The data extreme point is on the curve The frequency of occurrence in Indicates The spectral fluctuation characteristics of each data point.
[0131] Spectral fluctuation characteristics The larger the value, the more dramatic the fluctuation of the spectral curve in this area, which usually means that this area contains more complex nutritional information, which may be caused by overlapping or changing ingredients.
[0132] In a specific embodiment, calculating and obtaining the adaptive decomposition scales of different regions within the wavelength band where the absorption peak is located includes:
[0133] The traditional signal decomposition scale of the band where the target absorption peak is located is obtained, and the adaptive decomposition scales of different regions in the band where the absorption peak is located are calculated by combining the regional component chaos scales of similar fluctuation regions.
[0134] In this embodiment, the traditional RLMD algorithm is used to obtain the traditional signal decomposition scale of the band where the target absorption peak is located. , combined with the regional component chaos scale of the local area, the adaptive decomposition scale of different local bands in the band where the target absorption peak is located is calculated. The calculation formula is as follows:
[0135] ;
[0136] In the formula, Represents the adaptive decomposition scale of different local bands within the target absorption peak. Represents the mean of the spectral fluctuation characteristics of all data points in all similar fluctuation regions; Represents the absolute value of the difference in spectral fluctuation characteristics between adjacent data points.
[0137] In a specific embodiment, the obtained adaptive decomposition scale is used to decompose the near infrared spectrum curve of the fruit and vegetable sample to obtain the decomposition sub-data of different nutritional components and the corresponding contribution, including:
[0138] The RLMD algorithm is used to decompose the near-infrared spectral curves of fruit and vegetable samples through an adaptive decomposition scale, thereby decomposing the local spectral data of different nutrients in the target absorption peak into multiple spectral decomposition sub-data sequences, where each decomposition sub-data in the spectral decomposition sub-data sequence represents a nutrient component;
[0139] The contribution of each spectral decomposition sub-data in the near-infrared spectral curve of the fruit and vegetable samples is calculated to obtain a contribution sequence corresponding to the spectral decomposition sub-data sequence.
[0140] In this embodiment, the RLMD algorithm is used to decompose the near-infrared spectrum curve of the fruit and vegetable samples through an adaptive decomposition scale, and the signal is decomposed and processed using the characteristics of different local bands in the absorption peak;
[0141] Decompose the local spectral data of different nutrients within the target absorption peak into multiple spectral decomposition sub-data sequences , each decomposition sub-data Indicates a characteristic component in the signal, that is, the nutritional components of fruits and vegetables. In addition, the contribution ratio of these decomposition sub-data in the near-infrared spectrum curve is calculated to obtain a corresponding contribution ratio sequence , where each Indicates the corresponding decomposition sub-data Contribution or relative importance to the near-infrared spectral curve.
[0142] Among them, the contribution ratio is calculated by least squares fitting. Projection in the near-infrared spectrum curve, that is, calculation The size of the projection (i.e., the degree of fit) can be used to measure the degree of match or reconstruction error between the near-infrared spectral curve and the near-infrared spectral curve. The contribution to the near-infrared spectrum curve. The specific fitting degree is quantified by calculating the fitting goodness of the decomposition sub-signal curve and the near-infrared spectrum curve.
[0143] In a specific embodiment, the actual concentrations of different nutrients in fruits and vegetables are obtained by combining the decomposition sub-data of different nutrients and their corresponding contributions, and the maximum concentration estimate after calibration of the band where the target absorption peak is located.
[0144] In the process of fruit and vegetable detection, for all absorption peaks in the near-infrared spectrum curve, the maximum concentration estimate and the nutritional composition information of their local bands are obtained.
[0145] For the chaotic absorption peaks of components in the detection of fruit and vegetable components, obtain the spectral decomposition sub-data of all its components And the corresponding contribution ratio , combined with the maximum concentration estimation value of the chaotic absorption peak, the precise concentration of the target fruit and vegetable components is obtained;
[0146] Obtain the specific wavelength band of light absorption of the nutrients in fruits and vegetables ;
[0147]
[0148] In the formula, Specific wavelengths that indicate the light absorption of nutrients in fruits and vegetables The estimated maximum concentration of Specific wavelengths representing light absorption of fruit and vegetable ingredients The contribution ratio of Specific wavelengths that indicate the light absorption of nutrients in fruits and vegetables actual concentration.
[0149] In a specific embodiment, the actual concentrations of different nutrients in fruits and vegetables are graded according to the grading standard of each nutrient component, and the detection is completed, including:
[0150] According to different nutrient concentration ranges, a first concentration threshold and a second concentration threshold are set, wherein the first concentration threshold is less than the second concentration threshold;
[0151] If the actual concentration of the nutrient component is less than the first concentration threshold, it is classified as low concentration;
[0152] If the actual concentration of the nutrient is greater than and equal to the first concentration threshold, and less than or equal to the second concentration threshold, it is classified as medium concentration;
[0153] If the actual concentration of the nutrient component is greater than the second concentration threshold, it is classified as high concentration.
[0154] In this embodiment, the actual concentration of all nutrients in fruits and vegetables is obtained, and the classification standard of each nutrient is determined according to the concentration range of the nutrients in fruits and vegetables. For example:
[0155] Moisture content classification: low moisture, medium moisture, high moisture
[0156] Sugar content classification: low sugar, medium sugar, high sugar
[0157] Fat content classification: low fat, medium fat, high fat
[0158] Set two thresholds The actual concentration of fruits and vegetables is less than When the concentration is greater than or equal to , and less than or equal to When the concentration is greater than It is considered as high concentration.
[0159] This embodiment sets specific grades (e.g., A, B, C, etc.) or numerical ranges according to the actual concentrations of different nutrients to reflect the quality level of fruits and vegetables. For example, grade A indicates that the nutrient concentration is within the optimal range, grade B indicates that it is qualified but slightly deviated, and grade C indicates that the level needs to be improved.
[0160] Ultimately, the grading results are provided to producers, wholesalers or consumers to provide data support for market decisions, such as determining the selling price, storage conditions or transportation methods of fruits and vegetables.
[0161] See also Figure 4 , Figure 4 5 is a schematic block diagram of a computer system provided by an embodiment of the present invention. The computer system 500 is a server, which may be an independent server or a server cluster composed of multiple servers.
[0162] See also Figure 4 The computer system 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0163] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a high-quality fruit and vegetable nutrient component detection method for a grading evaluation system model.
[0164] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer system 500 .
[0165] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a high-quality fruit and vegetable nutrient component detection method oriented to a grading evaluation system model.
[0166] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer system 500 to which the solution of the present invention is applied. The specific computer system 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] The processor 502 is used to run the computer program 5032 stored in the memory to implement the high-quality fruit and vegetable nutrient component detection method for the grading evaluation system model disclosed in the embodiment of the present invention.
[0168] Those skilled in the art will understand that Figure 4 The computer system embodiments shown in the figure do not constitute a limitation on the specific composition of the computer system. In other embodiments, the computer system may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer system may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.
[0169] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0170] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the high-quality fruit and vegetable nutrient component detection method for a graded evaluation system model disclosed in an embodiment of the present invention is implemented.
[0171] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0172] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0173] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0174] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer system (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), disk or optical disk and other media that can store program codes.
[0176] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting the nutritional components of high-quality fruits and vegetables based on a grading evaluation system model, characterized in that: The method comprises the following steps: Obtaining a near infrared spectrum curve of the fruit and vegetable sample, wherein absorption peaks of different wavelengths in the near infrared spectrum curve represent nutrients of different concentrations in the fruit and vegetable; According to the absorption wavelength ranges corresponding to different nutrients, calculate the preliminary estimated value of the maximum concentration of the nutrients corresponding to the absorption peaks in the near-infrared spectrum curve; According to the longitudinal offset and lateral offset of the target absorption peak in the near-infrared spectrum curve, the maximum concentration calibration value of the band where the target absorption peak is located is calculated; According to the preliminary estimated value of the maximum concentration and the calibrated value of the maximum concentration, the estimated value of the maximum concentration after calibration of the band where the target absorption peak is located is calculated; The band where the target absorption peak is located is divided into regions, and the regional component chaos scale of similar fluctuation regions is calculated, so as to calculate the adaptive decomposition scale of different regions in the band where the absorption peak is located; The obtained adaptive decomposition scale is used to decompose the near infrared spectrum curve of fruit and vegetable samples to obtain the decomposition sub-data of different nutrients and their corresponding contribution degrees; The actual concentration of different nutrients in fruits and vegetables is obtained by combining the decomposition sub-data of different nutrients and their corresponding contribution, and the maximum concentration estimate after calibration of the band where the target absorption peak is located; According to the grading standards of each nutrient, the actual concentration of different nutrients in fruits and vegetables is graded and the test is completed; The calculation method of the maximum concentration calibration value includes: Based on the near-infrared spectrum curve of the fruit and vegetable samples, the first fitting curve functions of the lower envelope and the upper envelope of the near-infrared spectrum curve are fitted respectively; according to the slope of any data point on the upper envelope and the lower envelope, the longitudinal offset of the band where the target absorption peak is located is calculated; and the first fitting curve functions of the lower envelope and the upper envelope are converted into frequency domain data using a fast Fourier transform algorithm; The phase information of the upper and lower envelope frequency domain data is obtained respectively, and the phase information is converted into data using a trigonometric function; the absolute value of the difference between the data after the phase information of the upper and lower envelope frequency domain data is converted is calculated, and the absolute value of the difference is used as the lateral offset of the band where the target absorption peak is located; according to the longitudinal offset and lateral offset of the target absorption peak obtained, the maximum concentration calibration value of the band where the target absorption peak is located is calculated; The step of dividing the band where the target absorption peak is located into regions and calculating the regional component disorder scale of similar fluctuation regions includes: Obtaining a second fitting curve function of the band where the target absorption peak is located and band width data of the target absorption peak; According to the preset window area, the band where the target absorption peak is located is divided into window areas; Obtaining the slope aggregate variance of all extreme value points in each window region on the second fitting curve function in the band where the target absorption peak is located, and the occurrence frequency of the extreme value points in the second fitting curve function; According to the obtained slope set variance and occurrence frequency, the spectral fluctuation characteristics of different data points are calculated, thereby obtaining the spectral fluctuation characteristics of all data points in the band where the absorption peak is located; Calculate the absolute value of the difference between the spectral fluctuation characteristics of adjacent data points; The data points whose absolute value of the difference of the spectral fluctuation characteristics of adjacent data points is less than the preset area threshold are divided into similar fluctuation areas; otherwise, the area division is interrupted and re-divided until the entire band where the target absorption peak is located is traversed; The mean of the spectral fluctuation characteristics of all data points in all similar fluctuation regions is calculated, and the mean of the spectral fluctuation characteristics of all data points is used as the regional component chaos scale of the similar fluctuation region.
2. The high-quality fruit and vegetable nutrient component detection method for a grading evaluation system model according to claim 1 is characterized in that: Obtain near infrared spectral curves of fruit and vegetable samples, including the following: Under preset environmental conditions, a near-infrared spectrometer is used to scan fruit and vegetable samples of a preset size from the fruits and vegetables to be tested according to preset spectral resolution and scanning speed to obtain original near-infrared spectral data of multiple fruit and vegetable samples; The original near-infrared spectral data were preprocessed by linear fitting, smoothing, detrending and standard normal transformation to obtain the near-infrared spectral data corresponding to the fruit and vegetable samples. The near-infrared spectrum data were fitted by polynomial fitting to obtain the near-infrared spectrum curve.
3. The high-quality fruit and vegetable nutrient component detection method for a grading evaluation system model according to claim 1 is characterized in that: According to the absorption wavelength range corresponding to different nutrients, the maximum concentration of nutrients corresponding to the absorption peak in the near-infrared spectrum curve is calculated, including: The peak detection algorithm is used to obtain all absorption peaks in the near infrared spectrum curve of fruit and vegetable samples; Determine the absorption wavelength range of each nutrient based on the known fruit and vegetable spectrum database; The absolute value of the difference between all peak values and the minimum value of the peak in any absorption peak is calculated, and the absolute value of the difference is used as a preliminary estimate of the maximum concentration of the nutrient component corresponding to the absorption peak.
4. The high-quality fruit and vegetable nutrient component detection method for a grading evaluation system model according to claim 1 is characterized in that: Based on the near infrared spectrum curve of the fruit and vegetable sample, the first fitting curve function of the lower envelope and the upper envelope of the near infrared spectrum curve are respectively fitted, including: Obtaining each segment of spectral data in the near-infrared spectral curve of the fruit and vegetable sample, and fitting it using a quadratic polynomial to obtain a first fitting function; Calculating the extreme value of the first fitting function, wherein the extreme value includes a minimum value and a maximum value, and obtaining an envelope shape of the extreme value; Traverse the entire near-infrared spectrum curve, gradually calculate the extreme value of each section of spectrum data, and form the upper and lower envelopes; The first fitting curve functions of the lower envelope and the upper envelope are obtained respectively by using polynomial fitting.
5. The method for detecting high-quality fruit and vegetable nutrients based on a grading evaluation system model according to claim 1, characterized in that: According to the slope of any data point on the upper envelope and the lower envelope, the longitudinal offset of the band where the target absorption peak is located is calculated, including: According to the first fitting curve function of the upper envelope line, a first slope corresponding to any data point on the upper envelope line is obtained; according to the first fitting curve function of the lower envelope line, a second slope corresponding to any data point on the lower envelope line is obtained; Based on the first slope, the second slope, and the acquired data point set of the wavelength band where the target absorption peak is located, the longitudinal offset of the wavelength band where the target absorption peak is located is calculated.
6. The method for detecting high-quality fruit and vegetable nutrients based on a grading evaluation system model according to claim 1, characterized in that: The adaptive decomposition scales of different regions in the band where the absorption peak is located are calculated, including: The traditional signal decomposition scale of the band where the target absorption peak is located is obtained, and the adaptive decomposition scales of different regions in the band where the absorption peak is located are calculated by combining the regional component chaos scales of similar fluctuation regions.
7. The method for detecting high-quality fruit and vegetable nutrients based on a grading evaluation system model according to claim 1, characterized in that: The obtained adaptive decomposition scale is used to decompose the near infrared spectral curves of fruit and vegetable samples to obtain the decomposition sub-data of different nutrients and their corresponding contributions, including: The RLMD algorithm is used to decompose the near-infrared spectral curves of fruit and vegetable samples through an adaptive decomposition scale, thereby decomposing the local spectral data of different nutrients in the target absorption peak into multiple spectral decomposition sub-data sequences, where each decomposition sub-data in the spectral decomposition sub-data sequence represents a nutrient component; The contribution of each spectral decomposition sub-data in the near-infrared spectral curve of the fruit and vegetable samples is calculated to obtain a contribution sequence corresponding to the spectral decomposition sub-data sequence.
8. The method for detecting high-quality fruit and vegetable nutrients based on a grading evaluation system model according to claim 1, characterized in that: According to the grading standards of each nutrient, the actual concentration of different nutrients in fruits and vegetables is graded and the test is completed, including: According to different nutrient concentration ranges, a first concentration threshold and a second concentration threshold are set, wherein the first concentration threshold is less than the second concentration threshold; If the actual concentration of the nutrient component is less than the first concentration threshold, it is classified as low concentration; If the actual concentration of the nutrient is greater than and equal to the first concentration threshold, and less than or equal to the second concentration threshold, it is classified as medium concentration; If the actual concentration of the nutrient component is greater than the second concentration threshold, it is classified as high concentration.
Citation Information
Patent Citations
Compound microorganism and compound biostimulant efficient emulsification production control system
CN118671024A
Production quality spectrum detection method and system for hot marinated products
CN118782189A