A soil moisture prediction method and system based on attention mechanism and multi-source data interpolation fusion

By combining attention mechanism with multi-source data interpolation fusion for soil moisture prediction, the shortcomings of traditional methods in regional prediction are solved, and high spatiotemporal resolution soil moisture prediction is achieved, thus improving the scientific nature and practicality of agricultural management.

CN121302852BActive Publication Date: 2026-03-27CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional methods of obtaining soil moisture are insufficient to meet the needs of high-precision, continuous and wide-ranging predictions, especially when facing sudden weather events or periodic changes. Furthermore, single-point prediction results are difficult to generalize to regional scales.

Method used

A soil moisture prediction method based on attention mechanism and multi-source data interpolation is adopted. A time series prediction model is constructed by combining a bidirectional long short-term memory network (BiLSTM) with the attention mechanism. The uncertainty is expressed by combining the Monte Carlo Dropout method, and spatial expansion is achieved by combining Kriging interpolation and radial basis function interpolation.

Benefits of technology

It has achieved continuous prediction of soil moisture at the regional scale with high spatiotemporal resolution, improved the intelligence level of agricultural soil moisture monitoring, precision irrigation regulation and drought risk early warning, and provided prediction results with high accuracy, dynamic response capability and uncertainty quantification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121302852B_ABST
    Figure CN121302852B_ABST
Patent Text Reader

Abstract

The application provides a soil moisture prediction method and system based on an attention mechanism and multi-source data interpolation fusion, the method comprising collection and preprocessing of multi-source meteorological and soil monitoring data, soil moisture prediction based on a deep time series prediction model, spatial interpolation fusion of site prediction results, and prediction result output and format saving; the system comprising a multi-source meteorological and soil monitoring data fusion module, a deep time series prediction model module, a spatial interpolation expansion module, and a data export and visualization module. The method combines a Monte Carlo Dropout method to obtain prediction uncertainty, and realizes high-resolution spatial expansion through Kriging and RBF interpolation; at the same time, the system has prediction accuracy, regional adaptability and deployment flexibility, and can meet various application requirements such as smart agriculture, environmental monitoring and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of new generation information technology, and combines technologies in multiple fields such as artificial intelligence, agricultural remote sensing and soil environment monitoring, and particularly relates to a soil moisture prediction method and system based on an attention mechanism and multi-source data interpolation fusion. BACKGROUND

[0002] Soil moisture, as a key parameter for measuring the state of surface water, is widely used in fields such as agricultural production, water resource regulation, drought early warning and climate change research. Traditional soil moisture acquisition methods mainly rely on ground sensors, weather station observations and remote sensing inversion technology. However, due to the strong spatial and temporal variation and heterogeneity of soil moisture, relying only on discrete observation points or coarse resolution remote sensing data cannot meet the prediction requirements of high precision, continuity and regional wide range.

[0003] With the continuous development of deep learning technology, models such as recurrent neural network (RNN) and long short-term memory network (LSTM) have shown good performance in time series prediction tasks, and can effectively model the dynamic change process of soil moisture. However, the traditional LSTM structure lacks modeling ability when facing sudden weather events or periodic changes (such as diurnal variation and seasonal rhythm), and the prediction results lack interpretability and confidence interval expression, which limits its practical application in agricultural decision-making. In addition, single-point prediction results cannot be extended to regional scale, and spatial interpolation methods are needed for expansion.

[0004] Although existing interpolation methods such as Kriging and RBF can achieve a certain degree of continuity in space, their essence is still static spatial fitting, which cannot combine time series characteristics for dynamic modeling, and the accuracy decreases significantly when the data points are sparse. Therefore, it is urgent to build a comprehensive prediction system that integrates multi-source station data, has spatiotemporal modeling capability and supports uncertainty expression. SUMMARY

[0005] In view of the problems in the prior art, the purpose of the present application is to realize high spatiotemporal resolution continuous prediction of regional scale soil moisture, and to improve the intelligent level and scientific decision-making ability of agricultural soil condition monitoring, precise irrigation regulation and drought risk early warning, thereby providing a soil moisture prediction method and system based on an attention mechanism and multi-source data interpolation fusion.

