A soil moisture spatiotemporal prediction method and system based on environmental condition constraints

CN122927375APending Publication Date: 2026-10-16CHENGDU IND VOCATIONAL TECHN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611147094.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,现有少数可实现墒情预测的方法存在明显不足:一方面,多数预测模型仅依赖历史土壤墒情数据进行递推,未能耦合外部环境影响因素,导致预测结果与实际情况偏差较大;另一方面,即使部分方法尝试引入气象要素,也多局限于单一气象变量,或直接采用区域气象站预报数据,缺少对近地面真实环境的精准读取,更未将地面实测降雨等关键水分输入纳入模型约束

Benefits of technology

[0042]This invention does not rely solely on historical soil moisture data for recursive prediction. Instead, it organically embeds multi-dimensional environmental factors, such as near-surface temperature, humidity, light intensity, and measured rainfall, into the state transition process within the spatiotemporal prediction network as constraints. This environmental constraint mechanism dynamically adjusts the network's memory of historical information, thereby adaptively capturing the spatiotemporal evolution of soil moisture under different environmental conditions, significantly improving prediction accuracy. Compared to prediction methods that rely solely on historical moisture without considering any environmental factors, this invention significantly improves prediction accuracy. Furthermore, this invention simultaneously introduces multiple environmental factors, including temperature, humidity, light intensity, and rainfall, overcoming the information dimensionality limitations caused by considering only a single meteorological factor. The multi-factor synergistic constraint enables the model to comprehensively consider the combined effects of environmental conditions on soil moisture, resulting in predictions that better align with actual field conditions. Unlike technical approaches that rely on regional meteorological forecast grid data, this invention directly uses field-measured rainfall data as the rainfall constraint input. This avoids soil moisture prediction distortion caused by coarse spatial resolution or forecast bias in meteorological forecasts, making the soil moisture input more closely resemble actual infiltration conditions and further improving the accuracy of spatiotemporal soil moisture prediction. In summary, this invention embeds environmental factors as constraints into the state transition process, adaptively capturing the evolution patterns of soil moisture under different environmental conditions, effectively improving the accuracy of spatiotemporal soil moisture prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927375A_ABST
    Figure CN122927375A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on environmental condition restriction's soil moisture content spatio-temporal prediction method and system, belong to wisdom agricultural field.Method includes: obtaining historical soil moisture content spatio-temporal data and historical near-surface environmental information time series data;Through to soil moisture content data and near-surface environmental data spatio-temporal alignment data preprocessing obtains training sample;Fusion environment factor feature constructs environmental condition restriction's spatio-temporal memory unit, stacks four layers spatio-temporal memory unit and builds spatio-temporal memory recursive prediction network;To spatio-temporal memory recursive prediction network training, obtain soil moisture content spatio-temporal prediction model;Soil moisture content and near-surface environmental information data are input to prediction model, and inference obtains future soil moisture content spatio-temporal distribution result.The application embeds environmental factor in the form of constraint in state transition process, adaptively captures the evolution law of soil moisture content under different environmental conditions, effectively improves the accuracy of soil moisture content spatio-temporal prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart agriculture, specifically relating to a method and system for spatiotemporal prediction of soil moisture based on environmental constraints. Background Technology

[0002] Monitoring the four key agricultural conditions—soil moisture, farmland climate, crop seedling condition, and pest and disease status—is fundamental to precision management in smart agriculture. Among these, soil moisture, as a crucial indicator of root zone water supply, directly impacts irrigation decisions, drought warnings, and crop yield and quality. Achieving accurate prediction of soil moisture at a large-scale field scale for future periods is of significant practical importance for guiding water-saving irrigation and ensuring food security.

