An intelligent irrigation strategy making method based on short-term weather forecast error correction and Q-learning algorithm

By constructing a CNN-BiLSTM-AM deep learning framework and a Q-learning algorithm, weather forecast errors are corrected and crop parameters are optimized, solving the problem of inaccuracy in irrigation decisions in existing technologies and achieving high-precision irrigation strategy optimization.

CN122155263APending Publication Date: 2026-06-05NORTHWEST A & F UNIV +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWEST A & F UNIV
Filing Date
2026-03-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing crop growth models, when making irrigation decisions, are limited by weather forecast errors and the use of general parameters, making it difficult to accurately reflect the climate and soil characteristics of specific regions, resulting in irrigation schemes lacking practical guidance.

Method used

A smart irrigation strategy based on short-term weather forecast error correction and Q-learning algorithm is adopted. The meteorological data is corrected by constructing a CNN-BiLSTM-AM deep learning framework, crop parameters are optimized by combining an elite genetic algorithm, and a Matlab-AquaCrop irrigation decision joint simulation platform is built to realize dynamic irrigation strategy optimization.

Benefits of technology

It significantly improves the accuracy of meteorological data and the simulation precision of crop growth models, enabling it to autonomously explore and optimize irrigation time and amount, adapt to climate fluctuations, and formulate precise and efficient irrigation strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155263A_ABST
    Figure CN122155263A_ABST
Patent Text Reader

Abstract

The application relates to the field of agricultural irrigation, and discloses an intelligent irrigation strategy making method based on short-term weather forecast error correction and a Q-learning algorithm, which comprises the following steps: S1. A deep learning framework combining a convolutional neural network, a bidirectional long short-term memory network and an attention mechanism is built; and S2. Meteorological data of a planting area is collected, short-term weather forecast data is corrected for errors by using the deep learning framework, and corrected short-term meteorological data is obtained. By constructing the CNN-BiLSTM-AM deep learning framework, the problem that traditional public weather forecast data has systematic deviation in a specific planting area is effectively solved, the local change characteristics of the meteorological data are extracted by using the convolutional neural network, the bidirectional dependence relationship and key time nodes of the time sequence are captured by combining the bidirectional long short-term memory network and the attention mechanism, and the deviation law between historical forecast data and measured data can be accurately learned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural irrigation technology, specifically to a method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithms. Background Technology

[0002] In precision agriculture's water management, crop growth models (such as AquaCrop) are widely used to simulate crop responses to water resources to aid in irrigation planning. However, in practical applications, using these models to make accurate and forward-looking irrigation decisions still faces many technical challenges.

[0003] The accuracy of crop growth models is highly dependent on the accuracy of input meteorological data, especially for short-term weather conditions. Current short-term weather forecasts typically originate from large-scale public meteorological service platforms. These data reflect average weather conditions over a large area and are insufficient to accurately characterize the specific microclimate of a particular farmland. While some statistical methods exist for bias correction, these methods often rely on simple linear assumptions and fail to fully capture the complex nonlinear characteristics of meteorological factors over time and their long-term and short-term dependencies. This leads to systematic errors in the meteorological data input into crop models, consequently affecting the reliability of yield forecasts and water requirement assessments.

[0004] Furthermore, crop growth models contain numerous parameters related to crop physiology, soil physics, and field management, and the values ​​of these parameters directly determine the confidence level of the simulation. In existing technologies, to simplify application, the general parameter ranges or default values ​​provided in the model manual are often directly adopted. However, soil texture, water retention capacity, and genetic characteristics of crop varieties vary significantly across different regions, and general parameters cannot accurately reflect the actual environmental characteristics of a specific planting area. Without systematic calibration and optimization based on local historical data, the crop growth process simulated by the model will deviate from reality, rendering irrigation plans based on this model lacking practical guidance. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithms, thus solving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm, comprising the following steps: S1. Build a deep learning framework that combines convolutional neural networks, bidirectional long short-term memory networks, and attention mechanisms; S2. Collect meteorological data of the planting area, use the deep learning framework to correct the error of the short-term weather forecast data, and obtain the corrected short-term meteorological data; S3. Obtain historical crop growth data of the planting area, construct an initial AquaCrop crop growth model, and use an elite genetic algorithm to optimize the crop parameters of the initial AquaCrop crop growth model for regional adaptability, thereby obtaining a localized AquaCrop crop growth model. S4. Import the corrected short-term meteorological data, soil data and optimized crop parameters into the localized AquaCrop crop growth model; S5. Construct an irrigation decision system based on the Q-learning reinforcement learning algorithm framework, and define the state space, action space and reward function of the irrigation decision system; S6. Build a Matlab-AquaCrop irrigation decision co-simulation platform and connect the Matlab environment with the localized AquaCrop crop growth model through a standardized API interface; S7. In the Matlab-AquaCrop irrigation decision co-simulation platform, the irrigation decision system and the localized AquaCrop crop growth model are used to perform collaborative simulation iterations to output the optimal irrigation strategy for a specific crop growth model.