[0006] The purpose of the present application is achieved by the following technical solutions:

[0007] The present application provides a soil moisture prediction method based on an attention mechanism and multi-source data interpolation fusion, comprising the following steps:

[0008] Step 1, collection and preprocessing of multi-source weather and soil monitoring data

[0009] S11, collecting meteorological data and soil monitoring data from several ground meteorological monitoring points and soil monitoring sites, including wind speed, air temperature, air pressure, precipitation, evaporation, and soil moisture time series observation data;

[0010] S12, data preprocessing:

[0011] Unifying the data formats and aligning them by time, extracting the periodic characteristics of hours and annual cumulative days, and constructing rhythmic characteristics through sine / cosine functions, and standardizing the data.

[0012] Step 2, soil moisture prediction based on deep time series prediction model

[0013] S21, model construction: constructing a neural network structure based on a bidirectional long short-term memory network and an attention mechanism to form a time series prediction model, specifically including:

[0014] Taking the time series after sliding window slicing as input, each time step contains multi-dimensional meteorological and soil characteristics; extracting time series information through a bidirectional long short-term memory network (BiLSTM), with 128 single-direction hidden layer units in each layer; BiLSTM performs standard LSTM gating calculation in both forward and backward directions, including input gate, forget gate, output gate, and candidate cell update; the hidden states of the forward and backward directions are concatenated to obtain the output sequence at each time step; regularize through Dropout between layers, with Dropout values ranging from 0.2 to 0.5;

[0015] In the attention mechanism, the full sequence output by BiLSTM is used as the key and value (keys, values), and the hidden state or pooling result at the last time is used as the query vector (query). The scoring is calculated through additive attention (Bahdanau attention). First, map the key and query vector to the same space, perform nonlinear transformation, and then take the inner product with the learnable vector to obtain the output value e of the scoring function t , and then normalize the weight a through softmax t , and finally obtain the context vector c by weighted summation; in the output layer, the context vector c is concatenated with the global representation and input into a multilayer perceptron to form two prediction heads. One prediction head outputs the current soil moisture prediction value, and the other prediction head outputs the 24-hour hourly prediction sequence at once; the loss function uses the weighted mean squared error (MSE) or Huber loss of the current prediction and multi-step prediction;

[0016] S22, the input sequence is sampled multiple times by using the Monte Carlo Dropout method for forward inference, the sampling number is 50-100 times, the Dropout activation is kept in the inference stage, the model parameters are randomly disturbed, a group of prediction distribution is obtained; the final prediction result takes the mean value of these samples as the point estimate, the uncertainty interval is calculated through the variance or quantile, and the prediction value of the current time soil moisture and the prediction sequence of the future 24 hours are outputted, and the confidence interval is attached, as the soil moisture prediction result.

[0017] Step 3, spatial interpolation fusion of site prediction results

[0018] S31, the soil moisture prediction results obtained in step 2 are generated into coarse resolution spatial grid distribution by using the Kriging interpolation algorithm;

[0019] S32, a high-resolution prediction layer is generated by using the radial basis function interpolation method.

[0020] Step 4, output and format saving of prediction results

[0021] The high-resolution prediction results obtained in step 3 are formatted and outputted into grid files and / or table data.

[0022] Further, in step (1), the standardization processing adopts z-score or min-max normalization.

[0023] Further, the data preprocessing in step (1) further includes:

[0024] Missing value filling: time proximity method and site proximity method are used for reasonable interpolation;

[0025] Abnormal value detection: combined with Z-score method and IQR method, non-physical fluctuation is removed.

[0026] Further, the key calculation of BiLSTM includes updating i, f, o, Get:

[0027]

[0028] h t =o t ⊙tanh(c t )

[0029] In the formula, c t , c t-1 are the cell states at t time and t-1 time respectively, f t is the forgetting gate output at t time, i t is the input gate output at t time, is the candidate cell state at time t, h t is the hidden layer state at time t, o t is the output gate output at time t, is the element-wise multiplication, tanh() is the hyperbolic tangent activation function of the current cell state c t .

[0030] Further, in step (2), the Monte Carlo Dropout method is used to sample the input sequence multiple times in forward inference, and the specific calculation is:

[0031] In the inference phase, the Dropout activation is maintained, and the forward inference is repeated M times for the same input sample to obtain multiple sets of prediction results

[0032] The average of these results is taken as the final prediction value, that is,

[0033] The sample variance is taken as the uncertainty measure, that is,

[0034] Further, the prediction interval is constructed: under the normal approximation, the 95% confidence interval is

[0035] where Y h is the prediction result set, is the prediction value of the Mth sampling, M is the sampling number, is the final prediction value, is the sample variance, s h is the sample standard deviation, CI h is the 95% confidence interval.

[0036] Further, in step (3), the Kriging interpolation algorithm establishes a Kriging equation set based on the semi-variance function, and the weight coefficient λ i is solved, and the prediction value is:

[0037]

[0038] wherein, is the soil moisture prediction value of the prediction point x0, n is the number of monitoring stations, λ i is the weight coefficient of the ith monitoring station, z(x i ) is the soil moisture prediction value of the ith monitoring station.

[0039] Further, in step (3), the radial basis function interpolation method solves the weight vector w = Φ -1 by constructing the basis function matrix Φij = φ(||xi-xj||), and the prediction value z is:

[0040]

[0041] wherein, is the predicted value of soil moisture at the prediction point x0, n is the number of monitoring sites, w j is the weight of the jth monitoring site, φ(|x0-x j |) is the radial basis function, x j is the coordinate of the jth monitoring site.

[0042] The second aspect of the present application provides a soil moisture prediction system based on attention mechanism and multi-source data interpolation fusion, which is used to implement the soil moisture prediction method of the first aspect, and the system comprises:

[0043] A multi-source weather and soil monitoring data fusion module is used to collect and integrate time series observation data including wind speed, air temperature, air pressure, precipitation, evaporation and soil moisture, extract the periodic rhythm characteristics of hours and annual cumulative days, and perform standardization preprocessing on the data.

[0044] A deep time series prediction model module comprises a bidirectional long short-term memory network unit, an attention mechanism unit and a Monte Carlo Dropout unit, which is used to predict the soil moisture at the current time and the future 24-hour time series based on the preprocessed sequence data, and output the prediction confidence interval.

[0045] A spatial interpolation expansion module is used to generate coarse resolution spatial grid distribution by Kriging interpolation algorithm on the output result of the deep time series prediction model module, and generate high resolution prediction layer by radial basis function interpolation method.

[0046] A data export and visualization module is used to output the high resolution prediction layer as raster file and / or table data, and support the generation and display of dynamic soil moisture layer.

[0047] The soil moisture prediction method and system based on attention mechanism and multi-source data interpolation fusion provided by the present application have the following significant advantages compared with the prior art through the organic combination of multi-source data preprocessing, deep time series modeling and spatial interpolation technology:

[0048] 1. Improve the time series prediction accuracy and dynamic response capability

[0049] The method innovatively combines bidirectional long short-term memory network (BiLSTM) with attention mechanism (Attention), captures the historical dependence of soil moisture through bidirectional modeling, and assigns higher weights to key time steps (such as precipitation mutation and day-night transition nodes), solving the problem of insufficient modeling of sudden weather events and periodic changes (day-night, seasonal rhythm) in traditional LSTM. At the same time, by constructing periodic features such as hourly and annual accumulated days through sine / cosine functions, the model's ability to perceive temporal patterns is further enhanced, making the prediction accuracy reach R 2 >0.85, MAPE <10%, meeting the needs of fine capture of soil moisture dynamics for high-precision agricultural regulation.

[0050] 2. Realize prediction uncertainty quantification and risk decision support

[0051] The Monte Carlo Dropout method is introduced to generate prediction value distribution and calculate confidence interval through multiple sampling in the inference stage, making up for the lack of uncertainty expression in traditional deep learning models. This design provides agricultural managers with "prediction value + risk range" dual information, such as in drought warning, not only the future 24-hour soil moisture prediction value can be output, but also the probability interval of drought occurrence can be judged through the confidence interval, improving the scientificity of decision-making and risk response ability.

