Disclosure of Invention
Based on the foregoing, it is necessary to provide a method and a system for detecting quality of agricultural products, so as to solve at least one of the above technical problems.
To achieve the above object, a quality inspection method for agricultural products, the method comprising the steps of:
 step S1, carrying out spectrum scanning on apples through a near infrared spectrometer, and then removing baseline drift to obtain apple reflection correction spectrums;
 S2, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain sugar/acidity/cellulose spectrum band, carrying out peak variation structural strength analysis based on the sugar/acidity/cellulose spectrum band to obtain peak variation structural strength data, carrying out background interference band quantitative processing based on the peak variation structural strength data to obtain background interference band quantitative data;
 And step S3, constructing a quality detection and identification model according to the quantitative data of the background interference wave band to obtain a quality detection and identification model, and carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectral wave band based on the quality detection and identification model to obtain sugar/acidity/cellulose content distribution data.
Preferably, step S1 comprises the steps of:
 step S11, carrying out spectrum scanning on apples through a near infrared spectrometer to obtain apple reflection spectrums;
 Step S12, carrying out smoothing treatment on the apple reflection spectrum to obtain an apple reflection smooth spectrum;
 And S13, removing baseline drift from the apple reflection smooth spectrum to obtain an apple reflection correction spectrum.
Preferably, step S2 comprises the steps of:
 S21, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain a sugar/acidity/cellulose spectrum band;
 s22, carrying out absorption peak overlapping fluctuation analysis based on sugar/acidity/cellulose spectrum wave bands to obtain absorption peak overlapping wave band data of the sugar/acidity/cellulose;
 s23, analyzing the peak variation structural strength of the absorption peak overlapping wave band data to obtain peak variation structural strength data;
 and S24, carrying out background interference wave band quantitative processing on the apple reflection correction spectrum based on the peak shape variation structural strength data to obtain background interference wave band quantitative data.
Preferably, step S23 comprises the steps of:
 S231, carrying out overlapping band frequency change trend analysis on the absorption peak overlapping band data to obtain an overlapping band frequency change trend;
 step S232, calculating the wave band fluctuation slope change rate of the absorption peak overlapped wave band data based on the frequency change trend of the overlapped wave band to obtain the wave band fluctuation slope change rate;
 step S233, carrying out local extreme point deviation geometric proportion calculation on the overlapping band frequency change trend according to the band fluctuation slope change rate to obtain local extreme point deviation geometric proportion data;
 And step S234, analyzing the peak variation structural strength based on the local extreme point deviation geometric data and the wave band fluctuation slope change rate to obtain peak variation structural strength data.
Preferably, step S24 comprises the steps of:
 S241, carrying out spectral band identification of other substances on the apple reflection correction spectrum based on sugar/acidity/cellulose spectral bands to obtain other substance spectral bands, wherein the other substances comprise vitamins , minerals and moisture;
 Step S242, performing intensity coupling analysis on spectrum bands of other substances to obtain spectrum intensity band data of the other substances;
 step S243, carrying out scattering interaction effect evaluation on sugar/acidity/cellulose spectrum wave bands according to the spectrum intensity wave band data of other substances to obtain scattering interaction effect data;
 S244, carrying out band peak line fluctuation displacement analysis on the sugar/acidity/cellulose spectrum band based on scattering interaction effect data to obtain band peak line fluctuation displacement data;
 And step S245, carrying out background interference wave band quantitative processing based on the peak shape variation structural strength data and the wave band peak line fluctuation displacement data to obtain background interference wave band quantitative data.
Preferably, step S244 includes the steps of:
 performing multiple scattering intensity coupling on scattering interaction effect data to obtain multiple scattering intensity coupling data;
 Carrying out scattering wavelength polarization vector analysis on scattering interaction effect data based on multiple scattering intensity coupling data to obtain scattering wavelength polarization vectors;
 Calculating the rotation angle of the circular polarization degree of the scattered wavelength polarization vector to obtain the rotation angle of the circular polarization degree of the scattered wavelength;
 And carrying out band peak line fluctuation displacement analysis on the sugar/acidity/cellulose spectrum band based on the scattering circular polarization degree rotation angle to obtain band peak line fluctuation displacement data.
Preferably, step S3 comprises the steps of:
 step S31, carrying out normalization processing on the quantitative data of the background interference wave band to obtain quantitative normalization data of the background interference wave band;
 s32, constructing a quality detection and identification model according to quantitative normalization data of a background interference wave band and peak shape variation structure strength data to obtain the quality detection and identification model;
 And step S33, carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectrum band based on the quality detection identification model to obtain sugar/acidity/cellulose content distribution data.
Preferably, step S32 comprises the steps of:
 step S321, carrying out interference wave band similarity analysis on background interference wave band quantitative normalization data to obtain interference wave band similarity data;
 S322, performing multiple cluster regression analysis on the interference wave band similarity data to obtain interference wave band similarity cluster data;
 Step S323, carrying out structural instability evaluation on the peak variation structural strength data to obtain peak variation structural instability data;
 Step S324, carrying out interference correlation induction based on interference wave band similar clustering data and peak shape variation structure instability data to obtain interference correlation induction data;
 And step S325, constructing a quality detection recognition model for the interference related induction data based on a strategy gradient algorithm to obtain the quality detection recognition model.
Preferably, step S324 includes the steps of:
 Performing wavelet decomposition processing on the interference wave band similar clustering data and the peak shape variation structure instability data to obtain interference characteristic multi-scale decomposition data;
 Performing disturbance trend cross regression analysis on the disturbance characteristic multi-scale decomposition data to obtain disturbance trend regression data;
 Carrying out correlation weighted reconstruction on the interference band similarity clustering data according to the interference trend regression data to obtain interference weight normalization data;
 And carrying out interference correlation induction on the interference characteristic multi-scale decomposition data based on the interference weight normalization data to obtain interference correlation induction data.
