A method and system for detecting quality of agricultural products

Through near-infrared spectroscopy technology and identification model construction, the problem of low background interference recognition accuracy in traditional agricultural product quality detection methods is solved, and accurate quantitative analysis of apple sugar, acidity and cellulose content is achieved, reducing detection errors.

CN119804377BActive Publication Date: 2025-05-16YONGCHUN COUNTY AGRICULTURAL SCIENCE RESEARCH INSTITUTE (YONGCHUN COUNTY AGRICULTURAL INSPECTION CENTER YONGCHUN COUNTY CROP BREED FARM)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510282869.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-05-16
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

Traditional agricultural product quality detection methods have low accuracy in identifying spectral detection background interference, resulting in large errors in agricultural product quality detection.

Method used

Apple was subjected to spectral scanning through a near-infrared spectrometer to remove baseline drift, identify the spectral bands of sugar, acidity, and cellulose, and perform peak-form variation structure intensity analysis and background interference band quantitative processing, and build a quality detection and identification model to identify content distribution.

Benefits of technology

It improves the accuracy of identification of background interference in spectral detection, reduces the error in agricultural product quality detection, and realizes accurate quantitative analysis of apple sugar, acidity and cellulose content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119804377B_ABST
    Figure CN119804377B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of agricultural product quality detection, and in particular to a method and system for agricultural product quality detection. The method comprises the following steps: performing spectral scanning on apples by a near-infrared spectrometer, removing baseline drift, and obtaining an accurate reflection correction spectrum; identifying the spectral bands of sugar, acidity and cellulose based on the reflection spectrum, performing peak variation structure intensity analysis, and further performing quantitative processing of the background interference band on the peak variation structure intensity data to eliminate unnecessary interference signals; finally, constructing a quality detection and recognition model based on the quantitative data of the background interference band, and identifying the content distribution of apple sugar, acidity and cellulose by the model, and obtaining accurate component content distribution data; this process realizes efficient and accurate quality detection, and ensures the reliability and intelligence of agricultural product quality control. The present invention makes the agricultural product quality detection technology more perfect by optimizing the processing of agricultural product quality detection technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural product quality detection, and in particular to an agricultural product quality detection method and system. Background Art

[0002] With the rapid development of global agricultural production, the quality and safety of agricultural products have received increasing attention from consumers and regulatory authorities. The quality of agricultural products is directly related to people's health and food safety. Therefore, it is particularly important to conduct efficient, accurate and rapid quality testing of agricultural products. Previous agricultural product quality testing methods usually rely on manual sampling, chemical analysis and sensory evaluation. Although these methods can achieve quality assessment to a certain extent, they have problems such as high time cost, large errors in manual intervention, and incomplete test results. In addition, traditional testing methods often require a large amount of reagents and samples, which is costly and inefficient for large-scale production and testing. With the advancement of science and technology, especially the continuous development of near-infrared spectroscopy, sensing technology and artificial intelligence technology, new agricultural product quality testing methods have emerged. Near-infrared spectroscopy, as a non-destructive detection method, has been widely used in the quality analysis of agricultural products. By analyzing the absorption peaks in the reflectance spectrum of agricultural products, it can quickly obtain quantitative information on various components in agricultural products, such as sugar, acidity, cellulose, protein and other components, thereby achieving quality assessment of agricultural products. However, a traditional agricultural product quality testing method has the problem of low accuracy in identifying background interference in spectral detection, resulting in large errors in agricultural product quality detection. Summary of the invention

[0003] Based on this, it is necessary to provide a method and system for detecting agricultural product quality to solve at least one of the above technical problems.

[0004] To achieve the above object, a method for detecting the quality of agricultural products is provided, the method comprising the following steps:

[0005] Step S1: Scanning the spectrum of the apple by a near-infrared spectrometer, and then removing the baseline drift to obtain the apple reflectance correction spectrum;

[0006] Step S2: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands; performing peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; performing background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data;

[0007] Step S3: construct a quality detection and recognition model based on the quantitative data of the background interference band to obtain the quality detection and recognition model; identify the sugar / acidity / cellulose content distribution of the sugar / acidity / cellulose spectral band based on the quality detection and recognition model to obtain the sugar / acidity / cellulose content distribution data.

[0008] Preferably, step S1 comprises the following steps:

[0009] Step S11: Scanning the apple by a near infrared spectrometer to obtain a reflection spectrum of the apple;

[0010] Step S12: smoothing the apple reflection spectrum to obtain an apple reflection smoothed spectrum;

[0011] Step S13: removing the baseline drift of the apple reflectance smoothed spectrum to obtain the apple reflectance corrected spectrum.

[0012] Preferably, step S2 comprises the following steps:

[0013] Step S21: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands;

[0014] Step S22: performing absorption peak overlap fluctuation analysis based on the sugar / acidity / cellulose spectral bands to obtain absorption peak overlap band data of sugar / acidity / cellulose;

[0015] Step S23: performing peak shape variation structure intensity analysis on the absorption peak overlapping band data to obtain peak shape variation structure intensity data;

[0016] Step S24: performing background interference band quantitative processing on the apple reflectance correction spectrum based on the peak shape variation structure intensity data to obtain background interference band quantitative data.

[0017] Preferably, step S23 includes the following steps:

[0018] Step S231: analyzing the overlapping band frequency variation trend of the absorption peak overlapping band data to obtain the overlapping band frequency variation trend;

[0019] Step S232: calculating the band fluctuation slope change rate of the absorption peak overlapping band data based on the overlapping band frequency change trend to obtain the band fluctuation slope change rate;

[0020] Step S233: performing geometric calculation of the local extreme point deviation on the overlapping band frequency change trend according to the band fluctuation slope change rate to obtain the local extreme point deviation geometric data;

[0021] Step S234: Perform peak shape variation structure strength analysis based on the local extreme point deviation geometric data and the band fluctuation slope change rate to obtain peak shape variation structure strength data.

[0022] Preferably, step S24 comprises the following steps:

[0023] Step S241: identifying the spectral bands of other substances on the apple reflectance correction spectrum based on the sugar / acidity / cellulose spectral bands to obtain the spectral bands of other substances, wherein the other substances include vitamins, minerals, and water;

[0024] Step S242: performing intensity coupling analysis on the spectral bands of other substances to obtain spectral intensity band data of other substances;

[0025] Step S243: evaluating the scattering interaction effect of the sugar / acidity / cellulose spectral bands according to the spectral intensity band data of other substances to obtain scattering interaction effect data;

[0026] Step S244: performing band peak line fluctuation displacement analysis on the sugar / acidity / cellulose spectral bands based on the scattering interaction effect data to obtain band peak line fluctuation displacement data;

[0027] Step S245: performing background interference band quantitative processing based on the peak shape variation structure intensity data and the band peak line fluctuation displacement data to obtain background interference band quantitative data.

[0028] Preferably, step S244 includes the following steps:

[0029] Perform multiple scattering intensity coupling on the scattering interaction effect data to obtain multiple scattering intensity coupling data;

[0030] Based on the multiple scattering intensity coupling data, the scattering wavelength polarization vector is analyzed on the scattering interaction effect data to obtain the scattering wavelength polarization vector;

[0031] Calculate the circular polarization rotation angle of the scattered wavelength polarization vector to obtain the scattered circular polarization rotation angle;