[0052] 3. Break through the limitations of single-point prediction and realize high-resolution expansion at regional scale

[0053] The two-stage spatial expansion strategy of "Kriging coarse interpolation + RBF fine interpolation" is adopted to solve the problem of static fitting and inability to combine temporal features in traditional interpolation methods (such as single Kriging or RBF). Through Kriging to capture the regional humidity distribution trend, and then through RBF to realize spatial refinement at fine scale (such as 1km or 0.1°), the prediction results of discrete stations can be extended to regional scale, and hourly dynamic update is supported, meeting the needs of continuous and high-resolution soil moisture monitoring in large-area farmland, watershed, and other scenarios.

[0054] 4. Enhance data adaptability and practical application flexibility

[0055] The method integrates multi-dimensional meteorological and soil data such as wind speed, air temperature, and precipitation through a multi-source data fusion module, and designs a standardized preprocessing process (including missing value processing, sliding window segmentation, etc.), improving the adaptability to different observation conditions (such as data sparsity and format differences). At the same time, it supports current time prediction and 24-hour rolling prediction, and outputs formats compatible with GIS raster files (ASC) and CSV tables, which can be directly embedded into smart agriculture platforms, irrigation control systems, and other practical application scenarios, providing real-time and operable technical support for precision irrigation, drought warning, and other applications. Attached Figure Description

[0056] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0057] Figure 1 This is a technical roadmap of the soil moisture prediction method described in this invention;

[0058] Figure 2 This is a schematic diagram of the inter-sequence prediction model described in step 2 of the present invention;

[0059] Figure 3 This is an overview diagram of the Kriging interpolation algorithm described in step 3 of the present invention;

[0060] Figure 4 This is a visualization view of the prediction results obtained using the soil moisture prediction method described in the embodiments of this application. Detailed Implementation

[0061] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0062] Example 1

[0063] like Figure 1 As shown, this embodiment provides a soil moisture prediction method based on attention mechanism and multi-source data interpolation fusion, including the following steps:

[0064] Step 1: Acquisition and preprocessing of multi-source meteorological and soil monitoring data

[0065] S11 collects meteorological data and soil monitoring data from several ground meteorological monitoring points and soil monitoring stations, and collects time-series observation data including 10-minute wind speed, temperature, air pressure, precipitation, evaporation, and soil moisture.

[0066] S12, Data Preprocessing:

[0067] (1) Standardize the field format of each data and align them by time, set "observation time" as the main index, and ensure that each factor is paired by hour;

[0068] (2) Calculate short-term variables such as precipitation and evaporation by hourly cumulative or average value; imputation of missing values: use time proximity method and site proximity method (such as KNN) for reasonable imputation; outlier detection: combine Z-score method and IQR method to eliminate non-physical fluctuations;

[0069] (3) Extract periodic time features, including hour and day of year, and construct rhythmic features (sin_hour, cos_hour, sin_day, cos_day) through sine / cosine functions;

[0070] (4) Apply z-score or min-max normalization to input factors to unify feature input to a scale suitable for neural network, facilitating neural network training and convergence.

[0071] Step 2, soil moisture prediction based on deep time series prediction model

[0072] S21, model construction: construct a neural network structure based on bidirectional long short-term memory network (BiLSTM) and attention mechanism (Attention), form a time series prediction model, and capture the time series dependence and key feature contribution of historical soil moisture.

[0073] As shown in Figure 2 , the core structure of the neural network structure is as follows:

[0074] ① BiLSTM layer: bidirectional modeling of historical soil moisture and its dependence on meteorological factors before and after;

[0075] ② Attention layer: assign weights to each time step to improve the model's response to key moments (such as precipitation mutations);

[0076] ③ Dropout mechanism: prevent overfitting and perform multiple sampling through MC Dropout in the prediction stage;

[0077] ④ Output layer: regression single value (current value and future hourly value).

[0078] Take the time series after sliding window slicing as input, each time step contains multi-dimensional meteorological and soil features; extract time series information through bidirectional long short-term memory network (BiLSTM), set the number of single-direction hidden layer units to 128 in each layer, BiLSTM performs standard LSTM gating calculation in forward and backward directions, the gating calculation includes input gate, forget gate, output gate and candidate cell update, the hidden states of forward and backward directions are concatenated to obtain the output sequence at each time step; regularize through Dropout between layers, Dropout value range is 0.2-0.5.