Preferably, the present invention also provides an agricultural product quality detection system for performing the agricultural product quality detection method as described above, the agricultural product quality detection system comprising:
 The spectrum correction module is used for carrying out spectrum scanning on apples through the near infrared spectrometer, and then removing baseline drift to obtain apple reflection correction spectrums;
 the quantitative analysis module of the background interference wave band is used for identifying the spectrum wave band of the apple reflection correction spectrum to obtain the spectrum wave band of the sugar/acidity/cellulose, analyzing the peak variation structural strength based on the spectrum wave band of the sugar/acidity/cellulose to obtain the peak variation structural strength data;
 The content distribution recognition module is used for constructing a quality detection recognition model according to the quantitative data of the background interference wave band to obtain a quality detection recognition model, and carrying out sugar/acidity/cellulose content distribution recognition on the sugar/acidity/cellulose spectral wave band based on the quality detection recognition model to obtain sugar/acidity/cellulose content distribution data.
The method has the beneficial effects that the reflection correction spectrum of the apple is obtained after the spectrum scanning is carried out on the apple through the near infrared spectrometer and the baseline drift is removed. The method has the advantages that the near infrared spectrum scanning can be used for capturing the component characteristics in the apples without damage, and the baseline drift removal can be used for eliminating interference caused by factors such as instrument deviation, environmental change and the like, so that more accurate and stable spectrum data can be obtained. By obtaining reflection corrected spectra, a high quality data base can be provided for subsequent component analysis. And (3) identifying sugar, acidity and cellulose spectral bands of the apple reflection correction spectrum to obtain related spectral bands. The method has the beneficial effect that by accurately identifying the spectrum wave band related to sugar, acidity and cellulose, meaningful component information can be effectively extracted from complex spectrum data. In addition, analysis of the structural strength of the peak shape variation based on these spectral bands helps reveal the varying characteristics of each component and identify potential quality fluctuations in the sample by analyzing the peak shape variation. Further background interference wave band quantitative processing ensures the accuracy of the identification result, and avoids the interference of other components or environmental factors, thereby improving the accuracy and reliability of analysis. And constructing a quality detection and identification model according to the quantitative data of the background interference wave band. The method has the beneficial effects that a quality detection and identification model based on actual data is constructed, and the sugar, acidity and cellulose content of apples can be accurately and quantitatively analyzed. By utilizing the model, the quality distribution and variation trend of apples can be effectively identified and predicted, and scientific basis is provided for agricultural production, quality control and product optimization. In addition, the construction of the model can help to realize automation and standardization of apple quality detection, reduce errors of manual intervention, and improve production efficiency and quality assurance capability. Therefore, the invention is the optimization processing of the traditional agricultural product quality detection method, solves the problem that the traditional agricultural product quality detection method has low recognition accuracy of the background interference of the spectrum detection, thereby causing large error of the agricultural product quality detection, improving the recognition accuracy of the background interference of the spectrum detection and reducing the error of the agricultural product quality detection.
Detailed Description
Referring to fig. 1 to 3, a method for detecting quality of agricultural products, the method comprising the steps of:
 step S1, carrying out spectrum scanning on apples through a near infrared spectrometer, and then removing baseline drift to obtain apple reflection correction spectrums;
 S2, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain sugar/acidity/cellulose spectrum band, carrying out peak variation structural strength analysis based on the sugar/acidity/cellulose spectrum band to obtain peak variation structural strength data, carrying out background interference band quantitative processing based on the peak variation structural strength data to obtain background interference band quantitative data;
 And step S3, constructing a quality detection and identification model according to the quantitative data of the background interference wave band to obtain a quality detection and identification model, and carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectral wave band based on the quality detection and identification model to obtain sugar/acidity/cellulose content distribution data.
In the embodiment of the present invention, as described with reference to fig. 1, a schematic flow chart of steps of a method for detecting quality of agricultural products according to the present invention is provided, and in this example, the method for detecting quality of agricultural products includes the following steps:
 step S1, carrying out spectrum scanning on apples through a near infrared spectrometer, and then removing baseline drift to obtain apple reflection correction spectrums;
 In the embodiment of the invention, the apples are subjected to spectrum scanning through a near infrared spectrometer, the spectrum data is collected by using an integrating sphere diffuse reflection measurement mode and an InGaAs detector, the spectrum range is set to 900-2500nm, the spectrum resolution is controlled to be within the range of 1-2nm, and the standard white board is used for spectrum standardized calibration. In the spectrum scanning process, a halogen tungsten lamp is adopted as a light source, so that illumination uniformity is ensured, and the stability of a spectrum signal is improved through an optical fiber coupling system. Before the collected spectrum data is stored, a Savitzky-Golay smoothing filter algorithm is utilized to carry out smoothing treatment on a spectrum curve so as to reduce high-frequency noise interference, and meanwhile, a least square method is utilized to correct baseline drift, so that the accuracy of the spectrum data is ensured. The correction of the reflection spectrum adopts a multi-point correction method, and the spectrum normalization processing is carried out by selecting a plurality of reference points, so that the overall trend of the spectrum curve is more stable, and the reliability of the subsequent analysis is improved. And finally obtaining the apple reflection correction spectrum after the baseline drift is removed.
S2, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain sugar/acidity/cellulose spectrum band, carrying out peak variation structural strength analysis based on the sugar/acidity/cellulose spectrum band to obtain peak variation structural strength data, carrying out background interference band quantitative processing based on the peak variation structural strength data to obtain background interference band quantitative data;
 In the embodiment of the invention, the characteristic wave bands of sugar, acidity and cellulose are identified for the apple reflection correction spectrum, the principal component analysis is firstly carried out on the spectrum data, the principal characteristic information in the spectrum is extracted, the resolution of the spectrum characteristics is improved through the first derivative and the second derivative operation, the variable selection is further carried out by adopting a continuous projection algorithm, and the key spectrum wave bands related to the sugar, the acidity and the cellulose are screened out. After the characteristic wave band screening is finished, the peak position deviation analysis method is utilized to calculate the absorption peak displacement condition of the characteristic wave band based on the absorption peak variation condition of the characteristic wave band, and meanwhile, the peak shape variation analysis method is adopted to carry out statistical analysis on the spectrum peak shape variation condition of different samples so as to quantify the morphological variation trend of the absorption peak. For the intensity analysis of the peak shape variation structure, the difference of the spectrum peak shapes among different samples is calculated by adopting a statistical analysis method of standard deviation and variation coefficient, and the sensitivity of the spectrum peak shapes along with the component content is further evaluated. And (3) carrying out quantitative analysis on the background interference wave band by combining peak shape variation data, removing scattering effect in the spectrum by adopting a multi-component scattering correction method, and separating background noise signals based on an independent component analysis method so as to reduce the influence of the background interference on the target spectrum characteristics. And finally, acquiring quantitative data of a background interference wave band, and providing reliable data support for subsequent quality detection.
