Agricultural water and fertilizer integrated time sequence prediction method based on Informer-UNet hybrid neural network

By combining the Informer-UNet hybrid neural network with sparse attention mechanism and U-Net structure, the problems of accuracy and computational complexity in multi-source time series data prediction in integrated water and fertilizer systems are solved. This achieves efficient multi-scale feature fusion and uncertainty quantification, thereby improving the accuracy of water and fertilizer regulation and resource utilization efficiency.

CN121920618APending Publication Date: 2026-04-24赵柏栋
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
赵柏栋
Filing Date
2026-02-11
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing integrated water and fertilizer systems suffer from insufficient accuracy, high computational complexity, weak multi-scale feature fusion capability, and difficulty in quantifying the uncertainty of prediction results when facing multi-source agricultural time-series data prediction. This leads to a mismatch between water and fertilizer supply and crop demand, which can easily cause resource waste and yield fluctuations.

Method used

We employ an Informer-UNet hybrid neural network, combining a sparse attention mechanism with a U-Net structure, to achieve multi-scale feature extraction and fusion. Furthermore, we use the Monte Carlo Dropout method to quantify prediction uncertainties, providing a reliable basis for water and fertilizer regulation decisions.

Benefits of technology

It improves the accuracy of soil moisture and nutrient prediction, reduces computational complexity, enhances the model's adaptability to complex environments, reduces the risk of resource waste through uncertainty assessment, and improves water and fertilizer resource utilization efficiency and crop yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920618A_ABST
    Figure CN121920618A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural water and fertilizer integrated time sequence prediction method based on an Informer-UNet hybrid neural network, and belongs to the field of intelligent agriculture and precise irrigation, and the method comprises the following steps: S1, inputting projection and position codes: projecting 16-parameter sensor data to a 256-dimensional embedding space, and adding sine-cosine position codes; s2, encoder down-sampling: through a three-layer encoder structure, in combination with Conv1D and ProbSparse attention, multi-scale feature extraction of complexity is realized; s3, distilling and bottleneck: compressing the sequence to L / 16, and capturing global representation through 16 attention; s4, performing up-sampling by a decoder: fusing the three layers of features through ConvTransspose1D and jump connection; and S5, performing uncertainty quantification: generating a 95% confidence interval based on Monte Carlo Dropout. According to the method, accurate prediction of soil humidity and NPK nutrition is realized, water and fertilizer regulation and control are supported, resources are saved by 28%, and the yield is increased by about 12%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart agriculture and precision irrigation, and in particular to a time-series prediction method for integrated agricultural water and fertilizer management based on the Informer-UNet hybrid neural network. Background Technology

[0002] With the rapid development of precision agriculture and smart irrigation technologies, integrated water and fertilizer systems have become an important technical means to improve agricultural resource utilization efficiency, reduce production costs, and ensure stable and increased crop yields. These systems typically rely on soil sensors, meteorological sensors, and IoT platforms to collect real-time data on soil moisture, nutrient content, and environmental parameters, and then regulate irrigation and fertilization processes accordingly. However, agricultural production processes are influenced by a variety of factors, including climate conditions, soil heterogeneity, and crop growth stages, exhibiting significant temporal, nonlinear, and uncertain characteristics, which poses significant technical challenges to water and fertilizer regulation decisions.

[0003] The decision-making methods in existing integrated water and fertilizer systems mainly include empirical rule-based methods, mechanistic model-based methods, and data-driven prediction methods. Among them, empirical rule-based methods rely on human experience or fixed thresholds for control, making it difficult to adapt to dynamic changes in different regions, different crops, and different growth stages. Although mechanistic model-based methods can reflect some of the physical or physiological mechanisms between crops, soil, water, and nutrients, model construction is complex, parameter acquisition is difficult, and their adaptability to environmental disturbances in practical applications is limited.