[0079] In the attention mechanism, the full sequence output by the BiLSTM is taken as the key and value (keys, values), and the hidden state or the pooling result at the last moment is taken as the query vector (query). The scoring is calculated by additive attention (Bahdanau attention). The key and the query vector are mapped to a common space respectively, and the output value e of the scoring function is obtained by performing inner product with a learnable vector after nonlinear transformation t , and then the weight a is obtained by softmax normalization t . Finally, the context vector c is obtained by weighted summation. In the output layer, the context vector c is concatenated with the global representation and input into a multilayer perceptron to form two prediction heads. One prediction head outputs the current soil moisture prediction value, and the other prediction head outputs the hourly prediction sequence of the next 24 hours at one time. The loss function adopts the weighted mean square error (MSE) or Huber loss of the current prediction and multi-step prediction.

[0080] wherein the key calculation of the BiLSTM includes updating i, f, o, at each step by the gate to obtain

[0081]

[0082] h t = o t tanh(c t )

[0083] wherein c t and c t-1 are the cell states at t time and t-1 time respectively, f t is the forgetting gate output at t time, i t is the input gate output at t time, is the candidate cell state at t time, h t is the hidden layer state at t time, o t is the output gate output at t time, and is the element-wise multiplication, and tanh() is the hyperbolic tangent activation function of the current cell state c t .

[0084] S22, the Monte Carlo Dropout method is used to sample the input sequence multiple times forward, the sampling number is 50-100 times, the Dropout activation is kept during the inference stage, the model parameters are randomly disturbed, and a group of prediction distributions are obtained. The final prediction result takes the mean of these samples as the point estimate, and the uncertainty interval is calculated by the variance or quantile. The prediction result containing the current soil moisture prediction value and the prediction sequence of the next 24 hours is output, and the confidence interval is attached as the soil moisture prediction result.

[0085] The Monte Carlo Dropout method is used to sample the input sequence multiple times by forward inference, and the specific calculation is as follows:

[0086] In the inference phase, the Dropout activation is kept, and the forward inference is repeated M times for the same input sample to obtain multiple sets of prediction results

[0087] The average of these results is taken as the final prediction value, that is,

[0088] The sample variance is taken as the uncertainty measure, that is,

[0089] Further, the prediction interval is constructed: under the normal approximation, the 95% confidence interval is

[0090] where Y h is the set of prediction results, is the prediction value of the Mth sampling, M is the sampling number, is the final prediction value, is the sample variance, s h is the sample standard deviation, CI h is the 95% confidence interval.

[0091] Step 3, spatial interpolation fusion of site prediction results

[0092] Considering the problem that site prediction results are discrete and cannot directly provide regional services, the system introduces a two-stage interpolation method:

[0093] S31, first stage-Kriging interpolation: the soil moisture prediction results obtained in step 2 (current time soil moisture prediction value and future 24-hour hourly prediction sequence) are interpolated by the Kriging interpolation (Ordinary Kriging) algorithm (such as Figure 3 ), and the prediction values of discrete sites are interpolated to coarse resolution (such as 10 kilometers) spatial grid points to generate continuous "coarse grid" soil moisture distribution map, capturing large-scale humidity trends.

[0094] The Kriging interpolation algorithm establishes a Kriging equation set based on the semi-variance function, and the weight coefficient λ i is obtained by solving:

[0095]

[0096] where, is the soil moisture prediction value of the prediction point x0, n is the number of monitoring stations, λ i is the weight coefficient of the i-th monitoring station, z(x i) is the soil moisture prediction value of the i th monitoring site.

[0097] S32, second stage-RBF interpolation: using the radial basis function (RBF) interpolation method, the generation of high-resolution prediction layer is realized in fine-scale (such as 0.1°) space, and high-precision spatial refinement is realized by using radial basis function to form multi-time fine grid soil moisture prediction product.

[0098] The radial basis function interpolation method solves the weight vector w = Φ -1 The predicted value of z is:

[0099]

[0100] In the formula, is the soil moisture prediction value of the prediction point x0, n is the number of monitoring sites, w j is the weight of the j th monitoring site, φ (| x0-x j |) is the radial basis function, x j is the coordinate of the j th monitoring site.

[0101] Through this method, the system can estimate the soil moisture of any latitude and longitude coordinate point, and realize the regional expansion of the prediction result.

[0102] Step 4, output and format saving of prediction result

[0103] The high-resolution prediction result obtained in step 3 is visualized and standardized, which specifically includes:

[0104] (1) The fine grid prediction result of each hour is formatted into an ASCII grid (ASC) file according to the geographical spatial structure, which is convenient for calling in GIS platform (such as ArcGIS, QGIS), agricultural information system.

[0105] (2) The prediction results of all time are integrated into a CSV file, including coordinate points (lon, lat) and soil moisture prediction values from “now”+“hour+1” to “hour+24”, which is convenient for horizontal comparison and analysis and batch post-processing.

[0106] (3) Support output of prediction information according to site number and time identifier, with traceability and cross-platform compatibility.

[0107] Embodiment 2

[0108] The embodiment provides a soil moisture prediction system based on attention mechanism and multi-source data interpolation fusion, which is used to realize the soil moisture prediction method in embodiment 1, and the system comprises:

[0109] 1. Multi-source meteorological and soil monitoring data fusion module

[0110] The module is used for collecting and integrating key observation data from ground meteorological monitoring points and soil monitoring sites, including multi-dimensional time series observation data of wind speed, air temperature, air pressure, precipitation, evaporation, and soil moisture.

[0111] Further, the periodic rhythm characteristics of hours and annual accumulated days are extracted: the time periodicity feature construction mechanism is introduced, and the circadian rhythm (hours) and seasonal rhythm (annual accumulated days) in the form of sine and cosine are generated based on the observation time, enhancing the model's perception ability of time series regularity.

[0112] Finally, the data is standardized and preprocessed: including missing value processing, sliding window segmentation, standardization and normalization, etc. preprocessing operations on original data, to ensure the quality and structural consistency of model input data.

[0113] 2. Deep time series prediction model module (BiLSTM+Attention+MC Dropout)

[0114] The module contains a bidirectional long short-term memory network unit (BiLSTM), an attention mechanism unit (Attention), and a Monte Carlo Dropout unit, which is used to predict the current soil moisture and future 24-hour time series based on preprocessed sequence data, and output the prediction confidence interval.

[0115] Specifically, the module constructs a time series prediction model based on bidirectional long short-term memory network (BiLSTM) and attention mechanism (Attention), effectively capturing the nonlinear dynamic relationship between historical soil moisture and meteorological factors.

[0116] Then, the Monte Carlo Dropout method is introduced, which obtains the model prediction confidence interval through multiple sampling in the inference stage, realizes the expression of uncertainty, and improves the application value of the model in agricultural risk assessment.

[0117] Finally, the model supports single-site prediction of current soil moisture value and future 24-hour time prediction, with continuity and real-time features.

[0118] 3. Spatial interpolation expansion module (Kriging+RBF)

[0119] Used to generate coarse resolution spatial grid distribution through Kriging interpolation algorithm (Kriging) from the output of the deep time series prediction model module, and then generate high-resolution prediction layers through radial basis function interpolation method (RBF).

[0120] Specifically, the Kriging interpolation method is used to extend the soil moisture prediction results of each monitoring site to a coarse resolution (e.g., 10 km) gridded space, capturing regional-scale humidity distribution trends;

[0121] Then, based on the coarse grid results, a radial basis function (RBF) interpolation model is constructed to refine the space at a finer resolution (e.g., 1 km or 0.1°), generating high spatial accuracy soil moisture prediction layers;

[0122] The interpolation results support hourly output, with continuity and spatiotemporal consistency, suitable for agricultural map systems and remote sensing analysis platforms.

[0123] 4. Data export and visualization module

[0124] Used to output high-resolution prediction layers as ASCII raster files and general CSV table data, and support the generation and display of dynamic soil moisture layers.