And step S3, constructing a quality detection and identification model according to the quantitative data of the background interference wave band to obtain a quality detection and identification model, and carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectral wave band based on the quality detection and identification model to obtain sugar/acidity/cellulose content distribution data.
In the embodiment of the invention, a quality detection and identification model is constructed based on quantitative data of a background interference wave band, firstly, the background interference data is normalized, and a standard normal distribution method is adopted to convert spectrum data into standardized data with a mean value of 0 and a standard deviation of 1, so that measurement deviation among different samples is reduced. And then, carrying out feature dimension reduction on the normalized data, extracting the most representative spectral features by adopting a principal component analysis and linear discriminant analysis method, and constructing a feature space. Based on the data distribution of the feature space, the samples are subjected to grouping analysis by using a K-means clustering method, the distribution rule of the data is evaluated, and the degree of distinction among different types of samples is calculated through the mahalanobis distance. For the construction of a quality detection model, a partial least square regression method is adopted to establish the quantitative relation between a spectrum signal and sugar, acidity and cellulose content, a five-fold cross validation method is adopted to evaluate the generalization capability of the model in the model training process, and the decision coefficient and mean square error of the model are calculated to ensure the prediction accuracy of the model. After the model is built, spectral data of an apple sample is input into the model, the content distribution of sugar, acidity and cellulose is calculated based on spectral response of a characteristic wave band, reliability of a prediction result is estimated through regression residual analysis, and finally content distribution data of the apple sugar, acidity and cellulose is obtained.
Step S1 comprises the steps of:
 step S11, carrying out spectrum scanning on apples through a near infrared spectrometer to obtain apple reflection spectrums;
 Step S12, carrying out smoothing treatment on the apple reflection spectrum to obtain an apple reflection smooth spectrum;
 And S13, removing baseline drift from the apple reflection smooth spectrum to obtain an apple reflection correction spectrum.
In the embodiment of the invention, when the near infrared spectrometer is adopted to carry out spectrum scanning on the apples, firstly, a proper spectrum range and detection mode are required to be selected, so that the accuracy of spectrum data is ensured. The spectrum scanning adopts an integrating sphere diffuse reflection measurement mode, and a halogen tungsten lamp is selected as a light source so as to provide stable and uniform near infrared illumination. The detector selects an InGaAs photosensitive element, the response range covers 900-2500nm, and the spectral resolution is set to be 2nm so as to ensure the fineness of a spectral curve. In order to reduce the interference of ambient light, a standard whiteboard is used for reference correction before spectrum scanning, so that the consistency of instrument measurement is ensured. During the scan, the apple sample is placed on the sample stage, keeping the surface clean and dew free to prevent additional spectral absorption from affecting the measurement results. The optical fiber probe is fixed at a position 10mm away from the surface of the sample, the measurement angle is set to 90 degrees for vertical irradiation, and the maximum collection efficiency of reflected light is ensured. The spectrum signal is transmitted to the detector through the optical fiber, the data is stored in the form that the light intensity changes along with the wavelength, and finally the original reflection spectrum of the apple is obtained. The reflection spectrum of the apple is smoothed to reduce high frequency fluctuation caused by environmental noise or instrument thermal noise in the measuring process. The smoothing method selects Savitzky-Golay filtering algorithm, and the method carries out sliding window processing on the spectrum curve based on local polynomial fitting so as to reduce noise interference while maintaining spectrum peak shape characteristics. The size of the sliding window is set to 15 data points, and the fitting order is two-order, so that the higher resolution can be maintained after the spectrum is smoothed. In the filtering process, the spectrum boundary is processed by adopting an endpoint symmetrical expansion mode so as to prevent the loss or distortion of edge data. After smoothing treatment, the overall trend of the spectrum curve is smoother, the local fluctuation is reduced, the stability and the reliability of spectrum data in subsequent analysis are ensured, and finally the reflection smooth spectrum of the apple is obtained. And (3) carrying out baseline drift correction on the apple reflection smooth spectrum to eliminate baseline drift phenomenon caused by light scattering, instrument drift or sample surface non-uniformity in the spectrum measurement process. And the baseline correction adopts a least square fitting mode, a background fitting curve is constructed by selecting a plurality of spectrum background points, and the curve is subtracted from the original spectrum data. The background points are selected according to the low absorption region of the spectrum curve so as to ensure that the fitting curve can accurately reflect the baseline trend of the spectrum. The fitting adopts a polynomial regression method, and the order is set to be third order so as to smooth the background curve and avoid overfitting. In the correction process, firstly, linear interpolation is carried out on background points so that the background points are uniformly distributed in the whole spectrum range, then, the morphological parameters of a background curve are calculated by adopting a weighted fitting mode, and the baseline subtraction is carried out on original spectrum data point by point. After the baseline drift is removed, the integral baseline of the spectrum curve tends to be stable, the characteristic peak identification is prevented from being influenced by the fluctuation of the baseline, and finally the apple reflection correction spectrum after the baseline drift is removed is obtained.
Step S2 comprises the steps of:
 S21, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain a sugar/acidity/cellulose spectrum band;
 s22, carrying out absorption peak overlapping fluctuation analysis based on sugar/acidity/cellulose spectrum wave bands to obtain absorption peak overlapping wave band data of the sugar/acidity/cellulose;
 s23, analyzing the peak variation structural strength of the absorption peak overlapping wave band data to obtain peak variation structural strength data;
 and S24, carrying out background interference wave band quantitative processing on the apple reflection correction spectrum based on the peak shape variation structural strength data to obtain background interference wave band quantitative data.