[0007] Preferably, in step S1, the specific steps for building the deep learning framework include: A one-dimensional convolutional neural network module is constructed, which uses one-dimensional convolutional layers to process the feature dimensions of the input data and performs regularization through Dropout layers to extract spatial features containing temporal local correlations. A bidirectional long short-term memory network module is constructed to receive the spatial features, process historical information using a forward long short-term memory network, process future information using a backward long short-term memory network, and output time step features. An attention mechanism feature weighting module is constructed to calculate the correlation score between the weight matrix generated by the bidirectional long short-term memory network module and the features, generate the attention distribution on the feature dimension, and perform weighted calculation on the input features according to the attention distribution.

[0008] Preferably, the bidirectional long short-term memory network module uses a forget gate, an input gate, and an output gate to control the flow and storage of information; the forget gate is used to control the retention ratio of the hidden state at the previous moment, the input gate is used to control the degree of introduction of current meteorological data and generate candidate unit states, and the output gate is used to determine the contribution of the updated unit state to the current hidden state.

[0009] Preferably, in step S2, when performing error correction on short-term weather forecast data, a maximum temperature prediction module, a minimum temperature prediction module, and a rainfall prediction module are constructed respectively. The input features of the maximum temperature prediction module include a time identifier, the maximum temperature value of tomorrow's weather forecast, the maximum temperature prediction error value of the current day, and the maximum temperature prediction error value of the previous day. The output feature is the maximum temperature prediction error value of tomorrow's weather forecast. The input features of the minimum temperature prediction module include a time identifier, the minimum temperature value of tomorrow's weather forecast, the minimum temperature prediction error value of the current day, and the minimum temperature prediction error value of the previous day. The output feature is the minimum temperature prediction error value of tomorrow's weather forecast. The input features of the rainfall prediction module include a time stamp, the rainfall level of tomorrow's weather forecast, the rainfall level prediction error value for the current day, and the rainfall level prediction error value for the previous day. The output feature is the rainfall level prediction error value for tomorrow's weather forecast.

[0010] Preferably, the regional adaptation optimization of the crop parameters of the initial AquaCrop crop growth model using an elite genetic algorithm in S3 specifically includes: An initial population is randomly generated, where each individual represents a set of crop growth parameters to be optimized; Calculate the fitness value of each individual in the population, which is determined based on the correlation coefficient between the simulated yield and the measured yield of the initial AquaCrop crop growth model; The individuals with the best fitness are selected as elite individuals and directly retained to the next generation. New individuals are generated through crossover and mutation operations to update the population. The model is optimized through multiple generations of iterations using the training set from historical data, and the model is validated using the validation set. When the correlation coefficient on the validation set reaches a preset threshold, the optimized crop growth parameters are output.

[0011] Preferably, the state space includes meteorological factors, soil data, crop parameters, and field management information; wherein the meteorological factors include precipitation, maximum temperature, and minimum temperature; the soil data includes soil type and its moisture characteristics; and the crop parameters include growth period parameters and yield data.

[0012] Preferably, the action space includes a first type of strategy and a second type of strategy; The first type of strategy is based on the water requirement characteristics of crops, dividing the crop growth period into four main stages, and setting different soil moisture irrigation trigger thresholds for each stage. The trigger thresholds are set based on the percentage of effective water in the plant. The second type of strategy is based on irrigation at fixed time intervals, with different intervals of irrigation days set; The irrigation decision system combines the input predicted meteorological data and soil moisture changes to select the optimal action within the action space to dynamically adjust the irrigation time and water volume.

[0013] Preferably, the reward function is constructed based on water use efficiency per unit yield, crop yield, and water consumption during crop growth; the reward function is positively correlated with water use efficiency per unit yield and crop yield, and negatively correlated with water consumption during crop growth.

[0014] Preferably, the construction of the Matlab-AquaCrop irrigation decision co-simulation platform in S6 specifically includes: In the Matlab development environment, an extension module is built to provide a standardized API interface for the localized AquaCrop crop growth model. Write a connection program between Matlab and the AquaCrop model interface, so that the Q-learning agent in the Matlab environment can read the output state of the localized AquaCrop crop growth model and pass control action commands to the localized AquaCrop crop growth model.

[0015] Preferably, in the collaborative simulation iteration process, S7 sets the iteration time step between the localized AquaCrop crop growth model and the irrigation decision system to 6 seconds. The irrigation decision system continuously extracts the current system state from the output of the localized AquaCrop crop growth model and feeds back control actions according to this time step until the algorithm converges to the preferred strategy.

[0016] This invention provides a method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithms. It has the following beneficial effects: 1. This invention effectively solves the problem of systematic bias in traditional public weather forecast data in specific planting areas by constructing a CNN-BiLSTM-AM deep learning framework. It uses convolutional neural networks to extract local variation features of meteorological data and combines bidirectional long short-term memory networks and attention mechanisms to capture the bidirectional dependencies and key time nodes of time series. It can accurately learn the deviation patterns between historical forecast data and measured data. By performing targeted error correction on key meteorological indicators such as temperature and precipitation, it significantly improves the accuracy of input data, thereby reducing the cumulative bias caused by meteorological environment input errors in subsequent crop growth simulation.