[0125] Specifically, this module supports outputting fine grid prediction results in multiple formats, including geographic information system compatible ASCII raster (ASC) files and general CSV table data, facilitating subsequent visualization and system integration;

[0126] Automatically generate hourly soil moisture distribution layers and support merged output for building regional dynamic soil moisture databases;

[0127] Can be embedded into intelligent agriculture platforms to realize online display, risk warning, and water management support.

[0128] Application example:

[0129] The research area of this application example covers a longitude range of about 73°E to 135°E and a latitude range of 18°N to 54°N, covering multiple climate zones and agricultural regions such as North China, East China, Southwest China, Northwest China, Northeast China, and South China. The region has complex and diverse topography, with climate types spanning temperate, subtropical, and highland cold zones, with significant spatial heterogeneity and seasonal variation characteristics, making soil moisture modeling highly uncertain and challenging.

[0130] After interpolation is complete, the system outputs multiple two-dimensional grid matrices at the hour level, saved in ASCIIRaster format (.asc), containing grid dimensions, spatial starting point, raster size, and missing value definition, which can be directly used for loading and displaying on ArcGIS, QGIS, and other platforms or for overlay analysis with remote sensing data. An example visualization is shown in Figure 4 .

[0131] In summary, the method and system have high-precision time sequence prediction, regional dynamic modeling, uncertainty quantification and application flexibility, effectively solve the problems of "single point limitation, insufficient precision, lack of risk information" in traditional soil moisture prediction, and significantly improve the intelligent level of agricultural soil condition monitoring and decision-making.

[0132] Finally, it should be noted that the above is only to illustrate the technical solutions of the present application, not to limit, although the present application is described in detail with reference to the preferred arrangement, those skilled in the art should understand that the technical solutions of the present application (such as the use of various formulas, the order of steps, etc.) can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A soil moisture prediction method based on attention mechanism and multi-source data interpolation fusion, characterized in that, The method includes the following steps: Step 1: Acquisition and preprocessing of multi-source meteorological and soil monitoring data S11 collects meteorological data and soil monitoring data from several ground meteorological monitoring points and soil monitoring stations, and collects time-series observation data including wind speed, air temperature, air pressure, precipitation, evaporation, and soil moisture. S12, Data Preprocessing: Unify the data formats and align them by time, extract the periodic features of hours and yearly days, construct rhythmic features through sine / cosine functions, and standardize the data. Step 2, Soil moisture prediction based on deep time series prediction model S21, Model Construction: Construct a neural network structure based on a bidirectional long short-term memory network and an attention mechanism to form a time series prediction model, specifically including: The time series data after sliding window slicing is used as input, with each time step containing multidimensional meteorological and soil features. Temporal information is extracted through a bidirectional long short-term memory network (BiLSTM). The BiLSTM performs standard LSTM gating computations in both the forward and backward directions. The gating computations include input gates, forget gates, output gates, and updates of candidate units. The hidden states in the forward and backward directions are concatenated at each time step to obtain the output sequence. Regularization is performed between layers using Dropout. In the attention mechanism, the full sequence of the BiLSTM output is taken as the key and value, and the hidden state or the pooling result at the last moment is taken as the query vector, the scoring is calculated through the additive attention, the key and the query vector are respectively mapped to the common space, the output value of the scoring function is obtained after the nonlinear transformation and the inner product with the learnable vector , and the weight is obtained by normalizing the softmax , and the context vector c is obtained by finally weighting and summing In the output layer, the context vector c is input into the multilayer perceptron after being spliced with the global representation, two prediction heads are formed respectively, one prediction head outputs the predicted value of the soil moisture at the current moment, and the other prediction head outputs the hourly prediction sequence of the future 24 hours at one time. S22 uses the Monte Carlo Dropout method to perform multiple forward inference samplings on the input sequence. During the inference phase, Dropout activation is maintained to randomly perturb the model parameters and obtain a set of prediction distributions. The final prediction result is the mean of these samples as a point estimate. The uncertainty interval is calculated by variance or quantile. The output includes the predicted soil moisture value at the current time and the prediction sequence for the next 24 hours, along with a confidence interval, as the soil moisture prediction result. Step 3: Spatial interpolation and fusion of site prediction results S31, The soil moisture prediction results obtained in step 2 are used to generate a coarse-resolution spatial grid distribution through the Kriging interpolation algorithm. S32 uses radial basis function interpolation to generate a high-resolution prediction layer; Step 4: Output and formatted saving of prediction results The high-resolution prediction results obtained in step 3 are formatted and output as grid files and / or tabular data.