As an example of the present invention, referring to fig. 2, the step S2 in this example includes:
 S21, carrying out sugar/acidity/cellulose spectrum band identification on the apple reflection correction spectrum to obtain a sugar/acidity/cellulose spectrum band;
 In the embodiment of the invention, when the spectrum band identification of sugar, acidity and cellulose is carried out on the apple reflection correction spectrum, characteristic absorption peaks of different components are required to be selected. The characteristic wave band of sugar is mainly concentrated in the range of 900-2500nm of near infrared spectrum, wherein C-H telescopic vibration absorption peaks are near 1200nm and 1700nm, and fine wave band extraction is carried out by combining the second derivative spectrum so as to reduce background interference. The acidity is mainly represented by absorption peaks of O-H and C=O bonds, characteristic wave bands are concentrated at 1400nm and 1900nm, and the characteristic wave bands are separated by adopting a continuous wavelet transformation method, so that the characteristic wave bands can be stably identified in a complex spectrum environment. The cellulose content is closely related to the stretching vibration of molecular hydroxyl, the main absorption peaks are distributed at 2100nm and 2300nm, the band data is processed through a local maximum point search algorithm, the non-target absorption signal interference is removed, and the accurate extraction of the characteristic band is ensured. All spectrum bands are subjected to standardized treatment to eliminate measurement errors among samples, improve comparability of spectrum data and finally obtain spectrum bands of sugar, acidity and cellulose.
S22, carrying out absorption peak overlapping fluctuation analysis based on sugar/acidity/cellulose spectrum wave bands to obtain absorption peak overlapping wave band data of the sugar/acidity/cellulose;
 in the embodiment of the invention, the overlapping condition of the absorption peaks is analyzed based on the identified sugar, acidity and cellulose spectrum bands so as to ensure the independence and the distinguishing degree among the characteristic bands. The overlapping fluctuation analysis of the absorption peaks adopts a principal component analysis method, performs dimension reduction treatment on the original spectrum data to identify the main absorption interval of each wave band, and calculates the absorption overlapping rate between the wave bands. The sugar and acidity have stronger absorption overlap at 1400nm, and the offset trend of the extreme points of the derivative is calculated through the second derivative spectrum so as to evaluate the interference degree between wave bands. The cellulose overlaps with partial absorption peak of acidity near 1900nm, and curvature change rate of the overlapping area is measured by adopting a spectral line curvature calculation method so as to judge the influence range of the overlapping wave band. All absorption peak overlapping wave band data are stored and are subjected to statistical analysis, and data support is provided for subsequent analysis of peak shape variation structures.
S23, analyzing the peak variation structural strength of the absorption peak overlapping wave band data to obtain peak variation structural strength data;
 In the embodiment of the invention, peak shape variation structural strength analysis is carried out on the absorption peak overlapping band data so as to extract the independent absorption characteristics of each component and quantify the change of the spectrum signal. And the analysis process adopts a peak normalization method to normalize the spectrum intensities of all absorption peaks so as to eliminate signal deviation caused by sample thickness or density change. And calculating the peak width change rate by adopting a polynomial fitting curve aiming at the absorption peak of the sugar wave band so as to quantify the expansion trend of the peak shape. The peak variation of the acidity band is calculated by a first derivative method to judge the nonlinear variation characteristic of the acidity signal. The cellulose band is then analyzed for peak symmetry, and the degree of variation in peak shape symmetry is measured by calculating the peak height ratio. All peak variation structural strength data are stored in a numerical matrix form, and basic data are provided for subsequent quantitative analysis of background interference wave bands.
And S24, carrying out background interference wave band quantitative processing on the apple reflection correction spectrum based on the peak shape variation structural strength data to obtain background interference wave band quantitative data.
In the embodiment of the invention, based on the peak shape variation structural strength data, the apple reflection correction spectrum is subjected to background interference band quantitative processing so as to eliminate spectrum interference of non-target components. And the background interference wave band is identified by adopting partial least square regression analysis, and the linear decomposition is carried out on the optical data and the background signal so as to calculate the contribution degree of the background wave band. The background interference mainly comes from absorption of non-target components such as moisture, minerals and the like, wherein the moisture has strong absorption characteristics at 1400nm and 1900nm, and a least square filtering method is adopted to inhibit moisture absorption peaks. The interference wave band of mineral is mainly distributed at 2200nm, the interference signal is extracted by a eigenvalue decomposition method, and subtraction processing is carried out in the original spectrum data. The quantitative calculation of the background interference wave band adopts a weighted average method to carry out weighted summation on the interference contribution degrees of different wave bands, and quantitative data of the background interference wave band is generated so as to ensure the purity and the accuracy of final spectrum data.
Step S23 includes the steps of:
 S231, carrying out overlapping band frequency change trend analysis on the absorption peak overlapping band data to obtain an overlapping band frequency change trend;
 step S232, calculating the wave band fluctuation slope change rate of the absorption peak overlapped wave band data based on the frequency change trend of the overlapped wave band to obtain the wave band fluctuation slope change rate;
 step S233, carrying out local extreme point deviation geometric proportion calculation on the overlapping band frequency change trend according to the band fluctuation slope change rate to obtain local extreme point deviation geometric proportion data;
 And step S234, analyzing the peak variation structural strength based on the local extreme point deviation geometric data and the wave band fluctuation slope change rate to obtain peak variation structural strength data.