[0032] Based on the rotation angle of the scattering circular polarization degree, the peak line fluctuation displacement analysis of the sugar / acidity / cellulose spectral bands was performed to obtain the peak line fluctuation displacement data.

[0033] Preferably, step S3 comprises the following steps:

[0034] Step S31: normalizing the quantitative data of the background interference band to obtain the quantitative normalized data of the background interference band;

[0035] Step S32: constructing a quality detection and recognition model based on the quantitative normalization data of the background interference band and the peak shape variation structure intensity data to obtain a quality detection and recognition model;

[0036] Step S33: Based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is subjected to sugar / acidity / cellulose content distribution identification to obtain sugar / acidity / cellulose content distribution data.

[0037] Preferably, step S32 includes the following steps:

[0038] Step S321: performing interference band similarity analysis on the background interference band quantitative normalization data to obtain interference band similarity data;

[0039] Step S322: performing multivariate clustering regression analysis on the interference band similarity data to obtain interference band similarity clustering data;

[0040] Step S323: performing structural instability evaluation on the peak shape variation structural strength data to obtain peak shape variation structural instability data;

[0041] Step S324: performing interference correlation induction based on interference band similarity clustering data and peak shape variation structure instability data to obtain interference correlation induction data;

[0042] Step S325: construct a quality detection and recognition model for the interference-related summary data based on the policy gradient algorithm to obtain a quality detection and recognition model.

[0043] Preferably, step S324 includes the following steps:

[0044] The interference band similarity clustering data and peak shape variation structure instability data are processed by wavelet decomposition to obtain the interference feature multi-scale decomposition data;

[0045] Perform disturbance trend cross regression analysis on the multi-scale decomposition data of interference features to obtain interference trend regression data;

[0046] According to the interference trend regression data, the interference band similar clustering data is reconstructed by correlation weighting to obtain interference weight normalization data;

[0047] Based on the interference weight normalization data, the interference correlation is summarized on the multi-scale decomposition data of the interference feature to obtain the interference correlation summary data.

[0048] Preferably, the present invention further provides an agricultural product quality detection system for executing the agricultural product quality detection method as described above, the agricultural product quality detection system comprising:

[0049] A spectrum correction module is used to perform spectral scanning on apples through a near-infrared spectrometer, and then remove the baseline drift to obtain a reflectance correction spectrum of the apples;

[0050] The background interference band quantitative analysis module is used to identify the sugar / acidity / cellulose spectral bands of the apple reflectance correction spectrum to obtain the sugar / acidity / cellulose spectral bands; perform peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; perform background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data;

[0051] The content distribution recognition module is used to construct a quality detection recognition model based on the quantitative data of the background interference band to obtain the quality detection recognition model; based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is used to identify the sugar / acidity / cellulose content distribution to obtain the sugar / acidity / cellulose content distribution data.

[0052] The beneficial effect of the present invention is that the apple is spectrally scanned by a near-infrared spectrometer, and the reflection correction spectrum of the apple is obtained after the baseline drift is removed. The beneficial effect of this step is that the near-infrared spectrum scanning can capture the component characteristics inside the apple without loss, and the baseline drift removal can eliminate the interference caused by factors such as instrument deviation and environmental changes, ensuring that more accurate and stable spectral data are obtained. By obtaining the reflection correction spectrum, a high-quality data basis can be provided for subsequent component analysis. The sugar, acidity, and cellulose spectral bands of the apple reflection correction spectrum are identified to obtain related spectral bands. The beneficial effect of this step is that by accurately identifying the spectral bands related to sugar, acidity and cellulose, meaningful component information can be effectively extracted from complex spectral data. In addition, peak shape variation structure intensity analysis based on these spectral bands helps to reveal the changing characteristics of each component, and identify potential quality fluctuations in the sample by analyzing the peak shape changes. Further background interference band quantitative processing ensures the accuracy of the identification result and avoids interference from other components or environmental factors, thereby improving the accuracy and reliability of the analysis. According to the background interference band quantitative data, a quality detection recognition model is constructed. The beneficial effect of this step is that a quality detection and recognition model based on actual data is constructed, which can accurately quantitatively analyze the sugar, acidity and cellulose content of apples. By using this model, the quality distribution and change trend of apples can be effectively identified and predicted, providing a scientific basis for agricultural production, quality control and product optimization. In addition, the construction of this model can help realize the automation and standardization of apple quality detection, reduce the error of manual intervention, and improve production efficiency and quality assurance capabilities. Therefore, the present invention is an optimization process made to a traditional agricultural product quality detection method, which solves the problem that a traditional agricultural product quality detection method has low accuracy in identifying background interference in spectral detection, thereby causing large errors in agricultural product quality detection, improves the accuracy of identifying background interference in spectral detection, and reduces the error in agricultural product quality detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of the steps of a method for detecting the quality of agricultural products;

[0054] Figure 2 for Figure 1 Detailed implementation steps of step S2 in the flowchart;

[0055] Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG. DETAILED DESCRIPTION

[0056] See also Figures 1 to 3, a method for detecting the quality of agricultural products, the method comprising the following steps:

[0057] Step S1: Scanning the spectrum of the apple by a near-infrared spectrometer, and then removing the baseline drift to obtain the apple reflectance correction spectrum;

[0058] Step S2: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands; performing peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; performing background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data;

[0059] Step S3: construct a quality detection and recognition model based on the quantitative data of the background interference band to obtain the quality detection and recognition model; identify the sugar / acidity / cellulose content distribution of the sugar / acidity / cellulose spectral band based on the quality detection and recognition model to obtain the sugar / acidity / cellulose content distribution data.

[0060] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of a method for detecting the quality of agricultural products of the present invention. In this example, the method for detecting the quality of agricultural products includes the following steps:

[0061] Step S1: Scanning the spectrum of the apple by a near-infrared spectrometer, and then removing the baseline drift to obtain the apple reflectance correction spectrum;

[0062] In the embodiment of the present invention, the apple is spectrally scanned by a near-infrared spectrometer, an integrating sphere diffuse reflectance measurement method is adopted, and an InGaAs detector is used to collect spectral data. The spectral range is set to 900-2500nm, the spectral resolution is controlled within the range of 1-2nm, and a standard white board is used for spectral standardization calibration. During the spectral scanning process, a halogen tungsten lamp is used as the light source to ensure uniform illumination, and the stability of the spectral signal is improved by an optical fiber coupling system. Before the collected spectral data is stored, the spectral curve is smoothed using the Savitzky-Golay smoothing filter algorithm to reduce high-frequency noise interference, and the baseline drift is corrected using the least squares method to ensure the accuracy of the spectral data. The correction of the reflectance spectrum adopts a multi-point correction method, and by selecting multiple reference points for spectral normalization, the overall trend of the spectral curve is more stable, thereby improving the reliability of subsequent analysis. Finally, the apple reflectance correction spectrum after removing the baseline drift is obtained.

[0063] Step S2: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands; performing peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; performing background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data;

