Preprocessing method for near-infrared modeling of key nutritional parameters of whole-plant fresh corn

CN118518625BActive Publication Date: 2024-09-24NORTHEAST AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410985952.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-09-24
Estimated Expiration
2044-07-23

Smart Images

  • Figure CN118518625B
    Figure CN118518625B
Patent Text Reader

Abstract

The present invention relates to the field of spectral modeling pretreatment, and in particular to a pretreatment method for near-infrared modeling of key nutritional parameters of fresh corn whole plants. The method first obtains the near-infrared absorption spectrum of each fresh corn whole plant sample at different particle sizes, and the content of different nutritional parameters of each fresh corn whole plant sample; according to the change of the absorbance of the same fresh corn whole plant sample of different particle sizes at the target wavelength, and the change of the absorbance of different fresh corn whole plant samples of the same particle size at the target wavelength, the particle size influence degree of the target wavelength is obtained; the correlation between the absorbance of each fresh corn whole plant sample at the target wavelength and the content of the nutritional parameter is analyzed to obtain the contribution degree of the target wavelength; the characteristic wavelength is selected in combination with the particle size influence degree and contribution degree of each wavelength. The present invention can accurately select the characteristic wavelength used for near-infrared spectral modeling, and improve the effect of near-infrared spectral modeling pretreatment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of spectral modeling preprocessing, and in particular to a preprocessing method for near-infrared modeling of key nutritional parameters of a whole plant of fresh corn. Background Art

[0002] As one of the raw materials for corn silage, the detection and analysis of the nutritional components of the whole fresh corn plant is crucial for production and quality control. The prediction model established using near-infrared spectroscopy technology can quickly and accurately detect the content of various nutritional parameters of the whole fresh corn plant. However, due to the high dimension of the spectral data of the whole fresh corn plant and the presence of a large amount of redundant information, the predictive ability of the model will be affected. Therefore, preprocessing is required before modeling to improve the predictive ability of the model.

[0003] In the preprocessing method used in the related art, multiple characteristic wavelengths with minimal redundancy are usually selected based on spectral data to reduce the redundancy of spectral data and effectively extract key information. However, when collecting spectral data of fresh corn whole-plant samples, the samples need to be crushed, and there are large differences in the spectral data between samples of different particle sizes after crushing, and the correlation between different wavelengths and the nutritional parameters of the fresh corn whole plant is also quite different. As a result, the existing method cannot accurately select characteristic wavelengths based only on the spectral data itself, thereby reducing the effect of near-infrared spectral modeling preprocessing. Summary of the invention

[0004] In order to solve the technical problem that the existing method cannot accurately select characteristic wavelengths based on spectral data itself, thereby reducing the effect of near-infrared spectral modeling preprocessing, the purpose of the present invention is to provide a preprocessing method for near-infrared modeling of key nutritional parameters of whole fresh corn plants, and the technical scheme adopted is as follows:

[0005] The present invention proposes a pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plants, the method comprising:

[0006] Obtaining near-infrared absorption spectra of a preset first number of fresh corn whole-plant samples at different particle sizes, wherein the near-infrared absorption spectra include absorbances at different wavelengths, and simultaneously obtaining the contents of different nutritional parameters of each fresh corn whole-plant sample;

[0007] Taking any wavelength as the target wavelength, obtaining the particle size influence degree of the target wavelength according to the change of the absorbance of the same fresh corn whole plant samples of different particle sizes at the target wavelength, and the change of the absorbance of different fresh corn whole plant samples of the same particle size at the target wavelength;

[0008] According to the absorbance of each fresh corn whole plant sample of all particle sizes at the target wavelength, the overall absorbance of each fresh corn whole plant sample at the target wavelength is obtained; the correlation between the overall absorbance of different fresh corn whole plant samples at the target wavelength and the content of the same nutritional parameter of different fresh corn whole plant samples is analyzed to obtain the contribution degree of the target wavelength; according to the particle size influence degree and the contribution degree of the target wavelength, the preferred degree of the target wavelength is obtained;

[0009] According to the preferred degree of each wavelength and the absorbance of each fresh corn whole plant sample of different particle sizes at each wavelength, a characteristic wavelength for near-infrared spectroscopy modeling is selected from all wavelengths.

[0010] Further, the particle size influence degree of obtaining the target wavelength includes:

[0011] Taking any fresh corn whole plant sample as a target sample, analyzing the disorder degree of the absorbance of the target samples of all particle sizes at the target wavelength, and obtaining the first data change degree of the target sample with respect to the target wavelength;

[0012] Analyzing the overall level of the first data variation degree of all fresh corn whole-plant samples with respect to the target wavelength to obtain the first particle size influencing factor of the target wavelength;

[0013] Taking any particle size as a target particle size, analyzing the disorder degree of the absorbance of all fresh corn whole-plant samples of the target particle size at the target wavelength, and obtaining a second data variation degree of the target particle size with respect to the target wavelength;

[0014] Analyzing the overall level of the variation degree of the second data of all particle sizes with respect to the target wavelength to obtain a second particle size influence factor of the target wavelength;

[0015] The particle size influence degree of the target wavelength is obtained according to the first particle size influence factor and the second particle size influence factor of the target wavelength.

[0016] Further, obtaining the particle size influence degree of the target wavelength according to the first particle size influence factor and the second particle size influence factor of the target wavelength includes:

[0017] Performing negative correlation mapping on the second particle size impact factor of the target wavelength to obtain a third particle size impact factor of the target wavelength;

[0018] The first particle size influence factor and the third particle size influence factor of the target wavelength are integrated to obtain the particle size influence degree of the target wavelength.

[0019] Further, the contribution degree of obtaining the target wavelength includes:

[0020] The one-dimensional sequence composed of the overall absorbance of all fresh corn whole-plant samples at the target wavelength is used as the first sequence;