[0017] 2. This invention utilizes an elite genetic algorithm to perform regional adaptation optimization on the AquaCrop crop growth model, improving the model's simulation accuracy for specific planting environments. By introducing long-term historical data and dividing the training and validation sets, the algorithm can automatically optimize and calibrate complex crop growth parameters, avoiding simulation distortion caused by using general default parameters. The optimized model can accurately reflect the nonlinear impact of local soil characteristics, crop varieties, and field management measures on crop yield, ensuring a high degree of consistency between the virtual simulation environment and the real farmland environment, and providing a solid foundation model for making reliable irrigation decisions.

[0018] 3. This invention establishes a Matlab-AquaCrop co-simulation platform and introduces the Q-learning reinforcement learning algorithm to achieve dynamic closed-loop control of irrigation strategies. A standardized interface breaks down the data interaction barriers between the algorithm decision-making end and the environmental simulation end, overcoming the limitation of traditional crop models that can only operate according to preset fixed rules. The agent can autonomously explore and optimize irrigation time and amount based on real-time feedback of crop growth status and water use efficiency reward function, thereby formulating a precise irrigation strategy that meets crop water requirements while maximizing water use efficiency, adapting to the uncertainties brought about by climate fluctuations. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the Bidirectional Long Short-Term Memory (Bi-LSTM) neural network of the present invention; Figure 2 This is a schematic diagram of the neural network structure of the attention mechanism (AM) of the present invention; Figure 3 This is a schematic diagram illustrating the principle of the Q-learning algorithm of the present invention; Figure 4 This is a schematic diagram of the simulation model of the irrigation decision system based on Q-learning of the present invention; Figure 5 This is a schematic diagram of the collaborative simulation process based on Q-learning of the present invention; Figure 6 This is a schematic diagram of the iterative process based on Q-learning of the present invention. Detailed Implementation

[0020] 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.

[0021] Example: Please see the appendix Figure 1 -Appendix Figure 6 This invention discloses a method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm, comprising: S1. Construct a deep learning framework (CNN-BiLSTM-AM) that combines convolutional neural networks (CNN), bidirectional long short-term memory networks (BiLSTM), and attention mechanisms (AM). Specific implementation methods include: S101. This embodiment first constructs a CNN module for efficiently extracting local features from meteorological time series data. Traditional meteorological forecasting models are usually based on physical parameters or statistical methods, which are difficult to fully capture complex nonlinear relationships and local features. To address this issue, this embodiment uses a one-dimensional convolutional neural network (1D-CNN) as the front end for feature extraction, specifically including: One-dimensional convolutional layer configuration: To preserve the temporal characteristics of meteorological data, the model employs a one-dimensional convolutional layer to process the feature dimension of the input data. The convolutional kernel slides along the time axis, and by optimizing the weight matrix for feature extraction, it can effectively capture local change patterns of meteorological factors such as temperature and humidity within a short time window, such as rapid temperature rises or falls or sudden fluctuations in rainfall.

[0022] Dropout layer configuration: After the convolution operation, a dropout layer is set to prevent the model from overfitting to the training data. The dropout layer randomly discards neurons with a certain probability during training, breaking the complex cooperative adaptation between neurons, thereby forcing the network to learn more robust feature representations and further improving the model's generalization ability when faced with unseen meteorological data.

[0023] Spatial feature output: After processing by convolutional and dropout layers, the extracted spatial features containing local temporal correlations are vectorized and then fed into the BiLSTM network for subsequent temporal modeling. This provides high-quality, filtered and compressed feature inputs for subsequent bidirectional temporal analysis.

[0024] S102. Construction of the temporal prediction module of the Bidirectional Long Short-Term Memory Network (BiLSTM); After extracting spatial features, a BiLSTM module is constructed to enhance the model's ability to learn long-term trends and anomalies. LSTM effectively overcomes the gradient vanishing and gradient exploding problems that traditional RNNs encounter during long-term sequence training by introducing a gating mechanism, specifically including: LSTM cell structure configuration: The LSTM cell contains three key gating units (forget gate, input gate, and output gate) and a cell state storage module, which enables the model to precisely control the flow and storage of information in long sequences by opening and closing the "gates". First, the Gate of Oblivion Through activation function The forget gate controls the proportion of information retained from the previous time step. When the function output is 1, all information is retained; when the output is 0, no information is retained. The forget gate is based on the hidden state from the previous time step. and current input Dynamically adjust information flow to retain important historical data. Secondly, the input gate... The degree of meteorological data (temperature, humidity, and precipitation level) is controlled, and candidate unit states are generated through processing using the tanh activation function. This represents potential future weather change trends. Based on this, the unit state update mechanism combines the forget-gate weighted previous unit state. The candidate cell states are weighted by the input gate to generate updated cell states. This allows the model to effectively filter noisy data while maintaining a balance between historical and current information. Finally, the output gate... The hidden state determines the contribution of the updated unit state to the current hidden state. This is then used to predict weather conditions at the next time step, including precipitation levels and temperature trends; the calculation process of the LSTM network is as follows: ; ; ; ; ; ; in, , and These are the input gate, forget gate, and output gate, respectively. It is the sigmoid activation function; It is the candidate cell state at time t; It represents the internal state of the cell at time t; It is the internal state of the cell at time t−1; tanh is the hyperbolic tangent activation function; It is the hidden state at time t; , , and It is the weight matrix of the unit, input gate, forget gate, and output gate at time t; , , and It is the bias vector of the unit, input gate, forget gate, and output gate; * is the vector product.