In the embodiment of the invention, when the overlapping band frequency change trend analysis is performed on the overlapping band data of the absorption peak, the absorption peak change condition of the spectrum data under different sample conditions needs to be obtained. Firstly, normalization processing is carried out on the spectrum data so as to eliminate the influence of the measuring environment on the spectrum intensity, and the spectrum data of different samples are compared under the same dimension. Secondly, in the range of the selected absorption peak overlapping wave band, the main absorption peak of each spectrum curve is extracted, and the center frequency of the wave band is calculated. And calculating the center frequency by adopting a curve fitting method, selecting a quadratic polynomial to fit the shape of the absorption peak, and solving the zero point of the first derivative of the quadratic polynomial to serve as the center frequency.   And then, collecting center frequency data of a plurality of samples, constructing a frequency change trend curve, and smoothing the data by adopting a moving average method to eliminate noise interference. And finally, analyzing the frequency variation trend, and extracting the frequency deviation rule of the wave band under different sample conditions to judge whether the wave band is greatly influenced by external factors or not, so that the reliability of data is ensured. And calculating the wave band fluctuation slope change rate of the absorption peak overlapped wave band data based on the frequency change trend of the overlapped wave band so as to quantify the fluctuation characteristics of the spectrum curve. Firstly, selecting discrete data points of a frequency change trend curve, and calculating the change slope between adjacent data points to obtain a slope sequence. The slope calculation adopts a differential method to calculate the frequency variation of adjacent points, and the sampling interval normalization processing is used to eliminate the time scale difference between different spectrum data.   And then, calculating the change rate of the slope sequence, and calculating the change rate of the slope by adopting a second-order difference method, namely, performing difference operation on the slope sequence again to obtain the wave band fluctuation slope change rate data. Finally, carrying out statistical analysis on the wave band fluctuation slope change rate data, extracting characteristic values such as mean value and variance, and evaluating the stability of the wave band by combining a frequency change trend curve to judge whether further processing is needed to remove interference signals. And according to the change rate of the wave band fluctuation slope, carrying out local extreme point deviation geometric proportion calculation on the change trend of the overlapping wave band frequency so as to further quantify the change characteristics of the spectrum peak shape. First, searching local extreme points in a wave band fluctuation slope change rate curve, determining the inflection point position of the data change rate near a zero point by adopting a gradient searching method, and recording the numerical value of the extreme points.   Then, the deviation amount of the local extreme point is calculated, and the deviation degree of the extreme point relative to the reference is calculated by adopting a relative deviation calculation method and taking the overall change trend of the wave band as the reference. In the deviation calculation process, an equal-ratio weighting method is adopted to carry out weighted average on the deviation of different extreme points so as to ensure that a deviation calculation result has stronger representativeness. And finally, storing and normalizing the local extreme point deviation geometric data so as to perform unified analysis with subsequent data and provide accurate data support for subsequent peak shape variation structural strength analysis. And analyzing the structural strength of the peak variation based on the local extreme point deviation geometric data and the wave band fluctuation slope change rate so as to quantify the variation characteristics of the spectrum peak.   Firstly, key parameters of peak shape variation structure, including peak width, peak height, symmetry, gradient and the like, are extracted, and standardized to eliminate the influence of spectrum intensity of different samples. Secondly, performing dimension reduction treatment on a plurality of peak shape parameters by adopting a principal component analysis method, extracting main factors influencing peak shape variation, and calculating the contribution rate of each factor. And then, carrying out numerical characterization on the peak shape variation structural strength by using a curve fitting method, and constructing a peak shape variation index so as to quantify the variation degree of the spectrum data under different conditions. Finally, statistical analysis is carried out on the peak variation structural strength data, and the credibility of the data is evaluated by combining the spectral characteristics of sugar, acidity and cellulose, so that accurate spectral characteristic information is provided for quality detection of agricultural products.
Step S24 includes the steps of:
 S241, carrying out spectral band identification of other substances on the apple reflection correction spectrum based on sugar/acidity/cellulose spectral bands to obtain other substance spectral bands, wherein the other substances comprise vitamins , minerals and moisture;
 Step S242, performing intensity coupling analysis on spectrum bands of other substances to obtain spectrum intensity band data of the other substances;
 step S243, carrying out scattering interaction effect evaluation on sugar/acidity/cellulose spectrum wave bands according to the spectrum intensity wave band data of other substances to obtain scattering interaction effect data;
 S244, carrying out band peak line fluctuation displacement analysis on the sugar/acidity/cellulose spectrum band based on scattering interaction effect data to obtain band peak line fluctuation displacement data;
 And step S245, carrying out background interference wave band quantitative processing based on the peak shape variation structural strength data and the wave band peak line fluctuation displacement data to obtain background interference wave band quantitative data.
In the embodiment of the invention, the spectrum band identification of other substances is carried out on the apple reflection correction spectrum based on the spectrum band of sugar, acidity and cellulose, so as to determine the characteristic wavelength range of substances such as vitamins, minerals, moisture and the like. Firstly, for the known absorption characteristics of vitamins, minerals and moisture in the near infrared band, the apple reflection correction spectrum is subjected to Fourier transform by utilizing a spectrum decomposition method so as to enhance the characteristic information of different substances in the frequency domain. And then, extracting main features in the spectrum signals by adopting a principal component analysis method, and matching the main features with the apple spectrum data by utilizing the characteristic absorption wavelengths of different substances in a standard database so as to determine main absorption peaks of other substances. And then, enhancing the absorption peak signal by adopting a second derivative spectrometry to improve the identification accuracy and finally obtaining the spectrum band data of other substances. And performing intensity coupling analysis on spectral bands of other substances to determine the spectral signal interference relationship between substances such as vitamins, minerals, moisture and the like and the spectral bands of sugar, acidity and cellulose. Firstly, selecting spectrum data of different apple samples, calculating spectrum intensities of spectrum bands of other substances, and establishing an intensity distribution diagram. Then, the spectrum data is decomposed in a multi-scale way by adopting a wavelet transformation method so as to analyze the correlation between the spectrum intensity wave bands of other substances and the sugar, acidity and cellulose spectrum wave bands. And then, calculating the intensity coupling coefficient between different spectrum bands by using a partial least square regression method, and screening out a spectrum region with stronger interference effect based on the intensity coupling coefficient to obtain spectrum intensity band data of other substances. And according to the spectral intensity wave band data of other substances, carrying out scattering interaction influence effect evaluation on the spectral wave bands of sugar, acidity and cellulose so as to quantify the influence degree of the background component on the spectral signal of the target component. Firstly, adopting a Monte Carlo simulation method to simulate the scattering effect of vitamins, minerals and moisture with different concentrations on sugar, acidity and cellulose spectrum wave bands, and calculating the scattering intensity change trend. And then, calculating scattering coefficients of different background substances on the optical signals by using a Rayleigh scattering model, and carrying out regression analysis by combining experimental data to obtain scattering influence parameters of different background components. And then, performing scattering compensation on the spectrum signals of sugar, acidity and cellulose spectrum bands to remove interference of background components, and finally obtaining scattering interaction influence effect data. And carrying out band peak line fluctuation displacement analysis on the spectral bands of sugar, acidity and cellulose based on scattering interaction influence effect data so as to detect the influence of different background components on the target spectral peak position. Firstly, characteristic spectrum peaks of sugar, acidity and cellulose are selected, and the variation trend of peak positions under different background conditions is calculated. And then, curve fitting is carried out on the spectrum peak shape by adopting a Gaussian fitting method, and the offset of the peak position is calculated. Then, the correlation between the peak linear displacement and the background interference is analyzed by using a linear regression method, and the standard deviation of the peak linear displacement is calculated to quantify the influence degree of the background component. And finally, determining a spectrum band with poor peak position stability based on peak line fluctuation data, and providing data support for subsequent quantitative processing of a background interference band.
And carrying out background interference wave band quantitative processing on the spectrum wave bands of sugar, acidity and cellulose based on the peak shape variation structural strength data and wave band peak line fluctuation displacement data so as to eliminate background noise in the spectrum signals. Firstly, a multi-component scattering correction method is adopted to correct signals of spectrum bands with strong background interference, and the influence of scattering effect on spectrum signals is eliminated. Then, the target spectrum signals of sugar, acidity and cellulose are subjected to orthogonal decomposition with background noise by using an orthonormal transformation method, so as to extract pure target spectrum signals. Then, the noise ratio of the target spectrum signal is calculated, and a wavelet denoising method is adopted to carry out signal smoothing processing on the spectrum region with larger background interference so as to reduce noise interference. Finally, quantitative data of a background interference wave band is obtained, and a high-precision spectrum analysis basis is provided for quality detection of agricultural products.
Step S244 includes the steps of:
 performing multiple scattering intensity coupling on scattering interaction effect data to obtain multiple scattering intensity coupling data;
 Carrying out scattering wavelength polarization vector analysis on scattering interaction effect data based on multiple scattering intensity coupling data to obtain scattering wavelength polarization vectors;
 Calculating the rotation angle of the circular polarization degree of the scattered wavelength polarization vector to obtain the rotation angle of the circular polarization degree of the scattered wavelength;
 And carrying out band peak line fluctuation displacement analysis on the sugar/acidity/cellulose spectrum band based on the scattering circular polarization degree rotation angle to obtain band peak line fluctuation displacement data.