[0021] Taking any one nutritional parameter as a target nutritional parameter, and taking a one-dimensional sequence consisting of the contents of the target nutritional parameter of all fresh corn whole-plant samples as a second sequence of the target nutritional parameter;

[0022] Analyzing the correlation between the first sequence and the second sequence of the target nutritional parameter to obtain a correlation coefficient between the target wavelength and the target nutritional parameter;

[0023] According to the distribution of the correlation coefficients between the target wavelength and all nutritional parameters, the contribution degree of the target wavelength is obtained.

[0024] Furthermore, the fresh corn whole-plant samples corresponding to the elements at the same position between the first sequence and the second sequence are the same.

[0025] Further, obtaining the preferred degree of the target wavelength according to the particle size influence degree and the contribution degree of the target wavelength includes:

[0026] Performing negative correlation mapping on the particle size influence degree of the target wavelength to obtain the non-particle size influence degree of the target wavelength;

[0027] The non-granularity influence degree and the contribution degree of the target wavelength are integrated and normalized to obtain the preferred degree of the target wavelength.

[0028] Furthermore, the characteristic wavelength selected from all wavelengths for near-infrared spectrum modeling includes:

[0029] Based on the absorbance of each fresh corn whole plant sample of different particle sizes at the same wavelength, construct a spectral vector for each wavelength;

[0030] Taking the wavelength corresponding to the maximum value of the preferred degree as the initial wavelength;

[0031] Based on a continuous projection algorithm, characteristic wavelengths are iteratively selected according to the spectral vectors of the initial wavelength and other wavelengths except the initial wavelength, and the preference degree of the other wavelengths to obtain a preset second number of characteristic wavelengths for near-infrared spectral modeling.

[0032] Further, obtaining a preset second number of characteristic wavelengths for near-infrared spectrum modeling includes:

[0033] The initial wavelength is used as the basic wavelength, and the basic wavelength is marked;

[0034] If the number of marked wavelengths is less than the preset second number, the projection vector of the spectrum vector of each unmarked wavelength on the spectrum vector of the basic wavelength is calculated based on the projection formula in the continuous projection algorithm; the modulus length of the projection vector of each unmarked wavelength is weighted by the preferred degree of each unmarked wavelength to obtain the selection coefficient of each unmarked wavelength, the unmarked wavelength corresponding to the maximum value of the selection coefficient is used as the new basic wavelength, and the new basic wavelength is marked;

[0035] If the number of marked wavelengths is not less than the preset second number, the iteration process is stopped and all marked wavelengths are used as characteristic wavelengths.

[0036] Furthermore, the preset second number has a value range of 10 to 20.

[0037] Furthermore, the preset first number has a value range of integers between 100 and 200.

[0038] The present invention has the following beneficial effects:

[0039] The present invention takes into account that the existing methods cannot accurately select characteristic wavelengths based only on spectral data itself, thereby reducing the effect of near-infrared spectral modeling preprocessing. Therefore, the present invention first obtains the near-infrared absorption spectrum of each fresh corn whole-plant sample at different particle sizes, and the near-infrared absorption spectrum includes the absorbance of different wavelengths. At the same time, the content of different nutritional parameters of each fresh corn whole-plant sample is obtained. Considering that there are large differences in spectral data between samples of different particle sizes after crushing, without considering the particle size difference, the characteristic wavelengths selected by the existing method do not have minimum redundancy. Therefore, the degree of particle size influence obtained can be used to reflect the degree to which the target wavelength is affected by the particle size in the characteristic wavelength selection process, thereby improving the subsequent The accuracy of the subsequent characteristic wavelength selection is improved, the influence of particle size factors on the characteristic wavelength selection is reduced, and the wavelength that is greatly affected by particle size is avoided to be selected as the characteristic wavelength. Taking into account that the correlation between different wavelengths and the nutritional parameters of the whole plant of fresh corn is quite different, in the process of characteristic wavelength selection, the wavelength that has a greater correlation with the nutritional parameters of the whole plant of fresh corn and can obviously characterize the content of the nutritional parameters should be selected as much as possible. Therefore, the contribution degree obtained can be used to reflect the characterization ability of the target wavelength for the nutritional parameters of the whole plant of fresh corn, thereby improving the accuracy of subsequent characteristic wavelength selection, and then the characteristic wavelength used for near-infrared spectral modeling can be accurately selected through the obtained preference degree, thereby improving the effect of near-infrared spectral modeling preprocessing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flow chart of a preprocessing method for near-infrared modeling of key nutritional parameters of whole fresh corn plants provided by one embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a near-infrared absorption spectrum of a specific fresh corn whole-plant sample at a specific particle size provided by an embodiment of the present invention;

[0043] Figure 3 A flow chart of a method for obtaining the particle size influence degree of a target wavelength provided by one embodiment of the present invention;

[0044] Figure 4 A flow chart of a method for selecting a characteristic wavelength provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the pretreatment method for near-infrared modeling of key nutritional parameters of fresh corn whole plant proposed by the present invention, its specific implementation method, structure, characteristics and effects thereof as follows. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics of one or more embodiments may be combined in any suitable form.

[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0047] The specific scheme of the pretreatment method for near-infrared modeling of key nutritional parameters of whole-plant fresh corn provided by the present invention is described in detail below with reference to the accompanying drawings.

[0048] See also Figure 1 , which shows a flow chart of a preprocessing method for near-infrared modeling of key nutritional parameters of whole fresh corn plants provided by an embodiment of the present invention, the method comprising:

[0049] Step S1: obtaining near-infrared absorption spectra of a preset first number of fresh corn whole-plant samples at different particle sizes, wherein the near-infrared absorption spectra include absorbances at different wavelengths, and simultaneously obtaining the contents of different nutritional parameters of each fresh corn whole-plant sample.

