Convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction system and method
1. A convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction system is characterized in that: the system comprises an original data sorting module, a wave band transformation module, a sensitivity analysis module, a transformation wave band analysis module, a parameter input module, a convolutional neural network construction module, a model training module, a precision evaluation module, a coarse error elimination module, a model verification module, a model storage module, a model retraining module and a result graph output module which are operated in a flow.
2. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 1, wherein the method comprises the following steps: the original data sorting module is used for carrying out diversity, conversion, encapsulation and calibration on soil sample data, meteorological data, topographic data and soil type data according to the data input structure requirement for constructing the convolutional neural network.
3. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 1, wherein the method comprises the following steps: the band transformation module is used for transforming the bands of the preprocessed images according to a fixed formula to obtain transformation segments; and the sensitivity analysis module is used for analyzing the sensitivity of the preprocessed image wave band and the converted wave band to the soil alkaline hydrolysis nitrogen and calibrating the input wave band parameters.
4. A convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction method is characterized by comprising the following steps: the method comprises the following steps:
the method comprises the following steps: collecting soil samples in a target area, establishing a soil alkaline hydrolysis nitrogen sample database, establishing a meteorological database, a topographic database and a soil type database, and performing diversity, conversion, packaging and calibration on the soil sample data, the meteorological data, the topographic data and the soil type data through an original data sorting module;
step two: performing mathematical transformation on the collected preprocessed image wave bands by using a wave band transformation module to obtain transformation wave bands;
step three: performing sensitivity analysis on the preprocessed image wave band and the converted wave band through a sensitivity analysis module based on a soil alkaline hydrolysis nitrogen sample database, and calibrating input wave band parameters;
step four: performing parameter transformation on a soil alkaline hydrolysis nitrogen sample database, a meteorological database, a terrain database, a soil type database and input waveband parameters by using a parameter input module;
step five: carrying out a convolutional neural network by using a convolutional neural network construction module;
step six: evaluating the training precision of the convolutional neural network model by using a precision evaluation module;
step seven: coarse error elimination is carried out through a coarse error elimination module;
step eight: the model verification module verifies the precision of data inverted by the convolutional neural network model by using soil alkaline nitrogen hydrolysis data;
step nine: the model storage module stores the optimal soil alkaline hydrolysis nitrogen inversion model to form a regionalized calibration soil alkaline hydrolysis nitrogen inversion model;
step ten: the model retraining module retrains the stored optimal soil alkaline hydrolysis nitrogen inversion model again;
step eleven: and the result map output module outputs the soil alkaline hydrolysis nitrogen distribution result map of the target area according to the image coordinate system and the projection.
5. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 4, wherein the method comprises the following steps: the method comprises the steps that soil sample collection is carried out on soil sample points of a target area, a meteorological database is established by highest temperature, lowest temperature, relative humidity and rainfall information in a soil sample collection time period, and a topographic database is established by the gradient and the altitude of the target area; and establishing a soil type database by using the red soil, the yellow brown soil and the black calcium soil of the target area.
6. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 4, wherein the method comprises the following steps: the original image data comprises Landsat8OLI, Sentinel-2 and GF-5AHSI, and a band change module is utilized to carry out radiometric calibration, atmospheric correction, filtering processing and resampling processing on the original image data and establish a preprocessed image database.
7. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 4, wherein the method comprises the following steps: and performing sensitivity analysis on the transformed wave band through a spearman correlation analysis algorithm based on the set sensitivity analysis module.
8. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 4, wherein the method comprises the following steps: and step four, integrating model training input and target parameters according to the four-dimensional data input parameter format requirement of the soil alkaline hydrolysis nitrogen inversion model structure, and carrying out transformation and calibration.
9. The method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network as claimed in claim 4, wherein the method comprises the following steps: the method for constructing the soil alkaline hydrolysis nitrogen inversion model by the convolutional neural network construction module comprises the following steps:
the method comprises the following steps: establishing a sample database input by a soil alkaline-hydrolysis nitrogen inversion model, and extracting the reflectivity information of the preprocessed image data of the wave band after sensitivity analysis into the soil sampling point information by using a spatialanalysis tool in ArcGIS software;
step two: extracting meteorological data, topographic data and soil type data under a sampling point into soil sampling point information, inputting data of a crop soil alkaline hydrolysis nitrogen inversion model, taking collected soil alkaline hydrolysis nitrogen as target data, and establishing a sample database;
step three: carrying out four-dimensional matrix change on the sample database by utilizing Python according to a designed algorithm structure;
step four: establishing a convolutional neural network by utilizing a Python language Keras library, taking a four-dimensional matrix as input, and obtaining a soil alkaline nitrogen-solubilizing inversion model through a gradient back propagation algorithm and an optimization algorithm, relu, elu activation function, mse loss function and mae application performance, wherein the neuron weight values on the same plane of the convolutional neural network are obtained;
step five: and (3) packaging the soil alkaline hydrolysis nitrogen inversion model by using a Python language PyQt5GUI design module.
10. The method for constructing the convolutional neural network soil alkaline hydrolysis nitrogen analysis model according to claim 9, wherein the method comprises the following steps: the learning process of the convolutional neural network is as follows:
performing convolution through 32 trainable filters, convolution kernels of 3 × 3, step size of 1 × 1, filling of same and initialization method of he _ normal, generating 32 feature maps in a CNN1 layer after convolution, and pooling each group of a plurality of features in the feature maps through relu or elu activation functions and maxporoling to obtain 32 soil alkaline nitrogen decomposition feature maps of S1 layers;
the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN2 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 2 layers of soil alkaline-hydrolysis nitrogen feature maps; the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN3 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 3 layers of soil alkaline-hydrolysis nitrogen feature maps;
the soil alkaline nitrogen hydrolysis feature map is convolved by 256 trainable filters, a convolution kernel of 3 x 3, a step size of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated in a CNN4 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 256 soil alkaline nitrogen hydrolysis feature maps of S4 layers;
the method comprises the steps that a soil alkaline-hydrolysis nitrogen feature map is convoluted through 256 trainable filters, convolution kernels of 3 x 3, step length of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated on a CNN5 layer after convolution, then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxporoling to obtain 256 soil alkaline-hydrolysis nitrogen feature maps with S5 layers, overfitting is prevented by using a dropout method, and a CNN6 layer is obtained through 3 full-connection layers;
and finally, converting the sample database into a four-dimensional matrix and inputting the four-dimensional matrix into a convolutional neural network to obtain a soil alkaline hydrolysis nitrogen inversion model.
Background
The chemical fertilization is an effective means for preventing the environmental pollution caused by over fertilization and the influence on the growth of crops and the improvement of the quality of agricultural products due to insufficient soil nutrient supply caused by insufficient fertilization amount, the scientific fertilization is based on accurately mastering the distribution of soil nutrients, the traditional soil testing scheme is to utilize a large number of detection points which are too sparse, the alkaline hydrolysis nitrogen content of the soil of the whole farmland is measured by replacing the surface with 'points', the 'actual field measurement' cannot be finely realized, a large amount of soil testing data needs to be collected on site, the cost of sample collection and measurement is high, a large amount of manpower and material resources are consumed, the production cost is increased, and the precision is difficult to guarantee.
With the rapid development of satellite remote sensing at home and abroad, the variety of satellite images of multispectral data and hyperspectral data is increased, and effective data support is provided for researching inversion of soil alkaline-hydrolyzable nitrogen content based on the multispectral and hyperspectral data. However, most of the inversion models for the nitrogen content in soil are monitored by total nitrogen, and the important factor for scientific fertilization is alkaline nitrogen hydrolysis, and as the alkaline nitrogen hydrolysis modeling is greatly influenced by agricultural production environment factors, terrain environment, meteorological factors and the like, image data with higher time resolution and the soil alkaline nitrogen hydrolysis inversion models are needed, so that the rapid collection of the soil alkaline nitrogen distribution before planting cannot be realized.
Disclosure of Invention
The invention aims to provide a convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction system and method, which can solve the influence of agricultural production activities and meteorological factors by constructing an analysis model system, efficiently and accurately acquire soil alkaline hydrolysis nitrogen distribution data and provide data support for scientific fertilization.
The purpose of the invention is realized by the following technical scheme:
a convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction system comprises a raw data sorting module, a wave band conversion module, a sensitivity analysis module, a converted wave band analysis module, a parameter input module, a convolutional neural network construction module, a model training module, a precision evaluation module, a coarse error elimination module, a model verification module, a model storage module, a model retraining module and a result graph output module which are operated in a flow process.
The original data sorting module is used for performing diversity, conversion, encapsulation and calibration on soil sample data, meteorological output, topographic data and soil type data according to the data input structure requirement for constructing the convolutional neural network structure;
the band transformation module is used for transforming the preprocessed image bands according to a fixed formula to obtain transformed bands, expanding image band information and improving the sensitivity of the image bands;
the sensitivity analysis module is used for analyzing the sensitivity of the preprocessed image wave band and the converted wave band to soil alkaline hydrolysis nitrogen and calibrating input wave band parameters;
the parameter input module is used for input parameter transformation of convolutional neural network structure training;
the convolutional neural network construction module is responsible for constructing a convolutional neural network structure and packaging;
the precision evaluation module is used for training the precision evaluation of the convolutional neural network structure;
the coarse error elimination module eliminates obvious errors according to the precision evaluation result, and improves the training precision of the convolutional neural network structure;
the model verification module is responsible for verifying the final result precision;
the model storage module is used for storing an optimal soil alkaline hydrolysis nitrogen inversion model;
the model retraining module is used for continuously training the stored optimal soil alkaline hydrolysis nitrogen inversion model and further improving the precision of the soil alkaline hydrolysis nitrogen inversion model;
and the result map output module is used for outputting the soil alkaline hydrolysis nitrogen distribution result map of the target area according to the image coordinate system and the projection.
A convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction method comprises the following steps:
the method comprises the following steps: collecting soil samples of a target area according to the requirements of soil sample collection technical specifications, establishing a soil alkaline-hydrolyzable nitrogen sample database collected on site, establishing a meteorological database, a topographic database and a soil type database of a soil sample collection time period, and performing diversity, conversion, encapsulation and calibration on the soil sample data, meteorological output, topographic data and soil type data by using the original data sorting module;
further, collecting soil samples, namely collecting soil sample points of a target area, collecting plough layer soil of 0-20 cm in an operation area by adopting an equidistant sampling method, and fully and uniformly mixing the soil by adopting a 5-division method to obtain a soil sample; acquiring longitude, latitude and elevation information of sampling points by using a GPS; after sampling is finished, the soil sample enters a laboratory for treatment, and the accurate content of alkaline hydrolysis nitrogen in the soil is determined according to the determination standard of the nitrogen in the forest soil; acquiring information such as the highest temperature, the lowest temperature, the relative humidity and the rainfall in a soil acquisition time period to establish a meteorological database; acquiring the gradient and the altitude of a target area to establish a terrain database; and collecting red soil, yellow brown soil, black calcium soil and the like in the target area to establish a soil type database.
Acquiring image data including Landsat8OLI, Sentinel-2 and GF-5AHSI during sample acquisition before crop sowing, and utilizing ENVI5.6 arranged in a wave band conversion module to perform radiometric calibration, atmospheric correction, filtering processing and resampling processing on the acquired image data to establish a remote sensing image database.
Step two: performing mathematical transformation on the preprocessed image data by using a band transformation module to obtain a transformation band;
further, the wave band change module calls two tools in commercial application software to carry out 11 mathematical transformations, wherein a bandmath tool in ENVI5.6 software is utilized to carry out reciprocal transformation, reciprocal logarithmic transformation, reciprocal transformation of logarithm and square root transformation;
using the Image derivation tool in the ENVI5.6 software, the first Derivative R ', the first Derivative of the reciprocal (1/R)', the first Derivative of the logarithm (lg) were performedR) ', first derivative of square rootThe first derivative of the logarithm of the reciprocal (lg (1/R))' and the first derivative of the reciprocal of the logarithm (1/lg)R) The operation of' wherein R is an image sensitive band.
Step three: performing sensitivity analysis on the preprocessed image wave band and the preprocessed conversion wave band through a sensitivity analysis module based on a soil alkaline hydrolysis nitrogen sample database, and calibrating input wave band parameters;
furthermore, sensitivity analysis is carried out on the converted wave bands by utilizing a spearman correlation analysis algorithm based in the sensitivity analysis module, significance correlation is marked according to a report output by software, and when the output result reaches 0.05 significance level or 0.01 significance level, marking is carried out on the upper right corner of the report to show that the significance is more or extremely significant; selecting a wave band with obvious sensitivity shown in a report as an input parameter for training the soil alkaline hydrolysis nitrogen inversion model, and selecting 3-10 wave bands;
step four: performing model parameter transformation on a soil alkaline hydrolysis nitrogen sample database, a meteorological database, a terrain database, a soil type database and input waveband parameters by using a parameter input module;
further, integrating training input and target parameters of the soil alkaline hydrolysis nitrogen inversion model according to the requirement of a four-dimensional data input parameter format of the soil alkaline hydrolysis nitrogen inversion model structure, and carrying out transformation and calibration;
step five: carrying out a convolutional neural network by using a convolutional neural network construction module;
step six: evaluating the training precision of the convolutional neural network structure by using a precision evaluation module;
further, the precision evaluation module carries out precision evaluation on the trained model, and selects an optimal convolutional neural network structure to establish a soil alkaline hydrolysis nitrogen inversion model;
step seven: coarse error elimination is carried out through a coarse error elimination module;
further, a coarse error elimination module eliminates coarse errors in the training process and provides effective sample data for training an optimal soil alkaline hydrolysis nitrogen inversion model;
step eight: the model verification module verifies the accuracy of data inverted by the soil alkaline hydrolysis nitrogen inversion model by using the soil alkaline hydrolysis nitrogen data;
further, the model verification module compares and analyzes the soil alkaline hydrolysis nitrogen data predicted by the soil alkaline hydrolysis nitrogen inversion model with the measured data, and verifies the actual precision of the soil alkaline hydrolysis nitrogen inversion model
Step nine: the model storage module stores the optimal soil alkaline hydrolysis nitrogen inversion model to form a regionalized calibration soil alkaline hydrolysis nitrogen inversion model;
further, the model storage module stores the optimal model to complete regional calibration of the soil alkaline hydrolysis nitrogen inversion model;
step ten: the model retraining module retrains the stored optimal soil alkaline hydrolysis nitrogen inversion model again;
further, the model retraining module retrains the stored optimal soil alkaline hydrolysis nitrogen inversion model after further expanding the sample data to obtain a better soil alkaline hydrolysis nitrogen inversion model
Step eleven: the achievement map output module outputs a soil alkaline hydrolysis nitrogen distribution achievement map of the target area according to an image coordinate system and projection;
further, the result map output module outputs the soil alkaline hydrolysis nitrogen distribution result map of the target area according to an image coordinate system and projection, and the result map is used for data analysis in practical application.
The method for constructing the soil alkaline hydrolysis nitrogen inversion model by the convolutional neural network construction module comprises the following steps:
the method comprises the following steps: establishing a sample database input by a soil alkaline-hydrolysis nitrogen inversion model, and extracting the reflectivity information of the preprocessed image data of the wave band after sensitivity analysis into the soil sampling point information by using a Spatial analysis tool in ArcGIS software;
step two: extracting meteorological data, topographic data and soil type data under a sampling point into soil sampling point information, inputting data of a crop soil alkaline hydrolysis nitrogen model, taking collected soil alkaline hydrolysis nitrogen as target data, and establishing a sample database;
step three: carrying out four-dimensional matrix change on the sample database by utilizing Python according to a designed algorithm structure;
step four: establishing a convolutional neural network by utilizing a Python language Keras library, wherein weights of neurons on the same plane are equal, taking a four-dimensional matrix as input, and obtaining a soil alkaline-hydrolyzable nitrogen inversion model through a gradient back propagation algorithm and an optimization algorithm, relu, an elu activation function, an mse loss function and mae application performance;
step five: and (3) packaging the soil alkaline hydrolysis nitrogen inversion model by using a Python language PyQt5GUI design module.
The learning process of the convolutional neural network is as follows:
performing convolution through 32 trainable filters, convolution kernels of 3 × 3, step size of 1 × 1, filling of same and initialization method of he _ normal, generating 32 feature maps in a CNN1 layer after convolution, and pooling each group of a plurality of features in the feature maps through relu or elu activation functions and maxporoling to obtain 32 soil alkaline nitrogen decomposition feature maps of S1 layers;
the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN2 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 2 layers of soil alkaline-hydrolysis nitrogen feature maps; the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN3 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 3 layers of soil alkaline-hydrolysis nitrogen feature maps;
the soil alkaline nitrogen hydrolysis feature map is convolved by 256 trainable filters, a convolution kernel of 3 x 3, a step size of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated in a CNN4 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 256 soil alkaline nitrogen hydrolysis feature maps of S4 layers;
the method comprises the steps that a soil alkaline-hydrolysis nitrogen feature map is convoluted through 256 trainable filters, convolution kernels of 3 x 3, step length of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated on a CNN5 layer after convolution, then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxporoling to obtain 256 soil alkaline-hydrolysis nitrogen feature maps with S5 layers, overfitting is prevented by using a dropout method, and a CNN6 layer is obtained through 3 full-connection layers;
and finally, converting the sample database into a four-dimensional matrix and inputting the four-dimensional matrix into a convolutional neural network to obtain a soil alkaline hydrolysis nitrogen inversion model.
The system and the method for constructing the convolutional neural network soil alkaline hydrolysis nitrogen analysis model have the beneficial effects that:
according to the system and the method for constructing the soil alkaline hydrolysis nitrogen analysis model of the convolutional neural network, accurate and comprehensive fertilization can be guided through the soil alkaline hydrolysis nitrogen analysis model of the remote sensing and convolutional neural network, so that the problems that the cost input is too large and the environment is polluted due to too much fertilization, soil hardening is caused due to too little fertilization, the crop growth is influenced, and the land is damaged are avoided.
Drawings
The invention is described in further detail below with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a schematic flow chart of a soil alkaline hydrolysis nitrogen analysis model construction system of the invention;
FIG. 2 is a schematic diagram of the soil alkaline hydrolysis nitrogen analysis process of the present invention;
FIG. 3 is a schematic illustration of the alkaline-hydrolyzable nitrogen field sampling location profile of the present invention;
FIG. 4 is a graphical representation of the correlation coefficient of the sensitivity analysis of the present invention;
FIG. 5 is a schematic diagram of the sensitivity Sig of the present invention on both sides;
FIG. 6 is a graph of the mean square error mse evaluation of the model training of the present invention;
FIG. 7 is a graph of the error evaluation of the positive distribution of the model of the present invention;
FIG. 8 is a graph of the model error confidence interval evaluation of the present invention;
FIG. 9 is a graph of the model fit evaluation of the present invention;
FIG. 10 is a graph of the alkaline-hydrolyzable nitrogen content of the soil according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The present embodiment will be described below with reference to fig. 1 to 10;
a convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction system comprises an original data sorting module, a wave band transformation module, a sensitivity analysis module, a transformed wave band analysis module, a parameter input module, a convolutional neural network construction module, a model training module, a precision evaluation module, a coarse error elimination module, a model verification module, a model storage module, a model retraining module and a result graph output module which are connected in a logic sequence;
the method comprises the steps of constructing a neural network model for soil alkaline nitrogen analysis through progressive parameter data combing of an original data sorting module, a band transformation module, a sensitivity analysis module, a parameter input module, a convolutional neural network structure module, a precision evaluation module, a coarse error elimination module, a model verification module, a model storage module, a model retraining module and an achievement map output module, and finally achieving analysis results of various parameters of soil alkaline nitrogen analysis.
A convolutional neural network soil alkaline hydrolysis nitrogen analysis model construction method comprises the following steps:
the method comprises the following steps: acquiring and preprocessing original data;
collecting, packaging and calibrating soil samples of a target area according to the requirements of 'technical specification for collecting soil samples', collecting soil sample points of the target area, collecting plough layer soil of 0-20 cm in an operation area by adopting an equidistant sampling method, fully mixing the soil by adopting a 5-division method, then taking 1kg of soil, wherein the sampling interval is determined according to the size of an operation range, the interval of general dry fields is 100m, and 9 points are uniformly distributed on each grid of a paddy field. And acquiring longitude, latitude and elevation information of the sampling point by using the GPS. After sampling is finished, the soil sample enters a laboratory for treatment, and the accurate content of alkaline hydrolysis nitrogen in the soil is determined according to the standard of LY/T1228-2015 determination of forest soil nitrogen; acquiring information such as the highest temperature, the lowest temperature, the relative humidity, the rainfall and the like in a soil acquisition time period through a China meteorological network or a provincial meteorological center and meteorological satellite data to establish a meteorological database; establishing a terrain database by utilizing the slope and the altitude of a target area obtained by about 30m of Digital Elevation (DEM) data; and collecting red soil, yellow brown soil, black calcium soil and the like in a target area through a provincial plant inspection plant protection station or a local agricultural technology promotion center to establish a soil type database.
Acquiring image data including Landsat8OLI, Sentinel-2 and GF-5AHSI during sample acquisition before crop sowing, and utilizing ENVI5.6 arranged in a wave band conversion module to perform radiometric calibration, atmospheric correction, filtering processing and resampling on the acquired image data to establish a preprocessed image database.
Step two: image band transformation;
11 mathematical transformations are carried out on the sensitive wave band, and by utilizing ENVI5.6 software, the bandmath tool can carry out reciprocal transformation, reciprocal logarithmic transformation, reciprocal transformation of the logarithm and square root transformation; using ENVI5.6 software, the Image derivation tool can perform the first Derivative (R'), the first Derivative of the reciprocal (R;)1/R)'), the first derivative of the logarithm ((lg)R) '), first derivative of square rootThe first derivative of the logarithm of the reciprocal ((lg (1/R))'), the first derivative of the reciprocal of the logarithm ((1/lg)R) ', R is image sensitive band;
step three: and (3) sensitivity analysis:
the method comprises the steps of extracting reflectivity information of each wave band of a preprocessed image and reflectivity information of a mathematical transformation wave band into soil sampling point information by using ArcGIS software with the version of 10.1 or more and a Spatial analysis tool value-to-point function, carrying out sensitivity analysis on reflectivity values of each wave band of the image and corresponding alkaline-hydrolyzable nitrogen content by using a spearman correlation analysis algorithm of a sensitivity analysis module, marking significance correlation according to a report output by software, representing the upper right corner by a left corner in significance when an output result reaches a significance level of 0.05, and representing the upper right corner by a left corner in significance if the output result reaches the significance level of 0.01. Selecting a wave band with high sensitivity as an input parameter for training an inversion model, and generally selecting 3-5 wave bands;
step four: model training input and target parameter determination:
selecting single-waveband form input parameters (preprocessed image sensitive waveband, mathematically transformed sensitive waveband, meteorological data, topographic data and soil type) or double-waveband combination input parameters (preprocessed image sensitive waveband-mathematically transformed sensitive waveband, meteorological data, topographic data and soil type), and establishing a model sample database by taking alkaline-hydrolyzable nitrogen measured in an on-site soil sample laboratory as a target parameter;
step five: building a convolutional neural network model:
carrying out four-dimensional matrix change on the model sample database by utilizing Python according to a designed algorithm structure;
establishing a convolutional neural network by utilizing a Python language Keras library, wherein weights of neurons on the same plane are equal, taking a four-dimensional matrix as input, and obtaining a soil alkaline-hydrolyzable nitrogen inversion model through a gradient back propagation algorithm, an optimization algorithm, relu, an elu activation function, an mse loss function and mae application performance;
and (3) packaging the soil alkaline hydrolysis nitrogen inversion model by using a Python language PyQt5GUI design module.
Preferably, the learning process of the convolutional neural network is as follows: performing convolution through 32 trainable filters, convolution kernels of 3 × 3, step size of 1 × 1, filling of same and initialization method of he _ normal, generating 32 feature maps in a CNN1 layer after convolution, and pooling each group of a plurality of features in the feature maps through relu or elu activation functions and maxporoling to obtain 32 soil alkaline nitrogen decomposition feature maps of S1 layers; the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN2 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 2 layers of soil alkaline-hydrolysis nitrogen feature maps; the soil alkaline-hydrolysis nitrogen feature map is convolved by 64 trainable filters, 3 × 3 convolution kernels, 1 × 1 step size, same filling and he _ normal initialization methods, 64 feature maps are generated in a CNN3 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 64S 3 layers of soil alkaline-hydrolysis nitrogen feature maps; the soil alkaline nitrogen hydrolysis feature map is convolved by 256 trainable filters, a convolution kernel of 3 x 3, a step size of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated in a CNN4 layer after convolution, and then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxpoling to obtain 256 soil alkaline nitrogen hydrolysis feature maps of S4 layers; the method comprises the steps that a soil alkaline-hydrolysis nitrogen feature map is convoluted through 256 trainable filters, convolution kernels of 3 x 3, step length of 1 x 1, prime of same and an initialization method of he _ normal, 256 feature maps are generated on a CNN5 layer after convolution, then a plurality of features in each group in the feature map are pooled through relu or elu activation functions and maxporoling to obtain 256 soil alkaline-hydrolysis nitrogen feature maps with S5 layers, overfitting is prevented by using a dropout method, and a CNN6 layer is obtained through 3 full-connection layers; and finally, converting the sample database into a four-dimensional matrix and inputting the four-dimensional matrix into a convolutional neural network to obtain a soil alkaline hydrolysis nitrogen inversion model.
Step six: model training and precision evaluation:
the method comprises the steps of randomly dividing sample data into three parts, namely 70% of training samples (training), 15% of verification samples (validation) and 15% of test samples (test), wherein the training samples are used for training a convolutional neural network model, and the verification samples and the test samples are used for verifying and testing the trained model, so that the stability and the accuracy of the model are guaranteed. And training by combining the quantitative relation between the input parameters and the target parameters and utilizing a convolutional neural network model to obtain the quantitative functional relation between the input parameters and the target parameters, and establishing a soil alkaline-hydrolyzable nitrogen inversion model.
The soil alkaline-hydrolyzable nitrogen analysis method is characterized by comprising the following steps of adopting a spearman sensitive analysis technology and a convolutional neural network algorithm, carrying out GUI (graphical user interface) design by using a Python language Keras library programming and a PyQt5 module to establish a soil alkaline-hydrolyzable nitrogen inversion model, carrying out pixel-by-pixel fine analysis technology by using multiple parameters such as sensitive wave bands, sensitive wave band mathematical transformation, meteorological data, topographic data, soil type data and field soil sample acquisition data, and carrying out quantitative analysis on alkaline-hydrolyzable nitrogen of important nutrient elements in a soil fertilization prescription diagram, wherein specific characteristic points are as follows:
the characteristic points are as follows: preprocessing the acquired image data by utilizing the ENVI5.6 and above versions, and outputting reflectivity data; performing mathematical transformation on the processed image reflectivity data by using a mathematical formula;
and a second characteristic point: completing the sensitivity analysis of satellite image wave band information and transformation information thereof and the soil alkaline hydrolysis nitrogen content by using the sensitivity analysis module, and outputting a report;
the third characteristic point is as follows: selecting 3-10 wave bands which are most sensitive to the content of the alkaline-hydrolysis nitrogen in the soil as input parameters of model training by using a sensitivity analysis report of the feature point II, and improving the training precision of the model;
the feature points are four: the method comprises the steps of establishing a convolutional neural network by utilizing a Python language Keras library, enabling weights of neurons on the same plane to be equal, taking a four-dimensional matrix as input, obtaining a neural network model by using a gradient back propagation algorithm and an optimization algorithm, relu, an elu activation function, a mse loss function and mae application performance, training input parameters by taking a feature point I and a feature point III as models, and completing the construction of a soil alkaline-base nitrogen-decomposition inversion model by taking the alkaline-base nitrogen content analyzed by a field soil sample acquisition data laboratory as a target parameter.
The construction of a soil alkaline hydrolysis nitrogen analysis model based on remote sensing and a convolutional neural network is explained by combining the attached drawings 1-10, the method provided by the invention is adopted by taking a farmland in a certain province as an example, and a soil alkaline hydrolysis nitrogen content distribution map of the farmland is finally obtained, and the specific implementation scheme is as follows:
collecting soil samples according to local actual conditions, recording longitude and latitude coordinates and soil sample numbers of each sampling point, sending the soil samples to a professional third-party soil detection for laboratory test or collecting local soil alkaline hydrolysis nitrogen sample data, wherein the position spread points of the alkaline hydrolysis nitrogen sample data are shown in figure 3;
inquiring and downloading a remote sensing image, downloading GF-5 hyperspectral data in the example, wherein the resolution is 30 meters, the image time is 2019, 4 months and 16 days, carrying out radiometric calibration, atmospheric correction, filtering processing and wave band resampling processing on the image by using a wave band conversion module, and cutting by using a vector range; the sensitivity analysis model is used to obtain the pre-processed image data band and the soil sample alkaline hydrolysis nitrogen content sensitivity results as shown in fig. 4 and 5. The correlation is significant at a confidence (double test) of 0.01, and significant at a confidence (double test) of 0.05;
calculating to obtain soil alkaline hydrolysis nitrogen content grid data according to the optimized inversion model;
and exporting the grid data of the inverted soil alkaline hydrolysis nitrogen content pixel by utilizing a grid surface conversion function in the GIS, establishing a fishing net according to an image range, exporting vector data according to pixels, and connecting through an attribute table to realize grid data vectorization.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.