2. The soil moisture prediction method according to claim 1, characterized by, In step 1, the standardization process uses z-score or min-max normalization.

3. The soil moisture prediction method according to claim 1, characterized by, Step 1 data preprocessing also includes: Missing value imputation: Appropriate imputation is performed using the time proximity method and the site proximity method; Outlier detection: Combining Z-score and IQR methods to eliminate non-physical fluctuations.

4. The soil moisture prediction method according to claim 1, characterized in that, In Step 2, the key computation for BiLSTM includes updating i, f, o at each step by gating, , which gives ; ; In the formula, , The cell states at time t and time t-1 are shown respectively. The output of the forget gate at time t. The input gate output at time t, Let be the candidate cell state at time t. Let be the hidden state at time t. The output of the gate at time t is the output, ⊙ represents element-wise multiplication, and tanh() is the current cell state. The hyperbolic tangent activation function.

5. The soil moisture prediction method according to claim 1, characterized in that, In step 2, the Monte Carlo Dropout method is used to perform multiple forward inference samplings on the input sequence. The specific calculation is as follows: During the inference phase, Dropout activation is maintained, and forward inference is repeated M times for the same input sample to obtain multiple sets of prediction results. ; The average of these results is used as the final predicted value, i.e. ; Using sample variance as a measure of uncertainty, i.e. ; Furthermore, construct the prediction interval: Under the normal approximation, the 95% confidence interval is... ; in, For the set of prediction results, This is the predicted value from the Mth sample, where M is the number of samples. This is the final predicted value. For sample variance, The standard deviation of the sample is 1. The confidence interval is 95%.

6. The soil moisture prediction method according to claim 1, characterized in that, In step 3, the Kriging interpolation algorithm establishes a system of Kriging equations based on the semivariance function and solves for the weighting coefficients. The predicted value is: ; In the formula, For prediction points The predicted soil moisture value, where n is the number of monitoring stations. Let be the weight coefficient of the i-th monitoring station. Let be the predicted soil moisture value for the i-th monitoring station.

7. The soil moisture prediction method according to claim 1, characterized in that, In step 3, the radial basis function interpolation method constructs a basis function matrix. Solve for the weight vector The predicted value is: ; In the formula, For prediction points The predicted soil moisture value, where n is the number of monitoring stations. Let j be the weight of the j-th monitoring station. For radial basis functions, Let be the coordinates of the j-th monitoring station.

8. A soil moisture prediction system based on attention mechanism and multi-source data interpolation fusion, used to implement the soil moisture prediction method according to any one of claims 1 to 7, characterized in that, The system includes: The multi-source meteorological and soil monitoring data fusion module is used to collect and integrate time-series observation data including wind speed, air temperature, air pressure, precipitation, evaporation, and soil moisture, extract the periodic rhythm characteristics of hours and annual days, and perform standardized preprocessing on the data. A deep time series prediction model module, comprising a bidirectional long short-term memory network unit, an attention mechanism unit, and a Monte Carlo Dropout unit, is used to predict the current soil moisture and the hourly sequence of the next 24 hours based on preprocessed sequence data, and output the prediction confidence interval; The spatial interpolation extension module is used to generate a coarse-resolution spatial grid distribution from the output of the deep temporal prediction model module through the Kriging interpolation algorithm, and then generate a high-resolution prediction layer through the radial basis function interpolation method. The data export and visualization module is used to output high-resolution prediction layers as raster files and / or tabular data, and supports the generation and display of dynamic soil moisture layers.

Citation Information

Patent Citations

  • Greenhouse soil temperature and humidity prediction model construction method, prediction method and device, electronic equipment, storage medium and program product

    CN118261198A

  • Deep learning-based plant drought tolerance prediction method and system

    CN119990418A