[0050] Fresh corn whole plant is the raw material of corn silage, and its nutritional content detection and analysis are crucial for production and quality control. The prediction model established using near-infrared spectroscopy technology can quickly and accurately detect the content of various nutritional parameters of fresh corn whole plant. However, due to the high dimension of the spectral data of fresh corn whole plant and the presence of a large amount of redundant information, the prediction ability of the model will be affected. Therefore, preprocessing is required before modeling to improve the prediction ability of the model. In the preprocessing methods used in related technologies, multiple characteristic wavelengths with minimal redundancy are usually selected based on spectral data to reduce the redundancy of spectral data and effectively extract However, when collecting spectral data of whole-plant fresh corn samples, the samples need to be crushed to make the particle size of the samples uniform, reduce spectral measurement errors, and improve the accuracy and precision of the model. There are large differences in the spectral data between samples of different particle sizes after crushing, and the correlation between different wavelengths and the nutritional parameters of the whole plant of fresh corn is quite different, resulting in the inability to accurately select characteristic wavelengths based only on the spectral data itself in the existing methods, thereby reducing the effect of near-infrared spectral modeling preprocessing. Therefore, the present invention proposes a pretreatment method for near-infrared modeling of key nutritional parameters of whole-plant fresh corn to solve this problem.

[0051] In an embodiment of the present invention, a pulverizing device such as a cyclone mill or a hammer mill is first used to pulverize each whole plant fresh corn sample, and sieves with different apertures are used to screen each pulverized whole plant fresh corn sample, so as to obtain pulverized samples of different particle sizes corresponding to each whole plant fresh corn sample, wherein the value range of the preset first number of whole plant fresh corn samples is set to an integer of 100 to 200. In one embodiment of the present invention, the preset first number is set to 150. The specific numerical value of the number of whole plant fresh corn samples can also be set by the implementer according to the specific implementation scenario, which is not limited here. In one embodiment of the present invention, five types of sieves with apertures of 1.0 mm, 2.0 mm, 3.0 mm, 4.0 mm and 5.0 mm are selected respectively. At this time, each whole plant fresh corn sample has pulverized samples of five particle size types of 1.0 mm, 2.0 mm, 3.0 mm, 4.0 mm and 5.0 mm. The selection of the sieve aperture type and the number of different aperture types can also be set by the implementer according to the specific implementation scenario, which is not limited here.

[0052] After obtaining the crushed samples of different particle sizes of each fresh corn whole plant sample, a near-infrared spectrometer such as the Aurora handheld near-infrared spectrometer can be used to collect the spectral data of the crushed samples of different particle sizes corresponding to each fresh corn whole plant sample, thereby obtaining the near-infrared absorption spectrum of each fresh corn whole plant sample at different particle sizes. Please refer to Figure 2, which shows a schematic diagram of the near-infrared absorption spectrum of a specific fresh corn whole-plant sample at a specific particle size provided by an embodiment of the present invention. The wavelength range that can be detected by the Aurora handheld near-infrared spectrometer is 900~1700nm. The spectral data in the near-infrared absorption spectrum represents the absorption intensity of the fresh corn whole-plant sample to light of different wavelengths, that is, the horizontal axis of the near-infrared absorption spectrum represents the wavelength, and the vertical axis represents the absorbance. In an embodiment of the present invention, the sampling interval of the near-infrared absorption spectrum is set to 1nm, that is, the spectral data is collected once every 1nm of wavelength. The sampling interval can also be set by the implementer according to the specific implementation scenario, which is not limited here.

[0053] The near-infrared absorption spectrum of each fresh corn whole plant sample at different particle sizes is obtained. The embodiment of the present invention also needs to detect the content of each nutritional parameter in each fresh corn whole plant sample to provide a data basis for subsequent calculations. In one embodiment of the present invention, existing wet chemical detection methods are used to detect each fresh corn whole plant sample to obtain the content of each nutritional parameter in each fresh corn whole plant sample. In one embodiment of the present invention, the nutritional parameters are neutral detergent fiber, acid detergent fiber, starch and crude protein. In other embodiments of the present invention, the type of nutritional parameter can also be adaptively adjusted according to the specific implementation scenario, which is not limited here.

[0054] Step S2: Taking any wavelength as the target wavelength, the particle size influence degree of the target wavelength is obtained according to the change of absorbance of the same fresh corn whole plant samples of different particle sizes at the target wavelength, and the change of absorbance of different fresh corn whole plant samples of the same particle size at the target wavelength.

[0055] Near-infrared spectroscopy has problems such as low spectral signal-to-noise ratio, linear irrelevance between spectral information and measured properties, serious multiple correlations between spectra, and spectrum changes due to external environmental factors. As a result, there is a large amount of redundant information in the near-infrared absorption spectrum, which will affect the predictive ability of the established prediction model. Therefore, it is necessary to select characteristic wavelengths to reduce redundant information and effectively extract key information to improve the predictive ability of the model.

