Soil moisture inversion method, device, equipment and medium

By combining multispectral imagery with a random forest model, key spectral features were screened, solving the problems of low accuracy and high noise in soil moisture retrieval. This approach enables high-precision and stable soil moisture monitoring, making it suitable for precise irrigation decision-making in complex environments.

CN121762497APending Publication Date: 2026-03-31NORTH CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for retrieving soil moisture suffer from low model accuracy, high noise in results, and poor environmental adaptability, making it difficult to meet the needs of precision irrigation, especially in complex environments.

Method used

A machine learning framework combining multispectral imagery and a random forest model was adopted. Through feature selection processing and competitive adaptive reweighted sampling algorithm, key spectral features sensitive to water were screened out to construct a soil moisture content inversion model.

Benefits of technology

It achieves high-precision and high-stability soil moisture inversion, improves the model's adaptability and inversion accuracy, reduces resource input and energy consumption, and the output soil moisture map has strong spatial continuity, making it suitable for centimeter-level monitoring in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121762497A_ABST
    Figure CN121762497A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of soil monitoring, and provides a soil moisture inversion method, device and equipment and a medium. The method comprises the following steps: acquiring a multispectral image and soil moisture content data for a target area, wherein the soil moisture content data comprises a soil moisture content measured value of each preset sampling point in the target area; extracting a plurality of spectral features corresponding to each pixel according to the multispectral image, and generating a feature space data set; feature selection processing is carried out according to the soil moisture content data and the feature space data set, a target feature subset is generated, and the target feature subset comprises a target feature vector corresponding to each pixel; training a random forest model by using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data to obtain a soil moisture content inversion model; and according to the target feature subset, performing moisture content inversion calculation on the target area through a soil moisture content inversion model, and generating a soil moisture content spatial distribution result of the target area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of soil monitoring technology, and in particular to a method, apparatus, equipment and medium for soil moisture inversion. Background Technology

[0002] Previous remote sensing inversion techniques for surface soil moisture have relied on a linear regression framework. Due to its simple structure, this framework cannot accurately depict the complex nonlinear relationship between moisture and reflectance. The coefficient of determination is typically only around 0.5, with a root mean square error (RMSE) as high as 4%-5%, far from meeting the stringent error requirements of precision irrigation. Furthermore, high-dimensional collinearity among independent variables causes coefficient estimates to fluctuate dramatically with small sample variations, resulting in highly unstable extrapolated predictions. Moreover, the model is prone to overfitting due to memory noise as the dimensionality increases without a corresponding increase in sample size. Additionally, the index pixel values ​​are significantly affected by instantaneous noise and minute changes in illumination, leading to inconsistent water content readings. The images often appear as random "salt and pepper" spots with poor spatial continuity, introducing significant visual noise to drought patch identification and subsequent statistics. In coastal saline soils, bare land, or mixed areas with sparse vegetation, changes in surface roughness alter the scattering background, and crop residues interfere with red light absorption. These factors combined lead to a sharp drop in the correlation between the spectrum and moisture, necessitating manual re-selection of variables and adjustment of thresholds, resulting in extremely poor environmental adaptability. Furthermore, the selection of variables, removal of outliers, and equation correction rely entirely on expert experience, requiring repeated trial and error for each change of region. The lack of an adaptive mechanism leads to high costs for manual parameter adjustment during large-scale implementation.

[0003] In recent years, methods for retrieving soil moisture using UAV remote sensing have generally treated spectral indices as independent variables, establishing simple linear regressions between three or four empirical indices and water content. These methods fail to uncover the weakly coupled information hidden in the five original bands of blue, green, red, near-infrared, and red edge, and also neglect the nonlinear perturbations of reflectivity by surface roughness and vegetation residue. This results in a sharp drop in the coefficient of determination of the model in coastal saline-alkali areas or bare land with sparse vegetation, and the generated water content map exhibits significant "salt and pepper" noise and poor spatial continuity, making it difficult to support precise irrigation decisions. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, apparatus, equipment and medium for soil moisture inversion, so as to solve the above-mentioned technical problem.