[0003] Currently, research on soil moisture mainly focuses on real-time monitoring and data assimilation based on sensor networks. Most mature technologies are limited to interpolation and reconstruction of current soil moisture conditions, while methods for predicting future spatiotemporal distribution trends of soil moisture are relatively scarce. Field planting environments exhibit continuous spatial distribution, and soil moisture varies spatially and temporally across different plots. Therefore, spatiotemporal prediction is more valuable than single-point prediction. However, existing methods for soil moisture prediction have significant shortcomings: firstly, most prediction models rely solely on historical soil moisture data for recursion, failing to couple external environmental influencing factors, leading to significant discrepancies between predictions and actual conditions; secondly, even when some methods attempt to incorporate meteorological elements, they are often limited to single meteorological variables or directly use regional meteorological station forecast data, lacking accurate readings of the near-surface environment and failing to incorporate key water inputs such as measured surface rainfall into the model constraints. In reality, the evolution of soil moisture is not only influenced by the memory effect of historical moisture conditions, but also closely related to environmental conditions such as near-surface temperature, humidity, light intensity, and measured rainfall. If environmental factors cannot be effectively integrated into the constraints of the soil moisture state transition process, the model will struggle to adaptively capture the spatiotemporal evolution patterns of soil moisture under different meteorological conditions, leading to particularly prominent problems in the inaccurate prediction of the spatiotemporal distribution trend of soil moisture in field planting. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for spatiotemporal prediction of soil moisture based on environmental constraints, which solves the problems existing in the prior art.

[0005] This invention is achieved through the following technical solution:

[0006] On the one hand, this invention provides a method for spatiotemporal prediction of soil moisture based on environmental constraints, comprising the following steps:

[0007] S1. Obtain spatiotemporal data of historical soil moisture information and time series data of historical near-surface environmental information of the same area at the same time period;

[0008] S2. Spatiotemporal alignment data preprocessing is performed on soil moisture data and near-surface environmental data to obtain spatiotemporal dimension training samples;

[0009] S3. Integrate environmental factor features to construct spatiotemporal memory units constrained by environmental conditions, and stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network.

[0010] S4. Use the spatiotemporal dimension training samples to train the spatiotemporal memory recursive prediction network to obtain the spatiotemporal prediction model of soil moisture.

[0011] S5. The known spatiotemporal data of soil moisture and the time series data of near-surface environment are preprocessed and input into the spatiotemporal prediction model of soil moisture to infer the spatiotemporal distribution results of future soil moisture.

[0012] Furthermore, the soil moisture information in S1 is the soil volumetric water content, and the near-surface environmental information includes temperature, humidity, light intensity, and rainfall.

[0013] Furthermore, S2 performs spatiotemporal alignment data preprocessing on soil moisture data and near-surface environmental data to obtain spatiotemporal dimension training samples, including:

[0014] S21. Time alignment of soil moisture spatiotemporal data and near-surface environmental time series data is performed using interpolation.

[0015] S22. Under the same timestamp, the near-surface environmental time series data is expanded into a two-dimensional matrix with the same spatial size as the soil moisture spatiotemporal data, and then stitched together in the channel dimension.

[0016] S23. Perform max-min normalization on the data of different channel dimensions;

[0017] S24. Obtain spatiotemporal dimension training samples using the time sliding window method.

[0018] Furthermore, in S22, all element values ​​in the two-dimensional matrix corresponding to each near-surface environmental data are the same, and the channel splicing method in S22 is that soil moisture data comes first and environmental condition data comes second.

[0019] Furthermore, in S3, a spatiotemporal memory unit constrained by environmental conditions is constructed by integrating environmental factor features, and four layers of spatiotemporal memory units are stacked to build a spatiotemporal memory recursive prediction network, including:

[0020] S31. Based on the spatiotemporal memory unit of the convolutional recurrent neural network, environmental factor features are fused at the front end of the forget gate to construct a spatiotemporal memory unit constrained by environmental conditions.

[0021] S32. Stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network constrained by environmental conditions. Each layer is composed of spatiotemporal memory units constrained by environmental conditions. Spatial memory state is passed from bottom to top from the next layer to the next layer, and temporal memory state is passed from the previous moment to the next moment.

[0022] S33, the spatiotemporal memory recursive prediction network has a dual-branch output structure, with one branch outputting the predicted soil moisture value and the other branch outputting the predicted near-surface environment value;