[0056] With respect to existing characteristic wavelength selection algorithms, such as the Successive Projections Algorithm (SPA), in the process of selecting characteristic wavelengths, multiple characteristic wavelengths are selected only based on the spectral data itself, and it is expected that the selected multiple characteristic wavelengths have minimum redundancy and minimum collinearity. However, since each fresh corn whole plant sample has a large difference in light absorption at different particle sizes after crushing, the spectral data of the fresh corn whole plant sample at different particle sizes are very different, which leads to the inability to accurately select the characteristic wavelength based on the spectral data itself. Therefore, it is necessary to consider the influence of different particle size factors on the selection of characteristic wavelengths. Therefore, the embodiment of the present invention first takes any wavelength as the target wavelength, taking into account that in the near-infrared absorption spectra of the same fresh corn whole plant sample at different particle sizes, the greater the change in the absorbance of the target wavelength, the greater the change in the target wavelength at the characteristic wavelength. The greater the degree of influence of particle size factors during the selection process, and the smaller the degree of change in the absorbance of the target wavelength in the near-infrared absorption spectra of different fresh corn whole-plant samples at the same particle size, the stronger the characterization ability of the target wavelength for the nutritional parameters in the fresh corn whole-plant samples, and the greater the degree of influence of the target wavelength by the particle size factors in the characteristic wavelength selection process. Therefore, the change in absorbance of the same fresh corn whole-plant sample of different particle sizes at the target wavelength, as well as the change in absorbance of different fresh corn whole-plant samples of the same particle size at the target wavelength can be analyzed. The degree of influence of particle size obtained can be used to reflect the degree to which the target wavelength is affected by particle size in the characteristic wavelength selection process, thereby reducing the influence of particle size factors on the selection of characteristic wavelengths, avoiding the selection of wavelengths that are more affected by particle size factors as characteristic wavelengths, and thereby improving the effect of subsequent near-infrared spectral modeling preprocessing.

[0057] Preferably, in one embodiment of the present invention, the method for obtaining the particle size influence degree of the target wavelength specifically includes:

[0058] See also Figure 3 , which shows a flow chart of a method for obtaining the particle size influence degree of a target wavelength provided by an embodiment of the present invention.

[0059] Step S201: Take any fresh corn whole plant sample as the target sample, analyze the degree of confusion of the absorbance of the target samples of all particle sizes at the target wavelength, and obtain the first data change degree of the target sample with respect to the target wavelength; analyze the overall level of the first data change degree of all fresh corn whole plant samples with respect to the target wavelength, and obtain the first particle size influencing factor of the target wavelength.

[0060] Through the above analysis, it can be known that in the near-infrared absorption spectra of the same fresh corn whole plant sample at different particle sizes, the greater the degree of change in the absorbance of the target wavelength, the greater the degree of influence of the particle size factor on the target wavelength in the process of selecting the characteristic wavelength. Therefore, any fresh corn whole plant sample can be used as the target sample, and the degree of confusion of the absorbance of target samples of all particle sizes at the target wavelength is analyzed to obtain the first data change degree of the target sample with respect to the target wavelength. The greater the first data change degree, the greater the degree of change in the absorbance of the target wavelength in the infrared absorption spectra of the target samples at different particle sizes. The first data change degree of each fresh corn whole plant sample with respect to the target wavelength is obtained by the same method as above, and then the overall level of the first data change degree of all fresh corn whole plant samples with respect to the target wavelength is analyzed to obtain the first particle size influence factor of the target wavelength. The larger the first particle size influence factor, the greater the degree of influence of the target wavelength on the characteristic wavelength is, which provides a data basis for the subsequent calculation of the particle size influence degree.

[0061] In the embodiment of the present invention, the standard deviation or variance of the absorbance of target samples of all particle sizes at the target wavelength can be used as the first data variation degree of the target sample with respect to the target wavelength to analyze the confusion degree of the absorbance of target samples of all particle sizes at the target wavelength, which is not limited here.

[0062] In an embodiment of the present invention, the average value or median of the first data change degree of all fresh corn whole plant samples with respect to the target wavelength can be used as the first particle size influencing factor of the target wavelength to achieve an overall level analysis of the first data change degree of all fresh corn whole plant samples with respect to the target wavelength, which is not limited here.

[0063] Step S202: Take any particle size as the target particle size, analyze the degree of confusion of the absorbance of all fresh corn whole-plant samples of the target particle size at the target wavelength, and obtain the degree of change of the second data of the target particle size with respect to the target wavelength; analyze the overall level of the degree of change of the second data of all particle sizes with respect to the target wavelength, and obtain the second particle size influencing factor of the target wavelength.

[0064] Through the above analysis, it can be known that in the near-infrared absorption spectra of different fresh corn whole plant samples at the same particle size, the smaller the change degree of the absorbance of the target wavelength is, the stronger the characterization ability of the target wavelength for the nutritional parameters in the fresh corn whole plant samples is, and the target wavelength is more affected by the particle size factor in the process of characteristic wavelength selection. Therefore, any particle size can be used as the target particle size, and the confusion degree of the absorbance of all fresh corn whole plant samples of the target particle size at the target wavelength is analyzed to obtain the second data change degree of the target particle size with respect to the target wavelength. The smaller the second data change degree is, the smaller the change degree of the absorbance of the target wavelength is in the infrared absorption spectra of different fresh corn whole plant samples at the target particle size. The second data change degree of each particle size with respect to the target wavelength is obtained by the same method as above, and then the overall level of the second data change degree of all particle sizes with respect to the target wavelength is analyzed to obtain the second particle size influence factor of the target wavelength. The smaller the second particle size influence factor is, the greater the degree of influence of the target wavelength is on the particle size factor in the process of characteristic wavelength selection, which provides a data basis for the subsequent calculation of the particle size influence degree.

[0065] In an embodiment of the present invention, the standard deviation or variance of the absorbance of all fresh corn whole plant samples of the target particle size at the target wavelength can be used as the second data variation degree of the target particle size with respect to the target wavelength to analyze the degree of confusion of the absorbance of all fresh corn whole plant samples of the target particle size at the target wavelength, which is not limited here.

[0066] In the embodiment of the present invention, the average value or median of the second data change degree of all particle sizes with respect to the target wavelength can be used as the second particle size influencing factor of the target wavelength to achieve the overall level analysis of the second data change degree of all particle sizes with respect to the target wavelength, which is not limited here.

[0067] Step S203: Obtaining the particle size influence degree of the target wavelength according to the first particle size influence factor and the second particle size influence factor of the target wavelength.