In the embodiment of the invention, multiple scattering intensity coupling is performed on scattering interaction effect data so as to analyze interaction relation among different scattering effects. First, incident light of different angles is selected, multiple spectral scans are performed on an apple sample, and scattering intensity data for each scan is recorded. And then, carrying out normalization processing on the spectrum data by utilizing a bidirectional scattering distribution function so as to eliminate the influence of the change of the measurement angle on the scattering intensity. Then, the scatter intensity data is decomposed into a plurality of orthogonal components using a matrix decomposition method to distinguish contributions of different scattering mechanisms. Then, the correlation coefficient between different scattering components is calculated, and a scattering intensity coupling model is constructed by utilizing a Lagrange interpolation method so as to quantify the interaction intensity of different scattering effects.   Finally, multiple scattering intensity coupling data are obtained, and data support is provided for subsequent scattering wavelength polarization vector analysis. And carrying out scattering wavelength polarization vector analysis on the scattering interaction effect data based on the multiple scattering intensity coupling data so as to determine the influence of different scattering effects on polarization characteristics. Firstly, calculating polarization states under different wavelengths by adopting a Stokes parameter method, and constructing a polarized ellipsoid model of scattered light so as to intuitively express the polarized characteristics of the scattered light. Then, the change of polarized light intensity under different scattering angles is analyzed by using the Malus law, and polarization vectors of different wavelengths are calculated. And then, adopting a polarization matrix transformation method to map polarization vectors of different wavelengths into a unified coordinate system so as to compare polarization characteristic differences of different scattering mechanisms.   Then, the trend of the polarization degree with the change of the wavelength is calculated, and the frequency characteristic of the polarization vector is analyzed by using fourier transform to further quantify the influence of the scattering effect on the polarization state. Finally, a scattered wavelength polarization vector is obtained, and basic data is provided for subsequent circular polarization degree rotation angle calculation. And carrying out circular polarization degree rotation angle calculation on the scattered wavelength polarization vector to determine rotation characteristics of scattered light at different wavelengths. First, a plurality of characteristic wavelengths are selected, and polarization angle distribution at these wavelengths is calculated. Then, a Jones matrix method is adopted to simulate the propagation paths of light with different polarization states in an apple sample, and the rotation angle of the polarization direction of the light in the propagation process is calculated.   And then, analyzing the influence of the magnetic field and the internal structure of the sample on the polarization angle by utilizing a Faraday rotation model, and calculating the functional relation of the circular polarization degree along with the change of the wavelength. And then, performing curve fitting on the circular polarization data by adopting a nonlinear fitting method, and extracting key characteristic parameters to quantify the rotation angle change trend of different wavelengths. Finally, the rotation angle data of the scattering circular polarization degree is obtained, and a calculation basis is provided for subsequent wave band peak line fluctuation displacement analysis. Based on the rotation angle of the scattering circular polarization degree, the band peak line fluctuation displacement analysis is carried out on sugar, acidity and cellulose spectrum bands so as to study the influence of scattering effect on the stability of the spectrum peak position.   First, the characteristic absorption bands of sugar, acidity and cellulose are selected and their spectral peak positions under different background conditions are calculated. Then, the influence of the scattering effect on the spectrum peak shape is analyzed by using a Raman scattering enhancement model, and the offset of the spectrum peak position is calculated. And then, carrying out accurate fitting on the spectrum peak shape by adopting a Gaussian fitting method, and calculating the standard deviation of peak line fluctuation so as to quantify the disturbance degree of scattering on the spectrum peak position. And then, extracting key characteristics of the fluctuation displacement by using a principal component analysis method, and establishing a mathematical relationship between the fluctuation displacement and the rotation angle of the scattering circular polarization degree so as to further quantify the influence intensity of the scattering effect. Finally, wave band peak line fluctuation displacement data are obtained, and data support is provided for precision improvement of agricultural product quality detection.
Step S3 comprises the steps of:
 step S31, carrying out normalization processing on the quantitative data of the background interference wave band to obtain quantitative normalization data of the background interference wave band;
 s32, constructing a quality detection and identification model according to quantitative normalization data of a background interference wave band and peak shape variation structure strength data to obtain the quality detection and identification model;
 And step S33, carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectrum band based on the quality detection identification model to obtain sugar/acidity/cellulose content distribution data.
As an example of the present invention, referring to fig. 3, the step S3 in this example includes:
 step S31, carrying out normalization processing on the quantitative data of the background interference wave band to obtain quantitative normalization data of the background interference wave band;
 in the embodiment of the invention, the quantitative data of the background interference wave band is normalized so as to eliminate the influence of different detection conditions on the data and improve the comparability of the data. First, spectral data of a background interference wave band is selected, and spectral intensity values corresponding to each wavelength are extracted. And then, calculating the maximum value and the minimum value of the background interference wave band, and normalizing all spectrum intensity values by using a minimum-maximum normalization method to limit the data range between zero and one. And then, the data is standardized by adopting a Z-score standardization method to ensure that the mean value of the data is zero and the standard deviation is one, so that the dimensional influence among the data is eliminated. And then, denoising the normalized data by adopting a wavelet transformation method to remove the interference of high-frequency noise on subsequent analysis. And finally, obtaining quantitative normalization data of the background interference wave band, and providing standardized input data for the construction of a quality detection and identification model.