[0023] S34. The loss function is a joint loss consisting of a weighted sum of the predicted soil moisture loss and the predicted near-surface environment loss.

[0024] Furthermore, the spatiotemporal memory unit constrained by environmental conditions includes a forget gate, an input modulation gate, an input gate, an output gate, and an environmental condition constraint module.

[0025] Furthermore, the input to the environmental constraint module is a training sample at a certain moment, the internal structure of the environmental constraint module is a two-layer fully connected neural network, the output of the environmental constraint module is environmental factor features, and the feature fusion method from the output of the environmental constraint module to the forget gate adopts element-wise multiplication.

[0026] Furthermore, in step S4, the spatiotemporal memory recursive prediction network is trained using spatiotemporal dimension training samples to obtain a soil moisture spatiotemporal prediction model, including:

[0027] S41. The first third of the training iterations is the first training phase, and the probability of using the true label in the training samples is fixed at 0.5.

[0028] S42. The middle third of the training iterations is the second training phase, in which the probability of using the true label in the training samples decreases linearly from 0.5 to 0.

[0029] S43. The last third of the training iterations is the third training phase, and the probability of using the true label in the training samples is 0.

[0030] S44. In the model evaluation phase, the soil moisture prediction branch of the model is evaluated, and the structural similarity index (SSIM) is used as the evaluation index.

[0031] Furthermore, in step S5, the known spatiotemporal data of soil moisture and the time-series data of near-surface environment are preprocessed and input into the spatiotemporal prediction model of soil moisture to infer the future spatiotemporal distribution results of soil moisture, including:

[0032] S51. Input the soil moisture temporal prediction model with the preprocessed data of the spatiotemporal alignment data of S2.

[0033] S52, Model inference output: Close the near-surface environment prediction output branch and only retain the soil moisture prediction branch;

[0034] S53. Perform inverse normalization on the predicted output;

[0035] S54. Perform out-of-bounds pruning on the inverse normalization results to obtain the future spatiotemporal distribution results of soil moisture.

[0036] On the other hand, the present invention provides a soil moisture spatiotemporal prediction system based on environmental constraints, comprising:

[0037] The data acquisition module is used to acquire spatiotemporal data of historical soil moisture information and time-series data of historical near-surface environmental information in the same area at the same time period;

[0038] The data preprocessing module is used to perform spatiotemporal alignment and normalization on the collected data, and to construct training samples through a time sliding window;

[0039] The model building and training module is used to build a spatiotemporal memory recursive prediction network constrained by environmental conditions, and to train it using training samples to obtain a spatiotemporal prediction model for soil moisture.

[0040] The prediction and inference module is used to input the data of the period to be predicted into the spatiotemporal prediction model of soil moisture, and output the spatiotemporal distribution results of future soil moisture after inference and post-processing.

[0041] The beneficial effects of this invention are:

[0042] This invention does not rely solely on historical soil moisture data for recursive prediction. Instead, it organically embeds multi-dimensional environmental factors, such as near-surface temperature, humidity, light intensity, and measured rainfall, into the state transition process within the spatiotemporal prediction network as constraints. This environmental constraint mechanism dynamically adjusts the network's memory of historical information, thereby adaptively capturing the spatiotemporal evolution of soil moisture under different environmental conditions, significantly improving prediction accuracy. Compared to prediction methods that rely solely on historical moisture without considering any environmental factors, this invention significantly improves prediction accuracy. Furthermore, this invention simultaneously introduces multiple environmental factors, including temperature, humidity, light intensity, and rainfall, overcoming the information dimensionality limitations caused by considering only a single meteorological factor. The multi-factor synergistic constraint enables the model to comprehensively consider the combined effects of environmental conditions on soil moisture, resulting in predictions that better align with actual field conditions. Unlike technical approaches that rely on regional meteorological forecast grid data, this invention directly uses field-measured rainfall data as the rainfall constraint input. This avoids soil moisture prediction distortion caused by coarse spatial resolution or forecast bias in meteorological forecasts, making the soil moisture input more closely resemble actual infiltration conditions and further improving the accuracy of spatiotemporal soil moisture prediction. In summary, this invention embeds environmental factors as constraints into the state transition process, adaptively capturing the evolution patterns of soil moisture under different environmental conditions, effectively improving the accuracy of spatiotemporal soil moisture prediction. Attached Figure Description