[0004] In recent years, with the accumulation of sensor data and the improvement of computing power, data-driven methods based on deep learning have been gradually applied to the field of agricultural time-series forecasting, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and Transformer-type models based on attention mechanisms. These methods have improved the prediction accuracy of soil moisture or single nutrient indicators to some extent, but they still have the following shortcomings in the application of integrated water and fertilizer management: On the one hand, traditional RNN or LSTM structures are prone to gradient vanishing or insufficient capture capability when processing long-term series, making it difficult to model short-term fluctuations and long-term trends simultaneously. On the other hand, the standard Transformer model has high computational complexity when the time series length is large, which is not conducive to real-time or near-real-time deployment in agricultural IoT scenarios.

[0005] Furthermore, most existing prediction methods focus on single-scale feature modeling, making it difficult to effectively integrate local change features and global evolution patterns at different time resolutions. This results in limited accuracy when jointly predicting soil moisture at multiple depths or multiple nutrient indicators. Meanwhile, agricultural sensor data is susceptible to noise, missing data, and outliers. Existing methods generally lack effective quantification of the uncertainty of prediction results, making it difficult to provide reliable risk references for irrigation and fertilization decisions, potentially leading to waste of water and fertilizer resources or crop stress.

[0006] In actual production, the above-mentioned problems often manifest as a mismatch between water and fertilizer supply and crop demand, especially in areas with frequent climate fluctuations or complex soil conditions, which can easily lead to nutrient leaching, uneven soil moisture distribution, and crop yield fluctuations. Therefore, there is an urgent need for an integrated water and fertilizer prediction and decision-making technology solution that can efficiently process multi-source agricultural time-series data, take into account multi-scale feature representation, and has the ability to assess predictive uncertainty, in order to improve the system's intelligence level and practical application effect. Summary of the Invention

[0007] The purpose of this invention is to address the problems in existing integrated water and fertilizer management systems, such as insufficient prediction accuracy of multi-source agricultural time-series data, high computational complexity of long-series modeling, weak multi-scale feature fusion capability, and difficulty in quantifying the uncertainty of prediction results. This invention proposes an agricultural integrated water and fertilizer time-series prediction method based on the Informer-UNet hybrid neural network.

[0008] By combining the efficient sparse attention mechanism of the Informer model in long sequence modeling with the advantages of the U-Net structure in multi-scale feature extraction and fusion, high-precision, multi-step time-series prediction of soil moisture and nitrogen, phosphorus and potassium nutrient content at multiple depths can be achieved. This provides a reliable uncertainty assessment basis for subsequent water and fertilizer regulation decisions, thereby improving the efficiency of water and fertilizer resource utilization and promoting stable and increased crop yields.

[0009] To achieve the above objectives, the present invention adopts the following technical solution: A time-series prediction method for integrated water and fertilizer management in agriculture based on an Informer-UNet hybrid neural network, characterized by the following steps: S1. Multi-source agricultural time-series data acquisition and preprocessing Meteorological sensors, soil sensors, and water and fertilizer monitoring equipment are deployed in the farmland environment to collect multi-source time-series data such as air temperature, air humidity, soil pH, solar radiation, wind speed, rainfall, soil moisture in different soil layers, and nitrogen, phosphorus, and potassium nutrient content at fixed time intervals. The collected data is time-aligned, outlier removed, missing value imputed, and normalized to form a standardized multidimensional time-series input tensor.

[0010] S2, Input Projection and Time Position Encoding The original multidimensional temporal data is projected into a high-dimensional embedding space through a linear mapping layer, and sine-cosine position encoding is introduced to preserve temporal order information and provide temporal context constraints for subsequent attention calculation.

[0011] S3, Encoder Downsampling and Sparse Attention Feature Extraction A multi-layer encoder structure is constructed. Each encoder layer sequentially employs one-dimensional convolutional downsampling and ProbSparse sparse self-attention mechanism to compress the input sequence step by step. This reduces computational complexity while extracting local temporal patterns and key global dependency features, thereby obtaining a multi-scale encoded feature sequence.