S32, constructing a quality detection and identification model according to quantitative normalization data of a background interference wave band and peak shape variation structure strength data to obtain the quality detection and identification model;
 In the embodiment of the invention, the quality detection and identification model is constructed according to the quantitative normalization data of the background interference wave band and the peak shape variation structure strength data so as to realize accurate evaluation of the quality of the apple sample. Firstly, characteristic parameters of background interference wave band quantitative normalization data and peak shape variation structural strength data are selected, wherein the characteristic parameters comprise spectrum peak value, half peak width, offset and the like, and correlation among the parameters is calculated to screen out representative characteristic variables. And then, performing dimension reduction processing on the screened characteristic variables by using a principal component analysis method so as to reduce data redundancy and improve calculation efficiency. And then, classifying the apple samples with different quality grades by adopting a K-means clustering method, and extracting the spectral characteristics of each class. And then, calculating Euclidean distance between each quality category, and constructing a discriminant function based on the distance calculation result so as to realize classification and identification of the quality of the apple sample. And finally, establishing a quality detection and identification model, and providing a calculation basis for identifying the distribution of sugar, acidity and cellulose content.
And step S33, carrying out sugar/acidity/cellulose content distribution identification on the sugar/acidity/cellulose spectrum band based on the quality detection identification model to obtain sugar/acidity/cellulose content distribution data.
In the embodiment of the invention, the content distribution identification is carried out on sugar, acidity and cellulose spectrum bands based on the quality detection identification model so as to determine the quality characteristics of the interior of the apple sample. Firstly, characteristic absorption wave bands of sugar, acidity and cellulose are selected, and spectral intensity data under corresponding wavelengths are extracted. Then, the difference between the spectrum intensity and the standard sample is calculated, and a partial least squares regression method is adopted to establish the mathematical relationship between the spectrum intensity and the content value. And then analyzing the change trend of the light intensity by utilizing a multi-element curve fitting method, and calculating the content distribution data at each wavelength. Then, the discrete data is smoothed by an interpolation method to obtain a continuous content distribution curve. Finally, sugar, acidity and cellulose content distribution data are obtained, and quantitative reference is provided for quality evaluation of apple samples.
Step S32 includes the steps of:
 step S321, carrying out interference wave band similarity analysis on background interference wave band quantitative normalization data to obtain interference wave band similarity data;
 S322, performing multiple cluster regression analysis on the interference wave band similarity data to obtain interference wave band similarity cluster data;
 Step S323, carrying out structural instability evaluation on the peak variation structural strength data to obtain peak variation structural instability data;
 Step S324, carrying out interference correlation induction based on interference wave band similar clustering data and peak shape variation structure instability data to obtain interference correlation induction data;
 And step S325, constructing a quality detection recognition model for the interference related induction data based on a strategy gradient algorithm to obtain the quality detection recognition model.
In the embodiment of the invention, interference wave band similarity analysis is carried out on the background interference wave band quantitative normalization data so as to determine the spectrum similarity degree between different wave bands, thereby identifying redundant wave bands. Firstly, extracting the spectrum intensity of all wavelength points in the background interference wave band quantitative normalization data, and calculating the cosine similarity between each wave band to measure the correlation between different wave bands. Then, a dynamic time normalization method is adopted to conduct morphological matching analysis on the spectrum curve, and dynamic time distances among all wave bands are calculated to evaluate the overall similarity of the spectrum curve. And then, calculating the spectral correlation of each band by using the pearson correlation coefficient, and screening out band pairs with the correlation coefficient higher than a set threshold.   and then, clustering the bands with high similarity by adopting a hierarchical clustering method, and calculating the representative index of each clustering center band to determine the relation between the redundant bands and the key bands. Finally, interference wave band similarity data are obtained, and a basis is provided for subsequent interference wave band screening and analysis. And performing multiple clustering regression analysis on the interference wave band similarity data to further mine structural relations among the interference wave bands. First, principal component scores of each band are calculated based on interference band similarity data, and spectral data are classified by adopting a K-means clustering method to determine bands of different categories. And then, fitting the wave bands of each category by using a support vector regression method, and calculating regression errors of the wave bands to evaluate the regression stability of the spectrum curves of different categories.   And then, calculating the spectral regression coefficients of all the types of wave bands by adopting a partial least square regression method, and screening out the wave bands with obvious regression coefficients to determine the main contribution wave bands of the spectral regression. The manhattan distance between the band classes is then calculated to analyze the spectral discrimination between the different classes. Finally, obtaining interference wave band similar clustering data, and providing classification information for the construction of a subsequent quality detection and identification model. Structural instability evaluation is carried out on the peak variation structural strength data so as to analyze the stability of the spectral peak shape along with the change of external interference factors. Firstly, key characteristic parameters in peak shape variation structural strength data, including peak height, peak width, symmetry factors and the like, are extracted, and variation coefficients of the parameters in different spectrum samples are calculated to evaluate the fluctuation degree of spectrum peak shapes.   Then, the spectrum signal is decomposed in a multi-scale mode by adopting a wavelet transformation method, and energy distribution under different scales is calculated to analyze main influencing factors of peak shape variation. Then, the frequency domain characteristics of the spectrum peak shape are calculated by utilizing a Fourier transform method, and the dominant frequency components are screened out to determine the dominant change mode of the spectrum peak shape. Then, the spectral peak shape data is subjected to dimension reduction processing based on a local linear embedding method, and the aggregation degree of the data in a low-dimensional space is calculated to evaluate the stability of the peak shape data. Finally, the instability data of the peak shape variation structure is obtained, and instability characteristic parameters are provided for interference correlation induction. And carrying out interference correlation induction based on the interference wave band similarity clustering data and the peak shape variation structure instability data so as to quantify the influence degree of the interference wave band on the spectrum peak shape.   Firstly, calculating a pearson correlation coefficient between interference band similar clustering data and peak shape variation structure instability data, and screening out a band pair with obvious correlation. And classifying the screened wave band pairs by adopting a partial least square discriminant analysis method, and calculating the discriminant threshold among different categories to evaluate the interference action of the interference wave band on the spectrum peak shape. And then, calculating the contribution rate of the interference wave band to the peak variation by using a principal component regression method, and screening out the wave band with higher contribution rate to determine the main interference source. Then, an interference wave band classification model is constructed based on a support vector machine method, and the discrimination accuracy of different interference categories is calculated to optimize the identification method of the interference wave band.   Finally, interference related induction data are obtained, and interference characteristic parameters are provided for quality detection and identification model construction. And constructing a quality detection recognition model for interference related induction data based on a strategy gradient algorithm so as to realize intelligent evaluation of the quality of agricultural products. First, a policy gradient optimization objective function is defined and model parameters including learning rate, discount factors, etc. are initialized. Then, the interference related induction data is used as an input variable, and a gradient of a strategy function is calculated by adopting a gradient ascent method so as to optimize parameters of a quality detection recognition model. And then, storing historical training data based on an experience playback mechanism, and calculating a long-term return value by adopting a time difference method so as to improve the training stability of the model.   and then, evaluating the credibility of the model prediction result by using a cross entropy method, and adjusting parameters of a strategy function so as to improve the generalization capability of the model. Finally, a quality detection and identification model is obtained, and accurate assessment of sugar, acidity and cellulose content is realized.
Step S324 includes the steps of:
 Performing wavelet decomposition processing on the interference wave band similar clustering data and the peak shape variation structure instability data to obtain interference characteristic multi-scale decomposition data;
 Performing disturbance trend cross regression analysis on the disturbance characteristic multi-scale decomposition data to obtain disturbance trend regression data;
 Carrying out correlation weighted reconstruction on the interference band similarity clustering data according to the interference trend regression data to obtain interference weight normalization data;
 And carrying out interference correlation induction on the interference characteristic multi-scale decomposition data based on the interference weight normalization data to obtain interference correlation induction data.