[0064] In the embodiment of the present invention, the characteristic bands of sugar, acidity and cellulose are identified in the apple reflectance correction spectrum. First, the spectral data is subjected to principal component analysis to extract the main characteristic information in the spectrum. The resolution of the spectral characteristics is improved by first-order derivative and second-order derivative operations. The continuous projection algorithm is further used for variable selection to screen out key spectral bands related to sugar, acidity and cellulose. After the characteristic band screening is completed, the absorption peak displacement of the characteristic band is calculated based on the change of the absorption peak of the characteristic band using the peak position shift analysis method. At the same time, the peak shape variation structure analysis method is used to perform statistical analysis on the change of the spectral peak shape of different samples to quantify the morphological change trend of the absorption peak. For the intensity analysis of the peak shape variation structure, the statistical analysis method of standard deviation and coefficient of variation is used to calculate the difference of the spectral peak shape between different samples, and then the sensitivity of the spectral peak shape to the change of component content is evaluated. Combined with the peak shape variation data, the background interference band is quantitatively analyzed, and the multivariate scattering correction method is used to remove the scattering effect in the spectrum. At the same time, the background noise signal is separated based on the independent component analysis method to reduce the impact of background interference on the target spectral characteristics. Finally, quantitative data of the background interference band is obtained to provide reliable data support for subsequent quality inspection.

[0065] Step S3: construct a quality detection and recognition model based on the quantitative data of the background interference band to obtain the quality detection and recognition model; identify the sugar / acidity / cellulose content distribution of the sugar / acidity / cellulose spectral band based on the quality detection and recognition model to obtain the sugar / acidity / cellulose content distribution data.

[0066] In an embodiment of the present invention, a quality detection and recognition model is constructed based on the quantitative data of the background interference band. First, the background interference data is normalized, and the spectral data is converted into standardized data with a mean of 0 and a standard deviation of 1 using the standard normal distribution method to reduce the measurement deviation between different samples. Subsequently, the normalized data is subjected to feature dimension reduction, and the most representative spectral features are extracted using principal component analysis and linear discriminant analysis methods to construct a feature space. Based on the data distribution in the feature space, the K-means clustering method is used to group and analyze the samples, evaluate the distribution law of the data, and calculate the discrimination between samples of different categories using the Mahalanobis distance. For the construction of the quality detection model, the partial least squares regression method is used to establish the quantitative relationship between the spectral signal and the sugar, acidity and cellulose content. During the model training process, the five-fold cross-validation method is used to evaluate the generalization ability of the model, and the coefficient of determination and mean square error of the model are calculated to ensure the prediction accuracy of the model. After the model was established, the spectral data of the apple samples were input into the model, and the sugar, acidity and cellulose content distributions were calculated based on the spectral response of the characteristic bands. The reliability of the prediction results was evaluated through regression residual analysis, and finally the sugar, acidity and cellulose content distribution data of the apples were obtained.

[0067] Step S1 includes the following steps:

[0068] Step S11: Scanning the apple by a near infrared spectrometer to obtain a reflection spectrum of the apple;

[0069] Step S12: smoothing the apple reflection spectrum to obtain an apple reflection smoothed spectrum;

[0070] Step S13: removing the baseline drift of the apple reflectance smoothed spectrum to obtain the apple reflectance corrected spectrum.

[0071] In the embodiment of the present invention, when a near-infrared spectrometer is used to perform spectral scanning on apples, it is first necessary to select a suitable spectral range and detection method to ensure the accuracy of the spectral data. The spectral scanning adopts an integrating sphere diffuse reflectance measurement method, and a halogen tungsten lamp is selected as the light source 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 2nm to ensure the fineness of the spectral curve. In order to reduce the interference of ambient light, a standard white board is used for reference calibration before spectral scanning to ensure the consistency of instrument measurement. During the scanning process, the apple sample is placed on the sample table, and the surface is kept clean and free of dew to prevent additional spectral absorption from affecting the measurement results. The optical fiber probe is fixed at a position 10mm from the sample surface, and the measurement angle is set to 90° vertical irradiation to ensure the maximum collection efficiency of the reflected light. The spectral signal is transmitted to the detector through the optical fiber, and the data is stored in the form of light intensity varying with wavelength, and finally the original reflection spectrum of the apple is obtained. The reflection spectrum of the apple is smoothed to reduce the high-frequency fluctuations caused by environmental noise or instrument thermal noise during the measurement process. The smoothing method uses the Savitzky-Golay filtering algorithm, which is based on local polynomial fitting and performs sliding window processing on the spectral curve to maintain the peak shape characteristics of the spectrum while reducing noise interference. The size of the sliding window is set to 15 data points, and the fitting order is second order, so that the spectrum can still maintain a high resolution after smoothing. In the filtering process, the spectral boundary is processed by endpoint symmetric expansion to prevent the loss or distortion of edge data. After smoothing, the overall trend of the spectral curve is more stable, and the local fluctuation is reduced, ensuring the stability and reliability of the spectral data in subsequent analysis, and finally obtaining the smoothed reflectance spectrum of the apple. The baseline drift correction of the smoothed reflectance spectrum of the apple is performed to eliminate the baseline offset caused by light scattering, instrument drift or sample surface inhomogeneity during spectral measurement. The baseline correction adopts the least squares fitting method. By selecting multiple spectral background points, a background fitting curve is constructed and the curve is subtracted from the original spectral data. The selection of background points is based on the low absorption region of the spectral curve to ensure that the fitting curve can accurately reflect the baseline trend of the spectrum. The fitting adopts the polynomial regression method, and the order is set to third order to smooth the background curve and avoid overfitting. During the correction process, the background points are first linearly interpolated to make them evenly distributed in the entire spectral range, and then the morphological parameters of the background curve are calculated using a weighted fitting method, and the baseline is subtracted point by point from the original spectral data. After the baseline drift is removed, the overall baseline of the spectral curve tends to be stable, avoiding the influence of baseline fluctuations on the identification of characteristic peaks, and finally obtaining the apple reflectance correction spectrum after removing the baseline drift.

[0072] Step S2 includes the following steps:

[0073] Step S21: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands;

[0074] Step S22: performing absorption peak overlap fluctuation analysis based on the sugar / acidity / cellulose spectral bands to obtain absorption peak overlap band data of sugar / acidity / cellulose;

[0075] Step S23: performing peak shape variation structure intensity analysis on the absorption peak overlapping band data to obtain peak shape variation structure intensity data;

[0076] Step S24: performing background interference band quantitative processing on the apple reflectance correction spectrum based on the peak shape variation structure intensity data to obtain background interference band quantitative data.

[0077] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes:

[0078] Step S21: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands;

[0079] In the embodiment of the present invention, when the spectral bands of sugar, acidity and cellulose are identified on the apple reflectance correction spectrum, it is necessary to select the characteristic absorption peaks of different components. The characteristic bands of sugar are mainly concentrated in the 900-2500nm range of the near-infrared spectrum, of which 1200nm and 1700nm are the CH stretching vibration absorption peaks, and the second-order derivative spectrum is combined to perform fine band extraction to reduce background interference. Acidity is mainly manifested as the absorption peaks of OH and C=O bonds, and the characteristic bands are concentrated at 1400nm and 1900nm. The continuous wavelet transform method is used to separate the characteristic peaks of the acidity bands, so that it can maintain stable identification in a complex spectral environment. Cellulose content is closely related to the stretching vibration of molecular hydroxyl groups, and its main absorption peaks are distributed at 2100nm and 2300nm. The band data is processed by the local maximum point search algorithm, and the interference of non-target absorption signals is eliminated to ensure the accurate extraction of characteristic bands. All spectral bands are standardized to eliminate measurement errors between samples, improve the comparability of spectral data, and finally obtain the spectral bands of sugar, acidity and cellulose.