[0025] S103. Construct an attention mechanism (AM) feature weighting module; While LSTM excels at processing time series data, it can only handle one-way information, considering only the influence of past information on future trends. However, when correcting short-term weather forecast errors, the current state may be influenced by both past and future information. Therefore, this embodiment further introduces a BiLSTM mechanism, which consists of a forward LSTM and a backward LSTM.

[0026] Forward LSTM processes historical information, while backward LSTM processes future information through backpropagation. The outputs of both are considered together in the current hidden state. It can capture information from the past and the future at the same time, automatically adjust the prediction error, thereby improving the model's ability to learn long-term dependencies, dynamically capturing weather change patterns, and improving the accuracy of short-term weather forecast correction. In short-term weather forecast error correction, the attention mechanism, due to its selective focus on key features and time points, has become a core method for improving model prediction accuracy. This embodiment introduces the attention mechanism (AM) into the time series prediction framework, weighting the time step features output by BiLSTM to highlight key time steps and important features, thereby improving the model's sensitivity to important features and thus enhancing prediction performance.

[0027] First, for time step t, the input features are computed using an attention mechanism. For any feature The weight matrix generated by the neural network layers is calculated using the dot product function. With features The correlation score between them is calculated as shown in formula (1). Then, the activation function is used... The scores are normalized to generate an attention distribution along the feature dimensions. (See Formula (2)) to quantify the importance of each feature at the current time step.

[0028] Based on this, the input features are adjusted according to the attention distribution. Perform weighted calculations to extract the key information that best reflects the current meteorological conditions (see formula (3)).

[0029] (1) (2) (3) in, For attention score, For query vector, For key vectors, For attention weights, For output representation, It is a value vector.

[0030] In this way, the attention mechanism can dynamically focus on salient features and important time points in the time series, thereby effectively correcting the errors of weather forecast models, enhancing their sensitivity to local climate change, and providing more accurate data support for short-term weather forecasting and subsequent agricultural irrigation decisions.

[0031] S2. Collect meteorological data provided by weather stations within the planting area, and use the CNN-BiLSTM-AM neural network framework to correct short-term weather forecasts, specifically including: S201: Acquire multi-source meteorological data. Extract weather forecast data for the designated planting area from public meteorological service platforms such as the China Meteorological Data Network. The data includes key meteorological indicators such as precipitation, maximum temperature, and minimum temperature. Simultaneously, extract on-site measured weather data from local meteorological stations. By integrating large-scale public forecast data with local measured data from specific planting areas, a dual-source dataset containing both predicted and actual values ​​is constructed. This provides a comprehensive and timely data foundation for subsequent analysis of forecast errors, ensuring the targeted nature of model corrections.

[0032] S202: Deploy a short-term weather forecast error correction model. Utilizing the CNN-BiLSTM-AM deep learning framework built in S1, error correction modules are constructed for different meteorological indicators. Leveraging the powerful feature extraction and time-series modeling capabilities of deep learning networks, the model learns the patterns of deviation between historical forecast data and measured data. This enables the model to effectively identify and compensate for systematic forecast biases caused by complex terrain, local microclimate effects, or simplification of physical models, thereby significantly improving the accuracy of meteorological data.

[0033] S203: Configure the input and output characteristics of each sub-prediction module. The error correction system is specifically divided into a maximum temperature prediction module, a minimum temperature prediction module, and a rainfall prediction module. The specific configurations of each module are as follows: Maximum temperature prediction module The input features are set as follows: year, month, and day time identifiers, the maximum temperature value provided by tomorrow's weather forecast, the maximum temperature prediction error value for the current day (i.e., the difference between the actual measured value and the forecast value for the current day), and the maximum temperature prediction error value for the previous day.

[0034] The output feature is set as: the prediction error value of the highest temperature in tomorrow's weather forecast.

[0035] By introducing historical error sequences over multiple consecutive days as input, the model can capture the inertial characteristics of forecast system errors and the periodic patterns of temperature changes, thereby achieving accurate predictions of future maximum temperature deviations.

[0036] Minimum Temperature Prediction Module The input features are set as follows: year, month, and day time identifiers, the minimum temperature value provided by tomorrow's weather forecast, the minimum temperature prediction error value for the current day, and the minimum temperature prediction error value for the previous day.

[0037] The output feature is set as: the prediction error value of the minimum temperature in tomorrow's weather forecast.

[0038] Rainfall prediction module The input features are set as follows: year, month, and day time identifiers, the rainfall level provided in tomorrow's weather forecast, the rainfall level prediction error value for the current day, and the rainfall level prediction error value for the previous day.

[0039] The output feature is set as: the prediction error value of the rainfall level in tomorrow's weather forecast.

[0040] Given the discontinuous and highly volatile nature of rainfall data, the model can effectively correct predictions of rainfall event intensity by learning from rainfall level deviations, providing a more reliable reference for natural precipitation replenishment for agricultural irrigation decisions.

