Soil moisture prediction method, device, electronic device and storage medium

Through the gradient enhancement tree model and particle swarm optimization algorithm, combined with multi-source data fusion, the problems of high measurement destructiveness and low accuracy in soil moisture prediction are solved, and high-precision soil moisture prediction and spatial mapping are achieved.

CN114723149BActive Publication Date: 2024-11-15BEIJING RES CENT FOR INFORMATION TECH & AGRI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210395312.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2024-11-15
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

In the soil moisture prediction of prior art, point-oriented measurement requires manual operation and high destructiveness, and the prediction accuracy of scale-oriented prediction is not high, especially the global optimization ability of traditional genetic neural network algorithms is insufficient.

Method used

The gradient enhancement tree model is combined with the particle swarm optimization algorithm. By training the soil moisture data sample set carrying soil moisture information labels, the hyperparameters of the gradient enhancement tree model are optimized to improve prediction accuracy, and the high-quality data is obtained through meshing and multi-source data fusion. Precision soil moisture prediction.

Benefits of technology

实现了高精度的土壤墒情实时预测,避免了对农田土壤环境的破坏,节省了人力物力,并提高了土壤墒情空间制图的精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114723149B_ABST
    Figure CN114723149B_ABST
Patent Text Reader

Abstract

The present invention provides a soil moisture prediction method, device, electronic device and storage medium, including: inputting the soil moisture data to be predicted into a trained gradient boosting tree prediction model, and outputting soil moisture prediction information corresponding to the soil moisture data to be predicted; the trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained based on a particle swarm optimization algorithm. The present invention realizes the high-precision fitting ability of the model to complex nonlinear relationships, and by inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, high-precision real-time soil moisture prediction can be achieved, while also avoiding damage to the farmland soil environment and saving a lot of manpower and material resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural technology, and in particular to a soil moisture prediction method, device, electronic equipment and storage medium. Background Art

[0002] Soil moisture conditions directly reflect the state of soil moisture content in farmland. Accurately predicting soil moisture conditions can effectively guide agricultural production and macro-decision-making.

[0003] In the prior art, from the perspective of soil moisture prediction scale, it can usually be divided into point scale for field original site and surface scale for large area. However, for point scale prediction, it usually relies on traditional soil drying method, that is, the mass of water loss after heating and drying the soil is weighed to convert the soil moisture content. This method requires a lot of manpower and has obvious destructiveness and delay. For surface scale prediction, a prediction method based on traditional genetic neural network algorithm is provided. Due to its poor global optimization ability, the prediction accuracy of soil moisture is not high.

[0004] Therefore, how to better predict soil moisture conditions has become an urgent problem to be solved in the industry. Summary of the invention

[0005] The present invention provides a soil moisture prediction method, device, electronic equipment and storage medium for better predicting soil moisture.

[0006] The present invention provides a soil moisture prediction method, comprising:

[0007] Input the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and output the soil moisture prediction information corresponding to the soil moisture data to be predicted;

[0008] The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained by solving based on a particle swarm optimization algorithm.

[0009] According to a soil moisture prediction method provided by the present invention, after outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted, the method further includes:

[0010] Based on the soil moisture prediction information corresponding to the soil moisture data to be predicted and the preset soil moisture classification rendering standard, a target soil moisture prediction map is generated.

[0011] According to a soil moisture prediction method provided by the present invention, before inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, the method further includes:

[0012] Divide the target prediction area into grids according to the preset size to obtain multiple grid areas;

[0013] Obtaining historical data of M types of soil moisture influencing factors in each of the grid areas;

[0014] Determine a soil moisture data sample set based on historical data of M types of soil moisture influencing factors in each of the grid areas; M is a positive integer;

[0015] The soil moisture data sample set is used to train the gradient boosting tree prediction model.

[0016] According to a soil moisture prediction method provided by the present invention, a method for solving and obtaining the value of the target hyperparameter based on a particle swarm optimization algorithm includes:

[0017] Determine a particle swarm based on target hyperparameters of the gradient boosting tree prediction model; the gradient boosting tree prediction model is constructed based on the XGBoost model, and the target hyperparameters include at least: learning rate, maximum depth of the tree, weight threshold of child nodes, minimum partition loss, sample sampling rate, and feature sampling rate;

[0018] Based on the particle swarm optimization algorithm, the speed and position of each particle in the particle swarm are iteratively analyzed to determine the target particle with the smallest fitness value;

[0019] According to the target particle, a value of a target hyperparameter of the gradient boosting tree prediction model is obtained.

[0020] According to a soil moisture prediction method provided by the present invention, the soil moisture data sample set is determined based on the historical data of M types of soil moisture influencing factors in each grid area, including:

[0021] Inputting historical data of M types of soil moisture influencing factors in each of the grid areas into a preset prediction model, obtaining predicted values ​​corresponding to each type of soil moisture influencing factor in each of the grid areas, and determining SHAP values ​​corresponding to each type of soil moisture influencing factor in each of the grid areas according to the predicted values;

[0022] Based on the SHAP values ​​corresponding to the various soil moisture influencing factors in each of the grid areas, determine N types of target soil moisture influencing factors from the M types of soil moisture influencing factors; N≤M, M and N are both positive integers;

[0023] A soil moisture data sample set is obtained based on the historical data of the N types of target soil moisture influencing factors.

[0024] According to a soil moisture prediction method provided by the present invention, a gradient boosting tree prediction model is trained using the soil moisture data sample set, comprising:

[0025] A cross-validation method is adopted to obtain a training sample set from the soil moisture data sample set;

[0026] Taking the soil moisture data samples in the training sample set and the soil moisture information labels carried by the soil moisture data samples as a group of training samples, and obtaining multiple groups of training samples;

[0027] The gradient boosting tree prediction model is trained using the multiple groups of training samples.

[0028] According to a soil moisture prediction method provided by the present invention, the gradient boosting tree prediction model is trained using the multiple sets of training samples, including:

[0029] For any set of training samples, the training samples are input into the gradient boosting tree prediction model, and the soil moisture prediction information corresponding to the training samples is output;

[0030] Using a preset loss function, a loss value is calculated according to the soil moisture prediction information corresponding to the training sample and the soil moisture information label in the training sample;

[0031] If the loss value is less than a preset threshold or the current number of iterations reaches a preset maximum number of iterations, the training of the gradient boosting tree prediction model is completed.

[0032] The present invention also provides a soil moisture prediction device, comprising:

[0033] A prediction module, used for inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted;

[0034] The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained by solving based on a particle swarm optimization algorithm.

[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the soil moisture prediction method as described above is implemented.

[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the soil moisture prediction method as described in any one of the above is implemented.

[0037] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the soil moisture prediction methods described above.

[0038] The soil moisture prediction method, device, electronic device and storage medium provided by the present invention adopt a gradient boosting tree model and use a particle swarm optimization algorithm to optimize the target hyperparameters of the gradient boosting tree model to obtain a gradient boosting tree prediction model with optimal hyperparameters, thereby improving the prediction accuracy of the gradient boosting tree prediction model. At the same time, the gradient boosting tree prediction model is trained by a soil moisture data sample set carrying soil moisture information labels to obtain a trained gradient boosting tree prediction model, thereby realizing the model's high-precision fitting ability for complex nonlinear relationships. By inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, high-precision real-time prediction of soil moisture can be achieved, while also avoiding damage to the farmland soil environment and saving a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 It is a schematic flow chart of the soil moisture prediction method provided by the present invention;

[0041] Figure 2 It is a structural schematic diagram of the soil moisture prediction device provided by the present invention;

[0042] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Combine the following Figure 1-Figure 3 The present invention describes a soil moisture prediction method, device, electronic device and storage medium.

[0045] With the development of information technology and sensor technology, in the existing technology, based on frequency domain reflectometry (FDR) and time domain reflectometry (TDR), the volumetric water content of soil can be collected remotely, quickly and accurately through the conversion of soil dielectric coefficient. However, due to the influence of spatial variability of soil physical and chemical properties, the in-situ site scale monitoring of farmland can only represent the scale of nearby fields or even only represent the 10cm range of the sensor collection point, which is difficult to be effectively applied to regional guidance. In addition, for regional spatial interpolation, traditional methods such as inverse distance weighted interpolation (IDW) and Kriging usually only consider the spatial distance characteristics of the estimation point, and it is difficult to obtain high measurement accuracy. With the rapid development of remote sensing technology, satellites can obtain a wide range of multispectral data. The massive amount of public remote sensing data has enabled the rapid development of soil moisture inversion research. A large number of studies have used optical remote sensing data, active and passive microwave radar data, etc. to establish relationships with ground monitoring points to achieve regional soil moisture inversion. However, the disadvantage of remote sensing inversion is that it has a long re-entry period and it is difficult to obtain real-time data. In addition, due to the limitation of non-contact measurement method, it can only measure the soil moisture content at the surface (0-10cm), and cannot reflect the moisture conditions in the deeper crop root zone, making it difficult to use in agricultural production practice.

[0046] Therefore, in order to solve the above technical defects in the prior art, the present invention provides a soil moisture prediction method.

[0047] Figure 1 Schematic diagram of the process of soil moisture prediction method provided by the present invention. Figure 1 As shown, including:

[0048] Step 110, inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and outputting soil moisture prediction information corresponding to the soil moisture data to be predicted;

[0049] The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is solved based on a particle swarm optimization algorithm.

[0050] Specifically, the soil moisture data to be predicted described in the embodiment of the present invention may be data of multiple types of soil moisture influencing factors obtained from a preset grid database. In order to reduce the amount of data processed by the model and improve the model operation efficiency, the soil moisture data to be predicted may also be data of a certain number of key soil moisture influencing factors selected from multiple types of soil moisture influencing factors.

[0051] It can be understood that soil moisture influencing factors refer to factors that affect changes in soil moisture.

[0052] The soil moisture prediction information described in the embodiment of the present invention refers to the soil moisture content information predicted for the soil moisture data to be predicted, which can be expressed in the form of soil moisture content percentage.

[0053] In an embodiment of the present invention, the data source of the preset grid database is obtained by multi-scale collaborative data fusion, which can be specifically obtained by taking the ground in-situ soil moisture monitoring data as a benchmark, and fusing multi-source data such as topographic data, soil texture and nutrient data, and remote sensing monitoring data. Among them, the data source can include three categories: soil moisture in-situ data, static spatial data, and multi-temporal remote sensing fusion data.

[0054] In this embodiment, the in-situ monitoring data refers to the soil moisture data collected using fixed monitoring stations. In this type of data source, the data of multiple types of soil moisture influencing factors can be multi-depth soil volume water content data, which can specifically include soil volume water content (unit: %) at four depths of 0-20cm, 20-40cm, 40-60cm and 60-80cm. The data is collected at an hourly frequency, and the station coordinate longitude and latitude coordinate data (decimal degrees) are typical structured data, which are stored in the database to facilitate the correspondence with the station information;

[0055] Static spatial data refers to a relatively stable collaborative data source in the long term. In this type of data source, the data of various soil moisture influencing factors can include digital terrain model (DEM), slope, slope aspect and other terrain data, as well as multi-depth soil field water holding capacity (%), pH value (unitless), organic carbon content (g / kg), organic carbon density (kg / m 2 ), cation exchange capacity (cmol(+) / kg), total nitrogen content (g / kg), total nitrogen density (kg / m 2 ), total phosphorus content (g / kg), total phosphorus density (kg / m 2 ), total potassium content (g / kg), total potassium density (kg / m 2 )、Bulk density (g / cm 3 ), gravel content (>2mm) (%), sand (g / kg), silt (g / kg), clay (g / kg) and other numerical soil parameter data;

[0056] Multi-temporal remote sensing fusion data is an innovative design of the present invention. Based on remote sensing big data cloud computing platforms such as Google Earth Engine (GEE), multi-temporal remote sensing fusion data is obtained online. In this type of data source, the data of multiple types of soil moisture influencing factors can include aggregated data of multi-depth soil moisture content per month over the years, monthly average rainfall, temperature, wind speed, evapotranspiration data, etc. For the data within the selected temporal range, a new raster data set is constructed by "overlay averaging", that is, the average value of the data within all time ranges in history is calculated for each pixel point to form new aggregated data to reflect the spatial distribution characteristics of a specific time period area under a long time scale, among which meteorological data does not reflect soil depth characteristics.

[0057] In an embodiment of the present invention, a preset grid database of the target prediction area can be established by adopting a regional grid division method. In the geocentric coordinate system WGS84 coordinate system, the minimum longitude x 0 With minimum latitude y 0 The coordinate points (x 0 ,y 0 ) as the starting point, in the projection coordinate system of the target prediction area, square surface grid data can be established in sequence with a unit side length of 90m, with no gaps between grids and covering the entire prediction area, and unique and independent numbers are given to the established grids one by one;

[0058] Furthermore, the center point of each grid is extracted to create a new point layer dataset. The number of the point is consistent with the unique number of the grid. Using the spatial extraction method of Geographic Information System (GIS), the average value of multi-source data in the same area of ​​each grid is extracted one by one as the feature value, such as: the starting point (x 0 ,y 0 ) is the average value of the DEM grid image elevation data in the area where the grid is located. Similarly, different types of attribute data are assigned to each grid to generate an attribute table data set. The attribute table data set can be in a two-dimensional table format, that is, each row of data represents a spatial grid point, and each column of data represents the characteristic value of different soil moisture influencing factors in the grid area. The data collected in the grid is further assigned to the attribute table of the center point to realize data transfer and assignment, thereby constructing a preset grid database for the target prediction area as the underlying database for subsequent model prediction.

[0059] It should be noted that the tree-based algorithm structure represented by AI algorithms such as the eXtreme Gradient Boosting (XGBoost) model has obvious advantages in fitting complex nonlinear relationships. Compared with the deep learning (Deep Learning) model based on neural networks, the tree-based ensemble learning model has better stability and excellent training efficiency. While obtaining the same high-precision training results, the model training time is greatly shortened, which is suitable for dynamic model fitting operation services such as soil moisture prediction and soil moisture spatial mapping.

[0060] The gradient boosting tree prediction model described in the embodiment of the present invention refers to a soil moisture prediction model based on the gradient boosting tree model. In this embodiment, the gradient boosting tree models that can be used include a gradient boosting decision tree (GBDT) model, an XGBoost model, a LightGBM model, etc. Among them, the XGBoost model is an optimized distributed gradient boosting library designed to be efficient, flexible and portable.

[0061] It should be noted that the method used by the gradient boosting tree model for parameter selection is generally the stochastic gradient method. When the network hyperparameters are adjusted by this method, it is easy to fall into the local optimal situation and fail to find the optimal solution. Therefore, in an embodiment of the present invention, the particle speed and position can be updated and optimized by using a particle swarm optimization (PSO) algorithm, the gradient boosting tree prediction model can be parameter trained, and the optimization can be iterated continuously to find the optimal hyperparameters to obtain the best gradient boosting tree prediction model, thereby greatly improving the prediction accuracy of the model.

[0062] The trained gradient boosting tree prediction model described in the embodiment of the present invention is obtained by training the gradient boosting tree prediction model based on a soil moisture data sample set carrying soil moisture information labels. It is used to predict the soil moisture data to be predicted, learn the inherent laws of the influence of soil moisture influencing factor data on soil moisture, and thus output accurate soil moisture prediction information.

[0063] It can be understood that the soil moisture data sample set carrying the soil moisture information tag described in the embodiment of the present invention can be obtained from a preset grid database.

[0064] In an embodiment of the present invention, a multivariate data fusion method is adopted to collaboratively carry out multi-depth spatial prediction of soil moisture conditions. On the basis of conventional means such as DEM and slope aspect, more than ten kinds of soil index data such as soil texture, soil bulk density, and soil nutrients are integrated. The high-performance cloud computing platform is further utilized to collaboratively integrate multi-depth soil moisture content data and meteorological data with multi-temporal fusion, expand the collaborative factor dimension, and form a rich soil moisture data sample set, which can provide data support for the subsequent training and analysis of the gradient boosting tree prediction model.

[0065] Among them, the training samples of the gradient boosting tree prediction model are composed of multiple groups of soil moisture data samples carrying soil moisture information labels.

[0066] The soil moisture information label described in the present invention is predetermined based on the soil moisture data sample and corresponds to the soil moisture data sample one by one. That is, each soil moisture data sample in the training sample is predetermined to carry a corresponding soil moisture information label.

[0067] Based on the content of the above embodiment, as an optional embodiment, a method for solving and obtaining the value of the target hyperparameter based on a particle swarm optimization algorithm includes:

[0068] The particle swarm is determined based on the target hyperparameters of the gradient boosting tree prediction model; the gradient boosting tree prediction model is built based on the XGBoost model, and the target hyperparameters include at least: learning rate, maximum depth of the tree, weight threshold of child nodes, minimum partition loss, sample sampling rate, and feature sampling rate;

[0069] Based on the particle swarm optimization algorithm, the speed and position of each particle in the particle swarm are iteratively analyzed to determine the target particle with the minimum fitness value;

[0070] According to the target particle, the value of the target hyperparameter of the gradient boosting tree prediction model is obtained.

[0071] It should be noted that the PSO algorithm is an evolutionary algorithm based on swarm intelligence activities. Each potential solution is regarded as a point or particle, and all potential solutions form a particle swarm. Each particle searches for the optimal solution individually in the N-dimensional search space and records it as the current individual extreme value. The individual extreme value is shared with other particles in the entire particle swarm, and the optimal individual extreme value is found as the current global optimal solution of the entire particle swarm. All particles in the particle swarm adjust their speed and position according to the current individual extreme value and the current global optimal solution shared by the entire particle swarm.

[0072] Specifically, in an embodiment of the present invention, the gradient boosting tree prediction model is constructed based on the XGBoost model, and the target hyperparameters of the XGBoost model optimized by the PSO algorithm may at least include: learning rate learning rate (eta), maximum depth of the tree max_depth, weight threshold of child nodes min_child_weight, minimum partition loss min_split_loss (gamma), sample sampling rate subsample and feature sampling rate colsample_bytree.

[0073] Furthermore, based on the combination of the above target hyperparameters, a particle swarm in the PSO algorithm can be constructed, and then based on the PSO algorithm, the speed and position of each particle in the particle swarm can be iteratively analyzed, that is: randomly initialize the speed and position of each particle in the particle swarm in the search space, and generate the global optimal solution based on the individual optimal solution of each particle by defining the fitting equation, and then compare the current global optimal solution with the historical global optimal solution to decide whether to update the global optimal solution. Among them, the speed and position of each particle can be updated by the following strategy, which is expressed as:

[0074] V id =ωV id +C 1 random(0,1)(P id -X id )+C 2 random(0,1)(P gd -X id );

[0075] X id =X id +V id ;

[0076] In the formula, C 1 , C 2 represents individual and global learning factors; P id represents the dth dimension of the individual extreme value of the ith particle; P gd represents the dth dimension of the global optimal solution; ω represents the inertia factor, which is used to adjust the global optimization performance and local optimization performance; X id represents the position of the ith particle in the dth dimension; V id represents the velocity of the ith particle in the dth dimension.

[0077] In the embodiment of the present invention, the inertia factor may be updated using a linear decreasing strategy, which is expressed as:

[0078]

[0079] In the formula, iter is the maximum number of iterations, iter i is the current iteration number, ω max and ω min represent the maximum and minimum values ​​of ω respectively.

[0080] In this embodiment, the velocity and position of each particle in the particle swarm are continuously iteratively analyzed through the above-mentioned particle velocity and position update strategy and inertia factor update strategy. If the preset iteration stop condition is met, such as reaching the maximum number of iterations or the global optimal solution meets the minimum limit, the search is stopped and the result is output. The target particle with the smallest fitness value can be finally determined, so that the value of the target hyperparameter of the gradient boosting tree prediction model can be obtained according to the target particle, and the gradient boosting tree prediction model with the best performance can be obtained.

[0081] The method of the embodiment of the present invention uses the PSO algorithm to optimize the target hyperparameters of the gradient boosting tree prediction model built based on the XGBoost model to obtain an optimized gradient boosting tree prediction model, which can greatly improve the prediction accuracy of the gradient boosting tree prediction model.

[0082] Furthermore, after the gradient boosting tree prediction model is trained according to the soil moisture data sample set carrying soil moisture information labels to obtain the trained gradient boosting tree prediction model, the soil moisture data to be predicted obtained from the preset grid database can be input into the trained gradient boosting tree prediction model to obtain high-quality soil moisture prediction results, and the soil moisture prediction information corresponding to the soil moisture data to be predicted can be obtained, thereby achieving high-precision prediction of the soil moisture in the farmland prediction area.

[0083] The soil moisture prediction method of the embodiment of the present invention adopts a gradient boosting tree model and uses a particle swarm optimization algorithm to optimize the target hyperparameters of the gradient boosting tree model to obtain a gradient boosting tree prediction model with optimal hyperparameters, thereby improving the prediction accuracy of the gradient boosting tree prediction model. At the same time, the gradient boosting tree prediction model is trained by a soil moisture data sample set carrying soil moisture information labels to obtain a trained gradient boosting tree prediction model, thereby realizing the model's high-precision fitting ability for complex nonlinear relationships. By inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, high-precision real-time prediction of soil moisture can be achieved, while also avoiding damage to the farmland soil environment and saving a lot of manpower and material resources.

[0084] Based on the content of the above embodiment, as an optional embodiment, after outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted, the method further includes:

[0085] Based on the soil moisture prediction information corresponding to the soil moisture data to be predicted and the preset soil moisture classification rendering standard, a target soil moisture prediction map is generated.

[0086] It should be noted that the existing spatial mapping methods for farmland soil moisture conditions at the regional scale mostly use spatial estimation methods from point to surface based on traditional spatial interpolation algorithms. The corresponding models tend to consider the distance relationship on the spatial scale. Some schemes obtain the corresponding probability distribution through geostatistics to guide mapping. However, the above schemes combine fewer collaborative mapping elements, and it is difficult to effectively fit complex nonlinear relationships when facing higher-dimensional data, resulting in insufficient spatial mapping accuracy.

[0087] To this end, the soil moisture prediction method provided by the present invention can also effectively solve the defects existing in the above-mentioned prior art and improve the accuracy of soil moisture spatial mapping.

[0088] Specifically, the preset soil moisture classification rendering standard described in the embodiment of the present invention refers to a color rendering standard determined based on the classification and grading standard of farmland moisture conditions.

[0089] The target soil moisture prediction map of the embodiment of the present invention refers to a dynamic map for displaying the spatial distribution prediction of soil moisture, which is obtained by a classification and grading rendering method based on soil moisture prediction information corresponding to the soil moisture data to be predicted.

[0090] Exemplarily, in this embodiment, the classification and grading standards of farmland moisture conditions can be set as follows: if the soil moisture prediction information is greater than 100%, it can indicate the degree of waterlogging; if the soil moisture prediction information is between 85%-100%, it can indicate an excessive degree; if the soil moisture prediction information is between 65%-85%, it can indicate an appropriate degree; if the soil moisture prediction information is between 55%-65%, it can indicate an insufficient degree; if the soil moisture prediction information is between 35%-55%, it can indicate a drought degree; if the soil moisture prediction information is less than 35%, it can indicate a severe drought degree.

[0091] In an embodiment of the present invention, the soil moisture data to be predicted may be multi-source data of multiple categories of soil moisture influencing factors obtained from a preset grid database. Through the trained gradient boosting tree prediction model, the model's high-precision fitting ability for complex nonlinear relationships is achieved. The soil moisture prediction information corresponding to the soil moisture data to be predicted output by the trained gradient boosting tree prediction model can obtain a high-precision result of soil moisture prediction. Therefore, according to the preset grid database, the soil moisture prediction information corresponding to the soil moisture data to be predicted in each grid can be calculated point by point through the trained gradient boosting tree prediction model.

[0092] Furthermore, by using the Geographic Information System (GIS) platform, the soil moisture prediction information corresponding to the soil moisture data to be predicted in each grid can be mapped point by point to the spatial grid to form a single-layer regional soil moisture raster data. According to the above-mentioned classification and grading standards of farmland moisture, the generated raster data can be classified and graded and rendered, and then inserted into the layout map for mapping display, which can greatly improve the spatial mapping accuracy of soil moisture.

[0093] Optionally, in an embodiment of the present invention, the preset grid database only needs to be constructed once to form a stable collaborative modeling factor database; the trained gradient boosting tree prediction model is a dynamic model, and the input parameters involved in the model operation, the model's hyperparameter values, and the model training process are all dynamically changing, and their changes depend on the characteristics of the soil moisture data involved in the prediction, that is, when calculating the soil moisture space at each depth, it is necessary to repeat the operation, that is, in each operation, it is necessary to go through the steps of key factor screening, model construction, model training and mapping, and run in sequence to form the most suitable collaborative factors and model parameters for the current data conditions.

[0094] The method of the embodiment of the present invention realizes the high-precision fitting ability of the model to complex nonlinear relationships through the trained gradient boosting tree prediction model. The soil moisture prediction information output by the trained gradient boosting tree prediction model is combined with the preset soil moisture grading rendering standard to perform soil moisture prediction mapping, thereby obtaining a high-quality target soil moisture prediction map, which greatly improves the accuracy of soil moisture prediction spatial mapping.

[0095] Based on the content of the above embodiment, as an optional embodiment, before inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, it also includes:

[0096] Divide the target prediction area into grids according to the preset size to obtain multiple grid areas;

[0097] Obtain historical data of M-type soil moisture influencing factors in each grid area;

[0098] Based on the historical data of M types of soil moisture influencing factors in each grid area, a soil moisture data sample set is determined; M is a positive integer;

[0099] The gradient boosting tree prediction model is trained using the soil moisture data sample set.

[0100] Specifically, the target prediction area described in the embodiment of the present invention refers to a farmland area where soil moisture prediction is required.

[0101] The preset size described in the embodiment of the present invention refers to a preset area division size, which is used to grid the target prediction interval to obtain multiple grid areas, corresponding to each grid area in the preset grid database. It can be set according to actual computing requirements, such as selecting a size of 90m as the unit side length, or a size of 50m as the unit side length, etc.

[0102] The M types of soil moisture influencing factors described in the embodiment of the present invention refer to multiple types of soil moisture influencing factors in three major data sources, namely, soil moisture in-situ data, static spatial data, and multi-temporal remote sensing fusion data stored in a preset grid database.

[0103] Furthermore, after dividing the grid areas, based on the preset grid database, the historical data of M types of soil moisture influencing factors in each grid area can be obtained; based on the historical data of M types of soil moisture influencing factors in each grid area, a soil moisture data sample set with rich data sources can be obtained.

[0104] Optionally, in order to improve the efficiency of model training and reduce the amount of data processing, it is also possible to evaluate and analyze the contribution of each type of soil moisture influencing factor in the soil moisture prediction process, screen out a few types of soil moisture influencing factors that play a key role, and thus obtain a soil moisture data sample set based on the historical data of a few types of soil moisture influencing factors that play a key role.

[0105] Furthermore, after obtaining the soil moisture data sample set, the soil moisture data sample set can be used to train the gradient boosting tree prediction model to obtain a trained gradient boosting tree prediction model.

[0106] The method of the embodiment of the present invention, by gridding the prediction area and combining it with a preset grid database, obtains historical data of multiple types of soil moisture influencing factors in each grid area, determines a soil moisture data sample set, and realizes training of the gradient boosting tree prediction model through multi-source data of multi-scale collaborative data fusion, which is conducive to obtaining a high-precision gradient boosting tree prediction model and improving the prediction accuracy of the model in predicting soil moisture.

[0107] Based on the content of the above embodiment, as an optional embodiment, based on the historical data of M types of soil moisture influencing factors in each grid area, a soil moisture data sample set is determined, including:

[0108] Input the historical data of M types of soil moisture influencing factors in each grid area into the preset prediction model to obtain the predicted values ​​corresponding to each type of soil moisture influencing factor in each grid area, so as to determine the SHAP values ​​corresponding to each type of soil moisture influencing factor in each grid area according to the predicted values;

[0109] Based on the SHAP values ​​corresponding to various soil moisture influencing factors in each grid area, N types of target soil moisture influencing factors are determined from M types of soil moisture influencing factors; N≤M, M and N are both positive integers;

[0110] According to the historical data of N types of target soil moisture influencing factors, a soil moisture data sample set is obtained.

[0111] Specifically, the target soil moisture influencing factor described in the embodiment of the present invention refers to N types of soil moisture influencing factors that contribute most to model prediction among M types of soil moisture influencing factors, where N≤M, M and N are both positive integers, and the value of N is set according to the actual model calculation requirements.

[0112] The preset prediction model described in the embodiment of the present invention may be a support vector machine (SVM) model, a random forest model, or the like.

[0113] In an embodiment of the present invention, the Shapley Additive Explanations (SHAP) method is used to evaluate and analyze the contribution of multi-source data of multiple types of soil moisture influencing factors in model fitting and prediction.

[0114] It should be noted that the SHAP algorithm improves the interpretability of the model and solves the interpretability problem of the black box model of the AI ​​algorithm. Therefore, the present invention uses SHAP values ​​to interpret and analyze the various soil moisture influencing factors that affect soil moisture changes in the gradient boosting tree prediction model, so as to quantify the contribution of each type of soil moisture influencing factor to the model prediction and select the N types of target soil moisture influencing factors that are most critical under the current environment.

[0115] Optionally, in this embodiment, historical data of M types of soil moisture influencing factors in each grid area are input into a preset prediction model to obtain predicted values ​​corresponding to each type of soil moisture influencing factor in each grid area, so as to determine the SHAP values ​​corresponding to each type of soil moisture influencing factor in each grid area according to the predicted values;

[0116] Specifically, based on the SHAP algorithm, a type of soil moisture influencing factor is set to correspond to a feature. The marginal contribution of a feature when it is added to the SVM model is first calculated, that is, the marginal contribution of a type of soil moisture influencing factor in the same grid area in the prediction is calculated, and then the different marginal contributions of the feature in all feature sequences are calculated. Finally, the SHAP value of the feature is calculated, that is, the mean of all marginal contributions of the feature.

[0117] Assume that the i-th sample is x i , the jth feature of the i-th sample is x ij , here, xij It can represent the j-th soil moisture influencing factor in the i-th grid area of ​​the preset grid database. The marginal contribution of this feature is mc ij , with weight w i , where f(x ij ) represents x ij For example, the SHAP value of the first feature of the i-th sample is calculated as follows:

[0118] f(x i1 )=mc i1 w 1 +……+mc i1 w n ;

[0119] The model's prediction for this sample is The baseline of the entire model (usually the mean of the target variable for all samples) is y base , then the SHAP value obeys the following equation:

[0120]

[0121] f(x i1 ) represents the final prediction value of the first feature in the i-th sample The SHAP value of each feature indicates the change in model prediction when the feature is used as a condition. For each feature, the SHAP value describes its contribution. i1 )>0, it means that the feature improves the prediction value, otherwise, it means that the feature reduces the contribution.

[0122] Therefore, by quickly calculating the contribution of various soil moisture influencing factors to spatial prediction, N types of target soil moisture influencing factors can be determined. For example, the five types of target soil moisture influencing factors with the highest contribution can be screened. The five types of target soil moisture influencing factors are slope, organic carbon density, cation exchange capacity, total nitrogen content and gravel content.

[0123] Furthermore, historical data of N types of target soil moisture influencing factors are obtained, and the historical data of the N types of target soil moisture influencing factors are used as a soil moisture data sample set, which can be used in the modeling process and spatial mapping of subsequent models.

[0124] The method of the embodiment of the present invention extracts data of N types of target soil moisture influencing factors from M types of soil moisture influencing factors for modeling. Compared with the traditional neural network algorithm, while ensuring the same accuracy, it greatly reduces the training time and improves the training efficiency, making the method of the present invention more suitable for actual platform system applications and realizing an efficient and fast model construction and application process.

[0125] Based on the content of the above embodiment, as an optional embodiment, the gradient boosting tree prediction model is trained using a soil moisture data sample set, including:

[0126] The cross-validation method is adopted to obtain the training sample set from the soil moisture data sample set;

[0127] The soil moisture data samples in the training sample set and the soil moisture information labels carried by the soil moisture data samples are taken as a group of training samples to obtain multiple groups of training samples;

[0128] The gradient boosting tree prediction model is trained using multiple sets of training samples.

[0129] Specifically, the cross-validation method adopted in this embodiment can be a five-fold cross-validation method or a ten-fold cross-validation method, so that the soil moisture data sample set can be divided into a training sample set and a test sample set. For example, using the five-fold cross-validation method, according to the 2-8 principle, 80% of the sample data in the soil moisture data sample set is used as a training set, and 20% is used as a test set.

[0130] Furthermore, the soil moisture data samples in the training sample set and the soil moisture information labels carried by the soil moisture data samples are taken as a group of training samples, that is, each soil moisture data sample with a soil moisture information label is taken as a group of training samples, thereby obtaining multiple groups of training samples.

[0131] In the embodiment of the present invention, the soil moisture data samples and the soil moisture information tags carried by the soil moisture data samples are in one-to-one correspondence.

[0132] Then, after obtaining multiple groups of training samples, the multiple groups of training samples are input into the gradient boosting tree prediction model in sequence, that is, the soil moisture data samples in each group of training samples and the soil moisture information labels they carry are simultaneously input into the gradient boosting tree prediction model, and according to each output result of the gradient boosting tree prediction model, the model parameters in the gradient boosting tree prediction model are adjusted by calculating the loss function value, and finally the training process of the gradient boosting tree prediction model is completed.

[0133] Through the method of the embodiment of the present invention, the soil moisture data samples in the training sample set and the soil moisture information labels they carry are used as a group of training samples, and multiple groups of training samples are obtained. The gradient boosting tree prediction model can be effectively trained using the multiple groups of training samples.

[0134] Based on the content of the above embodiment, as an optional embodiment, a gradient boosting tree prediction model is trained using multiple groups of training samples, including:

[0135] For any set of training samples, the training samples are input into the gradient boosting tree prediction model, and the soil moisture prediction information corresponding to the training samples is output;

[0136] Using a preset loss function, the loss value is calculated according to the soil moisture prediction information corresponding to the training sample and the soil moisture information label in the training sample;

[0137] If the loss value is less than the preset threshold or the current number of iterations reaches the preset maximum number of iterations, the training of the gradient boosting tree prediction model is completed.

[0138] Specifically, the preset loss function described in the embodiment of the present invention refers to a loss function pre-set in the gradient boosting tree prediction model for model evaluation.

[0139] The preset threshold described in the embodiment of the present invention refers to a threshold pre-set by the model, which is used to obtain the minimum loss value and complete the model training.

[0140] After obtaining multiple groups of training samples, for any training sample, the soil moisture data sample in the training sample and the soil moisture information label carried by the soil moisture data sample are simultaneously input into the gradient boosting tree prediction model, and the soil moisture prediction information corresponding to the training sample is output.

[0141] On this basis, the preset loss function is used to calculate the loss value according to the soil moisture prediction information corresponding to the training samples and the soil moisture information labels in the training samples.

[0142] In an embodiment of the present invention, a gradient boosting tree prediction model can be constructed based on an XGBoost ensemble model. The XGBoost model ensemble algorithm uses gradient boosting technology, and its base classifier is a classification and regression tree (CART). Multiple CARTs are combined to form a tree ensemble model, which is established by iteratively adding trees. Assuming that at the tth iteration, the predicted value of the i-th sample can be expressed as:

[0143]

[0144] Iteratively adding trees aims to minimize the objective function, which can be expressed as:

[0145]

[0146] Where L represents the loss function, Ω(f t ) represents the model complexity, y i Represents the true value, that is, the soil moisture information label.

[0147] In order to quickly optimize the target, the second-order Taylor expansion is used for the target function, which can be expressed as:

[0148]

[0149] in, Represent the first and second order derivatives of the loss function respectively.

[0150] When adding the tth tree, the previous t-1 trees have completed training, that is, is a constant term. Removing this term, we can obtain the simplified objective function of the tth step, which can be expressed as:

[0151]

[0152] Definition I j ={i|q(X i )=j} is the sample set of leaf node j. By expanding the regularization term Ω, the above formula can be written as:

[0153]

[0154] Among them, ω j Represents the weight of leaf node j.

[0155] Finally, the objective function is optimized and the optimal solution can be expressed as:

[0156]

[0157]

[0158] Based on the above minimization objective function, after calculating the loss value of the current iteration process, the training process ends, and the network parameters in the gradient boosting tree prediction model are updated before the next training. During the training process, if the loss value calculated for a training sample is less than the preset threshold or the current iteration number reaches the preset maximum iteration number, the training of the gradient boosting tree prediction model is completed, and a trained gradient boosting tree prediction model can be obtained.

[0159] In addition, in this embodiment, in order to improve the accuracy and fitting speed of model training, the data is normalized, and the Min-Max normalization method is used to process each eigenvalue. The data normalization formula is:

[0160]

[0161] In order to make full use of the data value, it is proposed to use K-fold cross validation for model tuning. By using the non-repeated sampling technology, each sample point has only one chance to be included in the training set or test set in each iteration, so that the model can obtain the hyperparameter value with the best generalization performance. The training set is used for model training, while the test set is used to perform error testing on the trained gradient boosting tree prediction model. Five data sets for training and validation are generated respectively. For each cross-validated data, the XGBoost model builds a tree model, finds the optimal split point, constructs XGBoost, and calculates the objective function.

[0162] In this embodiment, the MSE indicator is used to evaluate the error of the trained gradient boosting tree prediction model, and the model weight parameter with the best model prediction accuracy is selected as the final model parameter. The test set is brought into the final model to evaluate the prediction accuracy of the model for data that are not involved in modeling. The updated model is measured using indicators such as Mean Absolute Error (MAE), Mean Square Error (MSE), and Root Mean Squared Error (RMSE):

[0163]

[0164]

[0165]

[0166]

[0167] In the formula, Represents the predicted value, y i represents the true value, Indicates the average value.

[0168] Optionally, in this embodiment, when the model training set verification results meet the MAE, MSE, RMSE are all less than 0.2% and R 2 When >0.90, the gradient boosting tree prediction model takes effect. If the model does not meet the accuracy requirements, it is retrained.

[0169] The method of the embodiment of the present invention controls the loss value of the gradient boosting tree prediction model within a preset range by training the gradient boosting tree prediction model, and performs error assessment on the trained gradient boosting tree prediction model through multiple indicators to ensure that a high-precision gradient boosting tree prediction model is obtained, which is beneficial to improving the accuracy of the model in predicting soil moisture conditions.

[0170] The soil moisture prediction device provided by the present invention is described below. The soil moisture prediction device described below and the soil moisture prediction method described above can be referred to each other.

[0171] Figure 2 Schematic diagram of the structure of the soil moisture prediction device provided by the present invention, such as Figure 2 As shown, including:

[0172] The prediction module 210 is used to input the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and output the soil moisture prediction information corresponding to the soil moisture data to be predicted;

[0173] The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the values ​​of the target hyperparameters of the gradient boosting tree prediction model are solved based on a particle swarm optimization algorithm.

[0174] The soil moisture prediction device described in this embodiment can be used to execute the above-mentioned soil moisture prediction method embodiment, and its principles and technical effects are similar, which will not be repeated here.

[0175] The soil moisture prediction device provided by the present invention adopts a gradient boosting tree model and optimizes the target hyperparameters of the gradient boosting tree model using a particle swarm optimization algorithm to obtain a gradient boosting tree prediction model with optimal hyperparameters, thereby improving the prediction accuracy of the gradient boosting tree prediction model. At the same time, the gradient boosting tree prediction model is trained by a soil moisture data sample set carrying soil moisture information labels to obtain a trained gradient boosting tree prediction model, thereby realizing the model's high-precision fitting ability for complex nonlinear relationships. By inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, high-precision real-time prediction of soil moisture can be achieved, while also avoiding damage to the farmland soil environment and saving a lot of manpower and material resources.

[0176] Figure 3 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the soil moisture prediction method provided by the above methods, the method comprising: inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted; the trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained by solving based on the particle swarm optimization algorithm.

[0177] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0178] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the soil moisture prediction method provided by the above-mentioned methods, and the method includes: inputting the soil moisture data to be predicted into a trained gradient boosting tree prediction model, and outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted; the trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained based on the particle swarm optimization algorithm.