[0080] Step S22: performing absorption peak overlap fluctuation analysis based on the sugar / acidity / cellulose spectral bands to obtain absorption peak overlap band data of sugar / acidity / cellulose;

[0081] In an embodiment of the present invention, based on the identified sugar, acidity and cellulose spectral bands, the overlap of the absorption peaks is analyzed to ensure the independence and distinction between the characteristic bands. The overlapping fluctuation analysis of the absorption peaks uses the principal component analysis method to reduce the dimension of the original spectral data to identify the main absorption interval of each band and calculate the absorption overlap rate between the bands. There is a strong absorption overlap between sugar and acidity at 1400nm. The offset trend of its derivative extreme point is calculated by the second-order derivative spectrum to evaluate the degree of interference between the bands. Cellulose and acidity have partial absorption peak overlap near 1900nm. The spectral line curvature calculation method is used to determine the curvature change rate of the overlapping area to determine the influence range of the overlapping bands. All absorption peak overlapping band data are stored and statistically analyzed to provide data support for subsequent peak shape variation structure analysis.

[0082] Step S23: performing peak shape variation structure intensity analysis on the absorption peak overlapping band data to obtain peak shape variation structure intensity data;

[0083] In an embodiment of the present invention, peak shape variation structural intensity analysis is performed on the absorption peak overlapping band data to extract the independent absorption characteristics of each component and quantify the changes in the spectral signal. The peak normalization method is used in the analysis process to normalize the spectral intensity of all absorption peaks to eliminate the signal deviation caused by changes in sample thickness or density. For the absorption peak of the sugar band, a polynomial fitting curve is used to calculate the peak width change rate to quantify the expansion trend of the peak shape. The peak shape variation of the acidity band uses the first-order derivative method to calculate the slope change rate to determine the nonlinear change characteristics of the acidity signal. The cellulose band uses the peak symmetry analysis method to measure the degree of change in the peak shape symmetry by calculating the peak height ratio. All peak shape variation structural intensity data are stored in the form of a numerical matrix to provide basic data for subsequent quantitative analysis of background interference bands.

[0084] Step S24: performing background interference band quantitative processing on the apple reflectance correction spectrum based on the peak shape variation structure intensity data to obtain background interference band quantitative data.

[0085] In an embodiment of the present invention, the background interference band of the apple reflectance correction spectrum is quantitatively processed based on the peak variation structure intensity data to eliminate the spectral interference of non-target components. The background interference band is identified by partial least squares regression analysis, and the spectral data and the background signal are linearly decomposed to calculate the contribution of the background band. The background interference mainly comes from the absorption of non-target components such as water and minerals, among which water has strong absorption characteristics at 1400nm and 1900nm. The least squares filtering method is used to suppress the water absorption peak. The mineral interference band is mainly distributed at 2200nm. The interference signal is extracted by the eigenvalue decomposition method and subtracted from the original spectral data. The quantitative calculation of the background interference band adopts the weighted average method, and the interference contribution of different bands is weighted and summed, and the quantitative data of the background interference band is generated to ensure the purity and accuracy of the final spectral data.

[0086] Step S23 includes the following steps:

[0087] Step S231: analyzing the overlapping band frequency variation trend of the absorption peak overlapping band data to obtain the overlapping band frequency variation trend;

[0088] Step S232: calculating the band fluctuation slope change rate of the absorption peak overlapping band data based on the overlapping band frequency change trend to obtain the band fluctuation slope change rate;

[0089] Step S233: performing geometric calculation of the local extreme point deviation on the overlapping band frequency change trend according to the band fluctuation slope change rate to obtain the local extreme point deviation geometric data;

[0090] Step S234: Perform peak shape variation structure strength analysis based on the local extreme point deviation geometric data and the band fluctuation slope change rate to obtain peak shape variation structure strength data.

[0091] In the embodiment of the present invention, when the overlapping band frequency change trend analysis is performed on the absorption peak overlapping band data, it is necessary to obtain the absorption peak change of the spectral data under different sample conditions. First, the spectral data is normalized to eliminate the influence of the measurement environment on the spectral intensity, so that the spectral data of different samples can be compared under the same dimension. Secondly, within the selected absorption peak overlapping band range, the main absorption peak of each spectral curve is extracted, and the center frequency of the band is calculated. The center frequency is calculated by a curve fitting method, a quadratic polynomial is selected to fit the absorption peak shape, and the zero point of its first-order derivative is obtained as the center frequency. Subsequently, the center frequency data of multiple samples are collected, a frequency change trend curve is constructed, and the data is smoothed by a sliding average method to eliminate noise interference. Finally, the frequency change trend is analyzed, and the frequency offset law of the band under different sample conditions is extracted to determine whether the band is greatly affected by external factors and ensure the reliability of the data. Based on the overlapping band frequency change trend, the band fluctuation slope change rate is calculated for the absorption peak overlapping band data to quantify the fluctuation characteristics of the spectral curve. First, the discrete data points of the frequency change trend curve are selected, and the change slope between adjacent data points is calculated to obtain the slope sequence. The slope calculation adopts the difference method to calculate the frequency change of adjacent points, and the sampling interval is normalized to eliminate the time scale difference between different spectral data. Then, the change rate of the slope sequence is calculated, and the slope change rate is calculated by the second-order difference method, that is, the slope sequence is differentiated again to obtain the band fluctuation slope change rate data. Finally, the band fluctuation slope change rate data is statistically analyzed to extract its mean, variance and other characteristic values, and combined with the frequency change trend curve, the stability of the band is evaluated to determine whether further processing is needed to remove interference signals. According to the band fluctuation slope change rate, the local extreme point deviation is proportionally calculated for the overlapping band frequency change trend to further quantify the change characteristics of the spectral peak shape. First, in the band fluctuation slope change rate curve, the local extreme point is searched, and the gradient search method is used to determine the inflection point position of the data change rate near the zero point, and the value of the extreme point is recorded. Then, the deviation of the local extreme point is calculated, and the relative deviation calculation method is used to calculate the degree of deviation of the extreme point relative to the benchmark, taking the overall change trend of the band as the benchmark. In the deviation calculation process, the geometric weight method is used to weighted average the deviations of different extreme points to ensure that the deviation calculation results are highly representative. Finally, the geometric data of the local extreme point deviations are stored and normalized for unified analysis with subsequent data, and to provide accurate data support for subsequent peak shape variation structure intensity analysis. Based on the geometric data of local extreme point deviations and the rate of change of band fluctuation slope, peak shape variation structure intensity analysis is performed to quantify the variation characteristics of the spectral peak shape. First, the key parameters of the peak shape variation structure are extracted, including peak width, peak height, symmetry, inclination, etc., and these parameters are standardized to eliminate the influence of spectral intensity of different samples.Secondly, the principal component analysis method was used to reduce the dimension of multiple peak shape parameters, extract the main factors affecting the peak shape variation, and calculate the contribution rate of each factor. Subsequently, the peak shape variation structure intensity was numerically characterized using the curve fitting method, and the peak shape variation index was constructed to quantify the degree of variation of the spectral data under different conditions. Finally, the peak shape variation structure intensity data was statistically analyzed, and the credibility of the data was evaluated in combination with the spectral characteristics of sugar, acidity and cellulose, providing accurate spectral characteristic information for agricultural product quality detection.

