Rice irrigation online learning prediction method and system
By using a hybrid model of physical mechanism and neural network, combined with water balance and adaptive learning rate, the stability and accuracy problems of irrigation forecasting under data-free conditions are solved, realizing efficient and interpretable paddy field water level prediction and irrigation decision-making, which is suitable for smart irrigation and water-saving efficiency improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2026-03-04
- Publication Date
- 2026-07-31
AI Technical Summary
Existing irrigation forecasting methods are difficult to implement quickly in newly built farms without weather stations or historical data. The parameter calibration of traditional physical mechanism models is complex, and data-driven models are susceptible to insufficient samples and sudden climate changes. It is difficult for models to maintain stable accuracy in long-term operation, especially in areas where only public weather forecasts are available. It is difficult to balance zero-data start-up, accurate prediction and continuous adaptive updates.
A hybrid model based on physical mechanisms and neural networks is adopted, which combines physical mechanisms such as water balance as prior constraints. The model is corrected by a neural network with learnable parameters, and a phased adaptive learning rate and experience playback mechanism are used to achieve online adaptive learning and high-precision prediction.
It significantly improves the stability and accuracy of paddy field water level prediction, enhances the scientific nature and interpretability of irrigation and drainage decisions, reduces deployment costs, and meets the application needs of smart irrigation for water conservation, low cost, and sustainability.
Smart Images