[0068] Since the larger the first particle size influence factor is and the smaller the second particle size influence factor is, the greater the degree to which the target wavelength is affected by the particle size factor is, therefore, the particle size influence degree of the target wavelength is obtained based on the first particle size influence factor and the second particle size influence factor of the target wavelength. The greater the particle size influence degree is, the greater the degree to which the target wavelength is affected by the particle size factor during the characteristic wavelength selection process.

[0069] Preferably, in one embodiment of the present invention, the method for obtaining the particle size influence degree of the target wavelength further comprises:

[0070] Since the smaller the second particle size influence factor is, the greater the degree to which the target wavelength is affected by the particle size factor, the second particle size influence factor of the target wavelength can be negatively correlated to obtain the third particle size influence factor of the target wavelength. The larger the third particle size influence factor is, the greater the degree to which the target wavelength is affected by the particle size factor.

[0071] In the embodiment of the present invention, an inverse proportional function or a natural exponential function can be used. Negative correlation mapping is achieved by using a negative correlation function such as a negative exponential function with a base , which is not limited here, and the same method can also be used to achieve negative correlation mapping in subsequent steps of the embodiment of the present invention.

[0072] The first particle size influence factor and the third particle size influence factor of the target wavelength are integrated to obtain the particle size influence degree of the target wavelength.

[0073] In the embodiment of the present invention, the first particle size influence factor and the third particle size influence factor of the target wavelength may be multiplied or added to obtain the particle size influence degree of the target wavelength, thereby achieving a combination of the two, which is not limited here.

[0074] The expression of the particle size influence degree of the target wavelength can be specifically expressed as:

[0075]

[0076]

[0077]

[0078] in, Indicates the degree of particle size influence on the target wavelength; The first particle size impact factor representing the target wavelength; A second particle size impact factor representing a target wavelength; Indicates The particle size The absorbance of a whole-plant fresh corn sample at the target wavelength; Indicates The degree of change of the first data of the whole-plant fresh corn samples about the target wavelength; Indicates a second data variation degree of the particle size with respect to the target wavelength; Indicates the number of types of all particle sizes; Represents the number of all fresh corn whole-plant samples; Represents the function of taking standard deviation; Indicates a collection symbol; The third particle size factor of the target wavelength is represented. In actual situations, since the contents of various substances in different fresh corn whole plant samples are not exactly the same, different fresh corn whole plant samples have different absorption capacities for light of the target wavelength at the same particle size. Therefore, the absorbance of all fresh corn whole plant samples at the same particle size at the target wavelength is not exactly the same. .

[0079] At this point, the degree of particle size influence of the target wavelength is obtained.

[0080] Step S3: according to the absorbance of each fresh corn whole plant sample of all particle sizes at the target wavelength, the overall absorbance of each fresh corn whole plant sample at the target wavelength is obtained; the correlation between the overall absorbance of different fresh corn whole plant samples at the target wavelength and the content of the same nutritional parameters of different fresh corn whole plant samples is analyzed to obtain the contribution degree of the target wavelength; according to the influence degree and contribution degree of the particle size of the target wavelength, the preferred degree of the target wavelength is obtained.

[0081] Taking into account the large differences in the correlations between different wavelengths and the nutritional parameters of the whole plant samples of fresh corn, in the process of selecting characteristic wavelengths, wavelengths that have a large correlation with the nutritional parameters of the whole plant of fresh corn and can clearly characterize the content of the nutritional parameters should be selected as much as possible, so that the selected multiple characteristic wavelengths can accurately reflect the content of different nutritional parameters and improve the effect of near-infrared spectroscopy modeling preprocessing.

[0082] Since each whole-plant fresh corn sample has multiple near-infrared absorption spectra at different particle sizes, the embodiment of the present invention first obtains the overall absorbance of each whole-plant fresh corn sample at the target wavelength based on the absorbance of each whole-plant fresh corn sample of all particle sizes at the target wavelength. The overall absorbance reflects the overall level of the absorbance of the target wavelength in the near-infrared absorption spectrum of each whole-plant fresh corn sample at each particle size, which facilitates the subsequent analysis of the correlation between the target wavelength and the nutritional parameters of the whole-plant fresh corn sample.

[0083] Preferably, in one embodiment of the present invention, the method for obtaining the overall absorbance of each fresh corn whole plant sample at the target wavelength specifically includes:

[0084] Any fresh corn whole plant sample is used as a test sample, and the overall level of absorbance of the test samples of all particle sizes at the target wavelength is analyzed to obtain the overall absorbance of the test samples at the target wavelength.

[0085] In an embodiment of the present invention, the average or median of the absorbance of the samples to be tested of all particle sizes at the target wavelength can be used as the overall absorbance of the samples to be tested at the target wavelength, thereby realizing the analysis of the overall level of absorbance of the samples to be tested of all particle sizes at the target wavelength, which is not limited here.

[0086] The same method as above can be used to obtain the overall absorbance of each fresh corn whole plant sample at the target wavelength, and then the correlation between the overall absorbance of different fresh corn whole plant samples at the target wavelength and the content of the same nutritional parameters of different fresh corn whole plant samples can be analyzed. The contribution degree obtained reflects the characterization ability of the target wavelength for the nutritional parameters of the fresh corn whole plant, thereby improving the accuracy of subsequent characteristic wavelength selection.

[0087] Preferably, in one embodiment of the present invention, the method for obtaining the contribution degree of the target wavelength specifically includes:

[0088] First, the one-dimensional sequence composed of the overall absorbance of all fresh corn whole plant samples at the target wavelength is taken as the first sequence; any nutritional parameter is taken as the target nutritional parameter, and the one-dimensional sequence composed of the content of the target nutritional parameter of all fresh corn whole plant samples is taken as the second sequence of the target nutritional parameter.

[0089] It should be noted that in order to ensure the correct analysis of the subsequent correlation between the first sequence and the second sequence, it is necessary to ensure that the fresh corn whole plant samples corresponding to the elements at the same position between the first sequence and the second sequence are the same.