[0179] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the soil moisture prediction method provided by the above-mentioned methods, the method comprising: inputting the soil moisture data to be predicted into a trained gradient boosting tree prediction model, and outputting soil moisture prediction information corresponding to the soil moisture data to be predicted; the trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained based on a particle swarm optimization algorithm.

[0180] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0181] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A soil moisture prediction method, characterized in that: include: Input the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and output the soil moisture prediction information corresponding to the soil moisture data to be predicted; the soil moisture data to be predicted is data of multiple types of soil moisture influencing factors obtained from a preset grid database; the data source of the preset grid database is obtained by multi-scale collaborative data fusion, the data source includes soil moisture in-situ data, static spatial data and multi-temporal remote sensing fusion data, and the multi-scale collaborative data includes topographic data, soil texture sample data and remote sensing monitoring data; The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained by solving based on a particle swarm optimization algorithm; The method for solving the value of the target hyperparameter based on the particle swarm optimization algorithm includes: Determine a particle swarm based on target hyperparameters of the gradient boosting tree prediction model; the gradient boosting tree prediction model is constructed based on the XGBoost model, and the target hyperparameters include at least: learning rate, maximum depth of the tree, weight threshold of child nodes, minimum partition loss, sample sampling rate, and feature sampling rate; Based on the particle swarm optimization algorithm, the speed and position of each particle in the particle swarm are iteratively analyzed to determine the target particle with the smallest fitness value; According to the target particle, a value of a target hyperparameter of the gradient boosting tree prediction model is obtained.