[0041] S3. The AquaCrop crop growth model is optimized for regional adaptation. Based on historical crop growth data related to the study area, the crop parameters are optimized and adjusted using the correlation coefficient R² between simulated and measured yields as the optimization objective. Specific implementation methods include: S301: Constructing the Foundation Environment for Crop Models Based on Historical Data. AquaCrop, a crop water productivity model developed by the Food and Agriculture Organization of the United Nations (FAO), aims to simulate and quantify the correlation between crop yield and field management under water resource constraints through a soil-crop-atmosphere continuum system. Historical data from the past 20 years for the study area were collected, encompassing crop field management data, meteorological data, soil data, and observational data on crop growth and yield. Four types of parameters—meteorological, soil, crop characteristics, and field management—were used as basic inputs into the model. Crop characteristic parameters specifically include crop emergence date, flowering date, maturity date, senescence date, planting density, maximum / minimum root depth, and reference harvest index. By introducing long-term, localized historical data, an initial model reflecting the specific climate and soil environmental characteristics of the local area can be established, providing a reliable data benchmark for subsequent parameter calibration.

[0042] S302: Initialize the Elite Genetic Algorithm Population. Given the numerous parameters and complex nonlinear coupling relationships in the crop growth model, the Elite Genetic Algorithm is employed for regional adaptive optimization of the crop growth parameters. First, a certain number of individuals are randomly generated as the initial population, where each individual represents a set of crop growth parameters to be optimized. Random initialization helps the algorithm to explore the search space extensively, avoiding getting trapped in local optima in the early stages of optimization, thereby improving its global optimization capability.

[0043] S303: Perform fitness assessment and population evolution operations. Calculate the fitness value of each individual in the population, run the AquaCrop model to simulate crop growth and predict yield, and evaluate the performance of parameters under actual planting conditions. Based on fitness, a selection operation is performed, choosing the individual with the highest fitness as the elite individual and directly retaining it to the next generation. This ensures that the optimal solution found during evolution is not lost due to crossover or mutation operations, guaranteeing the stability of algorithm convergence. For other individuals, selection is based on fitness probability, and new individuals are generated through crossover and mutation operations, introducing population diversity and prompting the algorithm to continuously explore new parameter combinations, further optimizing the simulation accuracy of the crop growth model.

[0044] S304: Multi-generation Iterative Optimization and Model Validation. Elite individuals are combined with newly generated individuals to update the population, undergoing multi-generation evolutionary iterations. During optimization, 20 years of historical data are divided into two parts: the first ten years' historical data are used for parameter tuning, and the latter ten years' historical data are used for model validation. The correlation coefficient (R²) between simulated and measured yields is set as the core optimization objective. When R² ≥ 0.9 on the validation set, the model is deemed to meet the accuracy requirements, and the iteration terminates. The optimized crop growth parameters are then output. This mechanism of separating training and validation sets not only ensures the model's ability to fit historical data but also significantly enhances its generalization ability through validation on independent datasets, enabling it to accurately reflect the actual growth patterns of crops in the region.

[0045] S4. Collect corrected short-term meteorological data, soil data, and crop parameters, and integrate field management information to build an AquaCrop crop growth model for a specific region. Specific implementation methods include: S401: Configure the high-precision meteorological data input module. Import the short-term meteorological data corrected by the CNN-BiLSTM-AM model in S2 into the AquaCrop model, specifically including the corrected daily minimum temperature, daily maximum temperature, and daily precipitation. In addition, daily reference evapotranspiration (ETo) and annual average CO2 concentration data also need to be input. Using high-quality meteorological data corrected by deep learning to replace the original forecast data can significantly reduce crop growth simulation errors caused by meteorological input biases, ensuring that the model's perception of the future short-term climate environment is highly consistent with the actual situation, thereby improving the reliability of yield prediction.

[0046] S402: Construct a localized crop parameter module. Based on the results optimized in S3, set crop growth parameters and validate them using historical statistical data. Crop yield statistics used for model validation (e.g., data from 2000-2020) can be obtained from authoritative institutions such as the National Bureau of Statistics. The range of crop parameter values ​​should refer to the AquaCrop official version (e.g., version 6.0 / 6.1) reference manual. By combining authoritative statistical data with official standard parameter ranges, and through the aforementioned regional adaptation optimization, it is ensured that the crop module not only conforms to general biological principles but also possesses the ability to accurately describe the characteristics of crop varieties in specific research areas.

[0047] S403: Establish a refined soil physical parameter module. Soil data for the study area is obtained from authoritative databases such as the World Soil Database (HWSD). For example, data for China can be obtained from the 1:1,000,000 scale soil data provided by the Institute of Soil Science, Chinese Academy of Sciences. The refined soil physical parameter module mainly covers the physical parameters required for the retention and movement of water and salt at the soil profile and its upper (soil surface) and lower (shallow groundwater) boundaries. Using high-resolution soil physical parameters enables the model to accurately simulate the infiltration, retention, and evaporation processes of soil moisture, which is crucial for accurately calculating the available water in the crop root zone and developing scientific irrigation strategies.

[0048] S404: Establish a comprehensive field management module. This module integrates information on fertilization levels, ground cover, irrigation methods, weed management, and other agronomic practices affecting soil moisture balance. By comprehensively considering the impact of human management measures on the crop growth environment, the model can simulate crop responses under different agricultural management levels, thus providing a realistic simulation environment for subsequently finding the optimal irrigation regime under specific management conditions.