[0043] Figure 1 This is a flowchart of the spatiotemporal prediction method for soil moisture in Embodiment 1 of the present invention;

[0044] Figure 2 This is a flowchart of step S2 in Embodiment 1 of the present invention;

[0045] Figure 3 This is a schematic diagram illustrating the spatiotemporal alignment of soil moisture and near-surface environmental data in Embodiment 1 of the present invention.

[0046] Figure 4 This is a flowchart of step S3 in Embodiment 1 of the present invention;

[0047] Figure 5 This is a diagram showing the internal structure of the spatiotemporal memory unit constrained by environmental conditions in Embodiment 1 of the present invention.

[0048] Figure 6 This is a schematic diagram of the soil moisture spatiotemporal prediction system in Embodiment 2 of the present invention; Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0050] Example 1

[0051] like Figure 1 As shown, this embodiment provides a method for spatiotemporal prediction of soil moisture based on environmental constraints, including the following steps:

[0052] S1. Obtain spatiotemporal data of historical soil moisture information and time series data of historical near-surface environmental information of the same area at the same time period;

[0053] S2. Spatiotemporal alignment data preprocessing is performed on soil moisture data and near-surface environmental data to obtain spatiotemporal dimension training samples;

[0054] S3. Integrate environmental factor features to construct spatiotemporal memory units constrained by environmental conditions, and stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network.

[0055] S4. Use the spatiotemporal dimension training samples to train the spatiotemporal memory recursive prediction network to obtain the spatiotemporal prediction model of soil moisture.

[0056] S5. The known spatiotemporal data of soil moisture and the time series data of near-surface environment are preprocessed and input into the spatiotemporal prediction model of soil moisture to infer the spatiotemporal distribution results of future soil moisture.

[0057] In this embodiment, the soil moisture information in S1 is the soil volumetric water content, and the near-surface environmental information includes temperature, humidity, light intensity, and rainfall.

[0058] In this embodiment, as Figure 2 As shown, step S2 involves performing spatiotemporal alignment data preprocessing on soil moisture data and near-surface environmental data to obtain spatiotemporal dimension training samples, including:

[0059] S21. Time alignment of soil moisture spatiotemporal data and near-surface environmental time series data is performed using interpolation.

[0060] S22. Under the same timestamp, the near-surface environmental time series data is expanded into a two-dimensional matrix with the same spatial size as the soil moisture spatiotemporal data, and then stitched together in the channel dimension.

[0061] S23. Perform max-min normalization on the data of different channel dimensions;

[0062] S24. Obtain spatiotemporal dimension training samples using the time sliding window method.

[0063] like Figure 3 As shown, the spatiotemporal alignment of soil moisture and near-surface environmental data includes two parts: temporal alignment and spatial alignment. j Soil moisture data is constantly missing, t iWhen near-surface environmental data is missing at any given moment, linear interpolation is used to fill in the missing data at that moment. At the same specific moment, the near-surface environmental data of each channel is expanded into a two-dimensional matrix with the same spatial size as the soil moisture spatiotemporal data. All elements of the two-dimensional matrix corresponding to a single environmental channel are uniformly set to the measured values ​​of that channel. Then, the soil moisture data at the same moment and the expanded environmental matrix are spliced ​​together, with the splicing order being: soil moisture data channel first, and near-surface environmental data channel second.