[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: a soil moisture inversion method, comprising: acquiring multispectral images and soil moisture content data for a target area, wherein the soil moisture content data includes measured soil moisture content values ​​at each preset sampling point in the target area; extracting multiple spectral features corresponding to each pixel from the multispectral images to generate a feature space dataset; performing feature selection processing on the soil moisture content data and the feature space dataset to generate a target feature subset, wherein the target feature subset includes a target feature vector corresponding to each pixel; training a random forest model using the target feature vectors of the pixels corresponding to each preset sampling point and the soil moisture content data to obtain a soil moisture content inversion model; and performing moisture content inversion calculation on the target area using the soil moisture content inversion model based on the target feature subset to generate a spatial distribution result of soil moisture content in the target area.

[0006] The beneficial effects of this invention are: This invention achieves high-precision and high-stability soil moisture retrieval through a machine learning framework combining feature selection processing and a random forest model. This method can adaptively screen key spectral features sensitive to moisture, effectively overcoming the shortcomings of traditional linear models, such as sharp drop in accuracy and high noise in complex environments.

[0007] Based on the above technical solution, the present invention can be further improved as follows.

[0008] Furthermore, the step of extracting multiple spectral features corresponding to each pixel from the multispectral image to generate a feature space dataset includes: preprocessing the multispectral image to generate five-band reflectance data, wherein the five-band reflectance data includes the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band, and near-infrared band; calculating the remote sensing index corresponding to each pixel based on the five-band reflectance data; constructing a feature vector corresponding to each pixel based on the remote sensing index corresponding to each pixel and the five-band reflectance data; and obtaining the feature space dataset based on the feature vectors corresponding to each pixel.

[0009] Furthermore, the remote sensing indices corresponding to each pixel include the red-edge normalized vegetation index, the enhanced vegetation index, the difference vegetation index, the normalized water index, and the ratio vegetation index.

[0010] Furthermore, the preprocessing of the multispectral image to generate five-band reflectance data includes: performing aerial triangulation and multi-view 3D reconstruction based on the multispectral image to generate a visible light orthophoto image; performing radiometric calibration and atmospheric correction on the visible light orthophoto image to obtain a processed image; projecting the processed image onto a preset geographic coordinate system to obtain a reflectance image; and extracting the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band, and near-infrared band according to the reflectance image to generate the five-band reflectance data.

[0011] Furthermore, the step of performing feature selection processing based on the soil moisture content data and the feature space dataset to generate a target feature subset includes: performing feature selection processing based on the soil moisture content data and the feature space dataset using a competitive adaptive reweighted sampling algorithm to generate the target feature subset.

[0012] Furthermore, the step of training the random forest model using the target feature vectors of the pixels corresponding to each preset sampling point and the soil moisture content data to obtain the soil moisture content inversion model includes: generating a training set and a test set respectively based on the target feature vectors of the pixels corresponding to each preset sampling point and the soil moisture content data; setting the parameters of the random forest model, including the number of decision trees, maximum depth, and minimum number of samples per node; training the random forest model with the set parameters using the training set to obtain the trained model; validating the trained model using the test set and evaluating the accuracy of the trained model based on the obtained validation results; and determining the trained model as the soil moisture content inversion model when the accuracy reaches a preset standard.

[0013] Furthermore, the multispectral images and the soil moisture content data are obtained in the following way: under preset weather and light conditions, a drone equipped with a multispectral camera is controlled to fly along a preset route to collect multispectral images covering the target area; multiple preset sampling points are set up in the target area according to a preset grid, and surface soil samples at a set depth are collected at each preset sampling point; the moisture content of each surface soil sample is determined by the drying method to obtain the soil moisture content data.

[0014] To address the aforementioned technical problems, the present invention also provides a soil moisture inversion device, comprising: The data acquisition module is used to acquire multispectral images and soil moisture content data for the target area, wherein the soil moisture content data includes the measured soil moisture content values ​​of each preset sampling point in the target area; The feature extraction module is used to extract multiple spectral features corresponding to each pixel based on the multispectral image and generate a feature space dataset. The feature selection module is used to perform feature selection processing based on the soil moisture content data and the feature space dataset to generate a target feature subset, wherein the target feature subset includes the target feature vector corresponding to each pixel; The model training module is used to train the random forest model using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, so as to obtain the soil moisture content inversion model. The inversion calculation module is used to perform water content inversion calculation on the target area based on the target feature subset and the soil water content inversion model, and generate the spatial distribution result of soil water content in the target area.

[0015] To address the aforementioned technical problems, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the soil moisture inversion method as described above.

[0016] To address the aforementioned technical problems, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a soil moisture inversion method as described above. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of a soil moisture inversion method according to the present invention; Figure 2 This is a sampling point layout diagram for a soil moisture inversion method according to the present invention; Figure 3 This is a spatial distribution map of soil moisture in a soil moisture inversion method according to the present invention; Figure 4 This is a schematic diagram of a soil moisture inversion device according to the present invention; Figure 5 This is a schematic diagram of an electronic device according to the present invention. Detailed Implementation

[0018] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0019] As mentioned earlier, soil moisture is a core variable affecting vegetation growth and ecological processes. Traditional measurement methods rely on field sampling and laboratory analysis, which are inefficient and fail to provide continuous spatial information. While satellite remote sensing has a wide coverage area, its spatiotemporal resolution is limited, making it difficult to meet the needs of fine-scale monitoring. Unmanned aerial vehicles (UAVs) offer advantages such as centimeter-level spatial resolution, hourly response speed, and low cost, making them an ideal platform for small-scale dynamic water monitoring. However, the complex surface environment and diverse water-influencing factors make it difficult for conventional linear models or single spectral indices to achieve high-precision inversion.