[0092] Step S24 includes the following steps:

[0093] Step S241: identifying the spectral bands of other substances on the apple reflectance correction spectrum based on the sugar / acidity / cellulose spectral bands to obtain the spectral bands of other substances, wherein the other substances include vitamins, minerals, and water;

[0094] Step S242: performing intensity coupling analysis on the spectral bands of other substances to obtain spectral intensity band data of other substances;

[0095] Step S243: evaluating the scattering interaction effect of the sugar / acidity / cellulose spectral bands according to the spectral intensity band data of other substances to obtain scattering interaction effect data;

[0096] Step S244: performing band peak line fluctuation displacement analysis on the sugar / acidity / cellulose spectral bands based on the scattering interaction effect data to obtain band peak line fluctuation displacement data;

[0097] Step S245: performing background interference band quantitative processing based on the peak shape variation structure intensity data and the band peak line fluctuation displacement data to obtain background interference band quantitative data.

[0098] In the embodiment of the present invention, based on the spectral bands of sugar, acidity and cellulose, the spectral bands of other substances are identified on the apple reflectance correction spectrum to determine the characteristic wavelength range of substances such as vitamins, minerals and water. First, the apple reflectance correction spectrum is Fourier transformed using a spectral decomposition method for the known absorption characteristics of vitamins, minerals and water in the near-infrared band, so as to enhance the characteristic information of different substances in the frequency domain. Then, the main features in the spectral signal are extracted using the principal component analysis method, and the characteristic absorption wavelengths of different substances in the standard database are matched with the apple spectral data to determine the main absorption peaks of other substances. Next, the absorption peak signal is enhanced using the second-order derivative spectroscopy method to improve the accuracy of identification, and finally the spectral band data of other substances are obtained. The spectral bands of other substances are subjected to intensity coupling analysis to determine the spectral signal interference relationship between substances such as vitamins, minerals and water and the spectral bands of sugar, acidity and cellulose. First, the spectral data of different apple samples are selected, the spectral intensity of the spectral bands of other substances is calculated, and an intensity distribution diagram is established. Then, the wavelet transform method was used to perform multi-scale decomposition of the spectral data to analyze the correlation between the spectral intensity bands of other substances and the spectral bands of sugar, acidity and cellulose. Then, the partial least squares regression method was used to calculate the intensity coupling coefficient between different spectral bands, and the spectral regions with strong interference were screened out based on the intensity coupling coefficient to obtain the spectral intensity band data of other substances. According to the spectral intensity band data of other substances, the scattering interaction effect of the spectral bands of sugar, acidity and cellulose was evaluated to quantify the influence of background components on the spectral signals of target components. First, the Monte Carlo simulation method was used to simulate the scattering effects of different concentrations of vitamins, minerals and water on the spectral bands of sugar, acidity and cellulose, and the scattering intensity change trend was calculated. Then, the Rayleigh scattering model was used to calculate the scattering coefficients of different background substances on the spectral signals, and regression analysis was performed in combination with the experimental data to obtain the scattering influence parameters of different background components. Then, the spectral signals of the spectral bands of sugar, acidity and cellulose were scattering compensated to eliminate the interference of background components, and finally the scattering interaction effect data were obtained. Based on the scattering interaction effect data, the spectral bands of sugar, acidity and cellulose were analyzed for band peak line fluctuation displacement to detect the influence of different background components on the target spectral peak position. First, the characteristic spectral peaks of sugar, acidity and cellulose were selected, and their peak position change trends under different background conditions were calculated. Then, the Gaussian fitting method was used to curve fit the spectral peak shape, and the offset of the peak position was calculated. Next, the linear regression method was used to analyze the correlation between the peak line displacement and the background interference, and the standard deviation of the peak line displacement was calculated to quantify the influence of the background components. Finally, based on the peak line fluctuation data, the spectral bands with poor peak position stability were determined, and data support was provided for the subsequent quantitative processing of the background interference bands.

[0099] Based on the peak variation structure intensity data and band peak line fluctuation displacement data, the spectral bands of sugar, acidity and cellulose are quantitatively processed for background interference bands to eliminate the background noise in the spectral signal. First, the multivariate scattering correction method is used to correct the signal of the spectral bands with strong background interference, and the influence of the scattering effect on the spectral signal is eliminated. Then, the target spectral signals of sugar, acidity and cellulose are orthogonally decomposed from the background noise using the standard orthogonal transformation method to extract the pure target spectral signal. Then, the noise ratio of the target spectral signal is calculated, and the wavelet denoising method is used to smooth the signal of the spectral region with large background interference to reduce noise interference. Finally, the quantitative data of the background interference band is obtained, providing a high-precision spectral analysis basis for agricultural product quality detection.

[0100] Step S244 includes the following steps:

[0101] Perform multiple scattering intensity coupling on the scattering interaction effect data to obtain multiple scattering intensity coupling data;

[0102] Based on the multiple scattering intensity coupling data, the scattering wavelength polarization vector is analyzed on the scattering interaction effect data to obtain the scattering wavelength polarization vector;

[0103] Calculate the circular polarization rotation angle of the scattered wavelength polarization vector to obtain the scattered circular polarization rotation angle;

[0104] Based on the rotation angle of the scattering circular polarization degree, the peak line fluctuation displacement analysis of the sugar / acidity / cellulose spectral bands was performed to obtain the peak line fluctuation displacement data.