[0090] Then, the correlation between the first sequence and the second sequence of the target nutritional parameter is analyzed to obtain the correlation coefficient between the target wavelength and the target nutritional parameter. The larger the correlation coefficient, the greater the correlation between the target wavelength and the target nutritional parameter.

[0091] In one embodiment of the present invention, the Pearson correlation coefficient between the first sequence and the second sequence of the target nutritional parameters can be used as the correlation coefficient between the target wavelength and the target nutritional parameters. In other embodiments of the present invention, the correlation between the two can also be analyzed based on the Spearman correlation coefficient or the Kendall correlation coefficient, etc., which is not limited here.

[0092] The correlation coefficient between the target wavelength and each nutritional parameter can be obtained by the same method as above.

[0093] Finally, the larger the correlation coefficient between the target wavelength and each nutritional parameter, the stronger the characterization ability of the target wavelength for the nutritional parameters. The greater the contribution of the target wavelength to the detection of the nutritional parameters of the whole-plant sample of fresh corn, which further indicates that the possibility of selecting the target wavelength as the characteristic wavelength is greater. Therefore, the contribution degree of the target wavelength can be obtained according to the distribution of the correlation coefficients between the target wavelength and all nutritional parameters.

[0094] In the embodiment of the present invention, the maximum value or average value of the correlation coefficient between the target wavelength and all nutritional parameters may be used as the contribution degree of the target wavelength, which is not limited here.

[0095] The expression of the contribution degree of the target wavelength can be specifically, for example, as follows:

[0096]

[0097] in, Indicates the contribution of the target wavelength; represents the first sequence; Indicates A second sequence of nutritional parameters; Indicates the quantity of all nutritional parameters; Indicates the target wavelength and Correlation coefficients between various nutritional parameters; Represents the maximum value function.

[0098] Through the above process, the particle size influence and contribution of the target wavelength are obtained. The smaller the particle size influence of the target wavelength and the greater the contribution, the greater the possibility that the target wavelength will be selected as the characteristic wavelength in the subsequent feature selection process. Therefore, the preferred degree of the target wavelength can be obtained according to the particle size influence and contribution of the target wavelength. The greater the preferred degree, the greater the possibility that the target wavelength will be selected as the characteristic wavelength in the subsequent process.

[0099] Preferably, in one embodiment of the present invention, the method for obtaining the preferred degree of the target wavelength specifically includes:

[0100] From the above analysis, it can be seen that the smaller the particle size influence of the target wavelength, the greater the possibility of it being selected as the characteristic wavelength. Therefore, the particle size influence of the target wavelength can be negatively correlated to obtain the non-particle size influence of the target wavelength. The greater the non-particle size influence, the less the target wavelength is affected by the particle size factor during the characteristic wavelength selection process, and thus the greater the possibility of the target wavelength being selected as the characteristic wavelength.

[0101] Then, the non-granularity influence and contribution of the target wavelength are integrated and normalized to obtain the preferred degree of the target wavelength.

[0102] In the embodiment of the present invention, the non-granularity influence degree and contribution degree of the target wavelength may be added or multiplied to achieve a combination of the two, which is not limited here.

[0103] In one embodiment of the present invention, the normalization processing can be specifically, for example, maximum and minimum value normalization processing, and the normalization in subsequent steps can all adopt maximum and minimum value normalization processing. In other embodiments of the present invention, other normalization methods can be selected according to the specific range of numerical values, which will not be described in detail.

[0104] The expression of the preferred degree of the target wavelength can be specifically, for example, as follows:

[0105]

[0106] in, Indicates the preference of the target wavelength; Indicates the degree of particle size influence on the target wavelength; Indicates the contribution of the target wavelength; Indicates the degree of non-particle size influence of the target wavelength; The natural index An exponential function with base ; Represents the normalization function.

[0107] At this point, the preference degree of the target wavelength has been obtained, and the preference degree of each wavelength can be obtained by the same method as above. Subsequently, the preference degree can be combined to accurately select the characteristic wavelength for near-infrared spectral modeling from all wavelengths.

[0108] Step S4: Select characteristic wavelengths for near-infrared spectral modeling from all wavelengths according to the preference of each wavelength and the absorbance of each fresh corn whole-plant sample of different particle sizes at each wavelength.

[0109] For the existing characteristic wavelength selection algorithms, such as the continuous projection algorithm, a spectral vector of each wavelength is constructed based on spectral data, and wavelengths corresponding to spectral vectors that are as orthogonal as possible to each other are iteratively selected as characteristic wavelengths, so that each characteristic wavelength has the characteristics of minimum collinearity and minimum redundancy. However, since the spectral data of the fresh corn whole plant sample is affected by the particle size factor after crushing, and at the same time, there are large differences in the correlation between different wavelengths and the nutritional parameters of the fresh corn whole plant sample, the existing characteristic wavelength selection algorithm cannot accurately select the characteristic wavelength. The above-mentioned obtained preference degree takes into account both of these influencing factors. Therefore, in the process of selecting characteristic wavelengths using the existing algorithm, the preference degree of each wavelength can be introduced to eliminate the interference of these two influencing factors on the characteristic wavelength selection. Therefore, according to the preference degree of each wavelength and in combination with the collected spectral data, that is, the absorbance of each fresh corn whole plant sample of different particle sizes at each wavelength, the characteristic wavelength used for near-infrared spectral modeling can be accurately selected from all wavelengths, thereby improving the effect of near-infrared spectral modeling preprocessing.

[0110] Preferably, in one embodiment of the present invention, the method for selecting the characteristic wavelength specifically includes:

[0111] See also Figure 4 , which shows a flow chart of a method for selecting a characteristic wavelength provided by an embodiment of the present invention.