[0064] In step S23, the calculation formula for the maximum-minimum normalization operation is: x_norm = (x - x_min) / (x_max - x_min), where x is the original data value, and x_min and x_max are the minimum and maximum values ​​of the data in that channel dimension, respectively. Each channel is normalized independently, while all spatial grid points for soil moisture data share the same set of normalization parameters. This normalization method can uniformly map environmental factors and soil moisture data of different dimensions to the [0,1] interval, eliminating the influence of dimensional differences on model training while preserving the relative distribution characteristics of the data. The normalization parameters are saved along with the training samples and used for subsequent inverse normalization processing in the prediction stage.

[0065] In step S24, the time sliding window method uses a fixed window length L, sliding along the time axis with a step size of 1 to truncate continuous time segments. Each training sample consists of two parts: an input sequence and a prediction target sequence. The input sequence contains historical time step data of length L_in, and the prediction target sequence is the subsequent future time step data of length L_out. Preferably, L_in is 12 time steps (i.e., 12 hours), and L_out is 6 time steps (i.e., 6 hours). The shape of the truncated sample is [B, C, T, H, W], where B is the batch size, C is the number of channels, T is the number of time steps, and H and W are the spatial height and width, respectively.

[0066] In this embodiment, as Figure 4 As shown, S3 involves fusing environmental factor features to construct a spatiotemporal memory unit constrained by environmental conditions, and stacking four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network, including:

[0067] S31. Based on the spatiotemporal memory unit of the convolutional recurrent neural network, environmental factor features are fused at the front end of the forget gate to construct a spatiotemporal memory unit constrained by environmental conditions.

[0068] S32. Stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network constrained by environmental conditions. Each layer is composed of spatiotemporal memory units constrained by environmental conditions. Spatial memory state is passed from bottom to top from the next layer to the next layer, and temporal memory state is passed from the previous moment to the next moment.

[0069] S33, the spatiotemporal memory recursive prediction network has a dual-branch output structure, with one branch outputting the predicted soil moisture value and the other branch outputting the predicted near-surface environment value;

[0070] S34. The loss function is a joint loss consisting of a weighted sum of the predicted soil moisture loss and the predicted near-surface environment loss.

[0071] In this embodiment, the internal composition of the environmentally constrained spatiotemporal memory unit is as follows: Figure 5 As shown. The spatiotemporal memory unit constrained by environmental conditions includes a forget gate, an input modulation gate, an input gate, an output gate, and an environmental condition constraint module.

[0072] Specifically, the input to the environmentally constrained spatiotemporal memory unit includes the training sample at a certain moment, the temporal memory state of the previous moment, and the spatial memory state of the next layer. The output includes the spatial memory state of the previous layer and the temporal memory state of the next moment. The connections between the forget gate, input modulation gate, input gate, and output gate within the spatiotemporal memory unit follow the mainstream spatiotemporal unit structure of convolutional recurrent neural networks. An environmental constraint module is embedded in front of the forget gate, incorporating environmental factor features.

[0073] The input to the environmental constraint module is the training sample X at a certain moment. The internal structure of the environmental constraint module is a two-layer fully connected neural network. The output of the environmental constraint module is the environmental factor features. The feature fusion method from the output of the environmental constraint module to the forget gate adopts element-wise multiplication.

[0074] In S32, the four-layer spatiotemporal memory units are stacked as follows: The first-layer spatiotemporal memory unit receives the current training sample input and the temporal memory state of the previous moment, and its spatial memory state is output to the second layer; The second-layer spatiotemporal memory unit takes the spatial memory state of the first layer as input, combines it with its own temporal memory state of the previous moment to perform calculations, and passes the generated spatial memory state to the third layer; The third layer receives the spatial memory state of the second layer in the same way and outputs it to the fourth layer; The fourth-layer spatiotemporal memory unit is located at the top of the network, and its output spatial memory state serves as the top-level spatiotemporal feature expression of the entire spatiotemporal memory recursive prediction network.

[0075] The dual-branch output structure in S33 is as follows: a dual-branch output layer is set after the fourth-layer spatiotemporal memory unit. One branch consists of a 1×1 convolution layer, which maps the top-level spatial memory state to the soil moisture prediction value; the other branch consists of a fully connected network layer, which outputs the near-surface environment prediction value.