[0105] In an embodiment of the present invention, multiple scattering intensity coupling is performed on the scattering interaction effect data to analyze the mutual influence relationship between different scattering effects. First, incident light at different angles is selected to perform multiple spectral scans on the apple sample, and the scattering intensity data of each scan is recorded. Then, the spectral data is normalized using the bidirectional scattering distribution function to eliminate the influence of the measurement angle change on the scattering intensity. Next, the scattering intensity data is decomposed into multiple orthogonal components using a matrix decomposition method to distinguish the contributions of different scattering mechanisms. Subsequently, the correlation coefficients between different scattering components are calculated, and a scattering intensity coupling model is constructed using the Lagrange interpolation method to quantify the interaction intensity of different scattering effects. Finally, multiple scattering intensity coupling data is obtained to provide data support for subsequent scattering wavelength polarization vector analysis. Based on the multiple scattering intensity coupling data, a scattering wavelength polarization vector analysis is performed on the scattering interaction effect data to determine the influence of different scattering effects on the polarization characteristics. First, the Stokes parameter method is used to calculate the polarization state at different wavelengths, and a polarization ellipsoid model of the scattered light is constructed to intuitively represent the polarization characteristics of the scattered light. Then, Malus's law is used to analyze the change of polarized light intensity at different scattering angles, and the polarization vectors of different wavelengths are calculated. Then, the polarization matrix transformation method is used to map the polarization vectors of different wavelengths into a unified coordinate system to compare the polarization characteristics of different scattering mechanisms. Then, the trend of polarization degree changing with wavelength is calculated, and the frequency characteristics of polarization vector are analyzed by Fourier transform to further quantify the influence of scattering effect on polarization state. Finally, the polarization vector of scattered wavelength is obtained to provide basic data for the subsequent calculation of circular polarization rotation angle. The circular polarization rotation angle calculation is performed on the polarization vector of scattered wavelength to determine the rotation characteristics of scattered light at different wavelengths. First, multiple characteristic wavelengths are selected and the polarization angle distribution at these wavelengths is calculated. Then, the Jones matrix method is used to simulate the propagation path of light of different polarization states in apple samples, and the rotation angle of the polarization direction of light during propagation is calculated. Then, the Faraday rotation model is used to analyze the influence of magnetic field and internal structure of the sample on polarization angle, and the functional relationship of circular polarization degree changing with wavelength is calculated. Then, the nonlinear fitting method is used to curve fit the circular polarization data, and key characteristic parameters are extracted to quantify the rotation angle change trend of different wavelengths. Finally, the scattering circular polarization rotation angle data is obtained to provide a calculation basis for the subsequent band peak line fluctuation displacement analysis. Based on the scattering circular polarization rotation angle, the band peak line fluctuation displacement analysis of the sugar, acidity and cellulose spectral bands is carried out to study the influence of the scattering effect on the stability of the spectral 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 Raman scattering enhancement model is used to analyze the influence of the scattering effect on the spectral peak shape, and the offset of the spectral peak position is calculated.Next, the Gaussian fitting method is used to accurately fit the spectral peak shape, and the standard deviation of the peak line fluctuation is calculated to quantify the degree of disturbance of the spectral peak position by scattering. Subsequently, the principal component analysis method is used to extract the key features of the fluctuation displacement, and a mathematical relationship between the fluctuation displacement and the rotation angle of the scattering circular polarization degree is established to further quantify the influence intensity of the scattering effect. Finally, the band peak line fluctuation displacement data is obtained to provide data support for improving the accuracy of agricultural product quality detection.

[0106] Step S3 includes the following steps:

[0107] Step S31: normalizing the quantitative data of the background interference band to obtain the quantitative normalized data of the background interference band;

[0108] Step S32: constructing a quality detection and recognition model based on the quantitative normalization data of the background interference band and the peak shape variation structure intensity data to obtain a quality detection and recognition model;

[0109] Step S33: Based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is subjected to sugar / acidity / cellulose content distribution identification to obtain sugar / acidity / cellulose content distribution data.

[0110] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes:

[0111] Step S31: normalizing the quantitative data of the background interference band to obtain the quantitative normalized data of the background interference band;

[0112] In an embodiment of the present invention, the quantitative data of the background interference band is normalized to eliminate the influence of different detection conditions on the data and improve the comparability of the data. First, the spectral data of the background interference band is selected, and the spectral intensity value corresponding to each wavelength is extracted. Then, the maximum and minimum values ​​of the background interference band are calculated, and all spectral intensity values ​​are normalized using the minimum-maximum standardization method so that the data range is limited to between zero and one. Next, the Z-score standardization method is used to standardize the data to ensure that the mean of the data is zero and the standard deviation is one, thereby eliminating the dimensional influence between the data. Subsequently, the normalized data is denoised using the wavelet transform method to remove the interference of high-frequency noise on subsequent analysis. Finally, the quantitative normalized data of the background interference band is obtained, which provides standardized input data for the construction of the quality detection recognition model.

[0113] Step S32: constructing a quality detection and recognition model based on the quantitative normalization data of the background interference band and the peak shape variation structure intensity data to obtain a quality detection and recognition model;

[0114] In an embodiment of the present invention, a quality detection and recognition model is constructed based on the quantitative normalized data of the background interference band and the peak variation structure intensity data to achieve accurate evaluation of the quality of apple samples. First, the characteristic parameters of the quantitative normalized data of the background interference band and the peak variation structure intensity data are selected, including the spectral peak value, half-peak width, offset, etc., and the correlation between the parameters is calculated to screen out representative characteristic variables. Then, the principal component analysis method is used to reduce the dimension of the screened characteristic variables to reduce data redundancy and improve calculation efficiency. Next, the K-means clustering method is used to classify apple samples of different quality grades, and the spectral features of each category are extracted. Subsequently, the Euclidean distance between each quality category is calculated, and a discriminant function is constructed based on the distance calculation results to achieve classification and identification of the quality of apple samples. Finally, a quality detection and recognition model is established to provide a calculation basis for the distribution identification of sugar, acidity and cellulose content.

[0115] Step S33: Based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is subjected to sugar / acidity / cellulose content distribution identification to obtain sugar / acidity / cellulose content distribution data.

[0116] In an embodiment of the present invention, the content distribution of sugar, acidity and cellulose spectral bands is identified based on the quality detection identification model to determine the quality characteristics inside the apple sample. First, the characteristic absorption bands of sugar, acidity and cellulose are selected, and the spectral intensity data at the corresponding wavelengths are extracted. Then, the difference between the spectral intensity and the standard sample is calculated, and the partial least squares regression method is used to establish the mathematical relationship between the spectral intensity and the content value. Next, the multivariate curve fitting method is used to analyze the trend of spectral intensity changes, and the content distribution data at each wavelength is calculated. Subsequently, the interpolation method is used to smooth the discrete data to obtain a continuous content distribution curve. Finally, the sugar, acidity and cellulose content distribution data are obtained, which provides a quantitative reference for the quality evaluation of apple samples.

[0117] Step S32 includes the following steps:

[0118] Step S321: performing interference band similarity analysis on the background interference band quantitative normalization data to obtain interference band similarity data;

[0119] Step S322: performing multivariate clustering regression analysis on the interference band similarity data to obtain interference band similarity clustering data;

[0120] Step S323: performing structural instability evaluation on the peak shape variation structural strength data to obtain peak shape variation structural instability data;

[0121] Step S324: performing interference correlation induction based on interference band similarity clustering data and peak shape variation structure instability data to obtain interference correlation induction data;

[0122] Step S325: construct a quality detection and recognition model for the interference-related summary data based on the policy gradient algorithm to obtain a quality detection and recognition model.