[0112] Step S401: constructing a spectral vector at each wavelength based on the absorbance of each fresh corn whole-plant sample of different particle sizes at the same wavelength.

[0113] In the subsequent steps of the embodiment of the present invention, the characteristic wavelength is selected from each wavelength based on the idea of ​​the existing continuous projection algorithm. Therefore, it is necessary to first construct the spectral vector of each wavelength based on the absorbance of each fresh corn whole plant sample of different particle sizes at the same wavelength. In one embodiment of the present invention, the specific form of the spectral vector of each wavelength is: ,in, Indicates The spectral vector of wavelengths; Indicates The particle size Fresh corn whole plant samples were The absorbance at each wavelength; Indicates the number of types of all particle sizes; Represents the number of all fresh corn whole-plant samples; Represents the transpose symbol.

[0114] Step S402: taking the wavelength corresponding to the maximum preference level as the initial wavelength.

[0115] For the existing continuous projection algorithm, during the initialization process, a wavelength is randomly selected from all wavelengths as the initial wavelength, which is also the first characteristic wavelength in the subsequent iterative selection process. However, this random selection method without considering any factors will reduce the accuracy of subsequent characteristic wavelength selection. From the above analysis, it can be seen that the greater the preference degree of each wavelength, the greater the possibility that the wavelength is a characteristic wavelength. Therefore, in the initialization stage, the wavelength corresponding to the maximum preference degree can be used as the initial wavelength to improve the accuracy of the characteristic wavelength selected in subsequent iterations.

[0116] Step S403: Based on the continuous projection algorithm, the characteristic wavelengths are iteratively selected according to the spectral vectors of the initial wavelength and other wavelengths except the initial wavelength, and the preference degree of other wavelengths to obtain a preset second number of characteristic wavelengths for near-infrared spectrum modeling.

[0117] After the initial wavelength is selected, the characteristic wavelength can be iteratively selected based on the continuous projection algorithm according to the spectral vectors of the initial wavelength and other wavelengths except the initial wavelength, while introducing the degree of preference of other wavelengths, so as to obtain a preset second number of characteristic wavelengths for near-infrared spectral modeling. The accuracy of the selected characteristic wavelength is improved by introducing the degree of preference, wherein the value range of the preset second number is generally an integer of 10 to 20. In one embodiment of the present invention, the preset second number is set to 20. The specific value of the preset second number can also be set by the implementer according to the specific implementation scenario, which is not limited here.

[0118] Preferably, in one embodiment of the present invention, the method for selecting the characteristic wavelength further comprises:

[0119] First, the initial wavelength is taken as the basic wavelength, and the basic wavelength is marked.

[0120] Then it enters the iterative selection stage. If the number of marked wavelengths is less than the preset second number, the projection vector of the spectral vector of each unmarked wavelength on the spectral vector of the basic wavelength is calculated based on the projection formula in the continuous projection algorithm. The projection formula in the continuous projection algorithm is an existing formula and will not be repeated here. The modulus length of the projection vector of each unmarked wavelength is weighted by the degree of preference to obtain the selection coefficient of each unmarked wavelength. The unmarked wavelength corresponding to the maximum value of the selection coefficient is used as the new basic wavelength, and the new basic wavelength is marked.

[0121] For the existing continuous projection algorithm, the unmarked wavelength corresponding to the maximum value of the projection vector modulus is directly used as the new basic wavelength and marked. That is to say, in each iteration process of the existing continuous projection algorithm, the unmarked wavelength corresponding to the maximum value of the projection vector modulus is used as a characteristic wavelength selected for each iteration. This selection method is based only on the spectral data itself, which will result in the characteristic wavelengths finally selected not having minimum collinearity and minimum redundancy. Therefore, the embodiment of the present invention introduces a degree of preference and utilizes the degree of preference of each unmarked wavelength to weight the modulus of the projection vector of each unmarked wavelength to obtain a selection coefficient for each unmarked wavelength, and uses the unmarked wavelength corresponding to the maximum value of the selection coefficient as a new basic wavelength, and marks the new basic wavelength.

[0122] The expression of the selection coefficient of each unmarked wavelength can be specifically, for example, as follows:

[0123]

[0124] in, Indicates The selection coefficient of the unmarked wavelengths; Indicates The preference of an unlabeled wavelength; Indicates The projection vector of the spectrum vector of the unlabeled wavelength to the spectrum vector of the basic wavelength; Represents the modulo symbol.

[0125] If the number of marked wavelengths is not less than the preset second number, the iterative process is stopped. In the whole process, the marked wavelengths are the characteristic wavelengths required by the embodiment of the present invention, so all marked wavelengths can be used as characteristic wavelengths.

[0126] After accurately selecting the characteristic wavelength, a near-infrared spectroscopy model with stronger predictive capabilities can be established based on the characteristic wavelength in the subsequent process.

[0127] In summary, the embodiment of the present invention first obtains the near-infrared absorption spectrum of each fresh corn whole plant sample at different particle sizes, the near-infrared absorption spectrum includes absorbances at different wavelengths, and simultaneously obtains the contents of different nutritional parameters of each fresh corn whole plant sample; taking any wavelength as the target wavelength, obtaining the particle size influence of the target wavelength according to the change in absorbance of the same fresh corn whole plant sample of different particle sizes at the target wavelength, and the change in absorbance of different fresh corn whole plant samples of the same particle size at the target wavelength; obtaining the overall absorbance of each fresh corn whole plant sample at the target wavelength according to the absorbance of each fresh corn whole plant sample of all particle sizes at the target wavelength; analyzing the correlation between the overall absorbance of different fresh corn whole plant samples at the target wavelength and the contents of the same nutritional parameters of different fresh corn whole plant samples, obtaining the contribution of the target wavelength; obtaining the preferred degree of the target wavelength according to the particle size influence and contribution of the target wavelength; selecting the characteristic wavelength for near-infrared spectral modeling from all wavelengths according to the preferred degree of each wavelength and the absorbance of each fresh corn whole plant sample of different particle sizes at each wavelength.