[0049] S5. Build an irrigation decision system based on Q-learning, and precisely define and configure the state space, action space and reward mechanism of the algorithm; S501. Construct a Q-learning reinforcement learning algorithm framework; within the Q-learning reinforcement learning algorithm framework, the policy is usually represented by the symbol π, which is a mapping from the state space to the action space (π: S→A), and it is the policy for each state. Specify an action This guides the agent to make decisions in the environment, as shown in formula (4).

[0050] (4) in This represents the conditional probability of the output control action. Represents control action, This refers to the current state.

[0051] Q-learning, as a typical model-free reinforcement learning algorithm, learns the optimal decision policy directly through interaction with the environment. Q-learning demonstrates its computational efficiency in multiple dimensions: model independence, policy orthogonality, efficient handling of delayed rewards, and offline learning capability. Furthermore, the Q-learning algorithm uses tables to store Q-values, making it suitable for smaller discrete state and action spaces, as shown in Equation (5).

[0052] (5) in, Represents the current state and actions The Q value below; The learning rate represents the extent to which new information covers older information; This represents a discount factor used to measure the current value of future rewards. Indicates the next state The maximum value of Q for all possible actions represents the expected value of the optimal future action; S502. Define the state space of the irrigation decision system; through correlation analysis, identify four types of variables closely related to the optimization of the crop irrigation system to constitute the state space. These variables specifically include: meteorological factors, including precipitation, maximum temperature, and minimum temperature; soil data, including soil type and its moisture characteristics; crop parameters, including growth period parameters and yield data; and field management information. By integrating these four key variables, the agent can comprehensively perceive the dynamic changes in the current agricultural environment, providing sufficient information for making accurate irrigation decisions. S503. Design the action space of the irrigation decision system; within the framework of the Q-learning reinforcement learning algorithm, the irrigation strategy is set as a set of control actions that the agent can choose in the state space, and the Q-learning algorithm iteratively updates the action value function during the interaction with the irrigation environment to achieve the joint optimization decision of irrigation timing and irrigation water volume. The action space of this embodiment includes two types of executable irrigation strategies: the first type is a threshold-triggered irrigation strategy based on crop water requirement characteristics and growth period segmentation. According to the crop growth process, the growth period is divided into four main stages and the trigger threshold range of root zone soil moisture content is set for each stage, expressed as plant effective water percentage (PAW), as shown in formula (6): (6) Among them, FC is the maximum water holding capacity of the soil in the field; PWP is the permanent wilting point of the crop.

[0053] The thresholds corresponding to the four stages are used as adjustable decision variables in reinforcement learning. Q-learning searches for and optimizes these thresholds during training to output the optimal combination of thresholds and their corresponding irrigation triggering times. After triggering, the irrigation amount is dynamically determined by combining the predicted meteorological information, soil moisture changes, and crop growth stages in the current state, so that the crop maintains suitable water conditions at key growth nodes. In one optional implementation, the triggering threshold ranges for the four stages can be set to 20%–60%, 30%–70%, 30%–80%, and 60%–95%, respectively. Q-learning learns the optimal threshold combination for each stage within the above ranges. The second type is the fixed-interval irrigation strategy, which sets the irrigation interval discretely to a candidate set of 3 to 27 days. Q-learning dynamically adjusts the irrigation amount each time based on meteorological forecasts and soil moisture status under different interval constraints to compensate for water deficits within the cycle and reduce the risk of over-irrigation. To ensure that the actions can be implemented under different observation conditions and engineering constraints, the system further introduces an action space selection mechanism to adaptively switch between the two types of strategies. That is, when the soil moisture data quality judgment with a week as the sliding window meets the validity constraint and the irrigation facility allows daily triggering, the first type of strategy is given priority to form a closed-loop fine control based on soil feedback. When there are missing soil moisture observations or the sampling interval is too large to stably determine the threshold triggering condition, or when irrigation execution is limited and needs to be implemented on a fixed cycle, the second type of strategy is switched as a fallback control. This allows Q-learning to obtain a stable, executable set of irrigation control actions that are consistent with environmental constraints within the discrete action space.

[0054] S504. Configure the reward function of the irrigation decision system; the reward function plays a key role in reinforcement learning algorithms, directly affecting the learning process and training efficiency of the algorithm. Considering that crop yield and water requirement are key indicators for irrigation system optimization, this embodiment selects crop yield, crop transpiration, and water use efficiency (WUE) as the main variables of the reward function, as shown in formula (6). To achieve this goal, the Q-learning control system continuously monitors and adjusts soil moisture to ensure that it is maintained within the optimal range.

[0055] (7) in, It is the water use efficiency per unit of output (kg / m²). It is the crop yield (kg / ha); This refers to the water consumption (mm) during crop growth.