[0020] Example 1 Based on this, such as Figure 1 As shown, this embodiment provides a soil moisture inversion method, including: S101. Acquire multispectral images and soil moisture content data for the target area. The soil moisture content data includes the measured soil moisture content values ​​at each preset sampling point in the target area. S102. Based on the multispectral image, extract multiple spectral features corresponding to each pixel to generate a feature space dataset; S103. Based on the soil moisture content data and the feature space dataset, perform feature selection processing to generate a target feature subset, which includes the target feature vector corresponding to each pixel. S104. Using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, train the random forest model to obtain the soil moisture content inversion model. S105. Based on the target feature subset, perform soil moisture content inversion calculation on the target area using the soil moisture content inversion model to generate the spatial distribution results of soil moisture content in the target area.

[0021] This invention achieves high-precision and high-stability soil moisture retrieval through a machine learning framework combining feature selection processing and a random forest model. This method adaptively selects key spectral features sensitive to moisture, effectively overcoming the shortcomings of traditional linear models, such as sharp drops in accuracy and high noise levels in complex environments.

[0022] Optionally, in the embodiments, multispectral images and soil moisture content data are obtained in the following way: under preset weather and light conditions, a drone equipped with a multispectral camera is controlled to fly along a preset route to collect multispectral images covering the target area; multiple preset sampling points are set up in the target area according to a preset grid, and surface soil samples at a set depth of each preset sampling point are collected; the moisture content of each surface soil sample is determined by the drying method to obtain soil moisture content data.

[0023] In this embodiment, a multispectral imaging system integrated with a Phantom 4 multispectral UAV was used to acquire multispectral images. Image acquisition was completed between 11:00 AM and 2:00 PM, with clear, cloudless, and windless weather conditions on that day. The UAV's flight altitude ranged from 100m to 120m. Before acquisition, solar irradiance was monitored in real time using a multispectral light intensity sensor on the top of the drone, and the D-RTK centimeter-level positioning system was used to automatically compensate for changes in illumination. The work surface was adapted to regular plots, and the UAV flew along a preset flight path, with the recommended forward overlap and lateral overlap set to 80% and 70%, respectively. An equal-interval shooting mode was used to ensure the acquisition of clear and continuous multispectral images.

[0024] Flight operations will be conducted under clear, windless weather conditions with a solar altitude angle greater than 30°. The UAV's multispectral sensor will simultaneously acquire image data in five bands: blue (450nm), green (560nm), red (650nm), near-infrared (840nm), and red-edge (720nm). Figure 2 As shown, 140 sampling points were simultaneously set up in the flight area using a grid method to collect surface soil samples at a depth of 0-30cm. The samples were immediately sealed and preserved, and then brought back to the laboratory to determine the soil moisture content using the drying method (drying at 105℃ to constant weight).

[0025] Optionally, in an embodiment, based on the multispectral image, multiple spectral features corresponding to each pixel are extracted to generate a feature space dataset, including: preprocessing the multispectral image to generate five-band reflectance data, the five-band reflectance data containing the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band, and near-infrared band respectively; calculating the remote sensing index corresponding to each pixel based on the five-band reflectance data; constructing the feature vector corresponding to each pixel based on the remote sensing index corresponding to each pixel and the five-band reflectance data; and obtaining the feature space dataset based on the feature vectors corresponding to each pixel.