[0076] In S34, mean squared error is used to calculate the predicted losses for soil moisture and near-surface environment branches, respectively. Weights are allocated according to the priority principle of soil moisture, and the sum of the two weights is fixed at 1. The weight of soil moisture is 0.8, and the remaining weights are allocated to near-surface environment loss. The two types of losses are combined and summed according to their corresponding weights to obtain the joint loss.

[0077] In this embodiment, step S4 involves training a spatiotemporal memory recursive prediction network using spatiotemporal dimension training samples to obtain a soil moisture spatiotemporal prediction model, including:

[0078] S41. The first third of the training iterations is the first training phase, and the probability of using the true label in the training samples is fixed at 0.5.

[0079] S42. The middle third of the training iterations is the second training phase, in which the probability of using the true label in the training samples decreases linearly from 0.5 to 0.

[0080] S43. The last third of the training iterations is the third training phase, and the probability of using the true label in the training samples is 0.

[0081] S44. In the model evaluation phase, the soil moisture prediction branch of the model is evaluated, and the structural similarity index (SSIM) is used as the evaluation index.

[0082] Specifically, in S41, the probability of using the true label in the first training phase is 0.5, meaning that 50% of the training samples are randomly selected to use the true value from the previous step as the input for the next step, while the remaining 50% use the model's own predicted values, enhancing the model's dependence on real data. In S42, in the second training phase, the probability of using the true label is calculated using the linear decay formula p = 0.5 × (1 - t / T), where t is the current iteration number and T is the total number of iterations in the second phase. Taking a total of 600 iterations as an example: after dividing the total 600 iterations into three equal parts, the first phase is the first 200 iterations, with the true value input probability fixed at 0.5; the second phase is the middle 200 iterations, where the true value input probability linearly decreases from 0.5 to 0; and the third phase is the last 200 iterations, where the true value input probability is fixed at 0. In S43, the third training phase uses the model's own predicted values ​​entirely as the input for the next step, simulating the real application scenario of the inference phase. In the evaluation phase, the SSIM index is used to comprehensively measure the similarity between the predicted and true values ​​in terms of structural information.

[0083] In this embodiment, step S5 involves preprocessing known spatiotemporal data of soil moisture and near-surface environmental time-series data, then inputting them into the spatiotemporal prediction model of soil moisture to infer the future spatiotemporal distribution of soil moisture, including:

[0084] S51. Input the soil moisture temporal prediction model with the preprocessed data of the spatiotemporal alignment data of S2.

[0085] S52, Model inference output: Close the near-surface environment prediction output branch and only retain the soil moisture prediction branch;

[0086] S53. Perform inverse normalization on the predicted output;

[0087] S54. Perform out-of-bounds pruning on the inverse normalization results to obtain the future spatiotemporal distribution results of soil moisture.

[0088] Specifically, S53 involves using the maximum and minimum soil moisture channel parameters saved during the training phase to perform inverse normalization processing, and restoring them using the following formula: x = x_norm×(x_max-x_min) + x_min.

[0089] Specifically, S54 involves performing out-of-bounds pruning on the grid points of the inverse normalization result. The effective range of soil volumetric water content is [0, θ_sat], where θ_sat is the upper limit of volumetric water content corresponding to field water holding capacity. If it is less than 0, it is set to 0; if it is greater than θ_sat, it is set to θ_sat. This ensures that the prediction result conforms to the soil physical constraints and outputs the final spatiotemporal distribution map of future soil moisture.

[0090] Example 2

[0091] like Figure 6 As shown, this embodiment provides a soil moisture spatiotemporal prediction system based on environmental constraints. The inputs to the soil moisture spatiotemporal prediction system are historical soil moisture information spatiotemporal data and historical near-surface environmental information time-series data for the same region at the same time. The output of the soil moisture spatiotemporal prediction system is the future soil moisture spatiotemporal distribution result, specifically the soil volumetric water content at different points in the future.

[0092] The soil moisture spatiotemporal prediction system includes:

[0093] The data acquisition module is used to acquire spatiotemporal data of historical soil moisture information and time-series data of historical near-surface environmental information in the same area at the same time period;

[0094] The data preprocessing module is used to perform spatiotemporal alignment and normalization on the collected data, and to construct training samples through a time sliding window;

[0095] The model building and training module is used to build a spatiotemporal memory recursive prediction network constrained by environmental conditions, and to train it using training samples to obtain a spatiotemporal prediction model for soil moisture.

[0096] The prediction and inference module is used to input the data of the period to be predicted into the spatiotemporal prediction model of soil moisture, and output the spatiotemporal distribution results of future soil moisture after inference and post-processing.

[0097] In this embodiment, the data acquisition module comprises two parts: a soil moisture data acquisition unit and a near-surface environment data acquisition unit. The soil moisture data acquisition unit connects to multiple soil moisture sensor nodes via a bus, periodically collecting soil volumetric water content data at each monitoring point. The near-surface environment data acquisition unit acquires temperature, humidity, light intensity, and rainfall observation data from the meteorological station via a data interface. The acquisition module has a built-in data verification function that automatically identifies and marks outliers.

[0098] In this embodiment, the data preprocessing module further includes a time alignment submodule, a spatial alignment submodule, a normalization processing submodule, and a sample construction submodule. The time alignment submodule uses linear interpolation to unify data from different sampling frequencies to the same time resolution. The spatial alignment submodule expands the near-surface environmental time-series data into a two-dimensional matrix with the same grid size as the soil moisture data. The normalization processing submodule performs max-min normalization on each channel. The sample construction submodule uses a time sliding window method to extract data over consecutive time periods, generating training and test samples of fixed time lengths.

[0099] In this embodiment, the model building and training module further includes a model building submodule, a training strategy control submodule, and a model evaluation submodule. The model building submodule stacks four layers of spatiotemporal memory units with environmental constraints to construct a prediction network structure with dual-branch output. The training strategy control submodule implements a three-stage learning strategy, dynamically adjusting the probability of using the true label. The model evaluation submodule calculates the SSIM metric to evaluate model performance and saves the optimal model parameters. The training process uses the Adam optimizer, with an initial learning rate of 0.001, a batch size of 8, and 200 training iterations. An early stopping mechanism monitors the validation set loss.

[0100] In this embodiment, the prediction inference module further includes a data input submodule, a model inference submodule, and a post-processing submodule. The data input submodule performs the same spatiotemporal alignment and normalization preprocessing as the training phase on the soil moisture and near-surface environmental data for the prediction period. The model inference submodule loads the trained spatiotemporal prediction model for soil moisture, closes the near-surface environmental prediction branch, and outputs only the soil moisture prediction result. The post-processing submodule performs inverse normalization on the model output, mapping the values ​​back to the original dimensional range, and performs physical reasonableness over-limit pruning on the predicted values; the soil volumetric water content pruning range is between 0 and the soil saturation water content.