Figure CN121766815B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart irrigation, specifically relating to an online learning forecasting method and system for rice irrigation. Background Technology
[0002] Existing irrigation forecasting methods generally rely on historical monitoring data and complete meteorological elements, making them difficult to implement quickly in newly established farms without weather stations or historical data. Traditional physical mechanism models have complex parameter calibration requirements, while purely data-driven models are susceptible to insufficient samples and sudden climate changes, lacking physical constraints and interpretability. Furthermore, in actual irrigation districts, only a single sample is acquired daily under online learning conditions; an excessively large learning rate leads to oscillations, while an excessively small rate hinders convergence, making it difficult for the model to maintain stable accuracy over long-term operation. Especially in areas where only public weather forecasts (temperature, weather type, wind speed) are available, existing technologies struggle to balance zero-data startup, accurate prediction, and continuous adaptive updates.
[0003] Therefore, it is necessary to propose an irrigation forecasting method that combines physical rationality with data-driven accuracy, can operate under extremely simple data conditions, and supports online adaptive learning, in order to meet the technical needs of smart agriculture, precision irrigation, and water conservation and efficiency improvement. Summary of the Invention
[0004] To overcome the prominent problems of existing irrigation forecasting technologies, such as difficulty in starting with zero historical data and reliance on specialized weather stations, this invention provides an online learning forecasting method and system for rice irrigation based on a hybrid physical mechanism-neural network model. This method introduces physical mechanisms such as water balance as prior constraints, combines them with a neural network correction model using learnable parameters, and employs a phased adaptive learning rate and experience replay mechanism to achieve zero-data cold start, continuous online learning, and high-precision prediction even when relying solely on publicly available weather forecast data. This hybrid intelligent model significantly improves the stability and accuracy of paddy field water level prediction, enhances the scientific rigor and interpretability of irrigation and drainage decisions, and meets the application requirements of smart irrigation that emphasizes water conservation, low cost, sustainability, and adaptability.
[0005] According to one aspect of the present invention, an online learning forecasting method for rice irrigation is provided, which is implemented based on a pre-constructed physical mechanism-neural network hybrid model that integrates prediction based on a physical mechanism model and error correction based on a neural network. The steps include:
[0006] S1. Obtain real-time environmental data of the target paddy field during the current decision-making cycle; the real-time environmental data includes, but is not limited to: the actual value of the water layer depth in the paddy field, weather forecast data, and infiltration calculation data;
[0007] S2. Based on real-time environmental data of the current decision-making cycle, predict the water depth of paddy fields in the next decision-making cycle through a hybrid physical mechanism-neural network model, and generate irrigation and drainage forecasts by combining crop irrigation and drainage patterns.
[0008] S3. Obtain real-time environmental data of the target paddy field in the next decision cycle after the irrigation and drainage forecast is executed, construct training samples and put them into the experience replay pool, and the physical mechanism-neural network hybrid model performs online learning based on the experience replay pool;
[0009] S4. At the start of the next decision cycle, return to S2 until the preset stopping condition is met.
[0010] As a further technical solution, in the physical mechanism-neural network hybrid model, the physical mechanism model takes the real value of the paddy field water layer depth in real-time environmental parameters, the highest and lowest temperatures in weather forecast data, and the forecasted rainfall and infiltration amount calculated from real-time environmental parameters as inputs, and outputs the predicted value of the paddy field water layer depth for the next decision cycle.
[0011] During the online learning phase, the neural network takes the difference between the predicted and actual water depth in the paddy field as input, optimizes the parameters with the goal of minimizing the error, and outputs the updated adjustment parameters to update the physical mechanism model.
[0012] As a further technical solution, the physical mechanism model is mathematically represented as follows:
[0013]
[0014]
[0015]
[0016] In the formula, This represents the true value of the paddy field water depth in the t-th future decision-making cycle; For the rainfall in the t-th decision-making cycle in the future; Let this be the leakage amount in the t-th decision-making cycle in the future; To predict crop evapotranspiration in the t-th decision-making period; This is the predicted value of the paddy field water depth in the (t+1)th decision cycle; and These are the predicted irrigation and drainage volumes for the t-th decision period, respectively. The forecast reference crop evapotranspiration for the t-th decision period; Radiation from outside the Earth; and These are the forecast maximum and minimum temperatures, respectively; the rainfall utilization rate parameter α, the crop water requirement regulation parameter β, the leakage correction coefficient γ, and the reference evapotranspiration calculation parameters C and E are adjustment parameters for the physical mechanism model.
[0017] As a further technical solution, the generation logic for irrigation and drainage forecasts is as follows:
[0018]
[0019]
[0020] In the formula, The predicted value of the paddy field water depth in the t-th decision-making cycle; This represents the lower limit of the suitable water layer for crop irrigation and drainage patterns. The upper limit of the suitable water layer for crop irrigation and drainage patterns; This refers to the upper limit of rainwater storage depth for crop irrigation and drainage systems. and Let represent the predicted irrigation volume and predicted drainage volume for the t-th decision period, respectively.
[0021] As a further technical solution, the physical mechanism-neural network hybrid model employs differentiated replay frequencies and a hybrid sampling strategy in the online learning process to obtain training samples from the experience replay pool for online learning of the physical mechanism-neural network hybrid model.
[0022] As a further technical solution, the physical mechanism-neural network hybrid model dynamically and adaptively adjusts the learning rate of the neural network during online learning, including: phased updates and adaptive correction of error trends;
[0023] The rules for the phased update include:
[0024]
[0025]
[0026]
[0027] In the formula, The initial learning rate, Let be the learning rate for the t-th decision period after phased updates;
[0028] The rules for adaptive error trend correction include:
[0029]
[0030]
[0031] In the formula, The training error within the most recent decision period is a preset number. The training error is the training error within the most recent decision period, prior to a predetermined number of previous decision periods. Let be the learning rate for the t-th decision period after adaptive error trend correction. The standard deviation of the training error within the most recent decision-making period is a preset number.
[0032] As a further technical solution, during the online learning phase, the neural network takes the difference between the predicted and actual water depth in the paddy field as input, optimizes the parameters with the goal of minimizing the error, and outputs the updated adjusted parameters. The process includes:
[0033] A loss function is constructed based on the difference between the predicted value of the paddy field water layer depth in the next decision cycle and the actual value of the paddy field water layer in the training samples. The neural network is updated based on the loss value, and the updated basic adjustment parameters are obtained using the updated neural network.
[0034] When the field water component calculated by the basic adjustment parameters and / or the physical mechanism model based on the basic adjustment parameters exceeds the preset physical reasonable constraint range, the basic adjustment parameters are corrected until they meet the physical reasonable constraint range, and the corrected basic adjustment parameters are output as the updated adjustment parameters; otherwise, the basic adjustment parameters are directly output as the updated adjustment parameters.
[0035] According to another aspect of this specification, an online learning forecasting system for rice irrigation is provided, which is used for an online learning forecasting method for rice irrigation, comprising:
[0036] A physical mechanism-neural network hybrid model pre-construction module is used to pre-construct a physical mechanism-neural network hybrid model based on the fusion of physical mechanism model prediction and neural network error correction. The physical mechanism-neural network hybrid model outputs the predicted value of paddy field water layer depth through the physical mechanism model, and updates the physical mechanism model through the neural network based on the predicted value and the actual value of paddy field water layer depth.
[0037] The data acquisition module is used to acquire real-time environmental data of the target paddy field;
[0038] The rice irrigation forecasting module is used to forecast the water depth in paddy fields based on real-time environmental data acquired by the data acquisition module, using a hybrid physical mechanism-neural network model, and to generate irrigation and drainage forecasts in combination with crop irrigation and drainage patterns.
[0039] The online learning module is used to construct training samples and put them into the experience replay pool, and to perform online learning based on the physical mechanism-neural network hybrid based on the experience replay pool;
[0040] The loop determination module is used to stop the system when a preset stopping condition is met.
[0041] According to another aspect of this specification, an electronic device is provided, including a memory and a processor, the memory storing program instructions executed by the processor, the processor invoking the program instructions to perform an online learning forecasting method for rice irrigation.
[0042] According to another aspect of this specification, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions that cause the computer to execute an online learning forecasting method for rice irrigation.
[0043] Compared with existing technologies, the advantages of this invention are as follows: This invention innovatively incorporates physical mechanisms such as water balance as prior constraints into a neural network structure with learnable parameters, achieving cold start with zero historical data and high-precision online prediction relying solely on publicly available weather forecast data. Simultaneously, it addresses the problems of slow convergence, oscillation, and low data utilization in online learning through a phased adaptive learning rate and experience replay mechanism, ensuring the model maintains stability and interpretability over long-term operation. This invention not only reduces the deployment cost of irrigation districts but also improves the accuracy and scientific rigor of paddy field water level prediction and irrigation / drainage decisions, possessing significant engineering application value and promotional significance. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating an online learning forecasting method for rice irrigation provided in an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of the structure of an online learning forecasting system for rice irrigation provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0048] It should be noted that:
[0049] The terms “comprising” and “having”, and any variations thereof, in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0050] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be decomposed, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of 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, 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. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form new technical solutions. Such combinations are not bound by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0052] like Figure 1 As shown, an online learning forecasting method for rice irrigation is implemented based on a pre-constructed hybrid physical mechanism-neural network model that integrates physical mechanism model prediction and neural network error correction. The hybrid model outputs predicted values of paddy field water depth through the physical mechanism model, and updates the physical mechanism model using the neural network based on the predicted and actual values of the paddy field water depth. The method includes:
[0053] Step 1: Obtain real-time environmental data for the target paddy field during the current decision-making cycle;
[0054] Step 2: Based on the real-time environmental data of the current decision-making cycle, predict the water depth of the paddy field in the next decision-making cycle through a hybrid physical mechanism-neural network model, and generate irrigation and drainage forecasts by combining crop irrigation and drainage patterns.
[0055] Step 3: Obtain real-time environmental data of the target paddy field in the next decision cycle after the irrigation and drainage forecast is executed, construct training samples and put them into the experience replay pool. The physical mechanism-neural network hybrid model performs online learning based on the experience replay pool.
[0056] Step 4: When the next decision cycle begins, return to step 2 until the preset stopping condition is met.
[0057] Specifically, the physical mechanism-neural network hybrid model is a physical constraint-enhanced hybrid prediction model that primarily uses a paddy field water balance physical mechanism model, while employing a neural network for bias compensation and adaptive parameter calibration. In this hybrid model, a paddy field water balance physical mechanism model is first constructed based on the principle of paddy field water balance. This model explicitly models water processes such as rainfall inflow, crop water demand, and field seepage, obtaining basic predictions of the next day's paddy field water layer changes. Building upon this, a neural network is introduced as an error learning and parameter update module. By learning from historical prediction errors and real-time environmental factors, the key water process parameters in the physical mechanism model (including rainfall utilization parameters, crop water demand regulation parameters, and deep field seepage parameters) are adaptively adjusted online, thereby continuously correcting systematic biases in the physical model. This hybrid mechanism ensures that the prediction process is always controlled by the physical constraints of water balance, while also possessing the ability to automatically calibrate model parameters according to environmental changes.
[0058] In the physical mechanism-neural network hybrid model, the physical mechanism model takes the real value of the paddy field water layer depth in real-time environmental parameters, the highest and lowest temperatures in weather forecast data, and the forecasted rainfall and infiltration amount calculated from real-time environmental parameters as inputs, and outputs the predicted value of the paddy field water layer depth for the next decision period.
[0059] During the online learning phase, the neural network takes the difference between the predicted and actual water depth in the paddy field as input, optimizes the parameters with the goal of minimizing the error, and outputs the updated adjustment parameters to update the physical mechanism model.
[0060] Furthermore, in the physical mechanism-neural network hybrid model, the physical mechanism model used for paddy field water balance is mathematically represented as follows:
[0061]
[0062]
[0063]
[0064] In the formula, This represents the true value of the paddy field water depth in the t-th future decision-making cycle; The rainfall for the t-th decision cycle in the future is adjusted by the rainfall utilization rate parameter α. The leakage amount in the t-th decision cycle is adjusted by the leakage correction coefficient γ. To predict crop evapotranspiration in the t-th decision period, the crop water requirement adjustment parameter β is used. This is the predicted value of the paddy field water depth in the (t+1)th decision cycle; and These are the predicted irrigation and drainage volumes for the t-th decision period, respectively. The forecast reference crop evapotranspiration for the t-th decision period is determined by weather forecast data in real-time environmental data and is calculated using the Hargreaves-Samani (HS) model. The ET0 value calculated for the HS model; Radiation from outside the Earth, MJ / m² / d; and These are the forecast maximum and minimum temperatures, in °C.
[0065] In the physical mechanism-neural network hybrid model, the adjustment parameters of the physical mechanism model include: rainfall utilization rate parameter α, crop water requirement regulation parameter β, field leakage parameter γ, and reference evapotranspiration calculation parameters C and E. These adjustment parameters are embedded into the neural network as learnable prior parameters, under the condition of default physical parameter values (…). , , With all values set to 1.0, and C and E set to 0.0023 and 0.5 respectively, zero data initialization of the model is achieved.
[0066] The neural network does not directly output the prediction results of the field water layer. Instead, it generates key parameters for updating the physical mechanism model and compensation values for correcting prediction errors. In the subsequent online learning stage, the updated key parameters are used as inherent terms of the physical mechanism model and participate in the subsequent water balance calculation process, thereby realizing the coupling between the neural network and the physical mechanism model at the parameter level.
[0067] In the specific calculation process, the physical mechanism-neural network hybrid model first uses the collected environmental parameters within the current decision-making period, including: paddy field water layer status, weather forecast data (maximum temperature, minimum temperature, weather type and corresponding rainfall), crop growth period parameters and field hydraulic parameters, to calculate the predicted value of paddy field water layer depth for the next decision-making period.
[0068] In step 1, the real-time environmental data of the target paddy field includes, but is not limited to: weather forecast data (weather type, highest temperature, lowest temperature), the current actual value of the water layer depth in the paddy field, and infiltration calculation data (current crop growth and development stage, soil texture, latitude and longitude, elevation, and slope of the paddy field).
[0069] Specifically, real-time environmental data of the target paddy field is collected. The collection methods include, but are not limited to, obtaining public weather forecast data through meteorological service interfaces and obtaining relevant parameters of paddy field hydraulic parameters through IoT sensor devices, including but not limited to weather forecast data, the current actual value of the water layer depth in the paddy field, the current crop growth and development stage, soil texture, latitude and longitude, elevation, and slope of the paddy field.
[0070] In step 2, the predicted value of the paddy field water layer depth for the next day is calculated by a physical mechanism-neural network hybrid model that integrates physical mechanism model and neural network error correction. The prediction value is then combined with weather forecast and crop irrigation and drainage patterns to generate irrigation and drainage forecast, thereby affecting the prediction result of the paddy field water layer.
[0071] Specifically, the process of calculating the predicted water depth of paddy fields for the next decision cycle using a hybrid model of physical mechanism and neural network is as follows:
[0072] Weather forecast information, including future maximum and minimum temperatures and weather type information, is introduced as exogenous meteorological driving variables. Based on the maximum and minimum temperatures, the forecast reference evapotranspiration is calculated according to the reference evapotranspiration calculation model in the physical mechanism model.
[0073] Based on the preset weather type conversion rainfall formula, the forecast rainfall is calculated according to the weather type information in the weather forecast information. The rainfall input item is used in the paddy field water balance physical mechanism model to participate in the field water balance calculation.
[0074] By inputting the forecast reference evapotranspiration and forecast rainfall into the physical mechanism-neural network hybrid model, the predicted value of the paddy field water depth for the next decision cycle is calculated.
[0075] In the above process, weather forecast information indirectly participates in the calculation of the field water balance equation by influencing the values of the reference evapotranspiration and rainfall input terms.
[0076] First, forecast the rainfall for the t-th decision cycle. The weather type conversion is based on the public forecast for the t-th decision period. The conversion is divided into simple weather type (e.g., light rain) and complex weather type (e.g., moderate rain turning into light rain). The precipitation (PDR) converted from the simple type is included but not limited to those shown in Table 1.
[0077] Table 1. Rainfall transitions between simple weather types
[0078]
[0079] The determination of the PDR value for rainfall forecasts of complex weather types is based on the following criteria:
[0080]
[0081] In the formula, This represents the PDR value of a combined weather type precipitation forecast; the subscript i indicates the simple weather type included in the combined weather type, and n is the number of simple precipitation forecast types included in the combined weather type precipitation forecast. For example, the PDR value of the weather forecast type "cloudy to light rain" is 2.5 mm.
[0082] Furthermore, in step 3, the predicted value of the paddy field water layer depth for the next day is calculated and combined with the weather forecast and crop irrigation and drainage pattern to generate an irrigation and drainage forecast, thereby affecting the prediction result of the field water layer and generating corresponding irrigation or drainage forecast information.
[0083] The mathematical representation of the generation logic of irrigation and drainage forecast values is as follows:
[0084]
[0085]
[0086] In the formula, The predicted value of the paddy field water depth in the t-th decision-making cycle; This represents the lower limit of the suitable water layer for crop irrigation and drainage patterns. The upper limit of the suitable water layer for crop irrigation and drainage patterns; This refers to the upper limit of rainwater storage depth for crop irrigation and drainage systems. and Let represent the predicted irrigation volume and predicted drainage volume for the t-th decision period, respectively.
[0087] Step 4 is essentially the online learning phase of the physical mechanism-neural network hybrid model, including:
[0088] (1) The learning rate is dynamically and adaptively adjusted based on the stage characteristics and error change patterns of the online learning process;
[0089] (2) By integrating a neural network with physical constraints, a loss function is constructed based on the error between the predicted water layer value and the measured water layer value output by the physical mechanism model; the above learnable parameters are updated online by gradient descent or equivalent optimization method: the loss value is applied in reverse to the neural network to update the rainfall utilization rate parameter, crop water demand regulation parameter, field leakage parameter and reference evapotranspiration calculation parameter online;
[0090] (3) After the update, the complete online training sample unit composed of the adjustment parameters of the current decision cycle, real-time environmental data, prediction results output by the model and corresponding observation feedback is added to the experience replay pool.
[0091] (4) Based on the differentiated replay frequency and mixed sampling strategy adopted in the online learning stage, training samples are obtained from the experience replay pool to enhance the efficiency of historical data utilization.
[0092] Furthermore, firstly, in the online learning process of the physical mechanism-neural network hybrid model, the learning rate of the neural network is dynamically and adaptively adjusted according to the stage characteristics and error change patterns of the learning process, including staged updates and adaptive correction of error trends:
[0093] The rules for the phased update include:
[0094]
[0095]
[0096]
[0097] In the formula, The initial learning rate, Let be the learning rate for the t-th decision period after phased updates;
[0098] The rules for adaptive error trend correction include:
[0099]
[0100]
[0101] In the formula, The training error within the most recent decision period is a preset number. The training error is the training error within the most recent decision period, prior to a predetermined number of previous decision periods. Let be the learning rate for the t-th decision period after adaptive error trend correction. The standard deviation of the training error within the most recent decision-making period is a preset number.
[0102] Optionally, error trend analysis uses a fixed 5-day time window. This represents the training error over the past 5 days. This represents the training error from the five days prior to the most recent five days. In practical applications, the length of the error statistics window can be adaptively or preset based on the data update frequency, model convergence speed, and the changing characteristics of the farmland environment. For example, 3 to 10 consecutive decision periods can be used as an error analysis window. By comparing the average error or error fluctuation amplitude within adjacent error windows, the trend of model error change can be determined, and the base learning rate for the current stage can be adaptively adjusted accordingly.
[0103] Specifically, the adaptive adjustment of the learning rate divides the training phases based on the online running time and the characteristics of prediction error changes. In a preferred embodiment, the cumulative number of online training days since the model's self-deployment is used as the basis for phase division: when the running time is between the 1st and 10th decision cycles, the model is in the initial stage of online learning. At this time, the number of samples is limited and the parameters have not yet fully adapted to the target farmland environment. A higher learning rate is used to accelerate the model's convergence speed, preferably 1.5 to 2.0 times the initial learning rate; when the running time is between the 11th and 30th decision cycles, the model enters the stable convergence stage. The prediction error gradually decreases with the accumulation of samples, and the learning rate gradually decays according to a preset rule, preferably 0.5 to 1.0 times the initial learning rate; when the running time exceeds 30 decision cycles, the model enters the fine-tuning stage. The prediction error remains within a small range within a continuous time window. A lower learning rate is used to fine-tune the model parameters, preferably 0.3 to 0.5 times the initial learning rate.
[0104] Meanwhile, during the aforementioned stages, the prediction error is monitored via a sliding time window. When a significant increase or increased fluctuation in error is detected in adjacent windows, the learning rate is temporarily increased (e.g., increased to 1.2 to 1.5 times the current learning rate) to enhance the model's adaptability to sudden weather changes or changes in field conditions. Once the error stabilizes, the learning rate automatically returns to the value range of the corresponding stage.
[0105] Secondly, during the online learning phase, the neural network takes the difference between the predicted and actual water depth in the paddy field as input, optimizes the parameters with the goal of minimizing the error, and outputs the updated adjusted parameters. This process includes:
[0106] The actual value of the paddy field water layer depth in the real-time environmental data of the target paddy field in the next decision period after the irrigation and drainage forecast is executed is regarded as the actual value of the paddy field water layer in the next decision period. A loss function is constructed based on the difference between the predicted value of the paddy field water layer depth and the actual value of the paddy field water layer in the next decision period. The neural network is updated according to the loss value, and the updated basic adjustment parameters are obtained using the updated neural network.
[0107] To ensure that the model calculation results conform to the physical laws of farmland water quantity changes, the online learning phase also includes: setting a physically reasonable constraint range for the adjustment parameters and the field water quantity components controlled by the adjustment parameters; when the updated adjustment parameters output by the neural network and / or the field water quantity components calculated by the physical mechanism model based on the updated adjustment parameters exceed the corresponding physically reasonable constraint range, the updated adjustment parameters are corrected until they conform to a reasonable range under the physically reasonable constraint range.
[0108] The methods for correcting the updated adjustment parameters include, but are not limited to: truncation, mapping, or equivalent correction.
[0109] Specifically, the rainfall utilization rate parameter α is used to characterize the proportion of rainfall converted into effective field water, and its value is limited to a preset reasonable range to avoid non-physical amplification or weakening of effective rainfall; the crop water demand regulation parameter β is used to reflect the regulatory effect of crop growth stage and environmental conditions on water demand, and its value is limited to a reasonable fluctuation range of crop evapotranspiration; the field leakage parameter γ is used to describe the leakage characteristics of field water into the lower soil layer, and its value is limited to non-negative and does not exceed the empirical upper limit allowed by soil permeability characteristics; the values of the reference evapotranspiration calculation parameters C and E are limited to the physical range allowed by the meteorological evapotranspiration calculation model to ensure the rationality of the evapotranspiration calculation results.
[0110] Optionally, under typical farmland irrigation scenarios, the reasonable range of rainfall utilization parameter α can be limited to approximately 0.2–2.5; the range of crop water requirement regulation parameter β can be limited to approximately 0.5–1.6 to reflect the reasonable changes in crop water requirement under different growth stages and meteorological conditions; the field leakage parameter γ is limited to a non-negative value, and its corresponding daily leakage does not exceed the empirical upper limit to avoid abnormal leakage that does not conform to soil hydraulic characteristics; when the reference evapotranspiration calculated from the above parameters exceeds the empirical upper limit (e.g., abnormally higher than the evapotranspiration level under normal meteorological conditions, such as 8 mm / d), the corresponding parameter update results are constrained or anomaly marked. By incorporating physical constraints into the neural network, the network always meets the physical consistency requirements during the gradient descent optimization process.
[0111] For example, a pruning method is used, and gradient descent is employed to update the adjustment parameters online through a neural network that incorporates physical constraints. The formula for the online update of the adjustment parameters is as follows:
[0112]
[0113] In the formula, Let be the learning rate for the t-th decision period. loss function For parameters gradient, parameters This includes correction parameters for rainfall utilization, crop water requirement regulation, field seepage, and evapotranspiration calculation. For parameters Physical constraint lower limit For parameters Physical constraint upper limit, This is the clipping function.
[0114] Preferably, the loss function is used to measure the deviation between the model's predicted results and the actual hydrological state of the target farmland, and serves as an evaluation function guiding the direction and magnitude of neural network parameter updates. In this invention, the loss function is primarily composed of the error between the predicted water depth of the paddy field the following day and the corresponding measured water depth, and can be further constructed by incorporating a penalty term for the degree of violation of physical constraints.
[0115] Third, the training samples do not only contain combinations of learnable parameters, but are complete online training sample units composed of real-time environmental data based on the current decision-making cycle, prediction results of the physical mechanism-neural network hybrid model, adjusted parameters, and observed feedback.
[0116] Adding the training samples from the current decision cycle to the experience replay pool can be represented as:
[0117]
[0118] In the formula, This represents the experience replay pool; Let represent the training sample in the t-th decision cycle.
[0119] Fourth, the online learning process employs differentiated replay frequencies and a hybrid sampling strategy to obtain training samples from the experience replay pool for online learning of the physical mechanism-neural network hybrid model, thereby enhancing the efficiency of historical data utilization.
[0120] Specifically, the differentiated replay frequency divides the decision cycle into different stages, with each stage having a preset stage-based replay frequency. When the number of samples in the experience replay pool is not less than the preset minimum number of replay training samples, and the current decision cycle meets the replay frequency conditions of the corresponding online learning stage, an experience replay is performed.
[0121] Specifically, the mathematical expression for the staged playback frequency is:
[0122]
[0123] In the formula, This represents the frequency of experience replay in the t-th decision cycle stage.
[0124] An experience replay will be performed once if the following conditions are met:
[0125]
[0126] In the formula, Indicates the first The experience replay control value for each decision cycle, when When =1, perform the experience replay operation. When =0, the experience playback operation is not performed; express yes Integer multiples of; This represents the minimum number of replay training samples in the experience replay pool.
[0127] Furthermore, the hybrid sampling strategy specifically refers to: proportional ( , , The formula (0.5, 0.3, 0.2) divides the experience replay pool into three subsets. It is collected from the most recent sample set (most recent in time series). It was collected from a high-error sample set (sorted by absolute error). It involves collecting samples from a random set, and then retrieving them from the experience pool after triggering experience replay. It is worth noting that the final playback batch is a deduplicated subset of the sampled sample set B.
[0128] Step 5 is essentially an iterative judgment. After collecting new real-time environmental parameters of the target paddy field, the prediction is recalculated, the model parameters are updated, and new irrigation or drainage forecasts are generated until the preset stopping conditions are met, such as reaching the end of the rice growth period.
[0129] The implementation of the various embodiments of the present invention is based on programmed processing through a system with processor functionality. Therefore, in practical engineering, the technical solutions and functions of the various embodiments of the present invention are encapsulated into various modules. Based on this reality, and building upon the above embodiments, the embodiments of the present invention provide an online learning forecasting system for rice irrigation, which is used to execute an online learning forecasting method for rice irrigation from the above method embodiments.
[0130] See Figure 2 The system includes:
[0131] A physical mechanism-neural network hybrid model pre-construction module is used to pre-construct a physical mechanism-neural network hybrid model based on the fusion of physical mechanism model prediction and neural network error correction. The physical mechanism-neural network hybrid model outputs the predicted value of paddy field water layer depth through the physical mechanism model, and updates the physical mechanism model through the neural network based on the predicted value and the actual value of paddy field water layer depth.
[0132] The data acquisition module is used to acquire real-time environmental data of the target paddy field;
[0133] The rice irrigation forecasting module is used to forecast the water depth in paddy fields based on real-time environmental data acquired by the data acquisition module, using a hybrid physical mechanism-neural network model, and to generate irrigation and drainage forecasts in combination with crop irrigation and drainage patterns.
[0134] The online learning module is used to construct training samples and put them into the experience replay pool, and to perform online learning based on the physical mechanism-neural network hybrid based on the experience replay pool;
[0135] The loop determination module is used to stop the system when a preset stopping condition is met.
[0136] It should be noted that the system embodiments provided by the present invention are used not only to implement the methods in the above method embodiments, but also to implement the methods in other method embodiments provided by the present invention. The only difference is that corresponding functional modules are set. The principle is basically the same as that of the above system embodiments provided by the present invention. As long as those skilled in the art can improve the modules in the above system embodiments by referring to the specific technical solutions in other method embodiments and combining technical features to obtain corresponding technical means and technical solutions composed of these technical means, on the basis of the above system embodiments, and on the premise of ensuring the practicality of the technical solutions, they can obtain corresponding system-like embodiments for implementing the methods in other method-like embodiments.
[0137] The method described in this invention is implemented using an electronic device; therefore, it is necessary to introduce the relevant electronic device. For this purpose, embodiments of this invention provide an electronic device, such as... Figure 3 As shown, the electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus, wherein the at least one processor, the communication interface, and the at least one memory communicate with each other via the communication bus. The at least one processor invokes logical instructions stored in the at least one memory to execute all or part of the steps of the methods provided in the foregoing method embodiments.
[0138] Furthermore, when the logical instructions in at least one of the aforementioned memories are implemented as software functional units and sold or used as independent products, they are stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, is embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (a personal computer, server, or network device) to execute all or part of the steps of the methods described in the various method embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks—various media for storing program code.
[0139] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, located in one place, or distributed across multiple network units. The purpose of this embodiment is achieved by selecting some or all of the modules according to actual needs. Those skilled in the art will understand and implement this without any inventive effort.
[0140] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0141] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0142] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0144] Based on the same technical concept as the foregoing embodiments, the present invention provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute an online learning forecasting method for rice irrigation.
[0145] In summary, the present invention discloses an online learning forecasting method and system for rice irrigation based on a hybrid physical mechanism-neural network model. The process includes: constructing a physical mechanism model of paddy field water balance, embedding rainfall utilization rate parameter α, crop water demand regulation parameter β, field seepage parameter γ, and reference evapotranspiration calculation parameters C and E as learnable prior parameters into a neural network structure, and initializing the model under zero-data conditions with default parameter values; collecting real-time environmental parameters of the target paddy field; calculating the predicted value of the paddy field water layer depth for the next day through a hybrid model based on the fusion of the physical mechanism model and neural network error correction, and generating irrigation or drainage forecasts by combining weather forecasts and crop irrigation and drainage patterns; dynamically and adaptively adjusting the learning rate according to the stage characteristics and error change patterns of the training process; updating the above learnable parameters online using gradient descent through a neural network that integrates physical constraints, and adding the current sample to the experience replay pool; obtaining training samples from the experience replay pool to enhance the utilization efficiency of historical data by adopting differentiated replay frequencies and hybrid sampling strategies according to the online learning stage; and iterating daily, recalculating the prediction, updating the model parameters, and generating new irrigation or drainage forecasts after collecting new real-time environmental parameters of the target paddy field.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. A method for online learning forecasting of rice irrigation, characterized in that, This is achieved based on a pre-built physical mechanism-neural network hybrid model. The physical mechanism-neural network hybrid model outputs the predicted value of the water layer depth in paddy fields through the physical mechanism model, and embeds the adjustment parameters as learnable prior parameters into the neural network. The neural network outputs updated adjustment parameters based on the predicted value and the actual value of the water layer depth in paddy fields. The updated adjustment parameters are used as inherent terms of the physical mechanism model to update the physical mechanism model. The steps include: S1. Obtain real-time environmental data of the target paddy field during the current decision-making cycle; the real-time environmental data includes the actual value of the paddy field water depth, weather forecast data, and infiltration calculation data; S2. Based on the real-time environmental data of the current decision-making cycle, the predicted value of the paddy field water layer depth for the next decision-making cycle is predicted through a physical mechanism-neural network hybrid model, and irrigation and drainage forecasts are generated in combination with crop irrigation and drainage patterns; in the physical mechanism-neural network hybrid model, the physical mechanism model takes the actual value of the paddy field water layer depth in the real-time environmental parameters, the highest and lowest temperatures in the weather forecast data, and the predicted rainfall and infiltration amount calculated from the real-time environmental parameters as inputs, and outputs the predicted value of the paddy field water layer depth for the next decision-making cycle; The physical mechanism model is mathematically represented as follows: ; ; ; In the formula, This represents the true value of the paddy field water depth in the t-th future decision-making cycle; For the rainfall in the t-th decision-making cycle in the future; Let this be the leakage amount in the t-th decision-making cycle in the future; To predict crop evapotranspiration in the t-th decision-making period; This is the predicted value of the paddy field water depth in the (t+1)th decision cycle; and These are the predicted irrigation and drainage volumes for the t-th decision period, respectively. The forecast reference crop evapotranspiration for the t-th decision period; Radiation from outside the Earth; and These are the forecast for the highest and lowest temperatures, respectively. During the online learning phase, the neural network takes the difference between the predicted and actual values of the water layer depth in the paddy field as input, and optimizes the parameters by minimizing the error to output updated adjustment parameters, which are used to update the physical mechanism model. The adjustment parameters include: rainfall utilization rate parameter α, crop water requirement adjustment parameter β, seepage correction coefficient γ, and reference evapotranspiration calculation parameters C and E. S3. Obtain real-time environmental data of the target paddy field in the next decision cycle after the irrigation and drainage forecast is executed, construct training samples and put them into the experience replay pool, and the physical mechanism-neural network hybrid model performs online learning based on the experience replay pool; S4. At the start of the next decision cycle, return to S1 until the preset stopping condition is met.
2. The online learning forecasting method for rice irrigation as described in claim 1, characterized in that, The generation logic for the irrigation and drainage forecast is as follows: ; ; In the formula, The predicted value of the paddy field water depth in the t-th decision-making cycle; This represents the lower limit of the suitable water layer for crop irrigation and drainage patterns. The upper limit of the suitable water layer for crop irrigation and drainage patterns; This refers to the upper limit of rainwater storage depth for crop irrigation and drainage systems. and Let represent the predicted irrigation volume and predicted drainage volume for the t-th decision period, respectively.
3. The online learning forecasting method for rice irrigation as described in claim 1, characterized in that, The physical mechanism-neural network hybrid model employs differentiated replay frequencies and a hybrid sampling strategy during the online learning process to obtain training samples from the experience replay pool for online learning of the physical mechanism-neural network hybrid model.
4. The online learning forecasting method for rice irrigation as described in claim 1, characterized in that, The physical mechanism-neural network hybrid model, during online learning, dynamically and adaptively adjusts the learning rate of the neural network, including: phased updates and adaptive correction of error trends; The rules for the phased update include: ; ; ; In the formula, The initial learning rate, Let be the learning rate for the t-th decision period after phased updates; The rules for adaptive error trend correction include: ; ; In the formula, The training error within the most recent decision period is a preset number. The training error is the training error within the most recent decision period, prior to a predetermined number of previous decision periods. Let be the learning rate for the t-th decision period after adaptive error trend correction. The standard deviation of the training error within the most recent decision-making period is a preset number.
5. The online learning forecasting method for rice irrigation as described in claim 1, characterized in that, During the online learning phase, the neural network uses the difference between the predicted and actual water depth in the paddy field as input, and the process of minimizing the error to optimize the parameter output and update the adjusted parameters includes: A loss function is constructed based on the difference between the predicted value of the paddy field water layer depth in the next decision cycle and the actual value of the paddy field water layer in the training samples. The neural network is updated based on the loss value, and the updated basic adjustment parameters are obtained using the updated neural network. When the field water component calculated by the basic adjustment parameters and / or the physical mechanism model based on the basic adjustment parameters exceeds the preset physical reasonable constraint range, the basic adjustment parameters are corrected until they meet the physical reasonable constraint range, and the corrected basic adjustment parameters are output as the updated adjustment parameters; otherwise, the basic adjustment parameters are directly output as the updated adjustment parameters.
6. A rice irrigation online learning forecasting system, used to implement the rice irrigation online learning forecasting method according to any one of claims 1-5, characterized in that, include: A physical mechanism-neural network hybrid model pre-construction module is used to pre-construct a physical mechanism-neural network hybrid model based on the fusion of physical mechanism model prediction and neural network error correction. The physical mechanism-neural network hybrid model outputs the predicted value of paddy field water layer depth through the physical mechanism model, and updates the physical mechanism model through the neural network based on the predicted value and the actual value of paddy field water layer depth. The data acquisition module is used to acquire real-time environmental data of the target paddy field; The rice irrigation forecasting module is used to forecast the water depth in paddy fields based on real-time environmental data acquired by the data acquisition module, using a hybrid physical mechanism-neural network model, and to generate irrigation and drainage forecasts in combination with crop irrigation and drainage patterns. The online learning module is used to construct training samples and put them into the experience replay pool, and to perform online learning based on the physical mechanism-neural network hybrid based on the experience replay pool; The loop determination module is used to stop the system when a preset stopping condition is met.
7. An electronic device, characterized in that, The method includes a memory and a processor, the memory storing program instructions that are executed by the processor, the processor invoking the program instructions to perform the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method described in any one of claims 1 to 5.