[0056] S6. Establish a Matlab-AquaCrop irrigation decision co-simulation platform. Specific implementation methods include: S601: Constructing a Matlab-AquaCrop co-simulation interactive architecture. Addressing the limitations of the AquaCrop crop model in integrating advanced intelligent control algorithms (especially reinforcement learning algorithms), this paper utilizes the Matlab development environment to build an extension module, providing a standardized API interface for AquaCrop. By writing a connection program between Matlab and the AquaCrop model interface, a data exchange channel is established between the algorithm and the crop growth model, constructing a co-simulation platform with Matlab as the runtime foundation, Q-learning algorithm as the decision-making core, and AquaCrop as the environment simulator. This integrated architecture achieves seamless integration between the algorithm environment and the growth simulation environment, enabling AquaCrop to receive real-time control commands within the Matlab environment, completely solving the technical bottleneck of traditional crop models' difficulty in performing closed-loop reinforcement learning training.

[0057] S602: Initialize the simulation platform and configure algorithm parameters. In the co-simulation environment, the AquaCrop crop growth model for a specific region, built in S4, is first loaded as the external environment for agent interaction. Subsequently, the Q-learning reinforcement learning model framework is deployed on the Matlab side. Based on the logic defined in S5, precise parameter mapping and configuration are performed on the algorithm's state space (weather, soil, crop, field management information), action space (irrigation strategies with different thresholds and time interval strategies), and reward function (yield, WUE, etc.), and the algorithm's internal parameters (such as learning rate and discount factor) are adjusted. This parameter configuration method based on a standardized interface not only improves the optimization control capability of the crop growth model but also ensures that the agent can conduct low-cost, high-efficiency trial-and-error learning in a high-fidelity virtual farmland.

[0058] S603: Perform model training and strategy optimization evaluation. Initiate the co-simulation process. The agent selects irrigation actions based on real-time conditions, and the AquaCrop model simulates crop responses and provides feedback reward signals. Through extensive iterative training, the Q-learning algorithm continuously updates the Q-value table to optimize the decision-making logic. After training, the optimized control strategy output by the agent is comprehensively evaluated, ultimately effectively outputting the optimal control strategy for a specific irrigation system, maximizing water use efficiency while ensuring crop yield.

[0059] S7. Based on the Matlab-AquaCrop irrigation decision co-simulation platform, the Q-learning algorithm model uses an iterative optimization approach to output the optimal irrigation strategy for a specific crop growth model. Specific implementation methods include: S701: Establish a collaborative simulation iterative mechanism. Utilizing the developed collaborative simulation platform, the interaction process between the Q-learning algorithm and the AquaCrop crop growth model is initiated. The Q-learning agent in the Matlab environment serves as the decision-making core, while AquaCrop acts as the feedback environment. This effectively overcomes the limitation of AquaCrop software, which can only simulate according to preset rules. By introducing the dynamic decision-making capability of reinforcement learning, the model can cope with nonlinear weather changes and complex crop water demand responses, thereby exploring efficient irrigation paths that traditional rules cannot cover. S702: Execution State Awareness and Action Feedback Loop. A Q-learning agent written in Matlab continuously extracts the current system state from the output of the AquaCrop crop growth model. Combined with reward function Output corresponding control actions The data is then fed into the AquaCrop crop growth model. This process iterates continuously until the agent converges to the optimal strategy, achieving closed-loop control from data perception to decision execution and effect feedback, ensuring that the final output irrigation strategy is the optimal solution in the global scope. S703: Set the synchronization time step of the model algorithm. Considering that AquaCrop drives the output of crop moisture and growth status on a daily scale, while Q-learning decision cycle is updated daily, in order to ensure that the state, action and reward between the Matlab-AquaCrop simulation platform and the reinforcement learning agent are strictly aligned within the same simulation day, this implementation configures the data exchange process between the two to a synchronization time step Δt independent of the decision cycle. The Δt is determined based on the AquaCrop interface refresh cycle and the time consumed in a single calculation, and satisfies that Δt is not less than the minimum stable cycle of communication and calculation and does not exceed the preset upper limit. In one implementation, Δt can be determined according to formula (8): (8) in, The average time required for a single AquaCrop simulation calculation and result write-back. For the refresh or read / write update cycle of the AquaCrop interface, Δt min Δt is the minimum allowed synchronization period of the system. max To avoid slow synchronization leading to state lag, the maximum synchronization period is set. When Δt obtained by formula (8) falls within the preset range, it can be used as the data exchange step size between the model and the agent. In a preferred embodiment, Δt is set to 3 to 30 seconds. The sequence number is used to ensure that each synchronization corresponds to the input and output data of the same simulation step, thereby improving the stability and repeatability of the joint simulation process.

[0060] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm, characterized in that, Includes the following steps: S1. Build a deep learning framework that combines convolutional neural networks, bidirectional long short-term memory networks, and attention mechanisms; S2. Collect meteorological data of the planting area, use the deep learning framework to correct the error of the short-term weather forecast data, and obtain the corrected short-term meteorological data; S3. Obtain historical crop growth data of the planting area, construct an initial AquaCrop crop growth model, and use an elite genetic algorithm to optimize the crop parameters of the initial AquaCrop crop growth model for regional adaptability, thereby obtaining a localized AquaCrop crop growth model. S4. Import the corrected short-term meteorological data, soil data and optimized crop parameters into the localized AquaCrop crop growth model; S5. Construct an irrigation decision system based on the Q-learning reinforcement learning algorithm framework, and define the state space, action space and reward function of the irrigation decision system; S6. Build a Matlab-AquaCrop irrigation decision co-simulation platform and connect the Matlab environment with the localized AquaCrop crop growth model through a standardized API interface; S7. In the Matlab-AquaCrop irrigation decision co-simulation platform, the irrigation decision system and the localized AquaCrop crop growth model are used to perform collaborative simulation iterations to output the optimal irrigation strategy for a specific crop growth model.