[0123] In the embodiment of the present invention, interference band similarity analysis is performed on the quantitative normalized data of background interference bands to determine the spectral similarity between different bands, thereby identifying redundant bands. First, the spectral intensity of all wavelength points in the quantitative normalized data of background interference bands is extracted, and the cosine similarity between each band is calculated to measure the correlation between different bands. Then, the spectral curve is subjected to morphological matching analysis by the dynamic time warping method, and the dynamic time distance between each band is calculated to evaluate the overall similarity of the spectral curve. Next, the spectral correlation of each band is calculated by the Pearson correlation coefficient, and the band pairs with correlation coefficients higher than the set threshold are screened out. Subsequently, the hierarchical clustering method is used to cluster the bands with high similarity, and the representative index of each cluster center band is calculated to determine the relationship between the redundant band and the key band. Finally, the interference band similarity data is obtained to provide a basis for subsequent interference band screening and analysis. Multivariate clustering regression analysis is performed on the interference band similarity data to further explore the structural relationship between interference bands. First, the principal component scores of each band are calculated based on the interference band similarity data, and the K-means clustering method is used to classify the spectral data to determine the bands of different categories. Then, the support vector regression method is used to fit the bands of each category, and the regression error is calculated to evaluate the regression stability of the spectral curves of different categories. Next, the partial least squares regression method is used to calculate the spectral regression coefficients of each category of bands, and the bands with significant regression coefficients are screened out to determine the main contributing bands of spectral regression. Subsequently, the Manhattan distance between each band category is calculated to analyze the spectral discrimination between different categories. Finally, the interference band similarity clustering data is obtained to provide classification information for the subsequent quality detection and recognition model construction. The structural instability evaluation of the peak shape variation structure intensity data is performed to analyze the stability of the spectral peak shape with the change of external interference factors. First, the key characteristic parameters in the peak shape variation structure intensity data, including peak height, peak width, symmetry factor, etc., are extracted, and the coefficient of variation of each parameter in different spectral samples is calculated to evaluate the degree of fluctuation of the spectral peak shape. Then, the wavelet transform method is used to decompose the spectral signal at multiple scales, and the energy distribution at different scales is calculated to analyze the main influencing factors of peak shape variation. Next, the frequency domain characteristics of the spectral peak shape are calculated using the Fourier transform method, and the main frequency components are screened out to determine the main variation mode of the spectral peak shape. Subsequently, the spectral peak shape data is reduced in dimension based on the local linear embedding method, and the aggregation degree of the data in the low-dimensional space is calculated to evaluate the stability of the peak shape data. Finally, the peak shape variation structural instability data is obtained to provide instability characteristic parameters for interference correlation induction. Interference correlation induction is performed based on the interference band similarity clustering data and the peak shape variation structural instability data to quantify the influence of the interference band on the spectral peak shape. First, the Pearson correlation coefficient between the interference band similarity clustering data and the peak shape variation structural instability data is calculated, and the band pairs with significant correlation are screened out.Then, the partial least squares discriminant analysis method is used to classify the selected band pairs, and the discrimination threshold between different categories is calculated to evaluate the interference effect of the interference band on the spectral peak shape. Then, the principal component regression method is used to calculate the contribution rate of the interference band to the peak shape variation, and the bands with higher contribution rates are screened to determine the main interference sources. Subsequently, the interference band classification model is constructed based on the support vector machine method, and the discrimination accuracy of different interference categories is calculated to optimize the identification method of the interference band. Finally, the interference-related inductive data is obtained to provide interference feature parameters for the construction of the quality detection and recognition model. The quality detection and recognition model is constructed based on the interference-related inductive data based on the policy gradient algorithm to realize the intelligent evaluation of agricultural product quality. First, the policy gradient optimization objective function is defined, and the model parameters, including learning rate, discount factor, etc., are initialized. Then, the interference-related inductive data is used as the input variable, and the gradient ascent method is used to calculate the gradient of the policy function to optimize the parameters of the quality detection and recognition model. Then, the historical training data is stored based on the experience replay mechanism, and the time difference method is used to calculate the long-term return value to improve the training stability of the model. Subsequently, the cross entropy method was used to evaluate the credibility of the model's prediction results, and the parameters of the strategy function were adjusted to improve the generalization ability of the model. Finally, a quality detection and recognition model was obtained to achieve accurate evaluation of sugar, acidity and cellulose content.

[0124] Step S324 includes the following steps:

[0125] The interference band similarity clustering data and peak shape variation structure instability data are processed by wavelet decomposition to obtain the interference feature multi-scale decomposition data;

[0126] Perform disturbance trend cross regression analysis on the multi-scale decomposition data of interference features to obtain interference trend regression data;

[0127] According to the interference trend regression data, the interference band similar clustering data is reconstructed by correlation weighting to obtain interference weight normalization data;

[0128] Based on the interference weight normalization data, the interference correlation is summarized on the multi-scale decomposition data of the interference feature to obtain the interference correlation summary data.

[0129] In an embodiment of the present invention, the interference band similar clustering data and the peak shape variation structural instability data are subjected to wavelet decomposition processing, and the characteristics of the signal at different frequencies are analyzed by multi-scale wavelet transform. First, the interference band similar clustering data and the peak shape variation structural instability data are merged to form a comprehensive data set. Then, a suitable mother wavelet (such as Daubechies wavelet or Haar wavelet) is selected, and the data is decomposed using wavelet transform to extract detail information and approximate information at different scales. In specific operations, the data is divided into different sub-intervals according to the time or space domain, and each sub-interval is transformed using the wavelet basis function to obtain the multi-scale decomposition coefficient of the interval. These coefficients reflect the changing trends and characteristics of the signal at different scales, providing multi-dimensional information for subsequent analysis. Through wavelet decomposition, the local details and global trends of the data can be captured at the same time, and then the multi-scale decomposition data of the interference features can be obtained. The multi-scale decomposition data of the interference features is subjected to perturbation trend cross regression analysis to reveal the mutual influence relationship between the interference band and the peak shape variation. First, the different scale information in the multi-scale decomposition data is extracted, and a representative scale is selected for further analysis. Then, the cross-regression analysis method is used to regress the interference data of different scales and the instability data of the peak shape variation structure to evaluate the influence of different scale information on the peak shape variation. Regression analysis establishes a relationship model between different scales, calculates the correlation coefficient, regression coefficient and error term, and thus evaluates the change of the disturbance trend at different scales. Through regression analysis, it can be revealed which scale features are closely related to the instability of the peak shape variation structure, providing a basis for the subsequent interference trend regression data. According to the interference trend regression data, the correlation weighted reconstruction of the interference band similar clustering data is performed to further improve the accuracy of the interference band and its impact on quality detection. First, based on the interference trend regression data obtained by regression analysis, the weight of each interference band in the regression model is evaluated. Then, according to the regression coefficient of each interference band, the interference band similar clustering data is weighted to highlight the band information that contributes more to quality detection. Specifically, the spectral data of each band is weighted so that the band that has a greater impact on quality detection occupies a higher proportion in the reconstructed data. This process can be carried out by weighted average or weighted summation, and the weight is determined by the coefficient obtained by regression analysis. After weighted processing, interference weight normalization data is obtained, which provides more accurate data support for the next step of interference correlation analysis. Based on the interference weight normalization data, the interference correlation of the multi-scale decomposition data of the interference feature is summarized to reveal the intrinsic connection between the interference features. First, the weighted interference band data and the interference feature data after multi-scale decomposition are integrated, and the correlation between them is calculated through correlation analysis. The correlation coefficient (such as the Pearson correlation coefficient) is used to measure the linear correlation between different interference features, and the bands and features with strong correlation are screened out.Then, the interference data is reduced in dimension using principal component analysis (PCA) or factor analysis to extract the interference features that have the greatest impact on quality detection. These interference features after dimensionality reduction can effectively summarize the relationship between the interference band and quality changes, and further help establish a more accurate quality detection model. Finally, interference-related summary data is obtained through this process, providing efficient interference feature input for quality detection.

[0130] The present invention also provides an agricultural product quality detection system for executing the agricultural product quality detection method as described above, the agricultural product quality detection system comprising:

[0131] A spectrum correction module is used to perform spectral scanning on apples through a near-infrared spectrometer, and then remove the baseline drift to obtain a reflectance correction spectrum of the apples;