[0026] Optionally, in this embodiment, the multispectral image is preprocessed to generate five-band reflectance data, including: performing aerial triangulation and multi-view 3D reconstruction based on the multispectral image to generate a visible light orthophoto image; performing radiometric calibration and atmospheric correction on the visible light orthophoto image to obtain a processed image; projecting the processed image onto a preset geographic coordinate system to obtain a reflectance image; and extracting the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band, and near-infrared band according to the reflectance image to generate five-band reflectance data.

[0027] Specifically, multispectral image preprocessing involves importing the acquired multispectral images into DJI Terra software for processing, including aerial triangulation and multi-view 3D reconstruction to generate visible light orthophotos. Radiometric calibration is then performed, converting the raw digital quantization (DN) values ​​into apparent reflectance, and using a built-in algorithm for atmospheric correction to eliminate aerosol scattering effects. The images are then uniformly projected onto the WGS 1984 coordinate system for geometric precision correction. Finally, the spectral reflectance data of each pixel in the image is extracted to generate five-band reflectance data.

[0028] Optionally, in the embodiments, the remote sensing indices corresponding to each pixel include the red-edge normalized vegetation index, the enhanced vegetation index, the difference vegetation index, the normalized water index, and the ratio vegetation index.

[0029] Specifically, based on the preprocessed five-band reflectance data, the ENVI software's band calculation function is used to batch calculate remote sensing indices sensitive to soil moisture, including the Red Edge Normalized Difference Vegetation Index (RENDVI), Enhanced Vegetation Index (EVI), Difference Vegetation Index (DVI), Normalized Difference Water Index (NDWI), and Ratio Vegetation Index (RVI). The reflectance values ​​of the five bands are then combined with the calculated indices to form a feature vector, achieving complete quantification of soil system moisture information.

[0030] The formula for calculating the Red Edge Normalized Difference Vegetation Index (RENDVI) is as follows: RENDVI = (NIR - R) / (NIR + R); The formula for calculating the Normalized Difference Water Index (NDWI) is as follows: NDWI = (G - NIR) / (G + NIR); The formula for calculating the Ratio Vegetation Index (RVI) is: RVI = R / NIR; The formula for calculating the Enhanced Vegetation Index (EVI) is as follows: EVI=(2.5×(NIR-R)) / (NIR+6×R-7.5×B+1) The formula for calculating the Difference Vegetation Index (DVI) is as follows: DVI = NIR-R; Wherein, B, G, R, and NIR are the reflectance values ​​of blue, green, red, and near-infrared in the multispectral image, respectively.

[0031] Optionally, in an embodiment, feature selection processing is performed based on soil moisture content data and feature space dataset to generate a target feature subset, including: performing feature selection processing based on soil moisture content data and feature space dataset using a competitive adaptive reweighted sampling algorithm to generate a target feature subset.

[0032] Specifically, based on the measured soil moisture content data from 140 sampling points and the feature space dataset, the Competitive Adaptive Reweighted Sampling (CARS) algorithm was used for feature optimization to achieve high-dimensional data compression and key information extraction. In this embodiment, the Monte Carlo sampling was set to 1000 times, and through 10-fold cross-validation, four key features—R, NIR, RENDVI, and NDWI—were selected from the features to construct the optimal feature subset.

[0033] Optionally, in an embodiment, a random forest model is trained using the target feature vectors of the pixels corresponding to each preset sampling point and soil moisture content data to obtain a soil moisture content inversion model. This includes: generating a training set and a test set based on the target feature vectors of the pixels corresponding to each preset sampling point and soil moisture content data; setting the parameters of the random forest model, including the number of decision trees, maximum depth, and minimum number of samples per node; training the random forest model with the set parameters using the training set to obtain a trained model; validating the trained model using the test set and evaluating the accuracy of the trained model based on the obtained validation results; and determining the trained model as the soil moisture content inversion model when the accuracy reaches a preset standard.

[0034] Specifically, the 140 sample data were randomly divided into training and test sets in a 7:3 ratio. A random forest soil moisture content inversion model was constructed using the randomForest package in R, with the number of decision trees set to 500, the maximum depth to 10, the minimum number of samples per node to 3, and the remaining parameters kept at their default values.

[0035] The trained random forest model was validated using a test set, employing the coefficient of determination (R²). 2 The root mean square error (RMSE) and the root mean square error (RMSE) are used as accuracy evaluation metrics. In this embodiment, the verification results show that model R... 2 The accuracy reached 0.71, and the RMSE was 2.3%, indicating that the model has high inversion accuracy and reliability.