2. The intelligent irrigation strategy formulation method based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, In step S1, the specific steps for building the deep learning framework include: A one-dimensional convolutional neural network module is constructed, which uses one-dimensional convolutional layers to process the feature dimensions of the input data and performs regularization through Dropout layers to extract spatial features containing temporal local correlations. A bidirectional long short-term memory network module is constructed to receive the spatial features, process historical information using a forward long short-term memory network, process future information using a backward long short-term memory network, and output time step features. An attention mechanism feature weighting module is constructed to calculate the correlation score between the weight matrix generated by the bidirectional long short-term memory network module and the features, generate the attention distribution on the feature dimension, and perform weighted calculation on the input features according to the attention distribution.

3. The intelligent irrigation strategy formulation method based on short-term weather forecast error correction and Q-learning algorithm according to claim 2, characterized in that, The bidirectional long short-term memory network module uses a forget gate, an input gate, and an output gate to control the flow and storage of information. The forget gate is used to control the retention ratio of the hidden state at the previous moment, the input gate is used to control the degree of introduction of the current meteorological data and generate candidate unit states, and the output gate is used to determine the contribution of the updated unit state to the current hidden state.

4. The intelligent irrigation strategy formulation method based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, In S2, when correcting errors in short-term weather forecast data, a maximum temperature prediction module, a minimum temperature prediction module, and a rainfall prediction module are constructed respectively. The input features of the maximum temperature prediction module include a time identifier, the maximum temperature value of tomorrow's weather forecast, the maximum temperature prediction error value of the current day, and the maximum temperature prediction error value of the previous day. The output feature is the maximum temperature prediction error value of tomorrow's weather forecast. The input features of the minimum temperature prediction module include a time identifier, the minimum temperature value of tomorrow's weather forecast, the minimum temperature prediction error value of the current day, and the minimum temperature prediction error value of the previous day. The output feature is the minimum temperature prediction error value of tomorrow's weather forecast. The input features of the rainfall prediction module include a time stamp, the rainfall level of tomorrow's weather forecast, the rainfall level prediction error value for the current day, and the rainfall level prediction error value for the previous day. The output feature is the rainfall level prediction error value for tomorrow's weather forecast.

5. The method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, The S3 step of using an elite genetic algorithm to perform regional adaptation optimization of the crop parameters of the initial AquaCrop crop growth model specifically includes: An initial population is randomly generated, where each individual represents a set of crop growth parameters to be optimized; Calculate the fitness value of each individual in the population, which is determined based on the correlation coefficient between the simulated yield and the measured yield of the initial AquaCrop crop growth model; The individuals with the best fitness are selected as elite individuals and directly retained to the next generation. New individuals are generated through crossover and mutation operations to update the population. The model is optimized through multiple generations of iterations using the training set from historical data, and the model is validated using the validation set. When the correlation coefficient on the validation set reaches a preset threshold, the optimized crop growth parameters are output.

6. The method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, The state space includes meteorological factors, soil data, crop parameters, and field management information; wherein, the meteorological factors include precipitation, maximum temperature, and minimum temperature; the soil data includes soil type and its moisture characteristics; and the crop parameters include growth period parameters and yield data.

7. The intelligent irrigation strategy formulation method based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, The action space includes a first type of strategy and a second type of strategy; The first type of strategy is based on the water requirement characteristics of crops, dividing the crop growth period into four main stages, and setting different soil moisture irrigation trigger thresholds for each stage. The trigger thresholds are set based on the percentage of effective water in the plant. The second type of strategy is based on irrigation at fixed time intervals, with different intervals of irrigation days set; The irrigation decision system combines the input predicted meteorological data and soil moisture changes to select the optimal action within the action space to dynamically adjust the irrigation time and water volume.

8. The intelligent irrigation strategy formulation method based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, The reward function is constructed based on water use efficiency per unit yield, crop yield, and water consumption during crop growth. The reward function is positively correlated with water use efficiency per unit yield and crop yield, and negatively correlated with water consumption during crop growth.

9. The method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, The specific steps involved in building the Matlab-AquaCrop irrigation decision co-simulation platform in S6 are as follows: In the Matlab development environment, an extension module is built to provide a standardized API interface for the localized AquaCrop crop growth model. Write a connection program between Matlab and the AquaCrop model interface, so that the Q-learning agent in the Matlab environment can read the output state of the localized AquaCrop crop growth model and pass control action commands to the localized AquaCrop crop growth model.

10. The method for formulating intelligent irrigation strategies based on short-term weather forecast error correction and Q-learning algorithm according to claim 1, characterized in that, In the collaborative simulation iteration process, S7 sets the iteration time step between the localized AquaCrop crop growth model and the irrigation decision system to 6 seconds. The irrigation decision system continuously extracts the current system state from the output of the localized AquaCrop crop growth model and feeds back control actions according to this time step until the algorithm converges to the optimal strategy.