[0132] The background interference band quantitative analysis module is used to identify the sugar / acidity / cellulose spectral bands of the apple reflectance correction spectrum to obtain the sugar / acidity / cellulose spectral bands; perform peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; perform background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data;

[0133] The content distribution recognition module is used to construct a quality detection recognition model based on the quantitative data of the background interference band to obtain the quality detection recognition model; based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is used to identify the sugar / acidity / cellulose content distribution to obtain the sugar / acidity / cellulose content distribution data.

[0134] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for detecting the quality of agricultural products, characterized in that: The following steps are involved: Step S1: Scanning the spectrum of the apple by a near-infrared spectrometer, and then removing the baseline drift to obtain the apple reflectance correction spectrum; Step S2: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands; performing peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; Based on the peak shape variation structure intensity data, quantitative processing of the background interference band is performed to obtain quantitative data of the background interference band; step S2 comprises: Step S21: performing sugar / acidity / cellulose spectral band identification on the apple reflectance correction spectrum to obtain sugar / acidity / cellulose spectral bands; Step S22: performing absorption peak overlap fluctuation analysis based on the sugar / acidity / cellulose spectral bands to obtain absorption peak overlap band data of sugar / acidity / cellulose; Step S23: performing peak shape variation structure intensity analysis on the absorption peak overlapping band data to obtain peak shape variation structure intensity data; Step S23 includes: Step S231: analyzing the overlapping band frequency variation trend of the absorption peak overlapping band data to obtain the overlapping band frequency variation trend; Step S232: calculating the band fluctuation slope change rate of the absorption peak overlapping band data based on the overlapping band frequency change trend to obtain the band fluctuation slope change rate; Step S233: performing geometric calculation of the local extreme point deviation on the overlapping band frequency change trend according to the band fluctuation slope change rate to obtain the local extreme point deviation geometric data; Step S234: performing peak shape variation structure strength analysis based on local extreme point deviation geometric data and band fluctuation slope change rate to obtain peak shape variation structure strength data; Step S24: performing background interference band quantitative processing on the apple reflectance correction spectrum based on the peak shape variation structure intensity data to obtain background interference band quantitative data; Step S3: construct a quality detection and recognition model based on the quantitative data of the background interference band to obtain the quality detection and recognition model; identify the sugar / acidity / cellulose content distribution of the sugar / acidity / cellulose spectral band based on the quality detection and recognition model to obtain the sugar / acidity / cellulose content distribution data.

2. The agricultural product quality detection method according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Scanning the apple by a near infrared spectrometer to obtain a reflection spectrum of the apple; Step S12: smoothing the apple reflection spectrum to obtain an apple reflection smoothed spectrum; Step S13: removing the baseline drift of the apple reflectance smoothed spectrum to obtain the apple reflectance corrected spectrum.

3. The agricultural product quality detection method according to claim 1, characterized in that: Step S24 includes the following steps: Step S241: identifying the spectral bands of other substances on the apple reflectance correction spectrum based on the sugar / acidity / cellulose spectral bands to obtain the spectral bands of other substances, wherein the other substances include vitamins, minerals, and water; Step S242: performing intensity coupling analysis on the spectral bands of other substances to obtain spectral intensity band data of other substances; Step S243: evaluating the scattering interaction effect of the sugar / acidity / cellulose spectral bands according to the spectral intensity band data of other substances to obtain scattering interaction effect data; Step S244: performing band peak line fluctuation displacement analysis on the sugar / acidity / cellulose spectral bands based on the scattering interaction effect data to obtain band peak line fluctuation displacement data; Step S245: performing background interference band quantitative processing based on the peak shape variation structure intensity data and the band peak line fluctuation displacement data to obtain background interference band quantitative data.

4. The agricultural product quality detection method according to claim 3, characterized in that: Step S244 includes the following steps: Perform multiple scattering intensity coupling on the scattering interaction effect data to obtain multiple scattering intensity coupling data; Based on the multiple scattering intensity coupling data, the scattering wavelength polarization vector is analyzed on the scattering interaction effect data to obtain the scattering wavelength polarization vector; Calculate the circular polarization rotation angle of the scattered wavelength polarization vector to obtain the scattered circular polarization rotation angle; Based on the rotation angle of the scattering circular polarization degree, the peak line fluctuation displacement analysis of the sugar / acidity / cellulose spectral bands was performed to obtain the peak line fluctuation displacement data.

5. The agricultural product quality detection method according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: normalizing the quantitative data of the background interference band to obtain the quantitative normalized data of the background interference band; Step S32: constructing a quality detection and recognition model based on the quantitative normalization data of the background interference band and the peak shape variation structure intensity data to obtain a quality detection and recognition model; Step S33: Based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is subjected to sugar / acidity / cellulose content distribution identification to obtain sugar / acidity / cellulose content distribution data.

6. The agricultural product quality detection method according to claim 5, characterized in that: Step S32 includes the following steps: Step S321: performing interference band similarity analysis on the background interference band quantitative normalization data to obtain interference band similarity data; Step S322: performing multivariate clustering regression analysis on the interference band similarity data to obtain interference band similarity clustering data; Step S323: performing structural instability evaluation on the peak shape variation structural strength data to obtain peak shape variation structural instability data; Step S324: performing interference correlation induction based on interference band similarity clustering data and peak shape variation structure instability data to obtain interference correlation induction data; Step S325: construct a quality detection and recognition model for the interference-related summary data based on the policy gradient algorithm to obtain a quality detection and recognition model.

7. The agricultural product quality detection method according to claim 6, characterized in that: Step S324 includes the following steps: The interference band similarity clustering data and peak shape variation structure instability data are processed by wavelet decomposition to obtain the interference feature multi-scale decomposition data; Perform disturbance trend cross regression analysis on the multi-scale decomposition data of interference features to obtain interference trend regression data; According to the interference trend regression data, the interference band similar clustering data is reconstructed by correlation weighting to obtain interference weight normalization data; Based on the interference weight normalization data, the interference correlation is summarized on the multi-scale decomposition data of the interference feature to obtain the interference correlation summary data.

8. An agricultural product quality detection system, characterized in that: Used to perform the agricultural product quality detection method according to claim 1, the agricultural product quality detection system comprises: A spectrum correction module is used to perform spectral scanning on apples through a near-infrared spectrometer, and then remove the baseline drift to obtain a reflectance correction spectrum of the apples; The background interference band quantitative analysis module is used to identify the sugar / acidity / cellulose spectral bands of the apple reflectance correction spectrum to obtain the sugar / acidity / cellulose spectral bands; perform peak shape variation structure intensity analysis based on the sugar / acidity / cellulose spectral bands to obtain peak shape variation structure intensity data; perform background interference band quantitative processing based on the peak shape variation structure intensity data to obtain background interference band quantitative data; The content distribution recognition module is used to construct a quality detection recognition model based on the quantitative data of the background interference band to obtain the quality detection recognition model; based on the quality detection recognition model, the sugar / acidity / cellulose spectral band is used to identify the sugar / acidity / cellulose content distribution to obtain the sugar / acidity / cellulose content distribution data.

Citation Information

Patent Citations

  • Apple quality rapid nondestructive testing method based on near infrared technology

    CN111537469A

  • Method for rapidly predicting oil content in fresh tobacco leaves by adopting peak-dividing analysis technology based on mid-infrared spectrum

    CN113484275A