[0128] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0129] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plants, characterized in that: The method comprises: Obtaining near-infrared absorption spectra of a preset first number of fresh corn whole-plant samples at different particle sizes, wherein the near-infrared absorption spectra include absorbances at different wavelengths, and simultaneously obtaining the contents of different nutritional parameters of each fresh corn whole-plant sample; Taking any wavelength as the target wavelength, obtaining the particle size influence degree of the target wavelength according to the change of the absorbance of the same fresh corn whole plant samples of different particle sizes at the target wavelength, and the change of the absorbance of different fresh corn whole plant samples of the same particle size at the target wavelength; According to the absorbance of each fresh corn whole plant sample of all particle sizes at the target wavelength, the overall absorbance of each fresh corn whole plant sample at the target wavelength is obtained; the correlation between the overall absorbance of different fresh corn whole plant samples at the target wavelength and the content of the same nutritional parameter of different fresh corn whole plant samples is analyzed to obtain the contribution degree of the target wavelength; according to the particle size influence degree and the contribution degree of the target wavelength, the preferred degree of the target wavelength is obtained; According to the preferred degree of each wavelength and the absorbance of each fresh corn whole plant sample of different particle sizes at each wavelength, a characteristic wavelength for near-infrared spectroscopy modeling is selected from all wavelengths.

2. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 1, characterized in that: The particle size influence degree of obtaining the target wavelength includes: Taking any fresh corn whole plant sample as a target sample, analyzing the disorder degree of the absorbance of the target samples of all particle sizes at the target wavelength, and obtaining the first data change degree of the target sample with respect to the target wavelength; Analyzing the overall level of the first data variation degree of all fresh corn whole-plant samples with respect to the target wavelength to obtain the first particle size influencing factor of the target wavelength; Taking any particle size as a target particle size, analyzing the disorder degree of the absorbance of all fresh corn whole-plant samples of the target particle size at the target wavelength, and obtaining a second data variation degree of the target particle size with respect to the target wavelength; Analyzing the overall level of the variation degree of the second data of all particle sizes with respect to the target wavelength to obtain a second particle size influence factor of the target wavelength; The particle size influence degree of the target wavelength is obtained according to the first particle size influence factor and the second particle size influence factor of the target wavelength.

3. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 2, characterized in that: The step of obtaining the particle size influence degree of the target wavelength according to the first particle size influence factor and the second particle size influence factor of the target wavelength comprises: Performing negative correlation mapping on the second particle size impact factor of the target wavelength to obtain a third particle size impact factor of the target wavelength; The first particle size influence factor and the third particle size influence factor of the target wavelength are integrated to obtain the particle size influence degree of the target wavelength.

4. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 1, characterized in that: The contribution degree of obtaining the target wavelength includes: The one-dimensional sequence composed of the overall absorbance of all fresh corn whole-plant samples at the target wavelength is used as the first sequence; Taking any one nutritional parameter as a target nutritional parameter, and taking a one-dimensional sequence consisting of the contents of the target nutritional parameter of all fresh corn whole-plant samples as a second sequence of the target nutritional parameter; Analyzing the correlation between the first sequence and the second sequence of the target nutritional parameter to obtain a correlation coefficient between the target wavelength and the target nutritional parameter; According to the distribution of the correlation coefficients between the target wavelength and all nutritional parameters, the contribution degree of the target wavelength is obtained.

5. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 4, characterized in that: The fresh corn whole-plant samples corresponding to the elements at the same position between the first sequence and the second sequence are the same.

6. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 1, characterized in that: The step of obtaining the preferred degree of the target wavelength according to the particle size influence degree and the contribution degree of the target wavelength comprises: Performing negative correlation mapping on the particle size influence degree of the target wavelength to obtain the non-particle size influence degree of the target wavelength; The non-granularity influence degree and the contribution degree of the target wavelength are integrated and normalized to obtain the preferred degree of the target wavelength.

7. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 1, characterized in that: The characteristic wavelengths selected from all wavelengths for near-infrared spectrum modeling include: Based on the absorbance of each fresh corn whole plant sample of different particle sizes at the same wavelength, construct a spectral vector for each wavelength; Taking the wavelength corresponding to the maximum value of the preferred degree as the initial wavelength; Based on a continuous projection algorithm, characteristic wavelengths are iteratively selected according to the spectral vectors of the initial wavelength and other wavelengths except the initial wavelength, and the preference degree of the other wavelengths to obtain a preset second number of characteristic wavelengths for near-infrared spectral modeling.

8. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 7, characterized in that: The obtaining of a preset second number of characteristic wavelengths for near-infrared spectrum modeling comprises: The initial wavelength is used as the basic wavelength, and the basic wavelength is marked; If the number of marked wavelengths is less than the preset second number, the projection vector of the spectrum vector of each unmarked wavelength on the spectrum vector of the basic wavelength is calculated based on the projection formula in the continuous projection algorithm; the modulus length of the projection vector of each unmarked wavelength is weighted by the preferred degree of each unmarked wavelength to obtain the selection coefficient of each unmarked wavelength, the unmarked wavelength corresponding to the maximum value of the selection coefficient is used as the new basic wavelength, and the new basic wavelength is marked; If the number of marked wavelengths is not less than the preset second number, the iteration process is stopped and all marked wavelengths are used as characteristic wavelengths.

9. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plants according to claim 7, characterized in that: The preset second number has a value range of 10 to 20.

10. The pretreatment method for near infrared modeling of key nutritional parameters of whole fresh corn plant according to claim 1, characterized in that: The preset first number has a value range of 100 to 200 integers.