2. The soil moisture prediction method according to claim 1, characterized in that: After outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted, the method further includes: Based on the soil moisture prediction information corresponding to the soil moisture data to be predicted and the preset soil moisture classification rendering standard, a target soil moisture prediction map is generated.

3. The soil moisture prediction method according to claim 1, characterized in that: Before inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, the method further includes: Divide the target prediction area into grids according to the preset size to obtain multiple grid areas; Obtaining historical data of M types of soil moisture influencing factors in each of the grid areas; Determine a soil moisture data sample set based on historical data of M types of soil moisture influencing factors in each of the grid areas; M is a positive integer; The soil moisture data sample set is used to train the gradient boosting tree prediction model.

4. The soil moisture prediction method according to claim 3, characterized in that: Determining a soil moisture data sample set based on historical data of M types of soil moisture influencing factors in each grid area includes: Inputting historical data of M types of soil moisture influencing factors in each of the grid areas into a preset prediction model, obtaining predicted values ​​corresponding to each type of soil moisture influencing factor in each of the grid areas, and determining SHAP values ​​corresponding to each type of soil moisture influencing factor in each of the grid areas according to the predicted values; Based on the SHAP values ​​corresponding to the various soil moisture influencing factors in each of the grid areas, determine N types of target soil moisture influencing factors from the M types of soil moisture influencing factors; N≤M, M and N are both positive integers; A soil moisture data sample set is obtained based on the historical data of the N types of target soil moisture influencing factors.