[0036] The trained random forest model was applied to the entire study area. Using four optimized features—R, NIR, RENDVI, and NDWI—soil moisture content was retrieved pixel-by-pixel, generating a spatial distribution map of soil moisture with a resolution of 5 cm. The map was then visualized using ArcGIS software. Figure 3 As shown.

[0037] By combining the generated water distribution map with auxiliary data such as digital surface model and vegetation index map, it is possible to analyze the spatial variation characteristics of soil moisture under different terrain locations and vegetation cover conditions, providing decision support for precision irrigation and water management.

[0038] This method can extract soil moisture content and achieve high-precision inversion based on differences in soil texture, vegetation cover, and moisture characteristics. The core of this method lies in constructing a ten-dimensional spectral space of "original five bands + five types of moisture indices," compressing redundant information into four key variables—red, near-infrared, RENDVI, and NDWI—through competitive adaptive reweighting sampling, and then using random forest ensemble learning to achieve nonlinear high-order fitting, forming a complete chain of "deep mining - adaptive dimensionality reduction - strong ensemble inversion," and transforming R... 2 The accuracy was improved from 0.5 to 0.71, the RMSE was reduced to 2.3%, and the output was in the form of 5cm continuous patches. This breakthrough overcame the bottlenecks of low accuracy, high noise, and easy failure of the traditional linear exponential method, enabling consumer drones to complete centimeter-level soil moisture monitoring in complex environments.

[0039] This method can quickly and accurately realize the spatial inversion of soil moisture, and has the following advantages compared with existing technologies: 1. This method uses UAV multispectral imagery, combined with random forest and CARS feature optimization algorithms. The hardware is readily available, the processing flow is simple, and it can be quickly deployed in large-scale complex environments.

[0040] 2. This method, by coupling the original bands with the multidimensional features of the moisture sensitivity index, not only weakens the spectral noise caused by surface heterogeneity, but also retains key variables by using CARS to compress dimensions, significantly improving the model's computational efficiency. At the same time, the nonlinear fitting of random forest enhances the ability to capture weak moisture signals, and the output 5cm resolution moisture content map is spatially continuous and has clear texture, which can be directly used for high-precision moisture monitoring and management.

[0041] 3. The four-element feature combination of red, near-infrared, RENDVI and NDWI selected in this method belongs to the spectral dimension with the strongest water indicativeness. It can maintain a stable response under different coverage conditions and effectively suppress the "salt and pepper" pseudo-drought spots commonly found in traditional index maps. At the same time, the four variables and random forest ensemble learning work together to automatically identify the water threshold under different backgrounds, providing centimeter-level positioning basis for subsequent variable management and significantly reducing resource input and energy consumption.

[0042] 4. This method adaptively selects NDWI and red edge information from ten-dimensional hyperspectral features, which can deeply mine vegetation water stress signals and promote management decisions to shift from "experience-based seedling assessment" to "spectral seedling diagnosis". Validation shows that this method reduces the surface water content prediction error to 2.3%, which can help users to make precise interventions in the early stage of water imbalance, prevent the escalation of environmental stress, and provide the optimal water window for the stability and health of the ecosystem.

[0043] In summary, this method constructs a multi-dimensional feature space to fully mine remote sensing information related to water, and combines it with the CARS algorithm to achieve adaptive feature optimization, effectively compressing data dimensionality while retaining key variables, thus improving model efficiency and stability. Utilizing the random forest ensemble learning algorithm significantly enhances inversion accuracy and model generalization ability, overcoming the problem of insufficient fitting ability in traditional empirical models. This method can achieve soil moisture content inversion at a spatial resolution of 5 cm, accurately revealing spatial heterogeneity of water, with strong spatial continuity in classification results, avoiding the "salt and pepper" noise problem in traditional methods. Based on the inversion results, further water status zoning can be carried out to identify key areas at different water levels, providing a scientific basis for precision irrigation and crop water management. This method has advantages such as simple operation, low cost, and repeatable observation, and is applicable to dynamic soil moisture monitoring and agricultural water-saving management in various ecological types, including inland farmland areas, demonstrating significant promotional value and application prospects.