[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Based on the technical essence of the present invention, any simple modifications, equivalent substitutions, and improvements made to the above embodiments within the spirit and principles of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for spatiotemporal prediction of soil moisture based on environmental constraints, characterized in that, Includes the following steps: S1. Obtain spatiotemporal data of historical soil moisture information and time series data of historical near-surface environmental information of the same area at the same time period; S2. Spatiotemporal alignment data preprocessing is performed on soil moisture data and near-surface environmental data to obtain spatiotemporal dimension training samples; S3. Integrate environmental factor features to construct spatiotemporal memory units constrained by environmental conditions, and stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network. S4. Use the spatiotemporal dimension training samples to train the spatiotemporal memory recursive prediction network to obtain the spatiotemporal prediction model of soil moisture. S5. The known spatiotemporal data of soil moisture and the time series data of near-surface environment are preprocessed and input into the spatiotemporal prediction model of soil moisture to infer the spatiotemporal distribution results of future soil moisture.

2. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 1, characterized in that, The soil moisture information in S1 refers to the soil volumetric water content, and the near-surface environmental information includes temperature, humidity, light intensity, and rainfall.

3. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 1, characterized in that, S2 includes: S21. Time alignment of soil moisture spatiotemporal data and near-surface environmental time series data is performed using interpolation. S22. Under the same timestamp, the near-surface environmental time series data is expanded into a two-dimensional matrix with the same spatial size as the soil moisture spatiotemporal data, and then stitched together in the channel dimension. S23. Perform max-min normalization on the data of different channel dimensions; S24. Obtain spatiotemporal dimension training samples using the time sliding window method.

4. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 3, characterized in that, S22 specifically involves: all element values ​​in the two-dimensional matrix corresponding to each channel of the near-surface environmental data are the same; the two-dimensional matrix is ​​spliced ​​according to the channel dimension, with channel 0 being the two-dimensional data of soil moisture, and the remaining channels arranged in the order of the channels of the near-surface environmental data.

5. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 1, characterized in that, S3 includes: S31. Based on the spatiotemporal memory unit of the convolutional recurrent neural network, environmental factor features are fused at the front end of the forget gate to construct a spatiotemporal memory unit constrained by environmental conditions. S32. Stack four layers of spatiotemporal memory units to build a spatiotemporal memory recursive prediction network constrained by environmental conditions. Each layer is composed of spatiotemporal memory units constrained by environmental conditions. Spatial memory state is passed from bottom to top from the next layer to the next layer, and temporal memory state is passed from the previous moment to the next moment. S33, the spatiotemporal memory recursive prediction network has a dual-branch output structure, with one branch outputting the predicted soil moisture value and the other branch outputting the predicted near-surface environment value; S34. The loss function is a joint loss consisting of a weighted sum of the predicted soil moisture loss and the predicted near-surface environment loss.

6. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 5, characterized in that, The spatiotemporal memory unit constrained by environmental conditions includes a forget gate, an input modulation gate, an input gate, an output gate, and an environmental condition constraint module.

7. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 6, characterized in that, The input to the environmental constraint module is the training sample at a certain moment. The internal structure of the environmental constraint module is a two-layer fully connected neural network. The output of the environmental constraint module is the environmental factor features. The feature fusion method from the output of the environmental constraint module to the forget gate adopts element-wise multiplication.

8. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 1, characterized in that, S4 includes: S41. The first third of the training iterations is the first training phase, and the probability of using the true label in the training samples is fixed at 0.

5. S42. The middle third of the training iterations is the second training phase, in which the probability of using the true label in the training samples decreases linearly from 0.5 to 0. S43. The last third of the training iterations is the third training phase, and the probability of using the true label in the training samples is 0. S44. In the model evaluation phase, the soil moisture prediction branch of the model is evaluated, and the structural similarity index (SSIM) is used as the evaluation index.

9. The method for spatiotemporal prediction of soil moisture based on environmental constraints according to claim 1, characterized in that, The S5 includes: S51. Input the soil moisture temporal prediction model with the preprocessed data of the spatiotemporal alignment data of S2. S52, Model inference output: Close the near-surface environment prediction output branch and only retain the soil moisture prediction branch; S53. Perform inverse normalization on the predicted output; S54. Perform out-of-bounds pruning on the inverse normalization results to obtain the future spatiotemporal distribution results of soil moisture.

10. A soil moisture spatiotemporal prediction system based on environmental constraints, characterized in that, include: The data acquisition module is used to acquire spatiotemporal data of historical soil moisture information and time-series data of historical near-surface environmental information in the same area at the same time period; The data preprocessing module is used to perform spatiotemporal alignment and normalization on the collected data, and to construct training samples through a time sliding window; The model building and training module is used to build a spatiotemporal memory recursive prediction network constrained by environmental conditions, and to train it using training samples to obtain a spatiotemporal prediction model for soil moisture. The prediction and inference module is used to input the data of the period to be predicted into the spatiotemporal prediction model of soil moisture, and output the spatiotemporal distribution results of future soil moisture after inference and post-processing.