A method for estimating carbon-nitrogen ratio of tea leaves based on canopy hyperspectral
The hyperspectral characteristics of Camellia oleifera leaves are trained through the BP neural network model, which solves the problems of low efficiency and high cost of traditional measurement methods, achieves rapid and non-destructive estimation of the carbon and nitrogen ratio of Camellia oleifera leaves, and is suitable for large-scale promotion.
Patent Information
- Application Number
- CN202211440139.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-11-17
AI Technical Summary
The traditional method used to determine the carbon-nitrogen ratio of camellia oleifera leaves has the problems of artificial destructiveness, low efficiency and high cost. It is difficult to achieve large-scale promotion, and the complexity of interpretation of hyperspectral data leads to non-linear problems and the 'curse of dimensionality'.
A multi-layer feedforward neural network (BP neural network) based on error backpropagation was used to construct an estimation model for the carbon-nitrogen ratio of Camellia oleifera leaves and hyperspectral in the visible and near-infrared spectral regions. Through preprocessing and feature transformation, the optimal variable combination was selected. Train the BP neural network model to achieve lossless estimation of carbon-nitrogen ratio.
This method achieves rapid and non-destructive estimation of the carbon-nitrogen ratio of Camellia oleifera leaves, reduces labor and time costs, improves estimation accuracy and model robustness, and is suitable for large-scale promotion and application.
Smart Images