[0012] S4. Distillation Layer Feature Compression and Bottleneck Modeling Distillation processing is performed on the end features of the encoder to further compress the sequence length and reduce redundant information; a multi-head self-attention mechanism and a feedforward neural network are introduced in the bottleneck layer to learn the global representation of agricultural water and fertilizer time series data.

[0013] S5, Decoder Upsampling and Multi-Scale Feature Fusion A decoder structure symmetrical to the encoder is constructed, transposed convolution is used for sequence upsampling, and multi-scale features of the corresponding level of the encoder are fused through skip connections to achieve an effective combination of local change features and long-term trend information.

[0014] S6. Predictive Output and Uncertainty Quantification The linear projection layer outputs the predicted soil moisture and nitrogen, phosphorus and potassium nutrients for multiple future time steps; during the inference stage, the Monte Carlo Dropout method is used to perform multiple random samplings on the model, calculate the predicted mean and confidence interval, and realize the quantitative assessment of prediction uncertainty.

[0015] S7, Water and Fertilizer Regulation Decision Application Based on the forecast results and their uncertainty range, and combined with the water and fertilizer requirements of different crop growth stages, corresponding irrigation and fertilization strategies are formulated to achieve refined regulation of water and fertilizer resources.

[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention organically combines the sparse self-attention mechanism in the Informer model with a U-shaped multi-scale feature fusion structure, simultaneously modeling the local short-term fluctuation characteristics and long-term evolution trends of agricultural multi-source time-series data within the same network framework. This effectively improves the joint prediction capability of soil moisture and nitrogen, phosphorus, and potassium nutrient content in different soil layers, reduces the risk of cumulative amplification of single indicator prediction errors in water and fertilizer regulation decisions, and thus improves the accuracy and stability of the overall prediction results.

[0017] This invention introduces the ProbSparse sparse attention mechanism in the process of temporal feature modeling. By filtering the attention distribution, it focuses on calculating only key time positions, which significantly reduces the computational complexity of long-sequence time-series prediction. This enables the model to balance prediction accuracy and computational efficiency when processing large-scale agricultural sensor data, and is suitable for resource-constrained practical application scenarios such as agricultural IoT and edge computing.

[0018] This invention employs a U-shaped structure and sets up a skip connection between the encoder and decoder. During the sequence downsampling process, it retains key information at different time scales and achieves step-by-step fusion of multi-scale features during the upsampling stage. This allows it to simultaneously capture short-term fluctuation features caused by weather changes and irrigation operations, as well as long-term trend features formed by crop growth stages and soil environment evolution, thereby improving the model's adaptability to complex agricultural environmental changes.

[0019] This invention introduces the Monte Carlo Dropout method in the prediction stage, which performs multiple random samplings on the model output to generate the prediction mean and the corresponding confidence interval. This enables a quantitative expression of the uncertainty of soil moisture and nutrient prediction results, so that water and fertilizer regulation decisions no longer rely solely on a single prediction value. This provides a risk reference for irrigation and fertilization processes, reduces the risk of over-irrigation or over-fertilization due to prediction bias, and improves the safety and reliability of system operation.

[0020] This invention provides a forward-looking regulatory basis for integrated water and fertilizer systems based on multi-step time-series prediction results of key agricultural water and fertilizer indicators and combined with the actual needs of crops at different growth stages. In actual farmland applications, it can rationally arrange the timing and amount of irrigation and fertilization, reduce the waste of water and fertilizer resources and the risk of nutrient loss, achieve water and fertilizer resource savings of about 20% to 30%, and improve crop yield and production efficiency while ensuring normal crop growth. It has good engineering application value and promotion prospects. Attached Figure Description

[0021] Figure 1 The near-end IoT data visualization chart shows the temporal changes of meteorological parameters during the winter wheat growth cycle, including average daily temperature, reference evapotranspiration, daily rainfall, solar radiation, wind speed, and relative humidity.

[0022] Figure 2 The model architecture diagram shows the U-shaped structure that integrates Informer and U-Net, including the encoder downsampling path (light blue to dark blue), distillation layer, bottleneck layer, decoder upsampling path (dark green to light green), and skip connections.

[0023] Figure 3The data flow diagram shows in detail the process of the input time-series data changing dimensions through a U-shaped structure, from the input (B×256×16) to the output (B×16×6), representing the complete data flow.

[0024] Figure 4 The training loss comparison chart shows the comparison of the training loss curves of the Informer-UNet model with the baseline models LSTM, Transformer, and Informer.

[0025] Figure 5 : Comparison chart of training losses for each prediction target, showing N, P, K, and MS respectively. 11 MS 12 MS 13 Independent loss curves for six targets and details of later scaling.

[0026] Figure 6 : A prediction plot with uncertainty estimation, showing multi-step prediction curves for different growth stages, including the actual value, the predicted mean, and the 95% confidence interval.

[0027] Figure 7 Scatter plot and R 2 The evaluation compares the predicted and actual values ​​for the MS group (orange gradient) and the NPK group (blue gradient) to validate R. 2 A fitting effect of >0.90. Detailed Implementation

[0028] Example 1 This embodiment uses winter wheat fields in the Chengdu Plain of Sichuan Province, China, as the application background. It focuses on the integrated water and fertilizer irrigation scenario in a subtropical monsoon climate zone, constructing a multi-objective, multi-step time-series prediction model based on an Informer-UNet hybrid neural network to provide forward-looking data for irrigation and fertilization regulation. The system collects historical sequences at half-hour sampling intervals, setting the historical input length L=256 (approximately 128 hours of history), and outputs future... pred len =16 time steps (approximately 8 hours).

[0029] Data processing includes the following steps: S1: Multi-source time-series data acquisition and preprocessing Meteorological, soil, and water / fertilizer monitoring sensors are deployed in the field to generate a 16-dimensional multi-source feature input sequence, as shown in the example below: Air temperature, air humidity, soil pH, atmospheric pressure, solar radiation intensity, solar irradiance, wind speed (sine and cosine components), wind direction, rainfall, soil moisture at three depths: MS11 (0–20 cm), MS12 (20–40 cm), MS13 (40–60 cm), soil nutrients: nitrogen (N), phosphorus (P), potassium (K). S2: Input projection and position encoding The 16-dimensional features are projected into the embedding space using a linear mapping. X' = ​​Linear(X) ∈

[0030] S3: Encoder Downsampling and ProbSparse Sparse Attention Feature Extraction The encoder employs a three-layer structure. Each layer first uses one-dimensional convolutional downsampling to extract local patterns and compress the sequence length. Then, ProbSparse sparse attention is used to capture key global dependencies, resulting in the sequence length becoming: Layer 1: L→L / 2L\to L / 2L→L / 2 Layer 2: L / 2 → L / 4 Layer 3: L / 4 → L / 8 The multi-scale features {E1, E2, E3} are obtained, providing an information pathway for subsequent U-shaped structure jump connections.

[0031] S4: Distillation layer and bottleneck layer The encoder's output is distilled to further compress the "sequence length" to L / 8 → L / 16, reducing redundant timing information and focusing on key patterns. Subsequently, a multi-head self-attention and feedforward network is used at the bottleneck layer to learn the global representation.

[0032] S5: Decoder Upsampling and Skip Connection Fusion The decoder and encoder are symmetrically set up in three layers, with each layer performing the following: 1. Perform skip connections and concatenation with the corresponding encoder layer features. 2. Transposed convolution upsampling recovers sequence length 3. ProbSparse attention supplements global dependency modeling

[0033] The six prediction targets are: N, P, K, MS11, MS12, and MS13.

[0034] S6: Training Objectives and Weighted Huber Loss In this embodiment, to improve the model's predictive robustness in the event of abnormal fluctuations in agricultural sensor data, a weighted Huber loss function is used as the objective function for model training, and different weights are assigned to different predictive variables.

[0035] The overall loss function of the model is defined as:

[0036] in, This indicates the index of the predictor variables, with a total of 6 predictor variables. Indicates the first The model output values ​​for each predictor variable; This represents the corresponding actual observed value; For the first Loss weights for each predictor variable; This is the threshold parameter for Huber loss.

[0037] The Huber loss function is defined as:

[0038] The error term is defined as follows:

[0039] In this embodiment, δ is set to 1.5, and the weight vector is:

[0040] S7: Multivariable, multi-time-step prediction output method The final output tensor of the model is represented as:

[0041] For any predictor variable, its multi-time-step prediction result is expressed as:

[0042] like Figure 4 and Figure 5 The training loss curve shown demonstrates that this embodiment achieves stable convergence within 300 training epochs. Compared to baseline models (LSTM, Transformer, Informer), the Informer-UNet model exhibits faster convergence speed and lower final loss value.

[0043] To further illustrate the application effect of the method of this invention in actual agricultural scenarios, the time-series prediction results of different predictor variables were quantitatively evaluated based on the above model structure and training method. The relevant evaluation indicators and corresponding results are summarized in Table 1.

[0044] Table 1 Performance Comparison between Example 1 and Baseline Model

[0045] Example 2 This embodiment, based on the prediction model described in Embodiment 1, further introduces an uncertainty quantification mechanism to improve the reliability of the prediction results in agricultural water and fertilizer regulation decisions. During the inference phase, the Monte Carlo Dropout method is used to perform multiple random forward propagation samples on the same input sequence to obtain the prediction distribution.

[0046] To visually demonstrate the multi-time-step prediction results and their uncertainty range, Figure 6 The predicted mean curves and corresponding confidence intervals are shown for typical crop growth stages.

[0047] Figure 6 In the diagram, Sowing (Day 1) - sowing (first day); Tillering (Day 30) - tillering (31st day); Joming (Day 60) - Heading (Day 90) - Flowering (Day 90); Values ​​- Data; During the inference phase, Dropout activation is maintained, and the same input sequence is sampled and predicted multiple times. The result of the nth prediction is expressed as follows:

[0048] Based on the results of N samplings, the predicted mean and variance are calculated as follows:

[0049] In this embodiment, a 95% confidence interval is constructed based on the normal distribution assumption, which is expressed as follows:

[0050] To quantify the predictive performance at different growth stages, the results of the corresponding evaluation indicators are summarized in Table 2.

[0051] Based on the prediction results and their uncertainty range, this embodiment further provides an example of water and fertilizer regulation decision rules to guide actual irrigation and fertilization operations.

[0052] Table 2 Comparison of Predictive Performance at Different Growth Stages

[0053] Based on the prediction results and uncertainty assessment, the following smart irrigation decision rules are formulated: Rule 1: When predicting soil moisture MS 11 Irrigation is triggered when the value is below the threshold θ1=25% and the upper bound of the confidence interval is still below θ1.

[0054] Rule 2: When the predicted N content is below the threshold θ nWhen the concentration of nitrogen fertilizer is 30 mg / kg and the uncertainty σ is less than 5 mg / kg, it is recommended to apply nitrogen fertilizer as a supplement.

[0055] Rule 3: When the predicted P and K contents are both below their respective thresholds and the joint confidence interval coverage is >90%, it is recommended to apply compound fertilizer.

[0056] By integrating the fuzzy control algorithm with the prediction results of the Informer-UNet model, this embodiment achieves the following in practical applications: Water conservation: 20-30% Fertilizer usage reduced by 15-25%. Wheat production increased by 10%. Example 3 This embodiment details the six-objective joint prediction mechanism of the Informer-UNet model. The model's output layer generates a prediction tensor of dimension (B×16×6) through linear projection, corresponding to 16 time steps and 6 prediction targets. Figure 7 Scatter plot and R 2 The evaluation results show that R0 for all objectives 2 All values ​​are greater than 0.90.

[0057] Reference Figure 2 and Figure 3 The architecture diagram shows that the encoder uses a three-layer structure, with each layer containing 1D convolution and ProbSparse attention: Encoder first layer:

[0058] Output dimension: (B, L / 2, ) Encoder second layer (medium blue):

[0059] Output dimensions: (B, L / 4, ) Encoder third layer (dark blue):

[0060] Output dimensions: (B, L / 8, ) Sparsity metric for ProbSparse attention:

[0061] Select the top-u sparse queries to achieve Complexity.

[0062] 3. Skip connections and feature fusion The decoder employs a three-layer upsampling structure (dark green to light green), fusing encoder features through skip connections:

[0063]

[0064]

[0065] To further illustrate the stability of the model, cross-validation was used to perform statistical analysis on the prediction results, and the performance index summary results are shown in Tables 4 to 6.

[0066] Table 4 Performance metrics of 5-fold cross-validation

[0067] Table 5 Summary of RMSE for each objective (mean ± standard deviation)

[0068] 5. Comparative analysis with existing technologies Table 6. Comprehensive Comparison of AgriHydroNet and Existing Technologies

[0069] Confidence intervals are constructed based on the predicted mean and variance to provide a risk reference for water and fertilizer regulation decisions.

[0070] Based on the above prediction results, and combined with the water and nutrient requirements of crops at different growth stages, irrigation and fertilization strategies are dynamically adjusted. When the prediction results approach the lower limit of the threshold, adjustments are made in advance to reduce water and fertilizer waste and improve water and fertilizer utilization efficiency.

[0071] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only for the purpose of helping to understand the method and core ideas of the present invention. The above descriptions are only preferred embodiments of the present invention. It should be noted that due to the limitations of textual expression, while there are objectively infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of the present invention.

Claims

1. A time-series prediction method for integrated water and fertilizer management in agriculture based on Informer-UNet hybrid neural networks, characterized by: The method includes the following steps: S1. Multi-source time-series data acquisition and preprocessing: Multiple types of sensors are deployed in the farmland environment to collect multi-source time-series data related to crop growth and water and fertilizer status. The multi-source time-series data includes meteorological parameters, soil environmental parameters, and water and fertilizer parameters. Each feature dimension; The acquired multi-source time-series data are subjected to time alignment, outlier removal, missing value imputation, and normalization to obtain a standardized input time-series tensor. ,in For batch size, The length of the time series. For feature dimensions; S2. Input Projection and Position Encoding: Normalizing the input temporal tensor through a linear mapping layer. Projecting to a high-dimensional embedding space yields the embedding features. ,in For the embedding dimension; a sine-cosine position encoding matrix is ​​introduced. To preserve time sequence information, the location code calculation formula is as follows: , , in For location index, The dimension index is used; the embedded features are added to the positional encoding to obtain the encoded features. ; S3. Encoder Downsampling Path Processing: Construct a multi-layer encoder structure, and sequentially perform one-dimensional convolutional downsampling and sparse self-attention calculation in each encoder layer. The calculation formula is as follows: The sequence length is compressed to L / 2. The sequence length is compressed to L / 4. The sequence length is compressed to L / 8. Conv1D is a one-dimensional convolution operation that extracts local temporal features and compresses the sequence length; ProbSparseAttn ​​is the ProbSparse sparse self-attention mechanism, which selects queries with sharp attention distributions for computation through a sparsity metric function. The computational complexity, the sparsity metric function is: , in For query matrix The A query vector, The key matrix, and The first and second are the key matrices respectively. The and the first A key vector, Let be the dimension of the key vector; the first term of the sparsity metric function represents the first term. The maximum attention score for each query and all keys. The function represents the log-normalized term of the attention score; the difference between the two measures the sharpness of the attention distribution for that query. A higher value indicates that attention is more focused on a few key locations; according to Attention is calculated for the top-u queries with sharp attention distributions, while the remaining queries are approximated with a uniform distribution; multi-scale encoded feature sequences are obtained through layer-by-layer downsampling. , ,..., }; S4. Distillation Layer Feature Compression: The features output from the last layer of the encoder are distilled. The formula for calculating the distillation layer is as follows: , in The features are output from the third layer of the encoder, with a sequence length of L / 8; Conv1D is a one-dimensional convolution operation. This indicates that the kernel size is 3 to capture local temporal patterns. This indicates that a step size of 2 halves the sequence length; The distilled features are compressed to L / 16 and used as the input to the bottleneck layer. The distillation layer focuses on key temporal patterns that contribute significantly to the prediction task through convolution operations, reducing redundant information and noise interference. S5. Global Representation Learning in the Bottleneck Layer: A multi-head self-attention mechanism and a feedforward neural network are used to construct a global temporal representation in the bottleneck layer. The bottleneck layer contains two sub-layers, each employing a residual connection structure. The calculation formula is as follows: , , in The compression features output from the distillation layer are used as input to the bottleneck layer. Indicates to Multi-head self-attention computation is performed, where the query matrix Q, key matrix K, and value matrix V are all obtained by linear transformation of H. These are the intermediate features after multi-head self-attention and the first residual connection. The feedforward neural network consists of two linear transformation layers and the GELU activation function. The final output of the bottleneck layer after the feedforward network and the second residual connection; the number of attention heads in the multi-head self-attention. =16; S6. Decoder Upsampling Path Processing: Construct a three-layer decoder structure symmetrical to the encoder. Each decoder layer sequentially performs skip connection concatenation, transposed convolutional upsampling, and sparse self-attention calculation. The calculation formula is as follows: , , , in The output of the bottleneck layer has a sequence length of L / 16. , , The output features of the encoder's first, second, and third layers are respectively passed to the corresponding decoder layers via skip connections, with sequence lengths of L / 2, L / 4, and L / 8, respectively; Concat represents feature concatenation along the channel dimension, fusing decoder features with multi-scale features from the corresponding encoder layers; ConvTranspose1D is a transposed convolution operation, achieving sequence length upsampling and recovery; ProbSparseAttn ​​is the ProbSparse sparse attention mechanism, capturing global temporal dependencies after upsampling; , , These are the output features of the third, second, and third layers of the decoder, respectively, with the sequence lengths recovered layer by layer to L / 8, L / 4, and L / 2; S7. Predicted Output and Uncertainty Quantization: The output of the first layer of the decoder is mapped to the dimension of the prediction target through a linear projection layer. The calculation formula is as follows: , in The first layer output features of the decoder are represented by Linear, which is a linear projection layer. To predict the output tensor, The batch size is 16, the prediction step size corresponds to a prediction duration of about 8 hours under a half-hour sampling interval, and the prediction target quantity includes soil nitrogen (N), phosphorus (P), potassium (K) content and soil moisture in three depth layers. The Monte Carlo Dropout method is used for uncertainty quantification. During the inference phase, the random deactivation layer is kept enabled, and N forward samplings are performed. The prediction mean μ and variance σ are calculated based on the sampling results. 2 : , 。 2. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The feature dimensions of the multi-source time series data mentioned in step S1 =16, specifically including: air temperature, air humidity, soil pH, atmospheric pressure, solar radiation intensity, solar irradiance, wind speed (sine component and cosine component), wind direction, rainfall, and soil moisture and nitrogen, phosphorus and potassium nutrient content at three depths; the time series length L=256, corresponding to historical data at half-hour sampling intervals.

3. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The embedding dimension described in step S2 =256, the parameter of the linear mapping layer is F→ The weight matrix.

4. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The encoder structure described in step S3 includes three layers, and the one-dimensional convolution parameters of each encoder layer are: =3、 =2, achieving sequential compression of sequence lengths to L / 2, L / 4, and L / 8; the number of attention heads in the ProbSparse attention mechanism. =16.

5. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The multi-head self-attention mechanism of the bottleneck layer described in step S5 adopts =16 attention heads; the hidden layer dimension of the feedforward neural network FFN is It is 4 times that of the GELU function.

6. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The transposed convolution parameters of the three layers of the decoder in step S6 are all =3、 =2, achieving layer-by-layer upsampling recovery of the sequence length; the skip connections form a U-shaped symmetrical structure, and the third layer of the decoder fuses the features of the third layer of the encoder. Decoder second layer fusion encoder second layer features Decoder first layer fusion encoder first layer features .

7. The method for time-series prediction of integrated agricultural water and fertilizer management based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The prediction step size described in step S7 =16, corresponding to a prediction duration of approximately 8 hours with a half-hour sampling interval; the number of predicted targets =6, including soil nitrogen (N), phosphorus (P), potassium (K) content and soil moisture at three depths: MS11 (0-20cm), MS12 (20-40cm), and MS13 (40-60cm).

8. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The random inactivation rate of the Monte Carlo Dropout method described in step S7 =0.1, sampling number N=50; the confidence interval is a 95% confidence interval, and the calculation formula is [μ-1.96σ,μ+1.96σ].

9. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The method also includes a model training step, which is optimized using a weighted Huber loss function, defined as follows: , The Huber loss is defined as: , Let j be the predicted value of the j-th target. To correspond to the actual value, For threshold parameters, For the first The weighting coefficients of each prediction target; The loss is robust to outliers in the sensor data.

10. The time-series prediction method for integrated agricultural water and fertilizer management based on Informer-UNet hybrid neural network according to claim 9, characterized in that, The threshold parameter of Huber loss =1.5; the weighting coefficients w=[1.0, 5.0, 5.0, 0.5, 0.5, 0.5] correspond to the six prediction targets N, P, K, MS11, MS12, and MS13, respectively, with higher weights assigned to phosphorus (P) and potassium (K) to balance the prediction difficulty.

11. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The method employs a differentiated learning rate strategy for model training: the learning rate for the encoder and decoder backbone networks is 1×10⁻⁵, and the learning rate for the prediction head is 5×10⁻⁴; the training process uses 5-fold cross-validation for model evaluation and selection.

12. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The prediction accuracy of the method meets the following requirements: root mean square error (RMSE) for soil moisture prediction < 2%, root mean square error (RMSE) for nitrogen, phosphorus, and potassium nutrient prediction < 5 mg / kg, and coefficient of determination R0. 2 >0.

90.

13. The method for time-series prediction of integrated agricultural water and fertilizer management based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The method also includes a water and fertilizer regulation step based on the prediction results: based on the predicted soil moisture and nutrient content and their confidence intervals, combined with the needs of crop growth stages, a fuzzy control strategy is adopted to formulate irrigation and fertilization decision schemes, so as to achieve water and fertilizer resource savings of 20%-30% and crop yield increase of more than 10%.

14. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The outlier removal in step S1 uses a statistical method to remove data points that exceed the mean ± 3 times the standard deviation. The missing value imputation uses linear interpolation or forward imputation. The normalization process uses the Z-score standardization method to convert each feature into a distribution with a mean of 0 and a standard deviation of 1.

15. The agricultural water and fertilizer integration time-series prediction method based on Informer-UNet hybrid neural network according to claim 1, characterized in that, The method is applied to the integrated water and fertilizer management of winter wheat fields in subtropical monsoon climate zones. The sensor collects data at half-hour intervals, covering key growth stages of the crop, such as sowing, tillering, jointing, and maturity.