A method for spatial interpolation prediction of soil nutrients
Patent Information
- Application Number
- CN202310386123.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-04-12
AI Technical Summary
[0007]本发明的目的就是提供一种土壤养分的空间插值预测方法,以解决现有神经网络插值法存在的预测结果误差较大的问题
1、将BP神经网络与贝尔曼方程结合起来,先用BP神经网络拟合空间中存在的趋势,再用贝尔曼方程处理残差。相比于普通克里金和神经网络残差克里金,本发明预测方法需要的专家知识要少得多,并且还不需要关于目标变量的分布和平稳性的统计假设,也不需要关于理论半方差函数建模。
Smart Images

Figure CN116383589B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a soil assessment method, specifically a spatial interpolation prediction method for soil nutrients. Background Technology
[0002] Agriculture is the source of food and clothing for the people, the foundation of national survival, and the basis of all production and life. Precision agriculture is an important development model for modern agriculture. By processing and analyzing agricultural data, the trial-and-error costs of agricultural development can be reduced, and production efficiency can be improved while reducing input, thereby obtaining greater benefits. Due to limitations such as economic level, technological means, and terrain conditions, the lack of soil nutrient data is a common problem. Spatial interpolation of soil nutrient data can estimate the nutrient data values of unknown points by using adjacent data sampling points, thus compensating for the lack of data. This is particularly important for agricultural production, soil resource monitoring, and protection. However, due to limitations such as economic level, technological means, and terrain conditions, soil nutrient data is difficult to obtain in many places. In this case, spatial interpolation prediction methods provide an assessment method for estimating data at unsampled locations. It can estimate approximate values at a specific location based on sampled values measured at other locations.
[0003] Neural networks are widely used in interpolation algorithms based on function methods due to their superior performance in function approximation. Neural networks can establish nonlinear feedback systems; theoretically, a three-layer neural network can approximate arbitrarily complex functions. Taking a backpropagation (BP) neural network trained using error backpropagation as an example, its optimization method is gradient descent. Backpropagation continuously adjusts the connection weights between each layer to improve the network's prediction accuracy. Furthermore, neural networks can use data other than the soil's measured attributes to assist in interpolation, which can also improve prediction accuracy to some extent. However, these studies still have the following problems: (1) Although neural networks are widely used in interpolation, most spatial interpolation methods using neural networks do not take into account geographical attributes, that is, they do not make full use of the spatial information contained in the residuals.
[0004] (2) Neural network residual kriging is one of the few methods that improves residuals in neural network interpolation. However, neural network residual kriging has many drawbacks when using kriging to process residuals: the path between two points is not unique, and some paths are far more important in value propagation than straight paths between two points.
[0005] (3) When fitting residuals using ordinary kriging, stringent assumptions are required: statistical assumptions about the distribution and stationarity of the target variable, and modeling of the theoretical semivariogram function. In practical applications, it may not be easy to find a reliable geostatistical model suitable for all residual data.
[0006] The existence of the above problems results in large errors in the prediction results of neural network-based interpolation methods, making them unsuitable for guiding practice. Summary of the Invention
[0007] The purpose of this invention is to provide a spatial interpolation prediction method for soil nutrients to solve the problem of large prediction errors in existing neural network interpolation methods.
[0008] The objective of this invention is achieved as follows: A spatial interpolation prediction method for soil nutrients includes the following steps: S1. Use a backpropagation (BP) neural network to estimate the spatial systematic effects of soil nutrients and obtain the neural network fitting residuals; the specific operation method is as follows: S11. Collect data on the organic matter nutrient content at each sampling point and normalize it according to the following formula: u i = ( z i -z min ) / ( z max -z min ) in, z i For the first i The attribute values of each sampling point z max The maximum value of the attribute at the sampling point. z min This represents the minimum value of the attribute at the sampling point.
[0009] S12. Use a backpropagation (BP) neural network to predict the soil attribute values at each sampling point. The number of input layer nodes is determined by the latitude and longitude dimension and the geographic attribute dimension of the sampling points, and the number of hidden layer nodes... H Determined by the following empirical formula: H =( I + O ) 1 / 2 + a in, H This represents the number of hidden layer nodes. I The number of nodes in the input layer. O Set the number of output layer nodes. O =1, a It is a constant.
[0010] S13. Using the attribute value data of organic matter nutrient content at each sampling point, and obtaining the surface attribute information of each sampling point based on the latitude and longitude data of the sampling points; concatenating the soil attribute value information and the surface attribute information of each sampling point to construct a multi-source dataset; dividing the multi-source dataset into a training set and a test set, and then feeding the training set into a BP neural network to obtain the predicted values for each sampling point in the test set, and combining them with the real values of each sampling point in the test set to obtain the residuals of each sampling point in the training set; merging the residuals of each sampling point in the training set with the latitude and longitude data of each sampling point in the training set and the latitude and longitude data of each sampling point in the test set to form a residual dataset.
[0011] S2. The residual dataset is gridded to construct a residual grid; the specific operation method is as follows: S21. Calculate the minimum Euclidean distance between all pairs of latitude and longitude coordinates of all sampling points in the residual dataset. d min .
[0012] S22, Minimum Euclidean distance d min Set the initial diagonal length of the grid to construct the grid. Calculate the relative positions of all sampling points according to latitude and longitude. Place the residual values of each sampling point in the training set calculated by the BP neural network into the constructed grid to form a residual grid.
[0013] S23. Scale the size of the residual grid to form a scaled grid. Place the residual values of the sampling points into the scaled grid, and keep the relative positions of each residual value in the scaled grid unchanged. When placing each residual value into the scaled grid, if there is a conflict in the placement position, place the residual value to be placed later in the position of the adjacent cell of the conflict position. After all the residual values of the sampling points are placed, the scaled residual grid is formed.
[0014] S3. The scaled residual grid is assigned to become a full-value scaled residual grid. After subsampling, the full-value scaled residual grid is iteratively updated using the Bellman equation until convergence, thus obtaining the predicted value of the sampling point residual by the Bellman equation. Then, the predicted value of the soil nutrient properties of the sampling point by the BP neural network is added to the predicted value of the sampling point residual by the Bellman equation to obtain the final spatial interpolation prediction result of the soil nutrients.
[0015] Furthermore, the activation function used in the hidden layers of the BP neural network is the ReLU function: f ( x )=max(0, x ) in, f(x) The value of the activation function is max(0,x (to obtain input) x The maximum value between 0 and 0.
[0016] Furthermore, the loss function used in the BP neural network is the squared loss function: L ( Y , f ( X ))=( Y - f ( X )) 2 in, L For loss, Y This is the actual output value. f ( X () represents the model's response to input variables X The predicted value.
[0017] Further, the specific operation of step S13 is as follows: Divide the residual dataset into 5 equal parts, named group A, group B, group C, group D, and group E. Recombine these five groups into groups BCD, ACD, ABD, and ABC. Train a BP neural network using group BCD to obtain the predicted values for group A. y A The first prediction for Group E y E1 Similarly, the predicted values for group B were subsequently obtained. y B The second predicted value for Group E y E2 Predicted values for Group C y C and the third predicted value of Group E y E3 Predicted values for group D y D and the fourth prediction value of Group E y E4 Then, using the actual values of groups A, B, C, and D... A , B , C , D Calculate the residuals for groups A, B, C, and D. ε A , ε B , ε C , ε D ; the residuals of group E ε ETemporarily set to 0, integrate the latitude and longitude data and corresponding residuals of each sampling point in groups A, B, C, D, and E into a residual dataset, with the following pattern: A 1, A 2, ε );in,( A 1, A 2) is the latitude and longitude data of the sampling points. ε It is the residual of the sampling points.
[0018] Furthermore, in step S23, the number of residual values of sampling points with conflicting locations that are transferred is controlled to within 2% of the total number of cells in the grid.
[0019] Furthermore, the specific operation method of step S3 is as follows: S31. First, assign values to the cells in the scaling residual grid that have not yet been placed with residual values to form a full-value scaling residual grid. The value assigned is the sum of all the residual values already placed in the scaling residual grid and then divided by the total number of cells in the scaling residual grid.
[0020] S32. Subsample the full-value scaling residual grid to obtain spatial weight parameters. Randomly determine the subsampling ratio of the full-value scaling residual grid in the residual grid constructed in step S22. Assign a random number between 0 and 1 to each cell in the full-value scaling residual grid. If the random number is less than the subsampling ratio, retain the value entered in the cell. If the random number is greater than the subsampling ratio, replace the value entered in the cell with an empty value. After processing the values entered in all cells of the full-value scaling residual grid in this way, a subgrid with a specified subsampling ratio is generated. Assign values to the empty cells in the subgrid. The assigned value is the sum of all the values entered in the subgrid and then divided by the total number of cells in the subgrid. Determine the spatial weight factor γ of the subgrid by randomly searching parameters, and use this spatial weight factor γ as the spatial weight factor γ of the full-value scaling residual grid.
[0021] S33. In a Markov process, the state transition probability of a state S at a certain time t to another state S' at the next time t+1 is: P SS' =P[ S t+1 = S' | S t = S ] Where P is the probability. S and S t All are states at time t. S' and S t+1 Allt The state at time +1.
[0022] S34. Iteratively update the full-value scaling residual grid using the Bellman equation until convergence, thus obtaining the predicted value of the residual for the sampling point after iterative update using the Bellman equation: v ( s ) = E[ R t+1 +γ v ( s t+1 )| s t = s ] Among them, R t+1 γ is the spatial weighting factor, representing the immediate reward for reaching a certain state. v ( s t+1 ) is the subsequent state value function with added spatial weighting factor γ.
[0023] S35. Add the predicted value of soil nutrient properties by the BP neural network at the sampling point to the predicted value of the residual at the sampling point by the Bellman equation, and take the sum as the final spatial interpolation prediction result of soil nutrients.
[0024] The beneficial effects of this invention are: 1. This invention combines a backpropagation (BP) neural network with the Bellman equation. First, the BP neural network is used to fit the trend in the space, and then the Bellman equation is used to process the residuals. Compared to ordinary kriging and neural network residual kriging, this prediction method requires far less expert knowledge and does not require statistical assumptions about the distribution and stationarity of the target variable, nor does it require modeling of the theoretical semivariogram function.
[0025] 2. Compared with the inverse distance weighted interpolation method, the prediction method of this invention can use more auxiliary information about the point to be measured.
[0026] 3. By employing a neural network approach, more auxiliary variables can be used to assist in interpolation. Since there is a certain correlation between interpolation points, and this correlation can aid in interpolation, a combination of a backpropagation (BP) neural network and Bellman equations for residual processing is used. First, the BP neural network is used to handle the existing trends in the system, and then the Bellman equations are used to handle the residual field. The predicted values from the BP neural network and the residual values fitted by the Bellman equations are added together to obtain the final prediction, thereby improving the accuracy of interpolation. Attached Figure Description
[0027] Figure 1 This is a flowchart of the spatial interpolation prediction method for soil nutrients according to the present invention.
[0028] Figure 2 This is a diagram illustrating grid scaling; where a is the initial residual grid diagram; b is the scaled grid diagram; c is the grid diagram used to divide the training and test sets; and d is the final grid diagram.
[0029] Figure 3 It is a diagram of the state set and the state transition matrix; where a is the state set diagram and b is the state transition matrix.
[0030] Figure 4 It is a graph showing the distribution and value calculation of neighbors.
[0031] Figure 5 This is a schematic diagram of value transfer during the iteration process; where a is the initialization process of the residual mesh; and bf is the result of each iteration process.
[0032] Figure 6 This is a distribution map of 450 soil nutrient sampling points within the area of Tangshan City.
[0033] Figure 7 This is a comparison chart of the root mean square error of the prediction results of five interpolation prediction methods. Detailed Implementation
[0034] Example: The soil nutrient sampling data in this embodiment comes from 450 soil nutrient sampling points within the Tangshan City area. The sampling point data includes the longitude and latitude of the sampling point, surface attributes, and soil organic matter nutrient content. The longitude and latitude information of the sampling point is its location coordinate information. The surface attributes of the sampling point include information describing the surface conditions such as slope and surface relief. The organic matter nutrient content of the sampling point is the soil attribute value information. Figure 6 The specific distribution of these 450 sampling points is given. This invention aims to predict the organic matter nutrient content in the soil of the tested area through interpolation. In this embodiment, 90 sampling points were randomly selected as the test set data, and the remaining 360 sampling points were used as the training set data for interpolation prediction.
[0035] like Figure 1 As shown, the spatial interpolation prediction method for soil nutrients of the present invention includes the following steps: S1. Use a backpropagation (BP) neural network to estimate the spatial systematic effects of soil nutrients and obtain the neural network fitting residuals. The specific operation method is as follows: S11. Collect data on the organic matter nutrient content at each sampling point and normalize it according to the following formula: u i = ( z i -z min) / ( z max -z min ) in, z i For the first i The attribute values of each sampling point z max The maximum value of the attribute at the sampling point. z min This represents the minimum value of the attribute at the sampling point.
[0036] S12. Use a backpropagation (BP) neural network to predict the soil attribute values of the sampling points. The number of input layer nodes is determined by the latitude and longitude dimension and the geographic attribute dimension of the sampling points, and the number of hidden layer nodes... H Determined by the following empirical formula: H =( I + O ) 1 / 2 + a in, H This represents the number of hidden layer nodes. I The number of nodes in the input layer. O Set the number of output layer nodes. O =1, a It is a constant.
[0037] The activation function used in the hidden layers of a BP neural network is the ReLU function. f ( x )=max(0, x ) in, f(x) The value of the activation function is max(0, x (to obtain input) x The maximum value between 0 and 0.
[0038] The loss function used in BP neural networks is the squared loss function: L ( Y , f ( X ))=( Y - f ( X )) 2 in, L For loss, Y This is the actual output value. f ( X ) represents the model's predicted value for the input variable X.
[0039] The interpolation residual is obtained using a backpropagation (BP) neural network, where: When predicting the attribute value of soil organic matter nutrient content: the number of input layer nodes is 8, the number of hidden layers is 1, the number of hidden layer nodes is 11, and the number of output layer nodes is 1; the neural network is trained 150 times.
[0040] When predicting nitrogen properties: the number of input layer nodes is 8, the number of hidden layers is 1, the number of hidden layer nodes is 13, and the number of output layer nodes is 1; the neural network is trained 220 times.
[0041] When predicting effective phosphorus properties: the number of input layer nodes is 8, the number of hidden layers is 1, the number of hidden layer nodes is 9, and the number of output layer nodes is 1; the neural network is trained 200 times.
[0042] When predicting the slow-release potassium properties: the number of input layer nodes is 8, the number of hidden layers is 1, the number of hidden layer nodes is 14, and the number of output layer nodes is 1; the neural network is trained 200 times.
[0043] When predicting the properties of readily available potassium: the input layer has 8 nodes, the hidden layer has 16 nodes, and the output layer has 1 node. The neural network is trained 180 times.
[0044] S13. Using the attribute values of organic matter nutrient content from 450 sampling points located within the Tangshan City area, and simultaneously using ArcGIS software to perform raster-to-point conversion on the corresponding areas in the China High-Resolution National Soil Information Grid Basic Attribute Dataset (2010-2018) from the National Earth System Science Data Center, surface attribute information for these 450 sampling points is obtained based on the latitude and longitude data of the sampling points. The soil attribute values of each sampling point are concatenated with the surface attribute data to construct a multi-source dataset. The multi-source dataset is divided into a training set and a test set. The training set is then fed into a BP neural network to obtain predicted values for each sampling point in the test set. Combined with the actual values of each sampling point in the test set, the residuals of each sampling point in the training set are obtained. Finally, the residuals of each sampling point in the training set are merged with the latitude and longitude data of each sampling point in the training set and the latitude and longitude data of each sampling point in the test set to form a residual dataset.
[0045] The specific operation method is as follows: Divide the residual dataset into 5 equal parts, named group A, group B, group C, group D, and group E. Recombine these five groups into groups BCD, ACD, ABD, and ABC. Train a backpropagation neural network using group BCD to obtain the predicted values for group A. y A The first prediction for Group E y E1 And so on, the predicted values for group B were subsequently obtained. yB The second predicted value for Group E y E2 Predicted values for Group C y C and the third predicted value of Group E y E3 Predicted values for group D y D and the fourth prediction value of Group E y E4 Then, using the actual values of groups A, B, C, and D... A , B , C , D Calculate the residuals for groups A, B, C, and D. ε A , ε B , ε C , ε D Set the residuals of group E ε E Temporarily set to 0, integrate the latitude and longitude data and corresponding residuals of each sampling point in groups A, B, C, D, and E into a residual dataset, with the following pattern: A 1, A 2, ε ).in,( A 1, A 2) is the latitude and longitude data of the sampling points. ε It is the residual of the sampling points.
[0046] S2. Perform gridding on the residual dataset to construct the residual grid.
[0047] As shown in Figure 2, the specific operation method of step S2 is as follows: S21. Calculate the minimum Euclidean distance between all pairs of latitude and longitude coordinates of all sampling points in the residual dataset. d min ; S22, Minimum Euclidean distance d min The initial diagonal length of the grid is set to be used to construct the grid. The relative positions of all sampling points are calculated according to latitude and longitude. The residual values of each sampling point in the training set calculated by the BP neural network are placed in the constructed grid to form a residual grid.
[0048] S23. The size of the residual grid is scaled down by using grayscale cells as blank cells without residual values and drawing horizontal lines to represent cells with residual values. Figure 2a) Ensure that each cell contains at most one residual value. The resulting residual grid is very sparse. To improve the efficiency of residual field processing, the cell size in the residual grid needs to be scaled. The processed grid forms the initial grid. Statistically determine the cell side lengths and the locations of the residual values. Place the residual values of the sampling points into the initial grid, keeping the relative positions of each residual value unchanged. If there is a positional conflict when placing residual values into the initial grid, place the next residual value in the adjacent cell of the conflicting location. This means placing the conflicting location in one of the adjacent positions (including top, bottom, left, and right). The placement result is as follows: Figure 2 As shown in b. This adjacent position is called the "neighbor position". To ensure that the overall relative position of each cell containing the residual values remains unchanged, the number of residual values of sampling points with conflicting positions that are transferred is controlled to 1.2% of the total number of cells in the grid. Within the transfer control ratio, the largest cell side length is the final scaled grid to be obtained. After all the residual values of the sampling points are placed into the cells, the scaled residual grid is formed. The cell containing the data of group E in this grid is set as the test set ( Figure 2 (Cells with diagonal lines drawn in c). For blank cells, cells with alternating horizontal lines are cells after iterative processing, where the grid data containing the pre-added residual values remains unchanged. Cells with reverse diagonal lines are cells after the test set update. The interpolated result is as follows: Figure 2 As shown in d, the root mean square error is calculated using the residual values in the cells with forward and reverse slopes.
[0049] S3. The scaled residual grid is assigned a full-value scaled residual grid, and after subsampling, the Bellman equation is used to iteratively update the full-value scaled residual grid until convergence, obtaining the Bellman equation's predicted value for the sampling point residuals. Then, the predicted value for soil nutrient properties at the sampling points by the BP neural network is added to the predicted value for the sampling point residuals by the Bellman equation, yielding the final spatial interpolation prediction result for soil nutrients. The specific operation method is as follows: S31. First, assign values to the cells in the scaling residual grid that have not yet been placed with residual values to form a full-value scaling residual grid. The value assigned is the sum of all the residual values already placed in the scaling residual grid and then divided by the total number of cells in the scaling residual grid.
[0050] S32. Subsample the full-value scaling residual grid to obtain spatial weight parameters. Randomly determine the subsampling ratio of the full-value scaling residual grid in the residual grid constructed in step S22. Assign a random number between 0 and 1 to each cell in the full-value scaling residual grid. If the random number is less than the subsampling ratio, retain the value entered in the cell. If the random number is greater than the subsampling ratio, replace the value entered in the cell with an empty value. After processing the values entered in all cells of the full-value scaling residual grid in this way, a subgrid with a specified subsampling ratio is generated. Assign values to the empty cells in the subgrid. The assigned value is the sum of all the values entered in the subgrid and then divided by the total number of cells in the subgrid. Determine the spatial weight factor γ of the subgrid by randomly searching parameters, and use this spatial weight factor γ as the spatial weight factor γ of the full-value scaling residual grid.
[0051] The spatial weighting factors γ for the organic matter attribute of the subgrid were determined by random search parameters as follows: 0.5418 for organic matter, 0.4926 for total nitrogen, 0.4127 for available phosphorus, 0.2998 for slow-release potassium, and 0.3633 for readily available potassium. The spatial weighting factors γ of each attribute's subgrid were then used as the spatial weighting factors γ of the entire residual grid for that attribute.
[0052] S33. In a Markov process, the state transition probability of a state S at a certain time t to another state S' at the next time t+1 is: P SS' =P[ S t+1 = S' | S t = S ] Where P is the probability. S and S t All are states at time t. S' and S t+1 All t The state at time +1.
[0053] This invention uses state transition probabilities to measure the influence of each neighbor on the current cell. For simplicity, it is assumed that neighbors have the same influence on the current cell. Figure 3 The state set shown in figure a represents the different positions of the cells within the grid. Figure 3The state transition matrix given in b shows the weight of each neighbor's influence on the current cell. For example, if a cell has three neighbors, then these three neighbors have the same degree of influence on the current grid, and each of them has a weight of 1 / 3.
[0054] S34. Iteratively update the full-value scaling residual grid using the Bellman equation until convergence, thus obtaining the predicted value of the residual for the sampling point after iterative update using the Bellman equation: v ( s ) = E[ R t+1 +γ v ( s t+1 )| s t = s ] Among them, R t+1 γ is the spatial weighting factor, representing the immediate reward for reaching a certain state. v ( s t+1 ) is the subsequent state value function with added spatial weighting factor γ.
[0055] Figure 4 It describes the positional relationship between the current cell and its neighbors in the grid, and gives the residual values in the neighbor positions. v 1. v 2. v 3) The residual value in the current cell ( v The functional relationship between () and () is the residual value in the current cell () v The residual values in the neighboring grids are multiplied by the spatial weighting factor λ and then averaged. Figure 5 A specific example illustrates the iterative process of mesh element values under the constraints of the Bellman equations. Specifically, Figure 5 'a' represents the initialization process of the residual mesh; Figure 5 b to Figure 5 f represents a process of five iterations. During this iteration, the numerical differences between each grid frame gradually decrease. Figure 5 f represents the final iteration result. Figure 5 The arithmetic expressions listed on the right detail the arithmetic expressions used in this embodiment. Figure 5 The update calculation process for each cell from a to b.
[0056] S35. The predicted value of soil nutrient properties at a certain sampling point by the BP neural network is added to the predicted value of the residual of the sampling point by the Bellman equation, which is used as the prediction model of the present invention - Neural Network Residual Bellman (NNRB) method, and the result of the addition is used as the final spatial interpolation prediction result of soil nutrients.
[0057] To prevent overfitting during network training, training is terminated when the training error continuously decreases while the test error begins to increase. The predicted values of soil nutrient properties obtained by the BP neural network are added to the predicted residual values obtained by iteratively updating the residuals using the Bellman equation to obtain the final spatial interpolation prediction result.
[0058] Figure 7 The table lists the root mean square error (RMSE) comparisons between the prediction results of the Neural Network Residual Bellman (NNRB) method used in this invention and those of other interpolation prediction methods, including Ordinary Kriging (OK), Inverse Distance Weight (IDW), BP Neural Network Interpolation Algorithm (BPNNIA), and Neural Network Residual Kriging (NNRK). Figure 7 The comparison results show that, in the comprehensive evaluation of various interpolation predictions for organic matter, nitrogen, phosphorus, available potassium, and slow-release potassium properties of soils in the Tangshan area, the interpolation method of this invention (neural residual Bellman method) has the best interpolation effect, while the BP neural network interpolation method (BPNNIA) has the worst. Specifically, for the interpolation prediction of available potassium, the neural network residual Bellman method (NNRB) has the best interpolation effect, while the neural network residual kriging method (NNRK) has the worst. Furthermore, only for this property, the neural network residual kriging method (NNRK) is inferior to the BP neural network interpolation method (BPNNIA). For the interpolation prediction of other properties, the neural network residual kriging method (NNRK) is superior to the BP neural network interpolation method (BPNNIA). For the prediction of the five soil property values in the Tangshan area, the inverse distance weighted interpolation method (IDW) only outperforms the ordinary kriging interpolation method (OK) in the nitrogen property prediction; the accuracy of the interpolation for the other properties is inferior to that of the ordinary kriging interpolation method (OK).
Claims
1. A spatial interpolation prediction method for soil nutrients, characterized in that, Includes the following steps: S1. Use a backpropagation (BP) neural network to estimate the spatial systematic effects of soil nutrients and obtain the neural network fitting residuals; the specific operation method is as follows: S11. Collect data on the organic matter nutrient content at each sampling point and normalize it according to the following formula: u i = ( z i -z min ) / ( z max - z min ) in, z i For the first i The attribute values of each sampling point z max The maximum value of the attribute at the sampling point. z min The minimum value of the attribute at the sampling point; S12. Use a backpropagation (BP) neural network to predict the soil attribute values at each sampling point. The number of input layer nodes is determined by the latitude and longitude dimension and the geographic attribute dimension of the sampling points, and the number of hidden layer nodes... H Determined by the following empirical formula: H =( I + O ) 1 / 2 + a in, H This represents the number of hidden layer nodes. I The number of nodes in the input layer. O Set the number of output layer nodes. O =1, a It is a constant; S13. Using the attribute value data of organic matter nutrient content at each sampling point, and obtaining the surface attribute information of each sampling point based on the latitude and longitude data of the sampling points; concatenating the soil attribute value information and surface attribute information of each sampling point to construct a multi-source dataset; dividing the multi-source dataset into a training set and a test set, further dividing the training set into multiple groups, and feeding each group into a BP neural network to obtain the predicted value of the corresponding sampling point, and combining it with the real value of each sampling point to obtain the residual of each sampling point in the training set; temporarily setting the residual of each sampling point in the test set to 0; merging the residual of each sampling point in the training set with the latitude and longitude data of each sampling point in the training set and the latitude and longitude data of each sampling point in the test set to form a residual dataset; S2. The residual dataset is gridded to construct a residual grid; the specific operation method is as follows: S21. Calculate the minimum Euclidean distance between all pairs of latitude and longitude coordinates of all sampling points in the residual dataset. d min ; S22, Minimum Euclidean distance d min Set the initial diagonal length of the cell in the grid to construct the grid. Calculate the relative positions of all sampling points according to latitude and longitude. Place the residual values of each sampling point in the training set calculated by the BP neural network into the constructed grid to form a residual grid. S23. Scale the size of the residual grid to form an initial grid. Place the residual values of the sampling points into the initial grid, keeping the relative positions of each residual value in the initial grid unchanged. If there is a position conflict in the cell where the residual value is placed, place the residual value to be placed later in the adjacent cell of the conflicting position. After all the residual values of the sampling points are placed, the scaled residual grid is formed. S3. The scaled residual grid is assigned to become a full-value scaled residual grid. After subsampling, the full-value scaled residual grid is iteratively updated using the Bellman equation until convergence, thus obtaining the predicted value of the sampling point residual by the Bellman equation. Then, the predicted value of the soil nutrient properties of the sampling point by the BP neural network is added to the predicted value of the sampling point residual by the Bellman equation to obtain the final spatial interpolation prediction result of the soil nutrients.
2. The spatial interpolation prediction method for soil nutrients according to claim 1, characterized in that, The activation function used in the hidden layers of the BP neural network is the ReLU function. f ( x )=max(0, x ) in, f(x) The value of the activation function is max(0, x (to obtain input) x The maximum value between 0 and 0.
3. The spatial interpolation prediction method for soil nutrients according to claim 1, characterized in that, The loss function used in the BP neural network is the squared loss function: L ( Y , f ( X ))=( Y - f ( X )) 2 in, L For loss, Y This is the actual output value. f ( X ) represents the model's predicted value for the input variable X.
4. The spatial interpolation prediction method for soil nutrients according to claim 1, characterized in that, The specific operation method of step S13 is as follows: Divide the residual dataset into 5 equal parts, named group A, group B, group C, group D, and group E. Mix and recombine the five groups to form group BCD, group ACD, group ABD, and group ABC. Use group BCD to train the BP neural network to obtain the predicted value of group A. y A The first prediction for Group E y E1 Similarly, the predicted values for group B were subsequently obtained. y B The second predicted value for Group E y E2 Predicted values for Group C y C and the third predicted value of Group E y E3 Predicted values for group D y D and the fourth prediction value of Group E y E4 Then, using the actual values of groups A, B, C, and D... A , B , C , D Calculate the residuals for groups A, B, C, and D. ε A , ε B , ε C , ε D ; the residuals of group E ε E Temporarily set to 0, integrate the latitude and longitude data and corresponding residuals of each sampling point in groups A, B, C, D, and E into a residual dataset, with the following pattern: A 1, A 2, ε ); in,( A 1, A 2) is the latitude and longitude data of the sampling points. ε It is the residual of the sampling points.
5. The spatial interpolation prediction method for soil nutrients according to claim 1, characterized in that, In step S23, the number of residual values of sampling points with location conflicts that are transferred is controlled to be within 2% of the total number of cells in the grid.
6. The spatial interpolation prediction method for soil nutrients according to claim 1, characterized in that, The specific operation method of step S3 is as follows: S31. First, assign values to the cells in the scaling residual grid that have not been placed with residual values to form a full-value scaling residual grid. The value assigned is the sum of all the residual values that have been placed in the scaling residual grid and then divided by the total number of cells in the scaling residual grid. S32. Subsample the full-value scaling residual grid to obtain spatial weight parameters. Randomly determine the subsampling ratio of the full-value scaling residual grid in the residual grid constructed in step S22. Assign a random number between 0 and 1 to each cell in the full-value scaled residual grid; If the random number is less than the subsampling ratio, then the value entered in this cell is retained; If the random number is greater than the subsampling ratio, then replace the value entered in the cell with an empty value; After processing the values entered into all cells of the full-value scaling residual grid in this way, a subgrid with a specified subsampling ratio is generated. The empty cells in the subgrid are assigned values, the size of which is the sum of all the values entered into the subgrid and then divided by the total number of cells in the subgrid. The spatial weight factor γ of the subgrid is determined by randomly searching parameters, and this spatial weight factor γ is used as the spatial weight factor γ of the full-value scaling residual grid. S33. In a Markov process, the state transition probability of a state S at a certain time t to another state S' at the next time t+1 is: P SS' =P[ S t+1 = S' | S t = S ] Where P is the probability. S and S t All are states at time t. S' and S t+1 All t The state at time +1; S34. Iteratively update the full-value scaling residual grid using the Bellman equation until convergence, thus obtaining the predicted value of the residual for the sampling point after iterative update using the Bellman equation: v ( s ) = E[ R t+1 +g v ( s t+1 )| s t = s ] Among them, R t+1 γ is the spatial weighting factor, representing the immediate reward for reaching a certain state. v ( s t+1 () represents the subsequent state value function with added spatial weighting factor γ; S35. Add the predicted value of soil nutrient properties at a certain sampling point by the BP neural network to the predicted value of the residual at that sampling point by the Bellman equation, and take the sum as the final spatial interpolation prediction result of soil nutrients.
Citation Information
Patent Citations
Extra-high arch dam deformation spatio-temporal series prediction method based on spatio-temporal integration
CN108846199A
Image content automatic description method based on construction of chinese visual vocabulary list
WO2021223323A1