5. The soil moisture prediction method according to claim 3, characterized in that: Using the soil moisture data sample set, the gradient boosting tree prediction model is trained, including: A cross-validation method is adopted to obtain a training sample set from the soil moisture data sample set; Taking the soil moisture data samples in the training sample set and the soil moisture information labels carried by the soil moisture data samples as a group of training samples, and obtaining multiple groups of training samples; The gradient boosting tree prediction model is trained using the multiple groups of training samples.

6. The soil moisture prediction method according to claim 5, characterized in that: Using the multiple sets of training samples, training the gradient boosting tree prediction model includes: For any set of training samples, the training samples are input into the gradient boosting tree prediction model, and the soil moisture prediction information corresponding to the training samples is output; Using a preset loss function, a loss value is calculated according to the soil moisture prediction information corresponding to the training sample and the soil moisture information label in the training sample; If the loss value is less than a preset threshold or the current number of iterations reaches a preset maximum number of iterations, the training of the gradient boosting tree prediction model is completed.

7. A soil moisture prediction device, characterized in that: include: A prediction module, used for inputting the soil moisture data to be predicted into the trained gradient boosting tree prediction model, and outputting the soil moisture prediction information corresponding to the soil moisture data to be predicted; the soil moisture data to be predicted is data of multiple types of soil moisture influencing factors obtained from a preset grid database; the data source of the preset grid database is obtained by multi-scale collaborative data fusion, the data source includes soil moisture in-situ data, static spatial data and multi-temporal remote sensing fusion data, and the multi-scale collaborative data includes topographic data, soil texture sample data and remote sensing monitoring data; The trained gradient boosting tree prediction model is obtained after training based on a soil moisture data sample set carrying soil moisture information labels, and the value of the target hyperparameter of the gradient boosting tree prediction model is obtained by solving based on a particle swarm optimization algorithm; The method for solving the value of the target hyperparameter based on the particle swarm optimization algorithm includes: Determine a particle swarm based on target hyperparameters of the gradient boosting tree prediction model; the gradient boosting tree prediction model is constructed based on the XGBoost model, and the target hyperparameters include at least: learning rate, maximum depth of the tree, weight threshold of child nodes, minimum partition loss, sample sampling rate, and feature sampling rate; Based on the particle swarm optimization algorithm, the speed and position of each particle in the particle swarm are iteratively analyzed to determine the target particle with the smallest fitness value; According to the target particle, a value of a target hyperparameter of the gradient boosting tree prediction model is obtained.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the soil moisture prediction method as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the soil moisture prediction method according to any one of claims 1 to 6 is implemented.