[0044] Example 2 like Figure 4 As shown, this embodiment provides a soil moisture inversion device 200, including: Data acquisition module 201 is used to acquire multispectral images and soil moisture content data for the target area. The soil moisture content data includes the measured soil moisture content values ​​of each preset sampling point in the target area. The feature extraction module 202 is used to extract multiple spectral features corresponding to each pixel based on the multispectral image and generate a feature space dataset. The feature selection module 203 is used to perform feature selection processing based on soil moisture content data and feature space dataset to generate a target feature subset, which includes the target feature vector corresponding to each pixel. The model training module 204 is used to train the random forest model using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, so as to obtain the soil moisture content inversion model. The inversion calculation module 205 is used to perform soil moisture inversion calculation on the target area based on the target feature subset and the soil moisture inversion model, and generate the spatial distribution results of soil moisture in the target area.

[0045] Optionally, in an embodiment, the feature extraction module 202 includes: The preprocessing unit is used to preprocess the multispectral image to generate five-band reflectance data, which includes the reflectance values ​​of each pixel in the blue band, green band, red band, red edge band and near-infrared band respectively. The index calculation unit is used to calculate the remote sensing index corresponding to each pixel based on the five-band reflectance data. The feature construction unit is used to construct the feature vector corresponding to each pixel based on the remote sensing index and five-band reflectance data corresponding to each pixel. The dataset generation unit is used to obtain the feature space dataset based on the feature vectors corresponding to each pixel.

[0046] Optionally, in the embodiments, the remote sensing indices corresponding to each pixel include the red-edge normalized vegetation index, the enhanced vegetation index, the difference vegetation index, the normalized water index, and the ratio vegetation index.

[0047] Optionally, in an embodiment, the preprocessing unit includes: The image processing subunit is used to perform aerial triangulation and multi-view 3D reconstruction based on multispectral images to generate visible light orthophotos. The correction subunit is used to perform radiometric calibration and atmospheric correction on the visible light orthophoto image to obtain the processed image. The projection subunit is used to project the processed image onto a preset geographic coordinate system to obtain a reflectance image; The data extraction subunit is used to extract the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band and near-infrared band according to the reflectance image, so as to generate five-band reflectance data.

[0048] Optionally, in an embodiment, the feature selection module 203 includes: The feature selection unit is used to perform feature selection processing based on soil moisture content data and feature space dataset, and generate a target feature subset through a competitive adaptive reweighted sampling algorithm.

[0049] Optionally, in an embodiment, the model training module 204 includes: The dataset construction unit is used to generate training and test sets respectively based on the target feature vectors of the pixels corresponding to each preset sampling point and the soil moisture content data; The parameter setting unit is used to set the parameters of the random forest model, including the number of decision trees, maximum depth, and minimum number of samples per node. The model training unit is used to train the random forest model with the parameters set using the training set, and obtain the trained model. The validation unit is used to validate the trained model using a test set and to evaluate the accuracy of the trained model based on the validation results. The model generation unit is used to determine the trained model as a soil moisture content inversion model when the accuracy reaches a preset standard.

[0050] Optionally, in the embodiments, multispectral images and soil moisture content data are obtained in the following way: under preset weather and light conditions, a drone equipped with a multispectral camera is controlled to fly along a preset route to collect multispectral images covering the target area; multiple preset sampling points are set up in the target area according to a preset grid, and surface soil samples at a set depth of each preset sampling point are collected; the moisture content of each surface soil sample is determined by the drying method to obtain soil moisture content data.

[0051] In some embodiments, the soil moisture inversion device 200 of the present invention can be implemented in a combination of hardware and software. As an example, the soil moisture inversion device 200 of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute a soil moisture inversion method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0052] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0053] Example 3 like Figure 5 As shown, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a soil moisture inversion method as described in Embodiment 1.

[0054] In other words, an electronic device according to an embodiment of the present invention may include, but is not limited to, a processor and a memory; the memory is used to store a computer program; the processor is used to execute a soil moisture inversion method shown in any embodiment of the present invention by calling the computer program.

[0055] In one alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5 The illustrated electronic device 300 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 300 may further include a transceiver 304, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present invention.

[0056] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0057] Bus 302 may include a path for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus 302 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0058] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0059] The memory 303 is used to store application code (computer program) for executing the present invention, and its execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the foregoing method embodiments.

[0060] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0061] It should be noted that, Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0062] Example 4 This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute a soil moisture inversion method as described in Embodiment 1.

[0063] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0064] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned soil moisture inversion method.