Figure CN115791705B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of carbon-nitrogen ratio estimation of tea leaves, and in particular to a method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral. Background Art
[0002] Camellia oleifera is an excellent tree species that combines ecological, economic and social benefits. In recent years, the scale of camellia oleifera cultivation and overall output have been rising year by year, which has important practical significance for ensuring China's grain and oil security. However, camellia oleifera has the biological characteristics of flowering and fruiting at the same time. The tree has a large demand for nutrient elements and a complex regulatory mechanism. External environmental factors can cause the annual yield to alternate between profit and loss, and in severe cases, low-yield forests can be formed. Therefore, it is of great value to establish a camellia oleifera nutrient monitoring system.
[0003] The carbon-nitrogen ratio of tea leaves is an indicative physical and chemical parameter closely related to tree growth and development and fruit yield. It can reveal the law of mutual restraint and balance of carbon and nitrogen elements inside the tree and can serve as an important diagnostic indicator to guide actual production.
[0004] Traditional methods usually use sampling and chemical reagents to determine the element content to qualitatively judge the growth situation in a local area. This method has time and space limitations and causes damage to the tree, making it difficult to support the development needs of precision operations. From the perspective of vegetation spectra, the absorption and scattering of light by the contents of tea leaves (such as photosynthetic pigments, water content, and various dry matter components) form a unique reflectance spectrum. The distribution of its wavelength and reflectance contains information about the spatial distribution of the target's scale and shape and the basic characteristics of its interaction with electromagnetic waves. High-resolution spectra (referred to as "hyperspectral") have more delicate apparent characteristics. Therefore, the use of hyperspectral to monitor chemical stoichiometric ratios in organisms has been generally recognized by researchers.
[0005] The observation method of hyperspectral data determines that it is non-destructive, fast and accurate, which greatly facilitates the monitoring of the carbon-nitrogen ratio of tea leaves and brings new technical development opportunities for the dynamic monitoring of nutrients in the economic forest field. However, in practical applications, the interpretation of hyperspectral feature information is still full of challenges.
[0006] The complexity of the ingredients in tea oil leaves and the redundancy of the internal information of hyperspectral data are the key factors that lead to nonlinear problems and the "curse of dimensionality" in hyperspectral interpretation. Therefore, the appropriate combination of spectral feature transformation and optimal variable subset screening methods can help to mine potential response information and improve the robustness and generalization ability of the estimation model (YUN YH, BIN J, LIU DL, et al. A hybrid variable selection strategy based on continuous shrinkage of variable space in multivariate calibration [J]. Analytica Chimica Acta, 2019, 1058: 58-69.).
[0007] Therefore, it is necessary to propose a non-destructive and rapid estimation method for the carbon-nitrogen ratio of tea leaves, so as to better apply hyperspectral technology to the monitoring of the carbon-nitrogen ratio of tea leaves. Summary of the invention
[0008] In order to overcome the problems of low efficiency, high cost and inability to be promoted on a large scale in the whole process due to the limitation of personnel operation level and equipment hardware when estimating the carbon-nitrogen ratio of tea leaves through manual destructive sampling and indoor chemical analysis, a method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral was proposed. The method is low-cost, easy to implement and suitable for large-scale promotion and application.
[0009] In order to achieve the above object, the present invention provides the following technical solutions:
[0010] A method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectrum. The method uses a multi-layer feedforward neural network based on error back propagation, namely, a BP neural network, to construct an estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectrum in the visible and near-infrared spectral regions. The carbon-nitrogen ratio data of the tea leaves to be tested are obtained by inputting the measured canopy hyperspectrum of the tea to be tested into the estimation model.
[0011] Preferably, an estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectral spectrum in the visible and near-infrared spectral regions is constructed, and the specific method is as follows:
[0012] S1. Obtain the canopy reflectance of at least 30 tea oil plants as the canopy hyperspectral sample data of tea oil plants. At the same time, pick the canopy leaves of each tea oil plant and measure the real carbon-nitrogen ratio data under laboratory conditions as the model optimization index.
[0013] S2. Preprocessing and feature transformation of the sample data to obtain a spectral feature screening set;
[0014] S3. Obtaining an optimal variable combination subset from the spectral feature screening set using a feature extraction and screening method;
[0015] S4. cyclically train the BP neural network model on the optimal variable combination subset using grid search and cross-validation method to obtain a set of optimal hyperparameter combinations;
[0016] S5. Use the optimal hyperparameter combination to introduce the BP neural network model, and compare the estimated value obtained by the BP neural network model with the actual carbon-nitrogen ratio data in S1. If the evaluation index of the BP neural network model meets the requirements, the construction of the estimation model is completed. Otherwise, further optimize the parameters until the evaluation index of the BP neural network model meets the requirements.
[0017] Preferably, in step S1, the canopy reflectance of the tea oil plant is obtained by measuring the canopy reflectance spectrum of a single tea oil plant ten times within a period when the solar altitude angle is greater than 45°, averaging the abnormal reflection spectra after eliminating them, and using the average reflection spectrum as the canopy reflectance of the single tea oil plant.
[0018] Preferably, in step S1, the picking of tea oil canopy leaves is specifically as follows: the tea oil canopy is divided into three equal parts along the vertical direction, which are respectively recorded as upper layer, middle layer and lower layer from top to bottom, and then 2 leaves are picked from each of the four directions of southeast, northwest, and upper layer of the middle layer of the canopy of each tea oil plant, for a total of 16 leaves.
[0019] Preferably, all the picked leaves are first withered at 105° C. for 30 minutes, then dried at 60° C. to constant weight, then ground and sieved, sampled and the required real carbon-nitrogen ratio data is obtained by a carbon, hydrogen and oxygen element analyzer.
[0020] Preferably, in step S2, the preprocessing includes resampling, smoothing filtering and mean normalization processing, and the specific operations are:
[0021] S21. Resampling: In the 400-1000nm range of the Camellia oleifera canopy hyperspectral spectrum, 121 reflectance values were extracted at a 5nm resampling interval;
[0022] S22. Smoothing filter: Use a 2nd order 9 window point Savitzky-Golay filter to perform a smoothing process on the extracted 121 reflectivity value sets;
[0023] S23. Mean normalization: In the hyperspectral data after smoothing, each extracted reflectance value of a single tea oil tree is divided by the average reflectance values of all sampled tea oil trees at the wavelength corresponding to the reflectance value, so as to describe the individual tea oil tree samples with relative values.
[0024] Preferably, in step S2, the feature transformation is specifically: first use the first-order derivative FD transformation on the pre-processed hyperspectral sample data, and then use the two-band normalized index NDI to amplify the hyperspectral signal of the oil-tea canopy. Preferably, in step S3, the feature extraction and screening method is specifically:
[0025] S31. Perform Pearson correlation analysis on the spectral feature screening set of S2 to screen out sensitive bands with p-values < 0.01;
[0026] S32. Use variable combination cluster analysis to remove collinearity and obtain candidate variable combination subsets.
[0027] Preferably, in step S4, the BP neural network model is cyclically trained on the optimal variable combination subset, and the specific method is: using the holdout method to randomly divide the optimal variable combination subset and its corresponding true carbon-nitrogen ratio data into a training set and a test set in a ratio of 7:3, setting a grid search combination item of the number of nodes in each layer of the three hidden layers in the BP neural network, and then using the five-fold cross-validation method to verify the training set, and selecting the combination item of the number of nodes in each layer of the hidden layer with the smallest mean square error as the optimal hyperparameter combination.
[0028] Preferably, the specific operations of step S4 are:
[0029] S41. Set the number of nodes in each of the three hidden layers in the BP neural network to X = 10, and obtain X based on the number of nodes. 3 A non-repeating combination of the number of nodes in the three hidden layers, that is, X 3 Equivalent to 1000 non-repeating grid search cycles;
[0030] S42. Use the five-fold cross validation method to verify the training set. The training set is randomly divided into five parts. Four of them are randomly selected through grid search for training the model, and the other is used to verify the model accuracy. The mean square error is selected as the verification indicator. The average of the five mean square error results is counted as a single non-repeated grid search result and stored in an array corresponding to the grid size.
[0031] S43. In X 3 After the grid search cycle is completed, the position of the minimum value corresponding to the grid scale is obtained and stored in the average mean square error array, and the number of hidden layer nodes of the BP neural network corresponding to the position is configured as the optimal hyperparameter combination.
[0032] Preferably, in step S5, the evaluation index is the relative analytical error RPD, and when the RPD value is ≥1.4, the construction of the estimation model is completed.
[0033] The beneficial effects of the present invention are:
[0034] The present invention aims at the prominent problems of high cost and low efficiency when using traditional chemical reagents to analyze the carbon-nitrogen ratio of tea leaves, and constructs a model for quickly and non-destructively estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral features. The BP neural network algorithm is used to train and learn the carbon-nitrogen ratio of tea leaves and the hyperspectral features of the canopy, and the potential hyperspectral response features that affect the estimation of the carbon-nitrogen ratio of tea leaves are excavated, and the specific hyperspectral feature combination is determined, so that the carbon-nitrogen ratio of tea leaves is directly measured using effective canopy hyperspectral feature combination information, which can greatly reduce the manpower and time costs, and will not cause any degree of damage to the tea body during the process, and is suitable for large-scale promotion and application.
[0035] The present invention pre-processes the collected camellia oleifera hyperspectral in the order of 5nm interval resampling, Savitzky-Golay smoothing filtering and mean normalization, improves the calculation efficiency, reduces the high-frequency noise in the original hyperspectral, and increases the difference between different sample individuals. Then, the feature transformation combination method of the first-order derivative and the two-band normalized index is used to gradually overcome various external or internal factors that inhibit the canopy hyperspectral characteristics and the potential response information of the carbon-nitrogen ratio of the camellia oleifera leaves, and maximizes the estimation accuracy of the carbon-nitrogen ratio of the camellia oleifera leaves. From the perspective of eliminating the "dimensionality disaster" caused by the internal information redundancy of the hyperspectral data, the present invention first pre-processes the original data, then performs the first-order derivative and the two-band normalized index transformation, and uses the results as the spectral feature screening set, and uses the variable combination cluster analysis and the method of removing collinearity to obtain the optimal variable combination subset. The BP neural network model is used to have superior multidimensional function mapping ability in complex data, so as to effectively solve the nonlinear problem caused by the complexity of the components of the inclusions in the camellia oleifera leaves. Therefore, the model design logic of the method is standardized, the operation is simple and convenient, and it is suitable for large-scale promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A global flow chart of a model and method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral provided in an embodiment of the present invention;
[0037] Figure 2 A flowchart of the construction details of the optimal BP neural network estimation model for the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral provided in an embodiment of the present invention;
[0038] FIG3 is a scatter plot of the estimated and measured carbon-nitrogen ratios of tea leaves for training set samples and test set samples in an embodiment of the present invention; Figure 3A A scatter plot of the estimated value and the measured value of the carbon-nitrogen ratio of the tea leaves of the training set samples in the embodiment of the present invention; Figure 3B It is a scatter plot of the estimated value and the measured value of the carbon-nitrogen ratio of the tea leaves of the test set samples in the embodiment of the present invention. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is described in more detail below in conjunction with the embodiments and drawings:
[0040] Example 1
[0041] like Figure 1-Figure 2 As shown, a method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectrum is disclosed. The method utilizes a multi-layer feedforward neural network based on error back propagation, namely, a BP neural network, to construct an estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectrum of visible light and near-infrared spectral regions. The carbon-nitrogen ratio data of the tea leaves to be tested are obtained by inputting the measured canopy hyperspectrum of the tea to be tested into the estimation model.
[0042] The estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectral spectrum in the visible and near-infrared spectral regions was constructed. The specific method is as follows:
[0043] S1. Obtain the canopy reflectance of at least 30 tea-oil plants as the hyperspectral sample data of the tea-oil plant canopy. At the same time, pick the canopy leaves of each tea-oil plant and measure the real carbon-nitrogen ratio data under laboratory conditions as the model optimization indicator.
[0044] Among them, the canopy reflectance of tea oil is obtained in the following way: when the solar altitude angle is greater than 45°, the canopy reflectance spectrum of a single tea oil plant is measured ten times, and the average is calculated after eliminating the abnormal reflectance spectrum. The average reflectance spectrum is used as the canopy reflectance of tea oil. The specific method of picking tea oil canopy leaves is: 2 leaves are picked from each of the four directions of the southeast, northwest, and middle upper part of the canopy of each tea oil plant, for a total of 16 leaves. All picked leaves are first withered at 105°C for 30 minutes, then dried at 60°C to constant weight, then ground and sieved, sampled, and the required real carbon-nitrogen ratio data is obtained by a carbon, hydrogen, and oxygen element analyzer.
[0045] S2. Preprocessing and feature transformation of the sample data to obtain a spectral feature screening set;
[0046] The preprocessing includes resampling, smoothing filtering and mean normalization processing, and the specific operations are as follows:
[0047] S21. Resampling: In the 400-1000nm range of the Camellia oleifera canopy hyperspectral spectrum, 121 reflectance values were extracted at a 5nm resampling interval;
[0048] S22. Smoothing filtering: Use a 2nd-order 9-window Savitzky-Golay filter to smooth the extracted 121 reflectivity value sets to eliminate random high-frequency noise caused by the device dark current;
[0049] S23. Considering the influence of many factors such as cloud, terrain and canopy structure on the hyperspectral data, the mean normalization method is used for the smoothed hyperspectral data to increase the comparability within the spectral data; the specific method of mean normalization is to divide each extracted reflectance value of a single oil-tea tree by the average reflectance value of all sampled oil-tea trees at the wavelength corresponding to the reflectance value in the smoothed hyperspectral data, so as to describe the individual oil-tea tree samples with relative values, so that all sample characteristics are at the same benchmark level;
[0050] S24. Feature transformation: The combined method of hyperspectral feature transformation of oil-tea canopy can amplify the hyperspectral response signal and improve the prediction accuracy of the model. First, the first-order derivative FD transformation is performed on the preprocessed hyperspectral data to weaken the soil background interference, baseline drift and distinguish overlapping peaks; secondly, the two-band normalized index NDI is used to further amplify the internal interaction information of the hyperspectral band and weaken the influence of external factors.
[0051] Where, NDI = (R i -R j ) / (R i +R j ), where R i , R j They represent the spectral reflectance at the i-th and j-th nm in the wavelength range of 400 to 1000 nm respectively.
[0052] S3. Using feature extraction and screening methods to obtain the optimal variable combination subset from the spectral feature screening set; the feature extraction and screening method is specifically:
[0053] S31. Perform Pearson correlation analysis on the spectral feature screening set of S2 to screen out sensitive bands with p-values < 0.01;
[0054] S32. Using variable combination cluster analysis to remove collinearity, obtain candidate variable combination subsets;
[0055] Among them, variable combination cluster analysis is based on exponential decreasing function, binary matrix sampling and model cluster analysis to continuously iterate and select the best variable subset. The initialization parameters are set as follows:
[0056] The number of binary sampling is 1000, the number of exponential decrease function iterations is 50, the ratio of the better model coming from the cluster model is set to 10%, the sub-model is nonlinear iterative partial least squares NIPALS, the maximum number of principal components is 10, and five-fold cross validation is used.
[0057] Variable combination cluster analysis uses binary sampling to generate 1000 variable combinations from all sensitive bands. A sub-model is established for each combination to obtain the root mean square error RMSECV of each combination with a five-fold crossover. Then, an exponential decreasing function is iterated 50 times to obtain all possible combinations within the 10% low RMSECV range. Finally, the variable combination with the lowest RMSECV is selected.
[0058] In order to minimize the multicollinearity within the variable combination, the results of the above variable combination cluster analysis also need to calculate the Pearson correlation coefficient between each pair of variables, set the threshold to 0.9, and retain only the pairs of variables that have the highest correlation with the carbon-nitrogen ratio of tea leaves among all the pairs of variables that exceed the threshold, so as to obtain the optimal variable combination subset.
[0059] S4. Circularly train the BP neural network model on the optimal variable combination subset using grid search and cross-validation method, the specific method is as follows:
[0060] The optimal variable combination subset is randomly divided into a training set and a test set in a ratio of 7:3 using the holdout method.
[0061] Set the grid search combination item of the number of nodes in each of the three hidden layers in the BP neural network. The selection range of the number of nodes in each hidden layer is Wherein I and O are the variable dimensions of the BP neural network input layer (corresponding to the number of optimal variable combination subsets in the present invention) and the output layer (corresponding to the dependent variable, i.e., the number of carbon-nitrogen ratios in the present invention), respectively, and α is an adjustment constant ranging from 1 to 10.
[0062] The training set is verified using the five-fold cross validation method. The training set is randomly divided into five parts, each of which becomes a validation subset. Conversely, the other four parts are combined into a new training subset. The grid search is to substitute a three-layer hidden layer node number configuration each time, and then use any four folds of the random division to train the model, and the remaining fold is used to verify the model accuracy. The verification indicator is MSE. After a grid search option is completed, the MSE generated by five verifications is recorded, and then the average MSE of a single cycle is calculated and stored in an array corresponding to the grid scale size. Finally, the combination of the number of hidden layer nodes corresponding to the minimum average MSE is used as the optimal hyperparameter combination.
[0063] In particular, to ensure that the cross-validation divides the training set consistently during the grid search cycle, the same number of seeds can be set to ensure that the training subsets are always the same during the BP neural network model training, thereby reducing random errors.
[0064] After all grid search cycles are completed, the position of the minimum value corresponding to the grid scale is obtained and stored in the average MSE array, and the number of hidden layer nodes of the BP neural network corresponding to the position is configured as the optimal hyperparameter combination.
[0065] S5. Use the optimal hyperparameter combination to train the BP neural network model, and compare the estimated value obtained by the model with the actual carbon-nitrogen ratio data in S1. If all evaluation indicators of the model meet the requirements, the construction of the estimation model is completed. Otherwise, further optimize the parameters until the evaluation requirements are met.
[0066] The above evaluation indexes include the determination coefficient R of the carbon-nitrogen ratio of tea leaves. 2 , root mean square error RMSE and relative analytical error RPD. The feasibility of estimating the carbon-nitrogen ratio of tea leaves is evaluated by the performance of the three indicators in the training set and the test set. 2 The larger the RPD is and the smaller the RMSE is, the better the model effect is; the larger the RPD is, the better the accuracy is. When RPD ≥ 1.4, it means that the model has good estimation ability.
[0067] If the evaluation indicators of the model do not meet the requirements, the model is retrained by changing the number of nodes in each of the three hidden layers in the BP neural network in S4 until the model evaluation requirements are met.
[0068] In this method, in order to expand the scope of application of the model and further improve the stability of the model, the model can be trained regularly, new model sample data can be introduced and merged with the old model data set, and the model can be updated in a timely manner according to actual production needs to continuously improve the timeliness and accuracy of the model.
[0069] Example 2
[0070] The method of the present invention is used to estimate the carbon-nitrogen ratio of oil-tea plants planted by Xianyuan Xiange Oil-tea Professional Cooperative in Huangshan District, Huangshan City.
[0071] S1. Obtain the canopy reflectance of Camellia oleifera as the hyperspectral sample data of the Camellia oleifera canopy, and pick the leaves of the Camellia oleifera canopy to measure the real carbon-nitrogen ratio data under laboratory conditions as the model optimization index;
[0072] The oil tea trees tested were Changlin series planted in 2012, which is the fruit ripening and harvesting period. 120 trees were randomly sampled in the oil tea forest. The canopy hyperspectral acquisition of the oil tea tree used a portable field spectrometer, FieldSpec4 Wide-Res, produced by ASD, USA. The solar altitude angle was required to be greater than 45° during measurement, so the measurement time was selected between 10:00-14:00 Beijing time. In order to avoid the disturbance of the hyperspectral measurement on rainy or windy days, the measurement weather conditions were selected as much as possible in a clear and windless or light wind environment.
[0073] The height of tea oil plants is generally higher than 1.8m, and the front field of view of the equipment sensor probe is only 25°, so the probe is connected to the fiber optic jumper and then lifted to 2m above the canopy using a telescopic rod and a support frame. At this time, the ground field of view is 1.77m in diameter. In order to ensure the stability of the equipment during measurement, the instrument needs to be turned on and preheated for at least 20 minutes before the formal measurement. During the measurement, 10 canopy hyperspectra were measured for each tea oil plant, and a reference white board with a reflectivity close to 100% was used to obtain the reference reflectivity before the measurement, which was used to compare and calculate the relative reflectivity of the tea oil canopy hyperspectrum. The hyperspectral samples of the canopy of a single tea oil plant are all the average tea oil canopy hyperspectra obtained by averaging the abnormal hyperspectra that obviously deviate from the reflectivity values of most of the spectra measured each time. If the number of abnormal hyperspectra exceeds half during the elimination process, consider re-measuring.
[0074] After collecting the hyperspectral spectrum of the oil tea canopy, the leaves of the corresponding oil tea plants were picked according to the four directions of the southeast, northwest and middle upper part of the canopy, and 2 leaves were taken in each direction, with a total of 16 leaves per oil tea plant. The picked oil tea leaves were immediately packed with envelope paper, taken back to the laboratory and placed in a blast drying oven for 30 minutes at 105°C, then dried to constant weight at 60°C, and then crushed with a grinder through a 60-mesh sieve. The carbon and nitrogen elements of the oil tea leaves were measured by a carbon, hydrogen and oxygen element analyzer. The preparation work was to take 2 to 3 mg of the dried and ground oil tea leaf fine powder with a tin bag and place it at the input slot end of the equipment. The carbon and nitrogen indicators measured by the equipment are the total carbon content and total nitrogen content of the leaves, respectively, so the carbon-nitrogen ratio of the oil tea leaves is the ratio of the measured total carbon content to the total nitrogen content.
[0075] S2. Perform spectral feature screening on the sample data to obtain a spectral feature screening set;
[0076] The 121 preprocessed features are transformed by the first-order derivative FD and the two-band normalized index NDI to form a spectral feature screening set with 14641 (121×121) features, where each specific feature value is the FD-NDI calculated value of the spectral reflectance at the i-th and j-th nm in the wavelength range of 400 to 1000 nm.
[0077] S3. Obtain the optimal variable combination subset from the spectral feature screening set using feature extraction and screening methods.
[0078] According to the steps of Example 1, after variable combination cluster analysis and removal of collinearity, in this embodiment, the FD-NDI optimal variable combination subset of spectral reflectance at (i, j) is finally determined to be {(605, 415), (665, 475), (755, 545), (755, 565), (890, 490), (930, 535), (945, 845), (955, 480), (960, 920)}, and a total of 9 FD-NDI combination features are selected into the combination subset.
[0079] According to the steps of Example 1, according to the formula but After rounding, the result is 3. Therefore, the specific selection range of the number of nodes in each hidden layer in this embodiment is all integers between 3+α=4 and 13. Therefore, there are 10 3 Count 1000 non-repeating combinations of the number of nodes in the three hidden layers. After 1000 grid search cycles, obtain the position corresponding to the grid scale and store it in the average MSE array where the minimum value is located, and configure the number of nodes in the BP neural network hidden layer corresponding to the position as the optimal hyperparameter combination. In this embodiment, the optimal number of hidden layer nodes obtained is (4, 5, 12).
[0080] The optimal hidden layer node number configuration (4, 5, 12) was used as the topological structure of the pre-trained BP neural network. All sample data of the training set were substituted into the model to retrain the model. Then, the test set was substituted into the newly trained BP neural network model with the optimal hidden layer node number configuration to obtain the estimated value of the carbon-nitrogen ratio of tea leaves.
[0081] like Figure 3A The figure shows a scatter plot of the estimated and measured carbon-nitrogen ratios of tea oil leaves of the training set samples. The carbon-nitrogen ratios of tea oil leaves estimated by substituting the tea oil canopy hyperspectral spectrum of the training set into the BP neural network model are compared with the measured values, and the standard deviation of the corresponding sample set is divided by the root mean square error RMSE value to obtain RPD = 1.82. 1.82>1.4, indicating that in most cases, the inversion product of the estimation model of the present invention can better match the distribution characteristics of the sample data of the carbon-nitrogen ratio of tea oil leaves, and has a certain mining depth for the potential response information of the hyperspectral spectrum.
[0082] Figure 3BThe figure shows a scatter plot of the estimated and measured carbon-nitrogen ratios of tea oil leaves of the test set samples. The carbon-nitrogen ratios of tea oil leaves estimated by substituting the tea oil canopy hyperspectral spectrum of the test set into the BP neural network model are compared with the measured values. The standard deviation of the corresponding sample set is divided by the RMSE value to obtain RPD = 1.82, 1.82> 1.4, indicating that the estimation model of the present invention has a good generalization ability for unknown carbon-nitrogen ratios of tea oil leaves, and can effectively overcome various external or internal factors that inhibit the canopy hyperspectral characteristics and the potential response information of the carbon-nitrogen ratio of tea oil leaves.
[0083] Experiments have shown that the model and method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral provided by the present invention constructs a fast and non-destructive BP neural network model for the carbon-nitrogen ratio of tea leaves. Compared with traditional monitoring methods for the carbon-nitrogen ratio of tea leaves, the carbon-nitrogen ratio of tea leaves can be understood in real time without destroying the tea leaves, providing a basis for tea leaves management decisions, and is suitable for large-scale promotion and application.
[0084] The above implementation modes are only used to illustrate the technical solutions of the present invention, but not to limit the present invention; the above-mentioned references are only used to supplement the prior art, but not to limit the present invention; although the present invention has been described in detail with reference to the above-mentioned implementation modes, those skilled in the art should understand that any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral, characterized in that: The method uses a multi-layer feedforward neural network based on error back propagation, namely a BP neural network, to construct an estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectral spectrum in the visible light and near-infrared spectral region, and inputs the measured canopy hyperspectral spectrum of the tea leaves to be tested into the estimation model to obtain the carbon-nitrogen ratio data of the tea leaves to be tested. The estimation model of the carbon-nitrogen ratio of tea leaves and the hyperspectral spectrum in the visible and near-infrared spectral regions was constructed. The specific method is as follows: S1. Obtain the canopy reflectance of at least 30 tea oil plants as the canopy hyperspectral sample data of tea oil plants. At the same time, pick the canopy leaves of each tea oil plant and measure the real carbon-nitrogen ratio data under laboratory conditions as the model optimization index. S2. Preprocessing and feature transforming the sample data to obtain a spectral feature screening set; S3. Obtaining an optimal variable combination subset from the spectral feature screening set using a feature extraction and screening method; S4. cyclically training the BP neural network model on the optimal variable combination subset using grid search and cross-validation method to obtain a set of optimal hyperparameter combinations; S5. Use the optimal hyperparameter combination to introduce the BP neural network model, and compare the estimated value obtained by the BP neural network model with the actual carbon-nitrogen ratio data in S1. If the evaluation index of the BP neural network model meets the requirements, the construction of the estimation model is completed. Otherwise, further optimize the parameters until the evaluation index of the BP neural network model meets the requirements.
2. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S1, the canopy reflectance of the tea oil plant is obtained by measuring the canopy reflectance spectrum of a single tea oil plant ten times within a period when the solar altitude angle is greater than 45°, averaging the abnormal reflection spectra after eliminating them, and using the average reflection spectrum as the canopy reflectance of the single tea oil plant.
3. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S1, the specific steps of picking the leaves from the canopy of the oil tea are as follows: the canopy of the oil tea is divided into three equal parts in the vertical direction, which are respectively recorded as the upper layer, the middle layer and the lower layer from top to bottom, and two leaves are picked from each of the four directions of the upper layer and the middle layer of the canopy of each oil tea plant, namely, the southeast, northwest and northeast, for a total of 16 leaves; The picked leaves are first withered at 105°C for 30 minutes, then dried at 60°C to constant weight, then ground and sieved, sampled and analyzed by a carbon, hydrogen and oxygen element analyzer to obtain the required true carbon-nitrogen ratio data.
4. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S2, the preprocessing includes resampling, smoothing filtering and mean normalization processing, and the specific operations are: S21. Resampling: In the 400-1000nm range of the Camellia oleifera canopy hyperspectral spectrum, 121 reflectance values were extracted at a 5nm resampling interval; S22. Smoothing filter: Use a 2nd order 9 window point Savitzky-Golay filter to smooth the extracted 121 reflectivity value sets; S23. Mean normalization: In the smoothed hyperspectral data, each extracted reflectance value of a single tea tree is divided by the average reflectance value of all sampled tea trees at the wavelength corresponding to the reflectance value, so as to describe the individual tea tree sample with a relative value.
5. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S2, the feature transformation is specifically as follows: firstly using the first-order derivative FD transformation on the preprocessed hyperspectral sample data, and then using the two-band normalized index NDI to amplify the hyperspectral signal of the oil-tea canopy.
6. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S3, the feature extraction and screening method is specifically as follows: S31. The correlation between the spectral feature screening set of S2 and the real carbon-nitrogen ratio data of Camellia oleifera in S1 was extremely significant using Pearson correlation analysis, i.e., the sensitive band with a p value of <0.01; S32. Use variable combination cluster analysis to remove collinearity and obtain candidate variable combination subsets.
7. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S4, the BP neural network model is cyclically trained on the optimal variable combination subset. The specific method is: the optimal variable combination subset and its corresponding real carbon-nitrogen ratio data are randomly divided into training set and test set in a ratio of 7:3 by using the holdout method, and the grid search combination items of the number of nodes in each layer of the three hidden layers in the BP neural network are set. At the same time, the training set is verified by the five-fold cross-validation method, and the combination item of the number of nodes in each layer of the hidden layer with the smallest mean square error is selected as the best hyperparameter combination.
8. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 7, characterized in that: The specific operations of step S4 are: S41. Set the number of nodes in each of the three hidden layers in the BP neural network to X = 10, and obtain X based on the number of nodes. 3 A non-repeating combination of the number of nodes in the three hidden layers, that is, X 3 Equivalent to 1000 non-repeating grid search cycles; S42. Use the five-fold cross validation method to verify the training set. The training set is randomly divided into five parts. Four of them are randomly selected through grid search for model training, and the other one is used to verify the model accuracy. The mean square error is selected as the verification indicator. The average of the five mean square error results is calculated as a single non-repeated grid search result and stored in an array corresponding to the grid size. S43. In X 3 After the grid search cycle is completed, the position of the minimum value corresponding to the grid scale is obtained and stored in the average mean square error array, and the number of hidden layer nodes of the BP neural network corresponding to the position is configured as the optimal hyperparameter combination.
9. The method for estimating the carbon-nitrogen ratio of tea leaves based on canopy hyperspectral according to claim 1, characterized in that: In step S5, the evaluation index is the relative analysis error RPD, and when the RPD value is ≥1.4, the construction of the estimation model is completed.
