A method for assessing nutrient abundance and deficiency in corn kernels based on spectral analysis
By combining near-infrared and mid-infrared light sources with wavelet transformation and support vector machine, the problems of spectral signal fluctuations and noise influence in infrared spectral analysis are solved, and the accurate evaluation and description of the nutrient status of corn grains is achieved.
Patent Information
- Application Number
- CN202510612812.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In the existing infrared spectral analysis technology, the influence of light source stability, ambient light interference and sample surface characteristics lead to large fluctuations in the spectral signal, and weak nutrient-related peaks are easily covered by background noise, affecting data consistency and analysis accuracy.
Near-infrared and mid-infrared light sources are used to irradiate corn grains, reflective spectral signals are collected, characteristic peaks are analyzed through wavelet transformation, and the recognizable spectral peaks are enhanced. The support vector machine is used to classify nutrient states, and nutrient threshold standards are set to describe abundance states based on database comparison and quantitative evaluation.
It improves the stability and accuracy of the spectral data, enhances the resolution of characteristic peaks, optimizes the ability to distinguish nutrient states, provides a clear description of nutrient abundance state, and improves the interpretability of the data.
Smart Images

Figure CN120142221B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of infrared spectrum analysis, and in particular to a method for evaluating the nutrient abundance or deficiency status of corn kernels based on spectrum analysis. Background Art
[0002] Infrared spectroscopy is a spectroscopic technique that detects the composition and structure of substances based on the vibrational properties of molecules. It identifies and quantitatively analyzes chemical components by detecting the absorption characteristics of infrared light. This technique uses the characteristic absorption peaks produced by molecules under infrared light to reflect the stretching and bending vibrations of chemical bonds within the molecule.
[0003] However, existing techniques for collecting infrared spectral data are often affected by light source stability, ambient light interference, and sample surface characteristics, resulting in significant fluctuations in some spectral signals and impacting data consistency. Furthermore, the resolution of characteristic peaks is affected by signal noise, and some weak nutrient-related peaks are easily obscured by background noise, affecting the accuracy of subsequent analysis. Therefore, improvements are needed. Summary of the Invention
[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method for evaluating the nutrient abundance and deficiency status of corn kernels based on spectral analysis.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis, comprising the following steps:
[0006] Irradiating corn seeds with near-infrared and mid-infrared light sources, collecting reflected spectral signals, and recording spectral signal data; extracting key wavelength region data based on the spectral signal data to obtain key spectral data;
[0007] Based on the key spectral data, applying wavelet transform to analyze characteristic peaks in the data, enhancing the identifiability of the spectral peaks, and generating enhanced spectral data; based on the enhanced spectral data, calibrating spectral peaks associated with nutrients, recording the position and intensity of each peak, and obtaining spectral peak calibration results;
[0008] Based on the spectral peak calibration results, a comparative analysis is performed with the standard nutrient spectra in the database to extract data features and generate a data feature set; based on the data feature set, a support vector machine is used to classify the nutrient status, distinguish each nutrient deficiency state, and obtain a nutrient status classification result;
[0009] Based on the nutrient status classification results, a quantitative assessment is performed, threshold standards for different nutrients are set, the abundance and deficiency of each nutrient element is analyzed, and the deficiency status of nutrients below the threshold standard is described to obtain the nutrient abundance and deficiency assessment results.
[0010] Preferably, the steps of acquiring the spectral signal data are:
[0011] Set near-infrared and mid-infrared light sources to irradiate corn kernels, capture spectral signals reflected from the corn kernels, convert the spectral signals into digital format, and obtain complete spectral signal data;
[0012] The complete spectrum signal data is recorded and stored to obtain spectrum signal data.
[0013] Preferably, the steps of acquiring the key spectral data are:
[0014] screening wavelength regions sensitive to nutrient evaluation of corn kernels from the spectral signal data, determining key wavelengths affecting nutrient analysis by comparing the absorption intensity and peak shape characteristics of each wavelength, and obtaining preliminary screened wavelength region data;
[0015] Based on the initially screened wavelength region data, non-critical wavelength points are eliminated to obtain critical wavelength region data;
[0016] Based on the key wavelength region data, spectral feature extraction is performed, including calculating the peak position, peak width and integrated peak area to obtain key spectral data.
[0017] Preferably, the step of acquiring the enhanced spectral data is:
[0018] Based on the key spectral data, the characteristic peaks are analyzed by wavelet transform to obtain the wavelet transform result, which is as follows:
[0019] in, Represents the frequency The transformed peak intensity at For in time and frequency The wavelet coefficients of the point, For time The spectral intensity, Represents the total number of time points;
[0020] Based on the wavelet transform results, spectral peaks are identified through peak comparison and intensity analysis to obtain enhanced spectral data.
[0021] Preferably, the steps for obtaining the spectrum peak calibration result are:
[0022] Based on the enhanced spectral data, all spectral peaks are extracted, local extreme points of the spectral curve within different wavelength ranges are analyzed, and the wavelength and spectral intensity are recorded to generate preliminary spectral peak data;
[0023] According to the preliminary spectral peak data, the nutrient correlation corresponding to the peak is calculated using the following formula:
[0024] in, The spectral peak and The correlation between nutrients, wavelength The spectral intensity at For the Standard spectral response curves for various nutrients, and The starting and ending wavelengths of the analysis wavelength range;
[0025] Based on the nutrient correlation corresponding to the peak, the spectral peaks that are highly correlated with the target nutrients are screened, the wavelength position and spectral intensity of the peak are sorted out, and the spectral peak calibration results are generated.
[0026] Preferably, the steps of obtaining the data feature set are:
[0027] Based on the spectral peak calibration results, the standard nutrient spectrum data in the database is retrieved, the spectral curve change trends of the two sets of spectra in the same wavelength range are compared, the position, width and intensity changes of the spectral absorption peaks are analyzed, and the standard nutrient spectrum matching results are obtained;
[0028] According to the standard nutrient spectrum matching results, the main component contribution is calculated using the following formula:
[0029] in, represents the principal component contribution, Represents the peak value of the spectrum calibration result. The spectral intensity of the wavelength, Represents the spectral intensity of the corresponding wavelength in the standard nutrient spectrum database, Representative The spectral absorption difference corresponding to the wavelength is Representative The contrast matching error of wavelengths, Represents the total number of wavelength points;
[0030] Based on the principal component contribution, principal component analysis is performed to extract spectral characteristic variables, construct a characteristic vector space, reduce the dimension of the spectral data, remove noise and redundant variables, and generate a data feature set.
[0031] Preferably, the steps for obtaining the nutrient status classification result are:
[0032] Based on the data feature set, configuring the kernel function type and kernel parameters of the support vector machine classifier to obtain a configured SVM model;
[0033] According to the configured SVM model, the classification result function is obtained, and the expression is:
[0034] in, is the classification result function, is a symbolic function, is the Lagrange multiplier corresponding to the support vector, For the The class labels of the data points, Calculate the kernel function Support vectors and input The similarity between is the bias term, is the number of support vectors;
[0035] Based on the classification result function, the nutrient status of each data point is classified to distinguish between nutrient sufficiency and nutrient deficiency, the deficiency degree of each nutrient is evaluated, and the nutrient status classification result is generated.
[0036] Preferably, the steps for obtaining the nutrient abundance and deficiency assessment results are:
[0037] According to the nutrient status classification results, the nutrient abundance and deficiency metrics are calculated using the following formula:
[0038] in, Indicates the nutrient abundance and deficiency measurement, is the measured nutrient concentration, is the threshold standard for this nutrient, is the maximum response concentration of the nutrient in the standard data, is the minimum response concentration of the nutrient, is the rate of change of the nutrient concentration;
[0039] Based on the nutrient abundance and deficiency measurement, the abundance and deficiency of each nutrient element is analyzed to generate a nutrient abundance and deficiency assessment result.
[0040] Compared with the prior art, the advantages and positive effects of the present invention are:
[0041] In the present invention, the combination of near-infrared and mid-infrared light sources enhances the ability to obtain nutrient information of corn kernels. The reflective characteristics of spectral signals are utilized to reduce the interference of environmental factors on data collection and improve the stability of spectral data. The screening of key wavelength regions reduces irrelevant information, making the spectral data more focused on the characteristic bands that affect the nutrient status. Wavelet transform processes the spectral signal, improves the resolution of the characteristic peak, strengthens the local change trend of the spectral signal, and makes feature extraction more accurate. The calibration process of the spectral peak associates the characteristic peak with the specific nutrient content, and improves the operability of subsequent analysis through data structured storage. The feature extraction method is used to reduce the data dimension during database comparison, improve the computational efficiency of spectral data, and reduce the impact of redundant information. The support vector machine classification method optimizes the ability to distinguish nutrient status, improves the generalization of the model, and maintains stable classification performance under different spectral data. In the quantitative evaluation stage, the nutrient threshold standard is combined to clearly divide the nutrient abundance and deficiency status, provide a numerical description of the nutrient status, and improve the interpretability of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] See also Figure 1 The present invention provides a technical solution, a method for evaluating the nutrient abundance and deficiency status of corn kernels based on spectral analysis, comprising the following steps:
[0045] Irradiating corn seeds with near-infrared and mid-infrared light sources, collecting reflected spectral signals, and recording spectral signal data; extracting key wavelength region data based on the spectral signal data to obtain key spectral data;
[0046] Based on key spectral data, wavelet transform is applied to analyze characteristic peaks in the data, enhancing the identifiability of spectral peaks and generating enhanced spectral data. Based on the enhanced spectral data, spectral peaks associated with nutrients are calibrated, and the position and intensity of each peak are recorded to obtain spectral peak calibration results.
[0047] Based on the spectral peak calibration results, the data was compared and analyzed with the standard nutrient spectra in the database to extract data features and generate a data feature set. Based on the data feature set, a support vector machine was used to classify the nutrient status, distinguish each nutrient deficiency state, and obtain the nutrient status classification results.
[0048] Based on the nutrient status classification results, a quantitative assessment is conducted, threshold standards for different nutrients are set, the abundance and deficiency of each nutrient element is analyzed, and the deficiency status of nutrients below the threshold standard is described to obtain the nutrient abundance and deficiency assessment results.
[0049] The steps for acquiring spectral signal data are as follows:
[0050] Set near-infrared and mid-infrared light sources to irradiate corn kernels, capture spectral signals reflected from the corn kernels, convert the spectral signals into digital format, and obtain complete spectral signal data;
[0051] The complete spectral signal data is recorded and stored to obtain spectral signal data.
[0052] Specifically, based on the set near-infrared and mid-infrared light source ranges, first determine in the experimental environment to use a near-infrared light source with a wavelength between 780 nanometers and 2500 nanometers and a mid-infrared light source with a wavelength between 2500 nanometers and 25000 nanometers. When irradiating the surface of the corn kernels, refer to a previously established light source application parameter description document. The document is compiled by performing optical reflectance measurements on 100 batches of corn kernel samples and counting their reflection peak ranges. Then, under the irradiation of the light source, an optical signal acquisition device is used to detect the reflection of the kernel surface. The device uses a 16-bit analog-to-digital converter to digitize the analog light signal, and the sampling frequency is set to 100 times per second. This setting is obtained after multiple actual measurements of the stability of the reflection waveform. Afterwards, the collected original waveform intensity is calibrated between 0 and 1 and a preliminary data set is generated. If some peaks are found to exceed the pre-set reflection intensity threshold , where 0.85 is obtained by taking the average value after multiple measurements of 300 random kernels and adding 0.05. This part of the peak information is regarded as the noise area and marked. Then, the remaining reflection signal is separated from the background noise. The spectral curves of different acquisition batches are compared to verify whether there are abnormal fluctuations. If a single acquisition curve is higher than 0.9 or lower than 0.02 for more than 2 seconds, it is considered abnormal. Finally, the digital data that meets the threshold range is unified and recorded in the memory structure to obtain complete spectral signal data.
[0053] When recording and storing complete spectral signal data, storage space and an index table are first allocated according to a parameter configuration document for the storage structure. This document is compiled based on a maximum capacity threshold of 500,000 records calculated based on the scale of historical spectral data and an assessment of index conflicts. Each digitized spectral record is then arranged in timestamp order and assigned a unique index number. Before writing, each record is error-checked to determine whether there are sudden jumps or extreme outliers. For example, if the reflection intensity value between 0 and 1 suddenly exceeds 1.2 or falls below -0.1, it is considered invalid and marked for archiving. For written data, if the number of records is repeatedly detected approaching 500,000, a threshold warning is triggered. The threshold is calculated based on a frequency of 20,000 new data records each time, and exceeding this range is used as the trigger standard. Entries are then added to the storage according to the index table. If the record is confirmed to meet the currently set index segment, it is written to the memory and the entry sequence is kept in order. Finally, after completing the above operations, the spectral signal data is obtained.
[0054] The steps for obtaining key spectral data are:
[0055] The wavelength regions that are sensitive to the nutrient evaluation of corn kernels are screened from the spectral signal data. By comparing the absorption intensity and peak shape characteristics of each wavelength, the key wavelengths that affect nutrient analysis are determined, and the preliminary screening wavelength region data are obtained.
[0056] Based on the initially screened wavelength region data, non-critical wavelength points are eliminated to obtain critical wavelength region data;
[0057] Based on the key wavelength region data, spectral feature extraction is performed, including calculation of peak position, peak width and integrated peak area to obtain key spectral data.
[0058] Specifically, wavelength regions that are sensitive to nutrient evaluation of corn kernels are screened from the spectral signal data. First, the collected spectral curves are preliminarily browsed to find the bands where significant absorption peaks may exist. Then, a band range record pre-calculated based on 200 batches of corn kernel samples is referred to. The common positions and peak height distributions of absorption peaks in each frequency band in the range of 300 nanometers to 2500 nanometers are listed. Then, the correspondence between wavelength and intensity is gradually calibrated on the actual spectral curve to determine whether the peak height in each local wavelength band exceeds the intensity threshold. For example, the aforementioned wavelength band is divided into several 5-nanometer sub-intervals and the difference between the highest absorption peak and the lowest absorption valley is calculated. If the difference is greater than 0.12, it is included in the subsequent comparison. This value of 0.12 is based on the average peak-to-valley difference of the measurement results of different corn kernels plus 0.02. On this basis, the peak shape characteristics of the included sub-intervals are further evaluated by calculating the slope change from the peak top to the peak shoulder and the ratio of the peak width to the length of the sub-interval. If the slope continuously changes by more than 0.03 set in advance and the peak width ratio exceeds 0.2, this sub-interval is considered a potential sensitive area. After summarizing the wavelength information of all potential sensitive areas, it is checked whether there are local overlaps or segments that are too close. If the wavelength distance between two adjacent segments is less than 2 nanometers, they are merged and the average peak shape characteristics of the merged segments are calculated to determine whether they still meet the aforementioned standards. Finally, all segments that meet the requirements are retained and a relatively complete sensitive wavelength range is formed to obtain the preliminary screened wavelength region data.
[0059] Based on the preliminary screening of wavelength region data, the average absorption intensity and peak position of each divided wavelength segment are first checked. If there is a situation in which the value is lower than the mean value of the segment by 40% and it lasts for two wavelength sampling points in the segment, it is judged as a noise point and eliminated. This 40% ratio is obtained by combining the extremely low value statistically calculated from 50 measured corn kernel spectrum samples and correcting its mean by 0.05. Then, by comparing the change rate of each wavelength point between two adjacent points, if the change rate exceeds 0.08, it is considered as an unstable point and is eliminated. The value of 0.08 is based on multiple rounds of regression analysis of peak volatility under the same measurement conditions. The average fluctuation range is selected and added with 0.01, and then all excluded point positions are saved in the memory structure for subsequent abnormal distribution inspection. If more than 3 consecutive wavelength points are excluded, an additional scan of 1 nanometer above and below is performed to exclude potential edge noise points. Finally, when the remaining wavelength segments are merged, if the wavelength difference between adjacent segments is within 1 nanometer, they are merged into the same segment. The total length after merging is compared with the preset lower limit of the effective length of 5 nanometers. If it is greater than 5 nanometers, it is regarded as a retained segment, otherwise it is merged into the adjacent larger segment. After multiple comparison and merging operations, a robust wavelength range is obtained to obtain the key wavelength area data.
[0060] Based on the key wavelength region data, when locating the peak position in each retained wavelength band, first detect it in steps of 0.5 nanometers, find the point with the highest absorption intensity and record it as the peak top, then expand it to both sides until the absorption intensity is less than half of the peak top to measure the peak width. If the sum of the wavelength distances between the left and right edges and the peak top exceeds 3 nanometers, this distance is recorded as the effective peak width. Otherwise, it is considered too narrow and not retained. Next, when calculating the integrated peak area of each effective peak segment, let the wavelength resolution be , the absorption intensity of each sampling point Discretize and compute approximate integrals ,in is the total number of sampling points after segmentation, It is the average wavelength interval between each sampling point. At this time, if the peak area calculated in a certain segment is more than twice the average level of the segment, it will be registered as a suspicious peak and the peak intensity will be re-compared to eliminate abnormal jumps in the data records. Once it is confirmed that no jump has occurred, the peak will be retained. Otherwise, an error mark will be made and it will not be included in the statistical range for the time being. Finally, after completing the peak position, peak width and integrated peak area calculations for each wavelength segment, the key spectral data will be obtained.
[0061] The steps for acquiring enhanced spectral data are:
[0062] Based on the key spectral data, the characteristic peaks are analyzed by wavelet transform to obtain the wavelet transform results. The formula is:
[0063] in, Represents the frequency The transformed peak intensity at For in time and frequency The wavelet coefficients of the point, For time The spectral intensity, Represents the total number of time points;
[0064] Based on the wavelet transform results, the spectral peaks are identified through peak comparison and intensity analysis to obtain enhanced spectral data.
[0065] Specifically, the formula is beneficial in that it combines the time dimension with the frequency dimension and uses the wavelet coefficients With spectral intensity The product of can realize the aggregation of energy at specific frequencies at different time points. This idea can more directly quantify the peak intensity at a certain frequency and more clearly locate the frequency position of the characteristic peak when analyzing key spectral data.
[0066] The acquisition steps are as follows: first, wavelet decomposition is used to split the known time series into multi-scale frequency bands, and then the amplitude under each frequency band is coefficientized to obtain a preliminary coefficient table, and then the local energy distribution at the same time in each scale frequency band is compared, and a threshold of 0.05 is used to distinguish whether there are outlier energy points. Here, 0.05 comes from the ratio of the energy variance of adjacent frequency bands to the local average value (the average ratio is about 0.04 when the variance statistics are performed on 200 measurements. On this basis, 0.01 is corrected upward and 0.05 is selected). After removing the outliers, the remaining coefficients are normalized to form the final For example, if the wavelet decomposition is divided into 5 layers, each layer contains 64 sampling points, then the frequency range of the single layer transitions from higher frequency band to lower frequency band according to the configuration of the actual measuring instrument. For example, the center frequency of the highest frequency layer is about 500 Hz, and the center frequency of the lowest frequency layer is about 31.25 Hz. The first frequency in the layer will be divided into two groups according to the approximate frequency layer to which 12 Hz belongs. The wavelet amplitude corresponding to each position is normalized and finally recorded in the coefficient table, thereby obtaining the Data, if the total number of time points is 512, then Sampling can be completed from 0 to 511.
[0067] The steps to obtain are: at each time point The corresponding spectral intensity is obtained from the real-time detection of the reflected signal from the corn kernel surface. It is discretized by a 16-bit analog-to-digital converter to obtain an integer value between 0 and 65535. The integer value is then mapped to a range between 0.0 and 1.0 using a calibration coefficient. The calibration coefficient is determined based on a comparison table obtained from multiple rounds of spectral testing of samples from the same batch. The specific calculation method is: , where "dark current average" is the base noise collected during the device self-test (obtained by collecting 1000 data points per second and averaging them, for example, the device's average dark current is 200), and the maximum signal is the saturation value under the peak illumination of the light source (for example, 65535 corresponds to the maximum reflectance that the device can measure). If the acquired value is 5000, the dark current average is 200, and the maximum signal is 65535. Approximately This mapping method can be multiplied with the wavelet coefficients in subsequent processing without additional dimensional conversion. The same formula can be applied to each time point to form a length of of sequence and perform subsequent operations.
[0068] The acquisition step is to obtain the total number of time points by forming a unified index count from the start to the end of the spectrum data acquisition. For example, in the experiment, a sampling frequency of 500 times per second and continuous acquisition for 30 seconds were used to obtain 15,000 valid time points. If there is an interruption in the acquisition process, the data index of the interruption range is removed and renumbered continuously, and finally a time index from 0 to sequence, where The specific value depends on the actual experimental conditions. The sampling time and sampling frequency can be flexibly adjusted by setting the upper control of the acquisition device. If higher accuracy is still required in the subsequent analysis stage, the sampling frequency can be increased or the acquisition time can be extended to expand the Once the sampling is completed, it is fixed Used for calculations.
[0069] The acquisition step is to divide the specific frequency value according to the center frequency corresponding to each layer of frequency band in the wavelet analysis process. For example, if the device hardware frequency detection range is 1 Hz to 1000 Hz, it can be divided into several sub-bands in a logarithmic interval manner, and a center value is determined for each sub-band as , and then locate the center frequency of each layer when performing wavelet decomposition based on the collected time series, and extract the corresponding and with Perform product operation, if you need to Interval refinement can interpolate and update the list of center frequencies based on the original sub-bands, and finally form a set of discrete frequency values for subsequent calculations, such as one of the center frequencies It represents the component corresponding to 12 Hz. You can query the coefficient sequence at this frequency in the wavelet coefficient table and perform the above steps to obtain and other information.
[0070] The acquisition steps are to use consecutive integer numbers starting from 0 to represent the sampling point sequence of time lapse, each Each of these corresponds to a spectral intensity value obtained by sampling the device once. If the device is set to a sampling frequency of 500 times per second for 30 seconds, a total of 15,000 sampling moments can be obtained. After numbering them The value range is from 0 to 14999. All can be calculated before and Find the corresponding item in the The summation operation.
[0071] Calculation process: Take a specific case as an example, select , time point from arrive , and set the target frequency to Hertz, the wavelet coefficients corresponding to the five moments at this frequency and spectral intensity The values are as follows:
[0072]
[0073]
[0074] Substitute into the formula , the steps are as follows:
[0075]
[0076] The results show that at the frequency of 12 Hz, the comprehensive peak intensity calculated based on the wavelet coefficients and spectral intensity at 5 sampling moments is 0.623. The larger the value, the higher the overall energy level detected at this frequency, which is of reference significance for the subsequent judgment of whether there is a significant peak in this frequency region.
[0077] Based on the wavelet transform results, through peak comparison and intensity analysis, first find the calculated value corresponding to each frequency in the obtained frequency-intensity mapping table By comparing the numerical ranges at different frequencies, we can locate the areas where local protrusions may appear. If we find that certain frequency bands The value obviously exceeds the set intensity threshold. For example, the threshold is set to 0.4 and the difference between the highest peak and the average peak in the test data of 200 batches of samples is about 0.35, and then it is appropriately increased by 0.05. Then check the adjacent frequencies under the corresponding frequency. If there is a continuous upward trend at the frequency, if the continuous upward amplitude exceeds 0.05, the frequency is marked as a candidate peak position, and the peak distribution of each sampling point is checked one by one in the adjacent frequency range according to the spectral peak search strategy. If the intensity in the adjacent frequency range remains above 0.35, it is determined that there is a steady-state peak here, and the maximum value corresponding to the steady-state peak is recorded. The values are classified as items to be summarized. If multiple local peaks are detected at certain frequencies, the differences between these peak points are compared and the point with the maximum value is selected as the main peak, and the other peaks are classified as secondary features. After the above search and comparison operations are completed, the peak information of all potential peaks can be obtained, and the enhanced spectral data can be obtained.
[0078] The steps to obtain the spectrum peak calibration results are:
[0079] Based on the enhanced spectral data, all spectral peaks are extracted, the local extreme points of the spectral curve in different wavelength ranges are analyzed, and the wavelength and spectral intensity are recorded to generate preliminary spectral peak data;
[0080] According to the preliminary spectral peak data, the nutrient correlation corresponding to the peak is calculated using the following formula:
[0081] in, The spectral peak and The correlation between nutrients, wavelength The spectral intensity at For the Standard spectral response curves for various nutrients, and The starting and ending wavelengths of the analysis wavelength range;
[0082] Based on the nutrient correlation corresponding to the peak, the spectral peaks that are highly correlated with the target nutrients are screened, the wavelength position and spectral intensity of the peak are sorted out, and the spectral peak calibration results are generated.
[0083] Specifically, when extracting all spectral peaks based on enhanced spectral data, first refer to a record containing a description of the wavelength range division, which lists several peak segments and peak shape information that may appear in the range of 450 nanometers to 2400 nanometers. Then, scan the corresponding interval segment by segment in the enhanced spectral data. Whenever a local wavelength continuously appears with a high intensity and the peak shape is obviously convex, the segment is recorded as a potential peak area. To ensure the reliability of peak area identification, a peak height threshold of 0.15 is set and measured from the bottom to the peak top with a discrete step length of 1 nanometer. The 0.15 is obtained by subtracting the standard deviation of 0.05 from the average peak value selected after statistics on 100 batches of corn kernel spectra. When it is detected that the peak intensity of two consecutive sampling points exceeds 0.15 and the difference between adjacent wavelengths is less than 3 nanometers, it is regarded as a coherent peak area. , then the exact wavelength of the peak apex is determined by calculating the extreme position of the curve in this section, and a certain interval is extended to the left and right of the peak apex to distinguish the interference of the main peak and the surrounding smaller peaks. If the intensity in this interval is lower than 40% of the peak intensity, the position is regarded as a peak shoulder and the extension is stopped. This 40% value is based on multiple rounds of observations of the same type of peak structure and the average value is corrected upward by 35%. Then the central wavelength of each peak area is calculated and the spectral intensity at this central wavelength is recorded synchronously. If there are more than two peak apexes in the same wavelength range, the highest one is selected as the main peak point and the remaining peak points are marked as secondary peaks for comparison with peaks in other bands in subsequent judgment. After all peak areas are identified, they are sorted and associated with their wavelength ranges and intensity values to form a preliminary spectral peak data.
[0084] The formula is useful in that it converts the spectral peak intensity With the standard spectral response curve By performing integral matching within a specified wavelength range, the similarity between the current peak value of corn kernels and the known nutrient characteristics can be quantified into a numerical value. , which has the advantage of being intuitive and operational when determining the degree of correlation between different nutrient contents.
[0085] The acquisition step is to retrieve the peak value in the initial spectrum peak data generated in the previous stage. to In the specific operation, a number of discrete measurement values are first obtained with a wavelength step of 1 nm or less, and then these measurement values are ( , intensity). If the intensity of some discrete points is missing, it is supplemented by local interpolation of adjacent points, and it is ensured that the interpolation does not cause jumps. The interpolation weight is determined by the wavelength spacing of the segment and the actual value of the adjacent points. For example, linear interpolation can be used. ,After continuously measuring 100 batches of corn kernels, the average intensity of some wavelength ranges is approximately between 0.1 and 0.7, and the corresponding extreme values can reach approximately 1.0 and will not significantly exceed this range.
[0086] The steps to obtain are: For each nutrient, a standard spectral response library is checked. The absorption characteristic curves of each nutrient at different wavelengths are stored in advance. Each curve is measured by an industry testing agency using high-purity samples under laboratory conditions. To facilitate numerical calculations, the original curve is sampled at equal intervals and obtained ( , response value) list, taking nitrogen as an example, a response value is obtained every 1 nanometer from 1200 nanometers to 1400 nanometers and recorded as , for example, measured at 1250 nm , measured at 1251 nm The complete curve data can span multiple bands, or it can be intercepted and combined with the previously determined key wavelength area. Alignment, whenever calculation is required Call the corresponding That's it.
[0087] The acquisition step is to refer to the database and the enhanced spectral peak positioning results to screen out the wavelength starting position of the peak that is most likely to correspond to the nutrient information. Taking nitrogen as an example, based on a large number of experiments, it was found that a strong absorption characteristic appeared around 1200 nanometers, so Set as the starting point of the analysis segment.
[0088] The steps to obtain are as follows: Correspondingly, the end wavelength position within the same peak segment is selected to include the sampling peak segment completely. Taking nitrogen as an example, if the peak is detected to be around 1390 nm, it is acceptable. .
[0089] Calculation process: In this example, take nanometer, Nanometers, assuming that the measurement step length of a batch of corn kernels in this interval is 1 nanometer, a total of 201 sampling points are obtained, which are recorded as ;
[0090] Selected nutrients (corresponding to nitrogen), extracted from preliminary spectral peak data And call it from the standard response library , located in Nanotechnology , Nanotechnology , and so on, do discrete integration point by point for the entire interval, and record the discrete step length , then the numerator can be approximated as:
[0091]
[0092] The denominator can be approximated as:
[0093]
[0094] The specific numerical operation examples are as follows, and four local points are selected for illustration:
[0095]
[0096]
[0097]
[0098]
[0099] The sum of these four points in the numerator is:
[0100]
[0101] The sum of these four points in the denominator:
[0102]
[0103] After accumulating all 201 sampling points, we get the numerator , the denominator , from which we can get:
[0104]
[0105] The results show that the correlation between the standard response curve of nitrogen and the corn kernels in the range of 1200 nm to 1400 nm is about 0.732. When it exceeds 0.70, it can be regarded as highly correlated, which means that the peak segment is more likely to correspond to the absorption characteristics of nitrogen. If it is lower than 0.40, it means that the matching degree between the section and the corresponding nutrients is low, and it can be checked again through subsequent steps.
[0106] When screening spectral peaks that are highly correlated with target nutrients based on the nutrient correlation corresponding to the peak, first retrieve the nutrient peaks calculated in the previous step. The value list is compared with the pre-set correlation threshold. The threshold can be determined based on statistical methods. For example, the average correlation of 100 batches of corn kernels measured in the same wavelength range is 0.55 and combined with the standard deviation of 0.1, the threshold is set to 0.55 plus twice the standard deviation of 0.2 to get 0.75. When a peak is detected If the value is greater than or equal to 0.75, it is classified as "highly correlated". If the correlation is between 0.5 and 0.75, it will be marked as "moderate correlation" for subsequent repeated measurements or further verification. During the process, the central wavelength and maximum spectral intensity corresponding to the peak segment will be recorded respectively. If the central wavelength is found to be within the nutrient key segment selected above and If the correlation degree is significantly higher than that of other nutrients, the peak segment will be preferentially identified as the characteristic peak of the target nutrient. Finally, after sorting out all the highly correlated peak information, a list containing wavelength position and spectral intensity is formed to obtain the spectral peak calibration result.
[0107] The steps to obtain the data feature set are:
[0108] Based on the spectral peak calibration results, the standard nutrient spectrum data in the database is retrieved, the spectral curve change trends of the two sets of spectra in the same wavelength range are compared, and the position, width and intensity changes of the spectral absorption peaks are analyzed to obtain the standard nutrient spectrum matching results;
[0109] According to the standard nutrient spectrum matching results, the main component contribution is calculated using the following formula:
[0110] in, represents the principal component contribution, Represents the peak value of the spectrum calibration result. The spectral intensity of the wavelength, Represents the spectral intensity of the corresponding wavelength in the standard nutrient spectrum database, Representative The spectral absorption difference corresponding to the wavelength is Representative The contrast matching error of wavelengths, Represents the total number of wavelength points;
[0111] Based on the principal component contribution, principal component analysis is performed to extract spectral characteristic variables, construct a characteristic vector space, reduce the dimension of the spectral data, remove noise and redundant variables, and generate a data feature set.
[0112] Specifically, when retrieving the standard nutrient spectrum data in the database based on the spectrum peak calibration results, first locate the reference number corresponding to the current corn kernel in the database, then read the sampling information of each wavelength range in the standard spectrum, including its characteristic wavelength points and the absorption intensity of each point, and then compare the wavelengths of these characteristic wavelength points with the previously recorded spectrum peak calibration results one by one. If it is found that the wavelength difference between the two is within 3 nanometers and the difference in absorption intensity is less than 0.05, then the wavelength point is determined to have comparable significance, and the corresponding absorption peak shape is extended to check, that is, the intensity change of the original spectrum is continuously compared within a range of 1 nanometer forward and backward at the wavelength point, and the sections where the intensity continuously rises or falls are recorded. If it is found that the peak width differs from the peak width information in the database by less than 0.2 nanometers or the peak height difference is less than 0.0 3, then the absorption peak is considered to be consistent with the reference peak height. At the same time, in order to eliminate local interference, it is necessary to compare the slope changes of the peak shape within the range of 5 nanometers above and below. If the intensity slope in this range fluctuates significantly by more than 0.08, it is marked as an abnormal peak segment and the comparison is temporarily put on hold. Next, the successfully matched wavelength points are sorted in sequence and their position distribution in the spectral curve is checked. If the wavelength difference between two adjacent valid comparison points does not exceed 2 nanometers, they are merged into the same reference segment, and the average absorption intensity and peak top position in the segment are used to determine whether they meet the standard waveform definition in the database. If all are met, they are summarized as a standardized peak segment. Finally, after confirming that the comparison operation of all reference peak segments is completed, the overall wavelength range and peak width, peak height and other differences are evaluated as a whole to obtain the standard nutrient spectrum matching result.
[0113] The formula is beneficial in that by introducing the spectral difference in the numerator and amendments , which can more finely measure the difference between the measured spectrum and the standard spectrum at different wavelengths, and normalize the overall intensity value in the denominator, thereby unifying various amplitudes and errors into a comparable principal component contribution index middle.
[0114] : represents the peak value of the spectrum calibration result The spectral intensity of each wavelength has been recorded in the previous step of spectral peak calibration. These values can be directly called and arranged in order. , The data are stored in an array in sequence for use in subsequent calculations.
[0115] : represents the spectral intensity of the corresponding wavelength in the standard nutrient spectrum database, which is obtained by one-to-one correspondence with the wavelength of the standard spectrum in the previous section and combined with the curve data pre-registered in the database. If the standard intensity corresponding to the same wavelength of 620 nanometers is 0.40 in the database, then , and 0.38 at 621 nm. , and so on to extract the standard values of all matching wavelength points in sequence.
[0116] :Represents The spectral absorption difference corresponding to each wavelength needs to be calculated by differentially calculating the actual measured absorption intensity and the absorption characteristics in the standard spectrum curve. For example: if the actual measured absorption value at 620 nm is 0.35 and the standard absorption value is 0.40, the basic difference of 0.05 can be calculated first, and then the correction factor (for example, 0.1) pre-set for this band can be added to obtain .
[0117] :Represents The contrast matching error of each wavelength is used to adjust The influence of the item on the overall contribution is obtained by collecting the deviation data of the wavelength on multiple batches of different samples and performing error estimation. Example: When a wavelength has an average deviation in the measurement of 50 batches of corn kernels And the variance , then let .
[0118] : represents the total number of wavelength points, that is, the number of wavelengths involved in the actual comparison. Each wavelength point corresponds to a group If the sampling is done at 1 nm intervals from 600 nm to 1400 nm and the same number of standard spectral points are paired, 801 wavelength points can be obtained, corresponding to Example: If researchers only compare the 100 key wavelength points, .
[0119] Calculation process:
[0120] by As an example, take four wavelength points ,make:
[0121]
[0122]
[0123]
[0124]
[0125] Substitute these values into the numerator of the formula:
[0126]
[0127] Calculate first ;
[0128]
[0129]
[0130] Therefore, this is approximately ;
[0131] Calculate the remaining three items in the same way and add up the results as the numerator, for example, we can get Equal values, we will not expand them one by one here, and the final sum of the molecular parts is recorded as ;
[0132] Denominator:
[0133]
[0134] Substitute the values into:
[0135]
[0136] but:
[0137]
[0138] The results show that the principal component contribution of the four wavelength points in this example is 0.112. If the value is too low, it means that the difference between the measured spectrum and the standard spectrum at these wavelength points is large. Researchers can combine the difference and matching error in the previous process to further investigate or repeat the measurement at more wavelength points. If in actual operation A value greater than 0.5 is generally considered a high match, while a value less than 0.2 indicates a significant difference and requires re-comparison and analysis of the source of the deviation.
[0139] When performing principal component analysis based on principal component contribution, first refer to a pre-organized wavelength and absorption intensity mapping table, which lists several wavelength points that can be used for principal component extraction and the intensity values measured in different corn kernel samples. These wavelength points and intensity values are then organized in a matrix form and a matrix decomposition step is performed to analyze the proportion of each wavelength in the variance distribution. Wavelengths that contribute significantly less to the variance are marked as redundant variables and removed from subsequent calculations. If the contribution of some wavelength points is less than 0.02, they are also classified as noise intervals. The value of 0.02 is obtained by statistically analyzing 200 batches of corn kernel measurement data. Then, the mean of 0.015 is selected and corrected upward by 0.005. After the decomposition is completed, the remaining principal component wavelengths are mapped back to the spectral intensity sequence to form a set of eigenvectors. A similarity judgment is then performed on this set of eigenvectors to exclude possible multicollinearity. If the similarity exceeds 0.9, it means that the two vectors are close in the data space. The threshold of 0.9 here is obtained by comparing the probability statistics of highly similar scenes appearing in multiple measurements of the same type of spectral vectors. Finally, vectors with sufficiently obvious differences are retained to cover more information dimensions. These vectors are combined into a new coordinate system for storage and summarized into a data feature set.
[0140] The steps to obtain the nutrient status classification results are as follows:
[0141] Based on the data feature set, the kernel function type and kernel parameters of the support vector machine classifier are configured to obtain the configured SVM model;
[0142] According to the configured SVM model, the classification result function is obtained, and the expression is:
[0143] in, is the classification result function, is a symbolic function, is the Lagrange multiplier corresponding to the support vector, For the The class labels of the data points, Calculate the kernel function Support vectors and input The similarity between is the bias term, is the number of support vectors;
[0144] Based on the classification result function, the nutrient status of each data point is classified to distinguish between nutrient sufficiency and nutrient deficiency, the degree of deficiency of each nutrient is evaluated, and the nutrient status classification results are generated.
[0145] Specifically, when configuring the kernel function type and kernel parameters of the support vector machine classifier based on the data feature set, first consult a description record of common kernel function characteristics, which lists in detail the performance of linear kernels, polynomial kernels and radial basis kernels under different data scales and their corresponding bias and soft interval setting ranges. If overfitting is prone to occur in small-scale data, you can consider using a linear kernel and setting the upper limit of the soft interval to a value between 0 and 5. After testing hundreds of groups of corn kernel features, it is determined that the most suitable value is about 2.0. At this time, 2.0 is based on the balance point between the input dimension and the classification error rate. Then check multiple When using a term kernel, pay attention to its order setting. For example, limit the order to between 2 and 4 and compare the error rate of each order. If the error rate decreases significantly with the increase of the order, retain the high-order option, but ensure that the final classification speed is not lower than expected. Whenever the kernel function is changed or the kernel parameters are adjusted, the cross-validation process should be repeated, and the accuracy and recall rates on the validation set should be compared. If the average accuracy under 10-fold cross-validation remains in the range of 85% to 90% and the recall rate remains in the range of 80% to 85%, it is judged to be acceptable. After completing the evaluation, the final kernel function type and the corresponding kernel parameters are registered to obtain the configured SVM model.
[0146] The usefulness of the formula is that the Lagrange multiplier corresponding to the support vector With its class label Combined and through the kernel function To measure input With each support vector The similarity between them can be used to effectively discriminate samples in high-dimensional feature space.
[0147] : represents the weighted accumulation of all support vectors. This term takes the Lagrange multiplier ,Label And the kernel function All are included in the operation. Before obtaining, researchers need to extract the corresponding support vectors from the trained SVM model. and The value of , and at the same time extract test samples from the spectral feature set and with support vector Perform kernel function calculations, then multiply and sum the results in order to obtain an example: If , , , , after kernel function calculation, we get , then the weighted cumulative value is .
[0148] The steps to obtain the Lagrange multiplier value corresponding to each support vector are as follows: when training SVM, the Lagrange dual problem is solved to determine the Lagrange multiplier value corresponding to each support vector. Generally, the objective function is established first and it is solved iteratively in a maximization manner. Each round of iteration updates the current solution until convergence. If the final result is greater than 0, it means Belong to the support vector, the researcher will also record the convergence threshold during training and judge whether the stopping condition is met, for example, the threshold is set to , if before and after iteration If the update amplitude is less than this value, the acquisition will stop. For example, in a training run, 200 corn kernel data are iterated, and finally 15 samples correspond to , and their average value is about 0.45, and the highest can reach 1.2, which meets the actual classification needs.
[0149] The acquisition steps are as follows: each data in the training sample corresponds to a known class label, and two categories are formed through early manual or automatic labeling. One category is defined as nutrient sufficient label 1, and the other category is nutrient deficient label -1. When completing sample collection, researchers conduct physical and chemical tests on corn kernels and obtain the measured nutrient content value, and then determine the category based on a certain content threshold. If the content is higher than the threshold, it is recorded as 1, and if it is lower than the threshold, it is recorded as -1. For example: in the nitrogen concentration range, 2% is used as the benchmark. If it is greater than or equal to 2%, it is marked as 1, and if it is less than 2%, it is marked as -1. Each sample is obtained through the same process. .
[0150] The steps to obtain are as follows: select the kernel function type and input With support vector Substitute the kernel function to calculate the similarity. If a linear kernel is used, then , if the radial basis kernel is used, ,in This can be determined by grid search during the training phase, where researchers will Test the classification accuracy and generalization performance within the candidate values and select the better value. For example: Bring it into the radial basis kernel and for the same spectral eigenvector With support vector Calculate the Euclidean distance to get ,but .
[0151] The steps to obtain the bias are as follows: after solving the dual problem of SVM training, the bias is obtained from the KKT condition. Generally, when the support vector and Will be satisfied later The samples of The calculation results are averaged to reduce noise. For example: When we substitute, we get , another support vector When we substitute, we get , we can average the two to get Used for final prediction.
[0152] The steps to obtain the support vectors are as follows: the number of support vectors is usually counted after the SVM training is completed. of samples, because only are considered as support vectors, and the total number is , can also be changed by adjusting the penalty factor or kernel function parameters in a series of training experiments , Example: In a classification task, there are 100 samples, and after training, about 10 samples meet If the condition .
[0153] Calculation process:
[0154] In a simplified calculation, select support vectors, and given their , , offset , the input spectrum vector is recorded as , the support vectors are and , if the kernel function is sampled and obtained , then the internal summation term:
[0155]
[0156] Add offset , the result is ,Then:
[0157]
[0158] This result shows that in this example the input sample It is classified into the category corresponding to label 1, which is the nutrient-sufficient category.
[0159] When classifying the nutrient status of each data point based on the classification result function, the SVM model obtained above is first applied to all the spectral data points to be measured and calculated one by one. and offset The total value is added, and then the sign function is called to determine its positive or negative value. If the result is positive, it is classified as nutrient sufficient category; if it is negative, it is classified as nutrient deficient category. In order to quantify the degree of deficiency of different nutrients, the negative value intensity that accumulates and exceeds a certain threshold is also recorded to measure the degree of deficiency. This threshold is calculated by adding 0.05 to the average deficiency judgment score measured by the equipment for 200 batches of corn kernels. If it is detected that the negative value intensity of a batch of corn kernels in the same nutrient dimension has reached the threshold, it is considered to be obviously deficient; if it is lower than the threshold, it is considered to be slightly deficient. In order to more comprehensively verify the classification results, these negative value intensities are also compared with the actual nutrient content of on-site testing. If the two maintain the same trend in multiple measurements, the classification accuracy is confirmed. Finally, the classification information of all kernels is summarized, including the nutrient category and deficiency degree corresponding to each kernel, and this summary information is recorded as the nutrient status classification result.
[0160] The steps to obtain nutrient abundance and deficiency assessment results are as follows:
[0161] According to the nutrient status classification results, the nutrient abundance and deficiency metrics are calculated using the following formula:
[0162] in, Indicates the nutrient abundance and deficiency measurement, is the measured nutrient concentration, is the threshold standard for this nutrient, is the maximum response concentration of the nutrient in the standard data, is the minimum response concentration of the nutrient, is the rate of change of the nutrient concentration;
[0163] Based on the nutrient abundance and deficiency measurement, the abundance and deficiency of each nutrient element is analyzed to generate the nutrient abundance and deficiency assessment results.
[0164] Specifically, the formula is useful in that it takes into account the deviation of nutrient concentrations. The maximum and minimum response concentrations in the standard data and The difference is integrated into the numerator and the logarithmic function is combined in the denominator To quantify the concentration change rate The impact can be expressed in a unified indicator It reflects the current abundance or scarcity of nutrients.
[0165] : is the measured nutrient concentration, which is obtained through actual sampling and analysis. Researchers first collect a certain amount of corn kernels in the field and send them to the laboratory or on-site testing instruments for precise measurement, forming multiple concentration data series. Then, all entries are merged and their mean or median value is extracted as the representative concentration. Example: In the nitrogen element test, the concentrations of several samples were measured to be 2.2%, 2.3%, 2.5%, etc., and 2.3% can be selected as the representative concentration. The representative value of q is obtained by further repeating the measurement on each sample with higher precision to improve the accuracy, and finally q = 2.3%.
[0166] :This is the threshold standard for this nutrient. A certain concentration limit needs to be determined to distinguish whether the nutrient is sufficient. This value is generally obtained from agricultural scientific institutions or long-term experimental data. Researchers establish appropriate thresholds based on the average requirements of similar crops under similar growth environments. Example: When testing nitrogen, the threshold standard is selected as 2.0%. This is based on the conclusion obtained from multiple observations of nitrogen concentration and plant health status during a 300-hour field trial. After correlation analysis of all concentration data and the final growth performance of the plants, 2.0% is selected as the threshold. .
[0167] : is the maximum response concentration of the nutrient in the standard data. When establishing standard data, researchers will test the kernels in multiple high-concentration environments to obtain the maximum actual detection value of the nutrient in the corn kernels, and then filter out abnormally high values based on multiple batches of experiments to obtain a high-reliability upper limit concentration. Example: When testing nitrogen, the actual limit concentration of multiple batches is about 3.5%. After considering some random fluctuations, 3.4% is recorded as For practical calculations, this 3.4% is the highest credible concentration obtained by combining samples from different periods and different plots.
[0168] : This is the minimum response concentration of the nutrient in the standard data, which is generally measured by long-term tracking of corn kernels in a large-scale low-input field or poor soil environment. Researchers sample and test conditions far below the normal demand of crops to screen out the most frequently occurring extremely low concentration values. Example: In nitrogen detection, the test results of kernels collected from severely nitrogen-deficient plots were around 1.2%, 1.1%, and 1.0% multiple times, and the final value was set to , representing the most common extremely low value.
[0169] : is the rate of change of the nutrient concentration, which is used to quantify the increase or decrease in concentration at different observation points or different time periods. Researchers calculated a relative rate of change by recording the concentration changes of the same batch of corn kernels in multiple tests. Example: Collect 20 samples and obtain the concentrations of , you can Calculate the difference ratio form such as , and take the average value or a more appropriate comprehensive index after dozens of repeated observations. A value greater than 0.2 indicates a 20% increase compared to the previous value, while a value of -0.1 indicates a 10% decrease compared to the previous value.
[0170] Calculation process:
[0171] The following example values
[0172] set up , concentration change rate , replace all values in the same form (such as decimal expression): .
[0173] Calculate the numerator first :
[0174]
[0175]
[0176]
[0177] Calculate the denominator again :
[0178]
[0179]
[0180]
[0181]
[0182] Substituting this into the formula:
[0183]
[0184] The results show that the nutrient abundance and deficiency If the same set of standards is considered That is, there is a significant difference between abundance and scarcity, and special attention should be paid to the nutrient status of the grains; if A value close to 0.5 or lower indicates that the overall concentration deviation is not large. Researchers can use this to determine whether additional fertilizer or other nutrient supplements are needed in actual planting management.
[0185] When analyzing the abundance and deficiency of each nutrient element based on nutrient abundance and deficiency measurement, first refer to a record of determination of common element concentration ranges, which set up several reference ranges for nitrogen, phosphorus, potassium and trace elements. The ranges are listed in order of 0.5 to 1.0, 1.0 to 2.0, 2.0 to 3.0, etc. The corresponding actual concentrations and growth performance are listed in sequence. When a certain element is detected When the value exceeds 2.0, it will be classified as an urgent concern type and the specific amount of its concentration higher or lower than the benchmark value will be checked. If more than half of the 30 samples meet the urgent concern condition, the entire batch of samples will be subject to additional screening. During this period, the concentration change process of each sample will be checked from the earliest to the latest measurement date, and compared with the on-site environmental information, including soil organic matter content, recent fertilization records, etc. If there is a concentration difference within two consecutive sampling periods, the concentration change process will be checked. If the value is always between 2.0 and 3.0, it is recorded that this batch of samples is very likely to be in an unbalanced state. The same comparison is performed on other elements. For phosphorus, the range of 2.5 to 3.5 can be regarded as a high-risk area. Similarly, the phosphorus concentration recorded previously is matched one by one. The increase and decrease trend of the corresponding value is marked in the test results of each record, and then compared with the pre-established observation dimensions. For example, the range of 0.6 to 1.5 for nitrogen is regarded as a slight deficiency, and the range of 1.0 to 1.8 for phosphorus is regarded as a slight deficiency. If there are obvious deviations for multiple elements at the same time, they will be included in the subsequent analysis objects. Finally, the results of all the comparisons are summarized to form the nutrient abundance and deficiency assessment results.
[0186] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis, characterized in that: The following steps are involved: Irradiate corn seeds with near-infrared and mid-infrared light sources, collect reflected spectral signals, and record spectral signal data; Extracting key wavelength region data based on the spectral signal data to obtain key spectral data; Based on the key spectral data, applying wavelet transform to analyze characteristic peaks in the data, enhancing the identifiability of the spectral peaks, and generating enhanced spectral data; Based on the enhanced spectral data, calibrating spectral peaks associated with nutrients, recording the position and intensity of each peak, and obtaining a spectral peak calibration result; Based on the spectral peak calibration results, comparative analysis is performed with standard nutrient spectra in the database to extract data features and generate a data feature set; Based on the data feature set, a support vector machine is used to classify the nutrient status, distinguish each nutrient deficiency state, and obtain a nutrient status classification result; Based on the nutrient status classification results, a quantitative assessment is performed, threshold standards for different nutrients are set, the abundance and deficiency of each nutrient element is analyzed, and the deficiency status of nutrients below the threshold standard is described to obtain a nutrient abundance and deficiency assessment result; The steps for obtaining the spectrum peak calibration result are: Based on the enhanced spectral data, all spectral peaks are extracted, local extreme points of the spectral curve within different wavelength ranges are analyzed, and the wavelength and spectral intensity are recorded to generate preliminary spectral peak data; According to the preliminary spectral peak data, the nutrient correlation corresponding to the peak is calculated using the following formula: in, The spectral peak and The correlation between nutrients, wavelength The spectral intensity at For the Standard spectral response curves for various nutrients, and The starting and ending wavelengths of the analysis wavelength range; Based on the nutrient correlation corresponding to the peak, the spectral peaks that are highly correlated with the target nutrients are screened, the wavelength position and spectral intensity of the peak are sorted out, and the spectral peak calibration results are generated.
2. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for acquiring the spectral signal data are as follows: Set near-infrared and mid-infrared light sources to irradiate corn kernels, capture spectral signals reflected from the corn kernels, convert the spectral signals into digital format, and obtain complete spectral signal data; The complete spectrum signal data is recorded and stored to obtain spectrum signal data.
3. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for obtaining the key spectral data are: screening wavelength regions sensitive to nutrient evaluation of corn kernels from the spectral signal data, determining key wavelengths affecting nutrient analysis by comparing the absorption intensity and peak shape characteristics of each wavelength, and obtaining preliminary screened wavelength region data; Based on the initially screened wavelength region data, non-critical wavelength points are eliminated to obtain critical wavelength region data; Based on the key wavelength region data, spectral feature extraction is performed, including calculating the peak position, peak width and integrated peak area to obtain key spectral data.
4. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for acquiring the enhanced spectral data are: Based on the key spectral data, the characteristic peaks are analyzed by wavelet transform to obtain the wavelet transform result, which is as follows: in, Represents the frequency The transformed peak intensity at For in time and frequency The wavelet coefficients of the point, For time The spectral intensity, Represents the total number of time points; Based on the wavelet transform results, spectral peaks are identified through peak comparison and intensity analysis to obtain enhanced spectral data.
5. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for obtaining the data feature set are: Based on the spectral peak calibration results, the standard nutrient spectrum data in the database is retrieved, the spectral curve change trends of the two sets of spectra in the same wavelength range are compared, the position, width and intensity changes of the spectral absorption peaks are analyzed, and the standard nutrient spectrum matching results are obtained; According to the standard nutrient spectrum matching results, the main component contribution is calculated using the following formula: in, represents the principal component contribution, Represents the peak value of the spectrum calibration result. The spectral intensity of the wavelength, Represents the spectral intensity of the corresponding wavelength in the standard nutrient spectrum database, Representative The spectral absorption difference corresponding to the wavelength is Representative The contrast matching error of wavelengths, Represents the total number of wavelength points; Based on the principal component contribution, principal component analysis is performed to extract spectral characteristic variables, construct a characteristic vector space, reduce the dimension of the spectral data, remove noise and redundant variables, and generate a data feature set.
6. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for obtaining the nutrient status classification results are: Based on the data feature set, configuring the kernel function type and kernel parameters of the support vector machine classifier to obtain a configured SVM model; According to the configured SVM model, the classification result function is obtained, and the expression is: in, is the classification result function, is a symbolic function, is the Lagrange multiplier corresponding to the support vector, For the The class labels of the data points, Calculate the kernel function Support vectors and input The similarity between is the bias term, is the number of support vectors; Based on the classification result function, the nutrient status of each data point is classified to distinguish between nutrient sufficiency and nutrient deficiency, the deficiency degree of each nutrient is evaluated, and the nutrient status classification result is generated.
7. The method for assessing the nutrient abundance and deficiency status of corn kernels based on spectral analysis according to claim 1, wherein: The steps for obtaining the nutrient abundance and deficiency assessment results are as follows: According to the nutrient status classification results, the nutrient abundance and deficiency metrics are calculated using the following formula: in, Indicates the nutrient abundance and deficiency measurement, is the measured nutrient concentration, is the threshold standard for this nutrient, is the maximum response concentration of the nutrient in the standard data, is the minimum response concentration of the nutrient, is the rate of change of the nutrient concentration; Based on the nutrient abundance and deficiency measurement, the abundance and deficiency of each nutrient element is analyzed to generate a nutrient abundance and deficiency assessment result.
Citation Information
Patent Citations
Rape nitrogen-phosphorus-potassium nutrient diagnosis method based on near-earth hyperspectral data and integrated model
CN111257240A
Grading evaluation system model-oriented high-quality fruit and vegetable nutritional ingredient detection method
CN119619048A