[0065] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0066] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0067] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0068] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0069] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0070] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0071] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0072] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for soil moisture inversion, characterized in that, include: Acquire multispectral images and soil moisture content data for the target area, wherein the soil moisture content data includes the measured soil moisture content values ​​at each preset sampling point in the target area; Based on the multispectral image, extract multiple spectral features corresponding to each pixel to generate a feature space dataset; Based on the soil moisture content data and the feature space dataset, feature selection processing is performed to generate a target feature subset, which includes the target feature vector corresponding to each pixel. By using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, the random forest model is trained to obtain the soil moisture content inversion model. Based on the target feature subset, the soil moisture content inversion model is used to perform moisture content inversion calculation on the target area, generating the spatial distribution result of soil moisture content in the target area.

2. The soil moisture inversion method according to claim 1, characterized in that, The step of extracting multiple spectral features corresponding to each pixel from the multispectral image to generate a feature space dataset includes: The multispectral image is preprocessed to generate five-band reflectance data, which includes the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band and near-infrared band respectively. Based on the five-band reflectance data, calculate the remote sensing index corresponding to each pixel; Based on the remote sensing index corresponding to each pixel and the five-band reflectance data, construct the feature vector corresponding to each pixel; The feature space dataset is obtained based on the feature vectors corresponding to each pixel.

3. The soil moisture inversion method according to claim 2, characterized in that, The remote sensing indices corresponding to each pixel include the red-edge normalized vegetation index, the enhanced vegetation index, the difference vegetation index, the normalized water index, and the ratio vegetation index.

4. The soil moisture inversion method according to claim 2, characterized in that, The preprocessing of the multispectral image to generate five-band reflectance data includes: Based on the multispectral image, aerial triangulation and multi-view 3D reconstruction are performed to generate visible light orthophotos; The visible light orthophoto image is subjected to radiometric calibration and atmospheric correction to obtain the processed image. The processed image is projected onto a preset geographic coordinate system to obtain a reflectance image; Based on the reflectance image, the reflectance values ​​of each pixel in the blue light band, green light band, red light band, red edge band, and near-infrared band are extracted to generate the five-band reflectance data.

5. The soil moisture inversion method according to claim 1, characterized in that, The step of performing feature selection processing based on the soil moisture content data and the feature space dataset to generate a target feature subset includes: Based on the soil moisture content data and the feature space dataset, a competitive adaptive reweighted sampling algorithm is used to perform feature selection processing to generate the target feature subset.

6. The soil moisture inversion method according to claim 1, characterized in that, The process of training a random forest model using the target feature vectors of pixels corresponding to each preset sampling point and the soil moisture content data to obtain a soil moisture content inversion model includes: Based on the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, a training set and a test set are generated respectively. Set the parameters of the random forest model, including the number of decision trees, maximum depth, and minimum number of samples per node; The random forest model with the parameters set is trained using the training set to obtain the trained model; The trained model is validated using the test set, and the accuracy of the trained model is evaluated based on the validation results. When the accuracy reaches the preset standard, the trained model will be determined as the soil moisture content inversion model.

7. The soil moisture inversion method according to claim 1, characterized in that, The multispectral imagery and the soil moisture content data were obtained in the following manner: Under preset weather and lighting conditions, the drone equipped with a multispectral camera is controlled to fly along a preset route to collect multispectral images covering the target area. Multiple preset sampling points are set up in the target area according to a preset grid, and surface soil samples at a set depth are collected at each preset sampling point. The moisture content of each surface soil sample is determined by the drying method to obtain the soil moisture content data.

8. A soil moisture inversion device, characterized in that, include: The data acquisition module is used to acquire multispectral images and soil moisture content data for the target area, wherein the soil moisture content data includes the measured soil moisture content values ​​of each preset sampling point in the target area; The feature extraction module is used to extract multiple spectral features corresponding to each pixel based on the multispectral image and generate a feature space dataset. The feature selection module is used to perform feature selection processing based on the soil moisture content data and the feature space dataset to generate a target feature subset, wherein the target feature subset includes the target feature vector corresponding to each pixel; The model training module is used to train the random forest model using the target feature vector of the pixel corresponding to each preset sampling point and the soil moisture content data, so as to obtain the soil moisture content inversion model. The inversion calculation module is used to perform water content inversion calculation on the target area based on the target feature subset and the soil water content inversion model, and generate the spatial distribution result of soil water content in the target area.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a soil moisture inversion method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute a soil moisture inversion method according to any one of claims 1 to 7.