In the embodiment of the invention, wavelet decomposition processing is carried out on the similar clustering data of the interference wave band and the unsteady data of the peak shape variation structure, and the characteristics of the signals on different frequencies are analyzed through multi-scale wavelet transformation. Firstly, combining interference band similar clustering data and peak shape variation structure instability data to form a comprehensive data set. Then, a suitable mother wavelet (such as Daubechies wavelet or Haar wavelet) is selected, the data is decomposed by wavelet transformation, and detail information and approximate information under different scales are extracted. In specific operation, the data is divided into different subintervals according to a time domain or a space domain, and each subinterval is transformed by using a wavelet basis function to obtain a multi-scale decomposition coefficient of the interval.   These coefficients reflect the trend and characteristics of the signal at different scales, providing multidimensional information for subsequent analysis. Through wavelet decomposition, local details and global trends of the data can be captured at the same time, and then multi-scale decomposition data of interference features are obtained. Disturbance trend cross regression analysis is carried out on disturbance characteristic multi-scale decomposition data so as to reveal the mutual influence relation between disturbance wave bands and peak shape variation. Firstly, extracting different scale information in multi-scale decomposition data, and selecting a representative scale for further analysis. Then, regression modeling is carried out on interference data with different scales and instability data of the peak shape variation structure by using a cross regression analysis method, and the influence degree of different scale information on the peak shape variation is estimated.   Regression analysis is performed by establishing a relationship model between different scales, and calculating a correlation coefficient, a regression coefficient and an error term, so as to evaluate the change of the disturbance trend under different scales. Through regression analysis, the characteristics of which scales are closely related to the instability of the peak shape variation structure can be revealed, and a basis is provided for subsequent interference trend regression data. And carrying out correlation weighted reconstruction on the interference wave band similarity clustering data according to the interference trend regression data, and further improving the accuracy of the interference wave band and the influence on quality detection. Firstly, based on interference trend regression data obtained by regression analysis, the weight of each interference wave band in a regression model is estimated. And then weighting the similar clustering data of the interference bands according to the regression coefficient of each interference band, and highlighting band information with larger contribution to quality detection.   Specifically, the spectral data of each band is weighted so that the band having a large influence on quality detection has a higher specific gravity in the reconstructed data. This process may be performed by means of weighted averaging or weighted summation, the weights being determined by the coefficients obtained by regression analysis. After the weighting treatment, the interference weight normalization data is obtained, and more accurate data support is provided for the interference correlation analysis of the next step. The interference correlation generalization is performed on the interference feature multi-scale decomposition data based on the interference weight normalization data to reveal the inherent relationship between the interference features. Firstly, integrating the weighted interference wave band data with the interference characteristic data after multi-scale decomposition, and calculating the correlation between the weighted interference wave band data and the interference characteristic data through correlation analysis.   And (3) measuring the linear correlation between different interference features by adopting a correlation coefficient (such as a pearson correlation coefficient), and screening out the wave band and the feature with stronger correlation. Then, the interference data is subjected to dimension reduction processing by using a Principal Component Analysis (PCA) or factor analysis method, so that interference characteristics with the most influence on quality detection are extracted. The interference characteristics after dimension reduction can effectively induce the relation between the interference wave band and the quality change, and further help to establish a more accurate quality detection model. Finally, interference related inductive data is obtained through the process, and efficient interference characteristic input is provided for quality detection.
The present invention also provides an agricultural product quality detection system for performing the agricultural product quality detection method as described above, the agricultural product quality detection system comprising:
 The spectrum correction module is used for carrying out spectrum scanning on apples through the near infrared spectrometer, and then removing baseline drift to obtain apple reflection correction spectrums;
 the quantitative analysis module of the background interference wave band is used for identifying the spectrum wave band of the apple reflection correction spectrum to obtain the spectrum wave band of the sugar/acidity/cellulose, analyzing the peak variation structural strength based on the spectrum wave band of the sugar/acidity/cellulose to obtain the peak variation structural strength data;
 The content distribution recognition module is used for constructing a quality detection recognition model according to the quantitative data of the background interference wave band to obtain a quality detection recognition model, and carrying out sugar/acidity/cellulose content distribution recognition on the sugar/acidity/cellulose spectral wave band based on the quality detection recognition model to obtain sugar/acidity/cellulose content distribution data.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.