A cultivated land quality monitoring method and system based on hyperspectral remote sensing
By constructing an inversion model using hyperspectral remote sensing image data and the Kriging interpolation algorithm, and combining site and climate condition indicators, the accuracy and efficiency problems of farmland quality assessment in traditional methods have been solved, achieving efficient and accurate farmland quality monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG LAND DEV GRP CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional multispectral remote sensing image data cannot fully and meticulously reflect the quality of cultivated land, which limits the accuracy and reliability of cultivated land quality assessment. Traditional field sampling and laboratory analysis are inefficient and costly, and cannot achieve rapid monitoring over large areas.
Hyperspectral remote sensing image data was used, and background field data was generated by combining the Kriging interpolation algorithm. An inversion model was constructed, and the model was trained using training samples. A minimum dataset was constructed by combining site and climate condition indicators, and the soil fertility index was calculated. A weighted summation algorithm was used to improve the monitoring accuracy.
It enables rapid and large-scale monitoring of nutrients in the topsoil, improving monitoring efficiency and accuracy, and comprehensively reflecting the land's overall productivity.
Smart Images

Figure CN122134493A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of farmland quality monitoring, and in particular to a method and system for farmland quality monitoring based on hyperspectral remote sensing. Background Technology
[0002] As a fundamental resource for agricultural production, arable land's quality directly affects crop yield and quality, thus impacting national food security and the stable development of the social economy. With the continuous growth of the global population and the acceleration of urbanization, arable land resources are becoming increasingly scarce, making precise and efficient detection and monitoring of arable land quality particularly urgent. Traditional methods for arable land quality testing mainly rely on field sampling and laboratory analysis. While these methods can obtain relatively accurate information such as soil nutrients, they suffer from problems such as large workload, low efficiency, high cost, and inability to achieve large-scale rapid monitoring, making it difficult to meet the needs of modern agriculture for dynamic monitoring of arable land quality.
[0003] Related technologies utilize multispectral remote sensing image data to extract information such as vegetation indices from the images and combine them with ground sampling data to establish simple statistical models to estimate indicators related to arable land quality, such as soil fertility and crop yield. However, multispectral remote sensing image data contains relatively limited information due to its limited number of bands and low spectral resolution.
[0004] In the assessment of arable land quality, relying solely on information such as vegetation indices extracted from multispectral data is insufficient to comprehensively and meticulously reflect all aspects of arable land quality. Consequently, the accuracy and reliability of the estimation results of statistical models based on multispectral data are limited when estimating arable land quality-related indicators. Summary of the Invention
[0005] To improve the accuracy of farmland quality monitoring results, this application provides a farmland quality monitoring method and system based on hyperspectral remote sensing.
[0006] Firstly, this application provides a method for monitoring farmland quality based on hyperspectral remote sensing, employing the following technical solution: A method for monitoring farmland quality based on hyperspectral remote sensing includes the following steps: We acquire hyperspectral remote sensing image data containing different soil types and measured values of topsoil nutrients. Based on the measured values of topsoil nutrients, we use the Kriging interpolation algorithm to generate background field data and construct an inversion model. We construct training samples based on the background field data and hyperspectral remote sensing image data and use the training samples to train the inversion model to obtain the trained inversion model. The hyperspectral remote sensing image data to be processed is input into the trained inversion model to obtain the inversion values of the topsoil nutrient index. Based on the inversion values of the topsoil nutrient index, a minimum dataset is constructed by combining site condition index and climate condition index. The membership degree of each index in the minimum dataset is calculated, and weights are set for each index in the minimum dataset. The target soil fertility index is calculated by using a weighted summation algorithm through membership degree and weight.
[0007] This application first acquires hyperspectral remote sensing image data and measured values of topsoil nutrients. Hyperspectral remote sensing image data contains rich spectral information, capable of capturing subtle spectral characteristics of soil in different bands. Different soil types have unique spectral reflectance characteristics. This application utilizes hyperspectral data for subsequent processing to more accurately distinguish different soil types, providing more detailed basic data for subsequent farmland quality monitoring and helping to improve monitoring accuracy and resolution. Then, background field data is generated based on the measured topsoil nutrient values using the Kriging interpolation algorithm. The Kriging interpolation algorithm is a spatial autocorrelation-based interpolation method that can fully utilize known measured topsoil nutrient values to generate continuous background field data. Next, training samples are constructed based on the background field data and hyperspectral remote sensing image data, establishing a quantitative relationship between hyperspectral remote sensing image data and topsoil nutrient indicators. This application can directly derive the values of topsoil nutrient indicators from hyperspectral remote sensing images, achieving rapid and large-scale monitoring of topsoil nutrients and improving monitoring efficiency. The data to be processed is then input into the trained inversion model to obtain the inversion value of the topsoil nutrient index. Based on the inversion value, the site condition index and the climate condition index are combined to construct a minimum dataset. This comprehensively considers multiple key factors affecting the quality of cultivated land, making the evaluation of cultivated land quality more comprehensive. This application comprehensively considers multiple factors such as topsoil nutrients, site conditions and climate conditions, so that the calculated soil fertility index can reflect the comprehensive productivity of the land more comprehensively and accurately.
[0008] Optionally, before constructing the inversion model, the method further includes: Hyperspectral reflectance data for different soil types were extracted from hyperspectral remote sensing image data, and measured reflectance data for the corresponding areas were collected. Initial reflectance curves for different soil types were plotted using hyperspectral reflectance data of different soil types. The initial reflectance curves were then corrected using measured reflectance data to obtain the final reflectance curves. Spectral features of different soil types were extracted based on the final reflectance curves, and spectral indices of different soil types were calculated based on these spectral features.
[0009] This application combines remote sensing and measured data by extracting hyperspectral reflectance data for different soil types from hyperspectral remote sensing image data and simultaneously collecting measured reflectance data for the corresponding areas. The measured data, serving as the ground truth, provides an accurate reference for the hyperspectral remote sensing image data, effectively reducing deviations caused by atmospheric interference, sensor errors, and other factors, thus improving data reliability. Subsequently, initial reflectance curves for different soil types are plotted based on the extracted hyperspectral reflectance data from the hyperspectral remote sensing image data. These curves are then corrected using the measured reflectance data to obtain the final reflectance curves. This reduces inaccuracies in the initial reflectance curves caused by data errors, model assumptions, and other factors, making the reflectance curves more closely reflect the true reflectance characteristics of the soil.
[0010] This application extracts spectral features from the final reflectance curves of different soil types. Since the final reflectance curves are corrected to be more accurate, the extracted spectral features can more realistically reflect the optical properties and intrinsic characteristics of the soil. These accurate spectral features are key inputs for constructing the inversion model, which helps the inversion model to better capture the relationship between soil properties and spectral information, thereby improving the fitting ability and prediction accuracy of the inversion model.
[0011] Optionally, in the process of generating background field data, the method further includes: The spatial distribution of different soil types is identified based on the final reflectance curves and spectral indices, and Kriging interpolation parameters are set according to the spatial distribution of different soil types. For different soil types, the correlation coefficients between each hyperspectral band and the measured values of nutrients in the topsoil were calculated. Hyperspectral bands with correlation coefficients greater than a preset threshold were designated as high-correlation bands. The correlation coefficients of the high-correlation bands were normalized to obtain correction coefficients. The weights of the Kriging interpolation parameters for each hyperspectral band within the soil type region were then set based on the correction coefficients.
[0012] This application identifies the spatial distribution of different soil types based on the final reflectance curves and spectral indices, and sets Kriging interpolation parameters accordingly, fully considering the spatial heterogeneity of soil types. Different soil types exhibit significant differences in physical and chemical properties, which are reflected in their spectral characteristics and thus affect the spatial distribution of nutrients. Setting Kriging interpolation parameters based on the spatial distribution differences of soil types allows the interpolation process to better reflect the actual characteristics of different soils.
[0013] Subsequently, the correlation coefficients between each hyperspectral band and the measured values of nutrients in the topsoil were calculated. Highly correlated bands were selected, and the correlation coefficients were normalized to obtain correction coefficients, which were then used to set the weights of the kriging interpolation parameters for each hyperspectral band. This application sets the weights of the kriging interpolation parameters based on the correlation between hyperspectral bands and measured values of nutrients in the topsoil, which highlights the band information that makes a significant contribution to nutrient prediction. Highly correlated bands contain more effective information related to nutrients; by assigning them greater weights, the interpolation process can fully utilize this key information, reduce interference from irrelevant or weakly correlated bands, and further improve the quality of the interpolation results.
[0014] Background field data calculated using optimized Kriging interpolation parameters can more accurately reflect the spatial distribution of nutrients in the topsoil. Using such background field data for inversion model training helps improve the model's predictive ability for topsoil nutrient indices, making the model's output inversion values more reliable. Accurate soil fertility index calculation depends on accurate topsoil nutrient inversion values. Optimized parameter settings improve the quality of background field data, thereby enhancing the performance of the inversion model and making the obtained topsoil nutrient inversion values closer to the true values. Based on this, constructing a minimal dataset by combining site condition indicators and climate condition indicators and calculating the target soil fertility index can improve the accuracy and reliability of the soil fertility index calculation results.
[0015] Optionally, constructing training samples based on background field data and hyperspectral remote sensing image data includes: A hyperspectral remote sensing image base map is generated based on hyperspectral remote sensing image data. The background field data is spatially registered with the hyperspectral remote sensing image base map. The spectral reflectance features of the pixel positions in the registered hyperspectral remote sensing image base map corresponding to the background field data are extracted. A feature vector is constructed based on the spectral reflectance features. The feature vector is correlated with the measured values of topsoil nutrients in the background field data to obtain training samples.
[0016] This application generates a hyperspectral remote sensing image base map based on hyperspectral remote sensing image data and spatially registers it with background field data. The hyperspectral remote sensing image base map reflects the true spatial distribution of the land surface, while the background field data contains spatial distribution information of topsoil nutrients. Spatial registration improves the spatial consistency between the two types of data, ensuring that the subsequently extracted spectral reflectance features truly correspond spatially to the corresponding measured values of topsoil nutrients. This reduces data association errors caused by spatial misalignment and aligns with the basic logic of geographic information processing and data analysis.
[0017] Subsequently, the spectral reflectance features of the corresponding pixel positions in the registered hyperspectral remote sensing image base map and the background field data are extracted. A feature vector is constructed based on the spectral reflectance features, and then the feature vector is correlated with the measured values of topsoil nutrients in the background field data to obtain training samples. The above scheme can make full use of the rich spectral information of hyperspectral remote sensing images, establish a connection between spectral features and actual topsoil nutrient indicators, and provide a reasonable and effective data foundation for building an inversion model that can accurately predict topsoil nutrients.
[0018] Optionally, the method further includes: The numerical distribution of measured values of topsoil nutrients in the statistical background field data is analyzed, and the sparse intervals of topsoil nutrient indicators are identified based on the numerical distribution. The sparse intervals refer to the regions in the numerical distribution of topsoil nutrient indicators with a frequency lower than a preset frequency threshold. Data augmentation processing was performed on the measured values of topsoil nutrients in sparse intervals to obtain new measured values of topsoil nutrients.
[0019] In practice, the values of topsoil nutrient indicators are often not uniformly distributed. Certain intervals may exhibit sparse data points due to limited sample sizes or measurement difficulties. This application accurately identifies these sparse intervals by statistically analyzing frequencies and setting preset frequency thresholds. Subsequent data augmentation processing on the measured topsoil nutrient values within these sparse intervals addresses the problem of uneven data distribution. In machine learning and model training, uneven data distribution leads to insufficient learning of data within sparse intervals, thus affecting the model's generalization ability and prediction accuracy. Data augmentation for sparse intervals increases the number of samples within those intervals, making the data distribution more uniform. In training samples, sparse intervals have fewer data points, and the model may not be able to fully capture the relationship between topsoil nutrient indicators and spectral features within these intervals during the learning process. This application achieves a more uniform data distribution through data augmentation, enabling the inversion model to learn more comprehensive data features, reducing dependence on specific data intervals, and thus enhancing the model's generalization performance.
[0020] Optionally, when training the inversion model using training samples, the method further includes: Based on the background field data and the prediction results of the inversion model, the interpolation variance of the nutrient index of the topsoil at each spatial location is calculated. The interpolation variance is then normalized, and the complement of the normalized interpolation variance is calculated. The complement is used to adjust the loss function of the inversion model. The calculation model of the adjusted loss function is as follows: ; in, The adjusted loss function; M is the number of interpolation variances; It is the complement of the variance of the i-th interpolation; The background field data corresponding to the i-th interpolation variance; These are the predicted values from the inversion model.
[0021] Interpolation variance reflects the uncertainty of topsoil nutrient indicators in background field data at different spatial locations. The topsoil nutrient status at different spatial locations may be affected by various factors (such as soil type, topography, fertilization, etc.), leading to differences and uncertainties in its distribution. This application quantifies this uncertainty by calculating the interpolation variance of topsoil nutrient indicators at each spatial location. The interpolation variance is then normalized, and its complement is calculated. This complement is then used to adjust the loss function of the inversion model, enabling the model to focus more on areas of higher uncertainty during training. Since areas of higher uncertainty often indicate more complex data and greater difficulty in model prediction, giving these areas greater weight helps the inversion model better learn the data characteristics under these complex conditions.
[0022] The adjusted loss function calculation model is an improvement on the traditional mean squared error loss function. When the interpolation variance at a certain location is large, its complement is also relatively large. In the loss function, the prediction error at that location will be given greater weight, thus making the inversion model pay more attention to improving the prediction accuracy at that location during training. This allows the inversion model to better adapt to the data characteristics of different spatial locations and improve the overall performance of the model.
[0023] By introducing the complement of the interpolation variance as a weight to adjust the loss function, the inversion model will increase the training intensity for areas with greater uncertainty during the training process. These areas usually contain more complex land cover features and soil nutrient changes. The adjusted loss function can guide the inversion model to pay more attention to these complex areas, thereby improving the prediction accuracy of the inversion model in these areas and making the prediction results of the inversion model more accurate and reliable.
[0024] Optionally, after generating a hyperspectral remote sensing image base map based on hyperspectral remote sensing image data, the process includes: The hyperspectral remote sensing image base map is cropped using a preset window to obtain multiple image blocks. Morphological opening operations are then used to remove isolated noise points from the image blocks to obtain the processed image blocks. The normalized vegetation index and moisture index of each pixel in the processed image block are calculated. Pixels with a normalized vegetation index less than a preset vegetation index threshold or a moisture index greater than a preset moisture threshold are marked as non-cultivated land pixels. The proportion of non-cultivated land pixels in the processed image block is counted. The processed image block with the proportion of non-cultivated land pixels less than a preset percentage is used as the new hyperspectral remote sensing image base map.
[0025] Hyperspectral remote sensing image data typically has a large amount of data and complex spatial information. Directly processing the entire image will face problems such as high computational resource consumption and low processing efficiency. This application decomposes large-scale data into multiple relatively small and independent data units by cropping it into multiple image blocks, which facilitates subsequent parallel processing and analysis.
[0026] Morphological opening is an image processing method based on mathematical morphology. It first performs erosion to remove small noise points from image patches, and then performs dilation to restore the shape of objects in the image. In hyperspectral remote sensing images, due to sensor errors, atmospheric interference, and other factors, some isolated noise points may exist in image patches. These noise points can affect subsequent index calculations and farmland identification. This application employs morphological opening to remove isolated noise points, which can effectively improve the quality of image patches and provide a reliable data foundation for the accurate calculation of the Normalized Difference Vegetation Index (NDVI) and Moisture Index.
[0027] This application proposes a method for identifying cultivated land based on vegetation and moisture characteristics. It calculates the normalized vegetation index (NDI) and moisture index of each pixel in a processed image patch and labels non-cultivated land pixels according to preset thresholds. The NDI reflects the growth status and coverage of vegetation, while the moisture index is related to the moisture content of soil and vegetation. Generally, cultivated land pixels typically have a higher NDI and a relatively lower moisture index. By setting reasonable NDI and moisture thresholds, this application can label pixels that do not meet the characteristics of cultivated land as non-cultivated land pixels. Then, it calculates the proportion of non-cultivated land pixels and uses processed image patches with a proportion lower than a preset percentage as new hyperspectral remote sensing image base maps. This further removes areas containing a large amount of non-cultivated land information from the image patch, improving the purity and quality of cultivated land information in the image base map.
[0028] The resulting hyperspectral remote sensing image base map, after the above processing, removes isolated noise points and image patches with excessive non-cultivated land information, significantly improving data quality. High-quality data reduces the interference of noise and irrelevant information on subsequent modeling and analysis, enabling the inversion model to more accurately learn the relationship between topsoil nutrients and hyperspectral features, thereby improving the model's prediction accuracy and reliability.
[0029] Optionally, the method further includes: Based on the new hyperspectral remote sensing image base map, the Euclidean distance between the current pixel and its neighboring pixels is calculated. Abnormal pixels whose Euclidean distance exceeds a preset distance threshold are removed. The missing pixels after removal are filled using the sliding window method. The filling value of the missing pixels is the median spectral reflectance of the neighboring pixels.
[0030] This application calculates the Euclidean distance between the current pixel and its neighboring pixels. Euclidean distance measures the similarity between two pixels in the spectral space; a larger distance indicates a greater difference in the spectral characteristics of the two pixels. In hyperspectral remote sensing images, anomalous pixels may be caused by sensor malfunctions, atmospheric interference, noise, etc., and their spectral characteristics differ significantly from surrounding normal pixels. By comparing the Euclidean distance with a preset distance threshold, these anomalous pixels can be effectively identified and removed, thereby improving the quality and reliability of the image data.
[0031] Subsequently, a sliding window method was used to fill in the missing pixels left after removing outlier pixels, and the median spectral reflectance of neighboring pixels was used as the fill value. The sliding window method can comprehensively consider the information of multiple neighboring pixels in a local area, reducing the randomness and errors that may exist in a single pixel. The median spectral reflectance was chosen as the fill value because the median has good robustness to outliers and can reduce the impact of extreme values on the fill result to a certain extent. After removing outlier pixels, the image data is cleaner and can more realistically reflect the spectral characteristics and spatial distribution information of ground objects.
[0032] Optionally, the method further includes: obtaining the historical geofertility index of the region to which the hyperspectral remote sensing image data to be processed belongs, automatically dividing the threshold interval using the K-means clustering algorithm to obtain the division result, and obtaining the level to which the target geofertility index belongs based on the division result.
[0033] Secondly, this application provides a farmland quality monitoring system based on hyperspectral remote sensing, which adopts the following technical solution: A farmland quality monitoring system based on hyperspectral remote sensing includes: a processor and a memory communicatively connected to the processor; The memory is provided with a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the processor processes a computer program stored on the computer-readable storage medium, it implements the method as described in the first aspect.
[0034] In summary, this application includes at least one of the following beneficial technical effects: 1. This application first acquires hyperspectral remote sensing image data and measured values of topsoil nutrients. Hyperspectral remote sensing image data contains rich spectral information and can capture subtle spectral characteristics of soil in different bands. Different soil types have unique spectral reflectance characteristics. This application utilizes hyperspectral data for subsequent processing to more accurately distinguish different soil types, providing more detailed basic data for subsequent farmland quality monitoring and helping to improve the accuracy and resolution of monitoring.
[0035] 2. This application utilizes the Kriging interpolation algorithm to generate background field data based on measured values of topsoil nutrients. Kriging interpolation is a spatial autocorrelation-based interpolation method that can fully utilize known measured values of topsoil nutrients to generate continuous background field data. Subsequently, training samples are constructed based on the background field data and hyperspectral remote sensing image data, establishing a quantitative relationship between the hyperspectral remote sensing image data and topsoil nutrient indicators. This application can directly derive the values of topsoil nutrient indicators from hyperspectral remote sensing images, achieving rapid and large-scale monitoring of topsoil nutrients and improving monitoring efficiency.
[0036] 3. This application inputs the data to be processed into a trained inversion model to obtain the inversion value of the topsoil nutrient index. Based on the inversion value, it constructs a minimum dataset by combining site condition index and climate condition index. It comprehensively considers multiple key factors affecting the quality of cultivated land, making the evaluation of cultivated land quality more comprehensive. By comprehensively considering multiple factors such as topsoil nutrients, site conditions and climate conditions, this application enables the calculated soil fertility index to reflect the comprehensive productivity of the land more comprehensively and accurately. Attached Figure Description
[0037] Figure 1 This is a flowchart of Embodiment 1 of this application; Figure 2 This is a flowchart of Embodiment 3 of this application. Detailed Implementation
[0038] The following combination Figure 1 and Figure 2 This application will be described in further detail.
[0039] Example 1: This example discloses a method for monitoring farmland quality based on hyperspectral remote sensing, referring to... Figure 1 The method includes: S11 data acquisition and processing, and S12 calculation of soil fertility index. First, hyperspectral remote sensing image data of different soil types and measured values of topsoil nutrients are acquired. Based on the measured values of topsoil nutrients, background field data is generated using the Kriging interpolation algorithm. An inversion model is constructed and training samples are generated. The inversion model is trained using the training samples. Then, the hyperspectral remote sensing image data to be processed is input into the trained inversion model to obtain the inversion values of topsoil nutrient index. A minimum dataset is constructed by combining site and climate condition indicators, the membership degree of each indicator is calculated, and weights are set. Finally, the target soil fertility index is calculated using a weighted summation algorithm. The execution process of each step in this embodiment is as follows: The S11 data acquisition and processing utilizes airborne sensors or spectrometers to collect hyperspectral remote sensing image data containing different soil types, covering the visible-near infrared (400-1000nm) and shortwave infrared (1000-2500nm) bands, with over 100 bands and a spectral resolution of less than or equal to 10nm. Sampling areas are designed for different soil types (such as red soil, black soil, brown soil, and alluvial soil), ensuring that the hyperspectral remote sensing image data covers the distribution areas of multiple soil types.
[0040] In this embodiment, grid sampling or stratified random sampling is used to collect the measured values of topsoil nutrients for various soil types. 20-50 sampling points are set up for each soil type area, with a sampling depth of 0-20cm. The measured values of topsoil nutrients include organic matter (SOM), total nitrogen (TN), available phosphorus (AP), available potassium (AK), etc.
[0041] The mean, variance, skewness, and other statistical measures of various topsoil nutrient values are calculated, and the theoretical semivariogram function is fitted to determine the nugget, sill, and range values. Based on the theoretical semivariogram function, the values of topsoil nutrient indicators for unsampled points are estimated to generate rasterized background field data (with the same resolution as the remote sensing image).
[0042] In other embodiments, after generating rasterized background field data, the method further includes: The statistical background field data includes the following steps: drawing a histogram of the numerical distribution of nutrient values in the topsoil layer based on the measured values of each nutrient index in the topsoil layer; counting the number of measured nutrient values in the topsoil layer in different numerical intervals; setting a preset frequency threshold for each numerical interval based on the total number of measured nutrient values in the topsoil layer and the number of measured nutrient values in different numerical intervals; if the frequency of a certain numerical interval is less than the preset frequency threshold for that numerical interval, then that numerical interval is considered to be a sparse interval. The preset frequency threshold is equal to the ratio of the total number of measured nutrient values in the topsoil layer to the number of numerical intervals.
[0043] For the measured values of topsoil nutrients in sparse intervals, oversampling or generative adversarial networks are used for data augmentation to obtain new measured values of topsoil nutrients.
[0044] Taking oversampling as an example, the process of data augmentation for measured values of topsoil nutrients in sparse regions is as follows: Obtain the measured values of topsoil nutrients within the sparse interval. Add Gaussian noise to each measured value of topsoil nutrients within the sparse interval to generate new measured values of topsoil nutrients. Continue until the frequency of the sparse interval increases to a preset frequency threshold, at which point no new measured values of topsoil nutrients will be generated.
[0045] Background field data were regenerated using the Kriging interpolation algorithm based on the new and existing measured values of topsoil nutrients.
[0046] Construct an inversion model, which can be a machine learning model such as Random Forest (RF), Support Vector Machine (SVM), or Gradient Boosting Tree (GBDT), or a deep learning model such as 1D-CNN, 3D-CNN, or iTransformer.
[0047] Taking the iTransformer model as an example, the working principle of the inversion model is as follows: The iTransformer model processes input sequences and their corresponding high-dimensional feature vectors from a novel transposed perspective. By inverting the original Transformer modules, iTransformer first maps the entire sequence of the same variable into a high-dimensional feature representation. The resulting feature vectors, with the variable as the primary descriptor, independently characterize the implicit features of each variable. Subsequently, the attention module naturally models the correlation between variables, while the feedforward network encodes the features of historical observations layer by layer and maps the learned features to future predictions.
[0048] In this embodiment, the parameter settings of the iTransformer model are shown in Table 1. In other embodiments, the model parameters can be set according to requirements.
[0049] Table 1 Parameter name Parameter Function Parameter settings batch size Each batch of input sample points is mapped into a high-dimensional vector of shape [8, n, 512], resulting in a prediction result of shape [8, 1]. 8 Sample size Number of bands in the model input image auto Number of iteration rounds Total number of iterations 100 Learning rate Step size for parameter updates during training 100 Parameter optimization Adaptive optimization of learning rate parameters based on gradient descent algorithm Adam loss function A function that measures the difference between model predictions and actual results. MSE The pixel values in the hyperspectral remote sensing image data are correlated with the corresponding background field data to obtain spectral-nutrient sample pairs, i.e., training samples. The inversion model is trained using these training samples to obtain the trained inversion model, which includes the following: Hyperspectral remote sensing image data of different soil types are mapped into high-dimensional feature vectors of dimension 512 through an embedding layer and input into the trained inversion model to obtain predicted values of topsoil nutrient indicators. The measured topsoil nutrient values corresponding to the background field data are used as label values. The loss is calculated using a loss function, and the gradient is calculated through backpropagation to optimize the inversion model parameters. The model is iteratively trained until convergence, resulting in the trained iTransformer model. The accuracy of the trained iTransformer model is then evaluated using a pre-built test set of sample data.
[0050] S12 calculates the soil fertility index by inputting the hyperspectral remote sensing image data to be processed into the trained inversion model to obtain the inversion value of the topsoil nutrient index.
[0051] Based on the inversion values of topsoil nutrient indicators, a minimal dataset is constructed by combining site condition indicators and climate condition indicators. Site condition indicators include topography (such as altitude, slope, aspect), soil type, soil texture, and soil thickness. These indicators reflect the geographical environment and basic conditions of soil formation and have a significant impact on the distribution and changes of topsoil nutrients. For example, in areas with higher altitudes and lower temperatures, the soil development level may be relatively lower, and the nutrient content may also differ. In areas with steeper slopes, soil erosion is stronger, which may lead to nutrient loss and affect the nutrient status of the topsoil. Climate condition indicators cover temperature, precipitation, sunshine duration, and wind speed. Climate factors indirectly affect the content and cycling of topsoil nutrients by influencing soil weathering processes, microbial activity, and crop growth. For example, in areas with abundant precipitation, soil leaching is stronger, which may lead to some nutrient loss; while in areas with sufficient sunshine, it is conducive to crop photosynthesis, promoting the absorption and utilization of nutrients by crops, thereby affecting the dynamic changes of topsoil nutrients.
[0052] The process of constructing the minimum dataset in this embodiment is as follows: Initially, relatively important local indicators are selected as evaluation factors. After the initial selection of evaluation factors, these factors need to be analyzed one by one to evaluate their correlation and importance with the inversion values of topsoil nutrient indicators. Various statistical analysis methods can be used, such as correlation analysis and principal component analysis.
[0053] Correlation analysis can intuitively reflect the degree of linear correlation between each evaluation factor and the inverted values of topsoil nutrient indicators. By calculating the correlation coefficient, it can be determined whether the factor and the nutrient indicator are positively or negatively correlated, and the strength of the correlation. For example, if the correlation coefficient between a certain site condition indicator and the predicted nitrogen content is high, it indicates that the indicator has a significant impact on changes in nitrogen content and may be an important evaluation factor.
[0054] Principal component analysis can transform multiple correlated evaluation factors into a few independent principal components, which retain most of the information of the original factors. By analyzing the loading matrix of the principal components, it is possible to determine which original factors dominate in the principal components, thereby screening out the key factors that have a significant impact on topsoil nutrients.
[0055] After a comprehensive analysis of the proposed evaluation factors, unsuitable factors were excluded based on the analysis results. Unsuitable factors may include those with extremely weak correlation to the inversion values of topsoil nutrient indicators, those with no significant impact on nutrient changes, and those with severe multicollinearity (multicollinearity can lead to unstable model estimations and affect the accuracy of the evaluation results).
[0056] After excluding unsuitable evaluation factors, the remaining factors are used as evaluation factors, and all evaluation factors are integrated into a minimal dataset.
[0057] The following section will further elaborate on the process of constructing the minimum dataset using specific examples.
[0058] In soil quality assessment and nutrient management in orchards of a certain region, a minimal dataset needs to be constructed to accurately and efficiently evaluate the nutrient status of the topsoil. Based on the local orchard's planting characteristics, soil type, and previous research experience, 12 relatively important indicators were initially selected as evaluation factors, as follows: Soil physical properties: soil bulk density and soil porosity.
[0059] Soil chemical property indicators: soil organic matter content, soil total nitrogen content, soil total phosphorus content, soil total potassium content, soil available nitrogen content, soil available phosphorus content, soil available potassium content, and soil pH value.
[0060] Site condition indicators: terrain slope and altitude.
[0061] Correlation analysis was used to calculate the correlation coefficients between the 12 proposed evaluation factors and the inverted values of topsoil nutrient indicators (taking the predicted values of nitrogen, phosphorus, and potassium content as examples). The data were processed using statistical software to obtain the correlation coefficient matrix.
[0062] Correlation with predicted nitrogen content: The correlation coefficient between total soil nitrogen content and predicted nitrogen content was as high as 0.92, showing a strong positive correlation. This indicates that total soil nitrogen content has a significant impact on nitrogen content changes and is an important factor in evaluating nitrogen content. The correlation coefficient between available soil nitrogen content and predicted nitrogen content was 0.85, also showing a strong positive correlation, indicating that it has a significant impact on nitrogen content changes. However, the correlation coefficient between topographic slope and predicted nitrogen content was only 0.12, showing an extremely weak correlation, indicating that topographic slope has a very small impact on nitrogen content changes.
[0063] Correlation with predicted phosphorus content: The correlation coefficient between total phosphorus content and predicted phosphorus content in soil was 0.88, showing a strong positive correlation, making it a key factor in evaluating phosphorus content. The correlation coefficient between available phosphorus content and predicted phosphorus content was 0.82, also showing a strong positive correlation. The correlation coefficient between altitude and predicted phosphorus content was 0.08, indicating an extremely weak correlation.
[0064] Correlation with predicted potassium content: The correlation coefficient between total potassium content and predicted potassium content in soil was 0.86, indicating a strong positive correlation. The correlation coefficient between available potassium content and predicted potassium content in soil was 0.80, also indicating a strong positive correlation. The correlation coefficient between soil bulk density and predicted potassium content was 0.15, showing a relatively weak correlation.
[0065] Using principal component analysis, the 12 correlated evaluation factors were transformed into a few independent principal components. The eigenvalues, variance contribution rates, and loading matrices of the principal components were calculated using statistical algorithms.
[0066] The variance contribution rate of the first principal component reached 45%. In the loading matrix, soil organic matter content, total nitrogen content, total phosphorus content, and total potassium content had relatively high loading values, indicating that these factors dominate the first principal component and have a significant impact on topsoil nutrients. The variance contribution rate of the second principal component was 25%, with relatively high loading values for soil available nitrogen content, available phosphorus content, and available potassium content, indicating their important influence in the second principal component. The variance contribution rate of the third principal component was 15%, with soil pH value showing a prominent loading value.
[0067] Based on the results of correlation analysis and principal component analysis, unsuitable factors were excluded: Factors with extremely weak correlations: The correlation between terrain slope and the predicted values of nitrogen, phosphorus, and potassium content is extremely weak; the correlation between altitude and the predicted value of phosphorus content is extremely weak, and the correlation with the predicted values of nitrogen and potassium content is also weak. Therefore, terrain slope and altitude are excluded as factors.
[0068] Factors with insignificant impact: Soil bulk density has a weak correlation with the predicted potassium content and did not show a significant impact in the principal component analysis, so soil bulk density is excluded.
[0069] Factors exhibiting severe multicollinearity: Further analysis revealed strong multicollinearity between total soil nitrogen content and available soil nitrogen content, as well as between total soil phosphorus content and available soil phosphorus content, and between total soil potassium content and available soil potassium content. Considering that available soil nitrogen content, available soil phosphorus content, and available soil potassium content more directly reflect the nutrient status that can be absorbed and utilized by plants, these three factors were excluded.
[0070] After excluding unsuitable evaluation factors, the remaining 6 factors were used as evaluation factors and integrated into a minimal dataset, namely: soil organic matter content, soil available nitrogen content, soil available phosphorus content, soil available potassium content, soil pH value, and soil porosity.
[0071] The membership degree of each indicator in the minimum dataset is calculated using the following model:
[0072] Among them, a, b, and c are the critical values for low, medium, and high fertility; is the membership function; x is the value of the corresponding indicator in the minimum dataset.
[0073] By using the analytic hierarchy process (AHP) to assign weights to each indicator in the minimal dataset, a three-level hierarchical structure model can be constructed for the minimal dataset of orchard topsoil nutrient evaluation: Target layer: Comprehensive evaluation of orchard topsoil nutrients, which is the ultimate goal to be achieved. It accurately reflects the overall status of orchard topsoil nutrients through a comprehensive assessment of various indicators.
[0074] Criterion layer: Since the minimum dataset has already determined the key evaluation indicators, the criterion layer consists of the various indicators in the minimum dataset, including soil organic matter content, soil available nitrogen content, soil available phosphorus content, soil available potassium content, soil pH value, and soil porosity.
[0075] Scheme Layer: The scheme layer can be understood as the specific evaluation object for different orchard plots or different time points. However, in the weight setting stage, the main focus is on the relative importance of the indicators in the criterion layer. The key point of the scheme layer is to determine the weight of each criterion indicator to the target layer.
[0076] Experts in relevant fields were invited to conduct pairwise comparisons of the indicators in the criteria layer based on their professional knowledge and practical experience, to determine their relative importance to the target layer, and to assign corresponding values according to the 1-9 scaling method to obtain the judgment matrix. The meaning of the 1-9 scaling method is shown in Table 2.
[0077] Table 2 Scale meaning 1 This indicates that the two factors are equally important. 3 This indicates that, compared to another factor, one factor is slightly more important. 5 This indicates that, compared to two factors, one factor is significantly more important than the other. 7 This indicates that, compared to two factors, one factor is significantly more important than the other. 9 This indicates that, compared to another factor, one factor is extremely more important. other This represents the median of the above adjacent judgments. Based on the judgment matrix, the weights of the importance order of factors related to a certain factor in the current level are calculated. Taking the sum-product method as an example, the calculation process of the weights of the importance order is as follows: Normalize each column of the judgment matrix by first calculating the sum of the elements in each column, and then calculating the normalized elements accordingly; then add the normalized judgment matrix row by row to obtain the target vector; finally, normalize the target vector, and the result is the relative weight of each indicator.
[0078] A weighted summation algorithm is used to calculate the target geofertility index through membership degree and weight. The calculation model of the target geofertility index is as follows: ; Where A is the target ground fertility index; As an indicator The weights; As an indicator The degree of membership.
[0079] In other embodiments, the method further includes: The historical geofertility index of the region to be processed from the hyperspectral remote sensing image data is obtained. The threshold interval is automatically divided using the K-means clustering algorithm to obtain the division results. Based on the division results, the level of the target geofertility index is obtained.
[0080] The K-means clustering algorithm is used to automatically divide the threshold intervals, including: Randomly select multiple historical geofertility index samples as initial cluster centers, assign each sample to the nearest cluster center, recalculate the center (mean) of each cluster, and repeat the above steps until the center point no longer changes or the maximum number of iterations is reached.
[0081] For each cluster, the minimum and maximum values of the geofertility index of its constituent samples are calculated and used as the grading threshold. Finally, the cluster center, threshold range, and corresponding level (including low, medium, and high) are output.
[0082] Example 2: This example differs from Example 1 in that, before constructing the inversion model, the method further includes: Hyperspectral reflectance data for different soil types were extracted from hyperspectral remote sensing image data, and measured reflectance data for the corresponding areas were collected.
[0083] For each soil type, the measured reflectance data from all sampling points are averaged by wavelength to obtain the initial reflectance curve for that soil type.
[0084] Hyperspectral reflectance data extracted from hyperspectral remote sensing image data may be biased due to atmospheric and geometric distortions. In this embodiment, measured reflectance data is used to correct the initial reflectance curve to obtain the final reflectance curve. Taking regression analysis correction as an example, the above process is as follows: For each hyperspectral band, with measured reflectance as the dependent variable Y and hyperspectral reflectance data as the independent variable X, a linear regression model Y=CX+B is established.
[0085] Calculate the regression coefficients (C, B) and the coefficient of determination. Select bands with a coefficient of determination greater than or equal to 0.7 for correction. The coefficient of determination is an important indicator of the goodness of fit of the regression model; its core function is to explain what proportion of the variation in the dependent variable can be explained by the independent variable (or the model). The calculation model is as follows: ; ; ; in, is the residual sum of squares, which equals the sum of squares of the differences between the actual values and the model predictions, reflecting the unexplained variation in the model. is the total sum of squares, which equals the sum of squares of the differences between the actual values and the mean of the dependent variable, reflecting the total variation in the dependent variable. It is the value of the i-th measured reflectance data; These are values calculated using a regression model; is the average value of the measured reflectance data; m is the sample size, i.e., the number of measured reflectance data.
[0086] Next, for the selected hyperspectral bands, the corrected hyperspectral reflectance data were calculated using a regression equation. The calculation model is as follows: ; The corrected hyperspectral reflectance data is used to replace the corresponding hyperspectral reflectance data in the initial reflectance curve to obtain the final reflectance curve.
[0087] Spectral features of different soil types are extracted based on their final reflectance curves. These features include location features, shape features, and area features. Location features refer to the wavelength positions of reflectance peaks or troughs. Shape features refer to the slope and curvature of the final reflectance curve. Area features refer to the integrated area within a specific spectral band, reflecting the depth of soil color.
[0088] Spectral indices for different soil types are calculated based on their spectral characteristics. These indices include: soil brightness index, dry soil index, organic matter sensitivity index, and iron oxide index.
[0089] The formula for calculating the soil brightness index is as follows: Soil brightness index = (red light band reflectance - green light band reflectance) / (red light band reflectance + green light band reflectance); A higher soil brightness index value indicates brighter soil and a higher degree of soil exposure, and is used to identify bare land or unused land.
[0090] The formula for calculating the dry soil index is as follows: Dry soil index = 1600nm reflectance / 2200nm reflectance; The dry soil index is used to distinguish between dry and wet soil. Dry soil has a higher reflectance at 1600nm, while wet soil has a lower reflectance due to water absorption.
[0091] The organic matter sensitivity index The calculation formula is as follows: ; in, Reflectivity at 600nm wavelength; Reflectivity at 550nm wavelength; The reflectivity is 700nm.
[0092] The organic matter sensitivity index is used to quantify the soil organic matter content; the higher the organic matter content, the larger the value of the organic matter sensitivity index.
[0093] The formula for calculating the iron oxide index (FII) is as follows: ; in, Reflectivity at 850nm wavelength; The reflectivity is 650nm.
[0094] The iron oxide index reflects the content of iron oxides (such as hematite) in the soil. The higher the value of the iron oxide index, the higher the content of iron oxides.
[0095] In the process of generating background field data, the method further includes: Based on the final reflectance curve and spectral index, the spatial boundaries of soil types are delineated using cluster analysis (such as K-means) or decision trees. This embodiment uses decision trees to delineate the spatial boundaries of soil types, including the following steps: The samples labeled with soil type were divided into training and test sets in a 7:3 ratio. A decision tree algorithm suitable for soil classification, such as CART or C4.5, was selected, using spectral features and spectral indices as input and soil type as output to construct a decision tree. By recursively partitioning features (e.g., using a certain spectral index threshold as a node), classification rules were generated. The test set was used to validate and adjust parameters such as tree depth, ultimately obtaining the trained decision tree model.
[0096] The spectral characteristics and spectral indices of the entire study area are input into the trained decision tree model to predict soil types grid by grid. The classification results are then correlated with the GPS coordinates of the soil samples to obtain a spatial distribution map of soil types.
[0097] The core of Kriging interpolation is to estimate the properties of unknown points using spatial correlation. However, the spatial correlation (variability) varies significantly among different soil types, requiring targeted parameter adjustments to avoid interpolation errors caused by a one-size-fits-all approach. Kriging interpolation parameters include the semi-variogram model, range, nugget value, and search radius.
[0098] The semi-mutation function model is set as follows: For contiguous soils with strong spatial continuity (such as plain alluvial soil and contiguous black soil): spatial correlation is stable, and a spherical model is selected (it has the best fitting effect and can accurately describe the pattern of strong correlation at close range and weak correlation at long range).
[0099] For soils that are scattered and have complex variations (such as mountain gravelly soil and scattered sandy soil in river valleys): the spatial correlation fluctuates greatly, so an exponential model or a Gaussian model should be selected (which is more suitable for complex variation patterns).
[0100] For mixed soil areas with interspersed distribution and dense boundaries (such as the transition zone between red and yellow soils): a hybrid model (combining two or more basic models) is adopted to adapt to different types of superimposed variations.
[0101] The variable range (used to limit the spatial correlation range, meaning that attributes have no correlation beyond this distance) is set as follows: For large-scale contiguous soil areas (with a distribution range of 5-10 km): Set the range to a larger value (e.g., 2000-3000 m) to ensure that enough relevant sample points are included during interpolation.
[0102] For small, scattered soils (within 5km): set the range to a small value (e.g., 500-1000m) to avoid including irrelevant samples from other soil types.
[0103] For densely bordered areas: the range is adjusted according to the average range of the two adjacent soil types (e.g., range of 1500m for red soil, range of 1200m for yellow soil, and range of 1350m for the transition zone).
[0104] The nugget value is set as follows: The nugget value in non-soil type transition areas is set at 30%-50% of the slab value.
[0105] The nugget value in soil type transition zones should be appropriately increased (e.g., 40%-60%) to accommodate different types of random variation superposition.
[0106] The search radius (the range for finding neighboring samples during interpolation) is set as follows: The search radius for boundary areas needs to be reduced (e.g., 70%-80% of the normal radius) to prevent the inclusion of interfering samples across soil types.
[0107] The standard radius is slightly smaller than the variable range, and is set to 90% of the variable range.
[0108] In other embodiments, the kriging interpolation parameters can also be set as needed.
[0109] For regions with different soil types, the correlation coefficients between each hyperspectral band and the measured values of nutrients in the topsoil were calculated. The calculation process is as follows: Suppose there are n soil samples, each with reflectance or radiance values in k spectral bands, forming an n×k matrix E, where E ij This represents the observation value of the i-th soil sample in the j-th band.
[0110] Each soil sample has measured values for nitrogen, phosphorus, and potassium. Based on all the measured values of nitrogen, phosphorus, and potassium, three vectors N, P, and K of length n are constructed. N, P, and K are vectors of length n, which means that there are n soil samples, and each sample corresponds to a measured value of nitrogen, phosphorus, and potassium. For example, the i-th value in vector N identifies the measured value of nitrogen in the i-th soil sample, the i-th value in vector P identifies the measured value of phosphorus in the i-th soil sample, and the i-th value in vector K identifies the measured value of potassium in the i-th soil sample.
[0111] For each nutrient index (nitrogen, phosphorus, potassium), calculate its correlation coefficient with all hyperspectral bands, and the correlation coefficient between the j-th hyperspectral band and the measured nutrient values in each topsoil layer. The calculation formula is: ; in, It is the reflectance or radiance value of n soil samples in the j-th hyperspectral band; It is a vector of measured values of topsoil nutrients (N, P, or K) from n soil samples. It is reflectivity or emissivity. Vector of measured nutrients in the topsoil covariance; It is reflectivity or emissivity. Standard deviation; It is the standard deviation of the measured nutrient vector F in the topsoil layer.
[0112] Hyperspectral bands with a correlation coefficient greater than a preset coefficient threshold are designated as high-correlation bands. In this embodiment, the preset coefficient threshold is set to 0.6.
[0113] The correlation coefficients of highly correlated bands are normalized to obtain correction coefficients. These correction coefficients are then used as weights for the kriging interpolation parameters of each hyperspectral band within the corresponding soil type region. The product of the weights of the kriging interpolation parameters of each hyperspectral band and the corresponding kriging interpolation parameters is used as the new kriging interpolation parameters. Background field data is then generated based on these new kriging interpolation parameters.
[0114] Example 3: Reference Figure 2 The difference between this embodiment and Embodiment 1 is that, in the data acquisition and processing of S11, the construction of training samples based on background field data and hyperspectral remote sensing image data can also adopt the following scheme: S31 preliminary processing involves radiometric and geometric correction of the hyperspectral remote sensing image data to obtain a hyperspectral remote sensing image base map.
[0115] Multiple image blocks are obtained by cropping the hyperspectral remote sensing image base map using a preset window. In this embodiment, the preset window size is 32×32 pixels. During the cropping process, the preset window can be slid according to a preset step size (such as 16 pixels) to crop the hyperspectral remote sensing image base map and obtain a set of overlapping or non-overlapping image blocks.
[0116] If the image patch is a color image, it needs to be converted to a grayscale or binary image. Morphological opening operations are then used to remove isolated noise points (such as salt-and-pepper noise, random bright / dark spots) from the image patch, resulting in the processed image patch. This process includes the following steps: Determine the structural element: Select a circular structural element; Determine the size of the structural element: If the noise is a single pixel bright spot / dark spot (such as salt and pepper noise), select a 3×3 circle (approximately 3 pixels in diameter). If the noise is a small cluster (such as a 2-3 pixel connected region), select a 5×5 circle (approximately 5 pixels in diameter).
[0117] The process of performing morphological opening on a binary image is as follows: Erosion stage: Scan the image block with structuring elements and retain only the foreground pixels that perfectly match the structuring elements (removing isolated noise).
[0118] Expansion stage: Restore the dimensions of the eroded target using the same structural elements.
[0119] The process of performing morphological opening on a grayscale image is as follows: Erosion stage: Take the minimum value in the local neighborhood to suppress bright noise.
[0120] Expansion phase: Take the maximum value within the local neighborhood and restore the target brightness.
[0121] The image block after morphological opening is marked as the processed image block.
[0122] Calculate the normalized vegetation index of each pixel in the processed image patch. and moisture index The calculation model is as follows: ; ; in, Reflectivity in the near-infrared band; Reflectivity in the red band; Green band reflectance; Normalized Difference Vegetation Index The value range is [-1, 1], with a larger value indicating higher vegetation cover; moisture index The value range is [-1, 1], and the larger the value, the higher the moisture content.
[0123] Pixels with a normalized vegetation index less than a preset vegetation index threshold (e.g., 0.2) or a moisture index greater than a preset moisture threshold (e.g., 0.3) are marked as non-arable land pixels.
[0124] In the processed image blocks, the proportion of non-farmland pixels is counted. Processed image blocks with a proportion of non-farmland pixels lower than a preset percentage (e.g., 0.4) are used as new hyperspectral remote sensing image base maps. In other words, processed image blocks with a proportion of non-farmland pixels not lower than the preset percentage are deleted.
[0125] S32 processes the data again. In the new hyperspectral remote sensing image base map, the spectral features of a pixel can be regarded as a point in a multidimensional space (the number of bands is the dimension). The Euclidean distance between the current pixel and its neighboring pixels is calculated. The Euclidean distance is used to measure the straight-line distance between two pixels in the spectral space. ; in, Let be the Euclidean distance between pixel i and pixel j; Let be the reflectance of pixel i in the g-th band; Let G be the reflectance of pixel j in the g-th band; G is the total number of bands.
[0126] Determine if there are any abnormal pixels whose Euclidean distance exceeds a preset distance threshold (e.g., 0.6).
[0127] If so, the median spectral reflectance of neighboring valid pixels is calculated within a sliding window (e.g., 5×5) centered on the anomalous pixel, and the anomalous pixel is filled with the median to obtain the processed hyperspectral remote sensing image base map. The processed hyperspectral remote sensing image base map is then used as the new hyperspectral remote sensing image base map.
[0128] If not, no action will be taken.
[0129] S33 constructs training samples and spatially registers the background field data with the new hyperspectral remote sensing image base map, including the following steps: Convert the geographic coordinates (e.g., WGS84 latitude and longitude) of the background field data into the projected coordinates (e.g., UTM) of the hyperspectral remote sensing image base map. Manually or automatically select corresponding ground feature points (e.g., field ridges, building corners) as control points in both the background field data and the new hyperspectral remote sensing image base map. The control points should be evenly distributed and have a quantity of ≥5. Calculate the affine transformation parameters based on the control points. Based on the affine transformation parameters, convert the geographic coordinates (latitude and longitude) of the background field data into the row and column coordinates of the new hyperspectral remote sensing image base map.
[0130] The spectral reflectance features of the corresponding pixel positions in the registered hyperspectral remote sensing image base map and the background field data are extracted to obtain the feature vector. The feature vector is then correlated with the measured values of topsoil nutrients in the background field data to obtain the training sample.
[0131] In the S12 calculation of geofertility index, before inputting the hyperspectral remote sensing image data to be processed into the trained inversion model, the hyperspectral remote sensing image data to be processed is converted into a hyperspectral remote sensing image base map using the above scheme.
[0132] When training the inversion model using training samples, the method further includes: Based on the background field data and the prediction results of the inversion model, the interpolation variance of the nutrient index of the topsoil at each spatial location is calculated. The interpolation variance is then normalized, and the complement of the normalized interpolation variance is calculated. The complement is used to adjust the loss function of the inversion model. The calculation model of the adjusted loss function is as follows: ; in, The adjusted loss function; M is the number of interpolation variances; It is the complement of the variance of the i-th interpolation; The background field data corresponding to the i-th interpolation variance; These are the predicted values from the inversion model.
[0133] The calculation model for the previous loss function L is as follows: .
[0134] Example 4: This example discloses a farmland quality monitoring system based on hyperspectral remote sensing. The system includes a processor and a memory that is communicatively connected to the processor.
[0135] The memory is provided with a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the processor processes the computer program stored on the computer-readable storage medium, it implements the method for monitoring farmland quality based on hyperspectral remote sensing as described above.
[0136] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for monitoring farmland quality based on hyperspectral remote sensing, characterized in that, include: We acquire hyperspectral remote sensing image data containing different soil types and measured values of topsoil nutrients. Based on the measured values of topsoil nutrients, we use the Kriging interpolation algorithm to generate background field data and construct an inversion model. We construct training samples based on the background field data and hyperspectral remote sensing image data and use the training samples to train the inversion model to obtain the trained inversion model. The hyperspectral remote sensing image data to be processed is input into the trained inversion model to obtain the inversion values of the topsoil nutrient index. Based on the inversion values of the topsoil nutrient index, a minimum dataset is constructed by combining site condition index and climate condition index. The membership degree of each index in the minimum dataset is calculated, and weights are set for each index in the minimum dataset. The target soil fertility index is calculated by using a weighted summation algorithm through membership degree and weight.
2. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 1, characterized in that, Before constructing the inversion model, the method further includes: Hyperspectral reflectance data for different soil types were extracted from hyperspectral remote sensing image data, and measured reflectance data for the corresponding areas were collected. Initial reflectance curves for different soil types were plotted using hyperspectral reflectance data of different soil types. The initial reflectance curves were then corrected using measured reflectance data to obtain the final reflectance curves. Spectral features of different soil types were extracted based on the final reflectance curves of different soil types, and spectral indices of different soil types were calculated based on the spectral features of different soil types.
3. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 2, characterized in that, In the process of generating background field data, the method further includes: The spatial distribution of different soil types is identified based on the final reflectance curves and spectral indices, and Kriging interpolation parameters are set according to the spatial distribution of different soil types. For different soil types, the correlation coefficients between each hyperspectral band and the measured values of nutrients in the topsoil were calculated. Hyperspectral bands with correlation coefficients greater than a preset threshold were designated as high-correlation bands. The correlation coefficients of the high-correlation bands were normalized to obtain correction coefficients. The weights of the Kriging interpolation parameters for each hyperspectral band within the soil type region were then set based on the correction coefficients.
4. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 1, characterized in that, The construction of training samples based on background field data and hyperspectral remote sensing image data includes: A hyperspectral remote sensing image base map is generated based on hyperspectral remote sensing image data. The background field data is spatially registered with the hyperspectral remote sensing image base map. The spectral reflectance features of the pixel positions in the registered hyperspectral remote sensing image base map corresponding to the background field data are extracted. A feature vector is constructed based on the spectral reflectance features. The feature vector is correlated with the measured values of topsoil nutrients in the background field data to obtain training samples.
5. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 1, characterized in that, The method further includes: The numerical distribution of measured values of topsoil nutrients in the statistical background field data is analyzed, and the sparse intervals of topsoil nutrient indicators are identified based on the numerical distribution. The sparse intervals refer to the regions in the numerical distribution of topsoil nutrient indicators with a frequency lower than a preset frequency threshold. Data augmentation processing was performed on the measured values of topsoil nutrients in sparse intervals to obtain new measured values of topsoil nutrients.
6. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 4, characterized in that, When training the inversion model using training samples, the method further includes: Based on the background field data and the prediction results of the inversion model, the interpolation variance of the nutrient index of the topsoil at each spatial location is calculated. The interpolation variance is then normalized, and the complement of the normalized interpolation variance is calculated. The complement is used to adjust the loss function of the inversion model. The calculation model of the adjusted loss function is as follows: ; in, The adjusted loss function; M is the number of interpolation variances; Let be the complement of the variance of the i-th interpolation; The background field data corresponding to the i-th interpolation variance; These are the predicted values from the inversion model.
7. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 4, characterized in that, After generating a hyperspectral remote sensing image base map based on hyperspectral remote sensing image data, the process includes: The hyperspectral remote sensing image base map is cropped using a preset window to obtain multiple image blocks. Morphological opening operations are then used to remove isolated noise points from the image blocks to obtain the processed image blocks. The normalized vegetation index and moisture index of each pixel in the processed image block are calculated. Pixels with a normalized vegetation index less than a preset vegetation index threshold or a moisture index greater than a preset moisture threshold are marked as non-cultivated land pixels. The proportion of non-cultivated land pixels in the processed image block is counted. The processed image block with the proportion of non-cultivated land pixels less than a preset percentage is used as the new hyperspectral remote sensing image base map.
8. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 7, characterized in that, The method further includes: Based on the new hyperspectral remote sensing image base map, the Euclidean distance between the current pixel and its neighboring pixels is calculated. Abnormal pixels whose Euclidean distance exceeds a preset distance threshold are removed. The missing pixels after removal are filled using the sliding window method. The filling value of the missing pixels is the median spectral reflectance of the neighboring pixels.
9. The method for monitoring farmland quality based on hyperspectral remote sensing according to claim 1, characterized in that, The method further includes: obtaining the historical geofertility index of the region to which the hyperspectral remote sensing image data to be processed belongs, automatically dividing the threshold interval using the K-means clustering algorithm to obtain the division result, and obtaining the level to which the target geofertility index belongs based on the division result.
10. A farmland quality monitoring system based on hyperspectral remote sensing, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory is provided with a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the processor processes a computer program stored on the computer-readable storage medium, it implements the method as described in any one of claims 1-9.