An edge cache-based irrigation control system and a method for off-network self-execution and data synchronization thereof
Patent Information
- Application Number
- CN202611265587.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-09-22
AI Technical Summary
1.纯云端直控方案:设备无本地任务缓存能力,一旦网络离线则无法接收云端指令,灌溉任务直接中断,易引发作物缺水、灌溉不足等问题;网络恢复后也无离线任务追溯机制
1、保障灌溉连续性:在网络离线时,边缘网关层依托本地缓存的云端平台层的灌溉指令集自主执行灌溉任务,彻底解决网络问题导致的灌溉中断问题;支持断电续跑、网络防抖,系统运行稳定性大幅提升。
Smart Images

Figure CN122802565A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of agricultural and garden irrigation automation and Internet of Things technology, specifically relating to an irrigation control system based on edge caching and its method for self-execution and data synchronization when the network is disconnected. Background Technology
[0002] In applications such as field agriculture, mountain orchards, and outdoor gardens, the IoT irrigation control model, which combines cloud-based decision-making with on-site terminal execution, is commonly adopted. The cloud platform generates irrigation decision commands based on multi-dimensional data, which are then sent to the irrigation controller via a gateway to drive valves and complete the irrigation operation. However, outdoor environments present challenges such as weak base station signals, strong wireless interference, large power supply fluctuations, and intermittent network outages, leading to frequent offlineing of on-site gateways and irrigation controllers.
[0003] Currently, the mainstream irrigation control solutions on the market are mainly divided into three categories, and most of them have the following obvious technical defects: 1. Pure cloud-based direct control solution: The device has no local task caching capability. Once the network is offline, it cannot receive cloud instructions, and the irrigation task is directly interrupted, which can easily lead to problems such as crop water shortage and insufficient irrigation; there is also no offline task tracking mechanism after the network is restored.
[0004] 2. Local fixed-time irrigation scheme: The equipment only supports preset fixed-time irrigation plans and cannot receive dynamic optimal decisions generated by the cloud based on real-time weather, soil moisture and crop growth models. The irrigation strategy is rigid and cannot adapt to environmental changes, resulting in low irrigation accuracy and resource utilization.
[0005] 3. Simplified Local Storage Solution: Some devices have basic local storage functionality, but lack standardized data synchronization and status fusion logic. After network recovery, the local offline execution logs are inconsistent with the cloud data status, requiring manual verification and reconciliation, and offline execution data is easily lost; at the same time, it cannot automatically correct for irrigation volume deviations or execution anomalies.
[0006] In summary, existing technologies have failed to achieve an integrated solution that enables dynamic decision-making from the cloud to the edge, autonomous execution of optimal irrigation strategies during network outages, and automatic data synchronization and status correction after network reconnection. This makes it difficult to meet the actual needs of unmanned and highly reliable irrigation in remote fields. Summary of the Invention
[0007] To address the aforementioned issues, the present invention aims to provide an irrigation control system based on edge caching and its method for self-execution and data synchronization during network outages. Relying on a cloud-edge collaborative architecture, it enables uninterrupted execution of irrigation tasks when the network is abnormal, and automatic data synchronization, state fusion, and deviation compensation after reconnection. This reduces manual intervention throughout the process and improves the stability, intelligence, and operational efficiency of the irrigation control system.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides an irrigation control system based on edge caching, comprising: The cloud platform layer is configured to generate a structured irrigation decision instruction set based on the acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records and a preset crop growth model. It is also responsible for issuing irrigation tasks, parsing offline logs, merging status, compensating for irrigation deviations, generating new plans, and pushing abnormal alarms. The edge gateway layer includes at least one edge gateway, which is configured to output device control signals based on the irrigation decision instruction set and is responsible for network outage autonomy, power outage resumption, data verification, and local audible and visual alarms until the queue to be synchronized is marked as empty. The field equipment layer is configured to collect meteorological data, field environmental data, and irrigation operation data in real time, providing data support for cloud platform layer and edge gateway layer to make cloud decisions and judge local anomalies. At the same time, it executes irrigation tasks according to the equipment control signals output by the edge gateway layer.
[0009] Furthermore, the cloud platform layer is equipped with a remote monitoring terminal (Web or App), a policy generation and rule module, a data storage and analysis engine, and a device access server cluster; The remote monitoring terminal (Web or App) is used to provide a visual human-computer interaction interface for different users, making it convenient for different users to modify irrigation tasks and parameters, and to display irrigation task information, on-site equipment perception information and fault alarm information. The strategy generation and rule module is used to generate a structured irrigation decision instruction set based on the received meteorological data, on-site environmental data and irrigation operation data, combined with historical irrigation records and a preset crop growth model. According to preset rules, after the network is restored, the irrigation strategy is modified based on the actual irrigation execution data during the offline period, and the updated version of the irrigation task is output to the edge gateway layer. The data storage and analysis engine uses a hybrid storage architecture combining time-series and relational databases to store and analyze all data. The device access server cluster serves as a communication relay hub between the cloud platform layer and the edge gateway layer, enabling network communication between the two.
[0010] Furthermore, the remote monitoring terminal Web or App is equipped with a user permission management submodule, an irrigation instruction and parameter modification submodule, an alarm information receiving submodule, and a visualization display submodule; The user permission management submodule is used to assign corresponding management operation permissions to different users, so as to realize the hierarchical management of multi-role permissions, and the switching of group views of multiple planting plots and multiple gateways; The irrigation instruction and parameter modification submodule is used to receive irrigation instructions and irrigation parameter modification information, so as to realize the functions of issuing irrigation instructions temporarily to different users, batch modifying irrigation parameters, customizing irrigation compensation thresholds, and exporting irrigation reports. The alarm information receiving submodule is used to receive remote alarm pushes for device offline, task execution failure, water volume deviation, cache abnormality and synchronization abnormality. The visualization display submodule is used to display irrigation task information, on-site equipment perception information, and fault alarm information in real time.
[0011] Furthermore, the strategy generation and rule module includes an external data interface submodule, an instruction set generation submodule, a rule base submodule, an irrigation strategy correction submodule, a custom submodule, and an extension submodule; The external data interface submodule is used to interface with external data, including external meteorological APIs, crop growth databases, soil moisture threshold models, and field equipment sensing information. The instruction set generation submodule is used to automatically generate a structured irrigation task instruction set for a future preset time period based on external interface data and according to a preset cycle. The rule library submodule is used to store and manage preset water volume deviation compensation rules, overdue re-irrigation rules, multi-device task conflict verification rules, and fault classification and handling rules. The irrigation strategy correction submodule is used to correct the irrigation strategy by combining the actual irrigation execution data during the offline period and the corresponding rules in the rule base submodule after the network is restored and synchronized, and output the updated irrigation task to the edge gateway layer. The custom submodule is used to support manual customization of irrigation duration, irrigation water volume, and rotation irrigation priority; The extended submodule is used to support the generation logic of multi-scenario control strategies.
[0012] Furthermore, the data storage and analysis engine includes a data storage submodule, a data preprocessing submodule, and a multi-dimensional data analysis submodule; The data storage submodule is used to persistently store raw meteorological data, soil temperature and humidity data, gateway cache task plans, offline or online execution logs, equipment fault codes, synchronization verification records, alarm events, and provide historical irrigation sample data support for the strategy generation and rule module, retaining full-link data to meet the needs of agricultural irrigation data traceability and supervision. The data preprocessing submodule is used to provide data cleaning, deduplication, and aggregation functions, and to complete the association and fusion of local offline logs and cloud-based scheduled tasks based on the globally unique task_id; The multi-dimensional data analysis submodule is used to provide multi-dimensional data analysis functions, including at least one of the following: plot water consumption statistics, irrigation efficiency analysis, network offline frequency statistics, and equipment failure rate statistics.
[0013] Furthermore, the edge gateway layer is equipped with a network status monitoring module, an operating mode switching engine, a data caching and synchronization module, a local cache and time series library, a fault detection module, a communication reconnection module, and an edge gateway controller; The network status monitoring module is used to monitor the network communication status between the cloud platform layer and the edge control layer in real time using a heartbeat mechanism, and sends the network status monitoring results to the edge gateway controller. The communication reconnection module is used to continuously attempt reconnection when the network is offline, and send the reconnection result to the edge gateway controller; The edge gateway controller determines whether the network is offline based on network status monitoring results. When the network is determined to be offline, the operating mode switching engine switches the working mode to the offline autonomous mode, stops requesting new tasks from the cloud platform layer, and enables the data caching and synchronization module, local cache and time series library to achieve local cache task scheduling. The edge gateway controller also determines whether the network is online based on the reconnection results. When the network is determined to be restored, the operating mode switching engine switches the working mode to the online mode and automatically triggers full-process data synchronization. The fault detection module is used to detect the status of the equipment in the field equipment layer and upload fault alarm information to the edge gateway controller; The data caching and synchronization module is used to receive the irrigation task instruction set issued by the cloud platform layer and save it to the local cache and time series library.
[0014] Furthermore, the fault detection module includes a real-time polling submodule, a fault identification submodule, a fault coding and classification submodule, and a fault information uploading submodule; The real-time polling submodule is used to poll the operating status of field sensing equipment in real time, including the operating status of valve actuators, various sensing sensors, local storage, communication modules, and power supply units. The fault identification submodule is used to identify various faults and anomalies based on the operating status of the field sensing equipment, including at least one of the following: valve jamming, sensor failure, buffer damage, power supply abnormality, communication hardware failure, excessive irrigation water volume deviation, and task scheduling conflict. The fault coding and classification submodule is used to uniformly assign standardized fault codes and classify various faults and anomalies. After a fault occurs, it is synchronously written to the local cache log. Minor faults trigger local audible and visual alarms, and serious faults automatically terminate the current irrigation operation. The fault information uploading submodule is used to upload the fault code along with the local cache log to the cloud platform layer after the network is restored, supporting cloud-based fault tracing, refueling decisions, and operation and maintenance alarm push.
[0015] Furthermore, the field equipment layer includes soil temperature and humidity sensors, flow sensors, water pressure sensors, micro weather stations, solenoid valves or water pump drive modules, as well as irrigation pipe networks and actuators; The soil temperature and humidity sensor, flow sensor, and water pressure sensor are used to collect real-time data on the field environment and irrigation operation. The micro weather station is equipped with several weather sensors for real-time collection of weather data; The on-site environmental data, meteorological data, and irrigation operation data are uploaded to the edge gateway controller or cloud platform layer to provide data support for cloud-based decision-making and local anomaly detection. The solenoid valve or water pump drive module is used to drive the irrigation network and actuator according to the device control signal sent by the edge gateway layer, complete the valve opening and closing, the opening degree adjustment, and feed back the operating status to the edge gateway layer.
[0016] Secondly, the present invention provides a method for self-execution and data synchronization of an irrigation control system based on edge caching, comprising: The cloud platform layer, based on the acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records, uses a preset crop growth model to generate a structured irrigation decision instruction set, which is then sent to the edge gateway layer. After receiving the irrigation decision instruction set, the edge gateway layer immediately executes the current pending task through the field device layer and caches all subsequent tasks locally. During task execution, the network status is monitored in real time. If the network is connected, the irrigation decision instruction set issued by the cloud platform layer is continuously received or synchronized until the queue to be synchronized is marked as empty, and then the system sleeps until the next detection cycle. If the network is offline, the edge gateway layer switches to the autonomous mode of disconnection and automatically triggers full-process data synchronization after the network is detected to be restored.
[0017] Furthermore, during the task execution process, the network status is monitored in real time. If the network is connected, it continuously receives or synchronizes irrigation decision instruction sets issued by the cloud platform layer until the synchronization queue is marked as empty, then it sleeps until the next detection cycle. If the network is offline, the edge gateway layer switches to a network-disconnected autonomous mode, and automatically triggers full-process data synchronization after detecting network recovery, including: ① The edge gateway layer uses a heartbeat mechanism to detect the network status in real time and periodically sends heartbeat packets to the cloud platform layer; ② Determine whether a valid heartbeat response has been received from the cloud platform layer. If yes, determine that the network is connected and proceed to step ③; otherwise, proceed to step ④. ③ Pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer, and overwrite and update the local edge cache until the queue to be synchronized is marked as empty, then sleep until the next detection cycle; ④ Start the reconnection retry and fault tolerance timer. When a valid heartbeat response is not received from the cloud platform layer for a preset number of consecutive times, it is determined that the network is offline and the edge gateway layer is switched to the network disconnection autonomous mode. ⑤ During the autonomous mode of network outage, continuously attempt to reconnect to the network, and after receiving a valid heartbeat response from the cloud platform layer a preset number of times, determine that the network has recovered, switch the edge gateway layer to online mode, automatically trigger full-process data synchronization, and pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer after synchronization, until the queue to be synchronized is marked as empty.
[0018] The present invention has the following advantages due to the adoption of the above technical solutions: 1. Ensure irrigation continuity: When the network is offline, the edge gateway layer autonomously executes irrigation tasks based on the irrigation instruction set of the cloud platform layer cached locally, completely solving the irrigation interruption problem caused by network issues; it supports power outage resume operation and network anti-jitter, greatly improving the stability of system operation.
[0019] 2. Retain the advantages of dynamic decision-making: The edge gateway layer caches the real-time dynamic irrigation strategy generated by the cloud platform layer in combination with meteorological and soil moisture conditions. Unlike traditional fixed timed equipment, it can flexibly adapt to environmental changes and improve the rationality of irrigation.
[0020] 3. Achieve seamless data synchronization: After connecting to the network, it automatically completes log uploading, data verification, task matching and status fusion, and fully retains offline execution data to prevent data loss; it automatically generates compensation plans for irrigation volume deviations to improve irrigation accuracy.
[0021] 4. Reduced operation and maintenance costs: The entire process is automated, eliminating the need for maintenance personnel to restart, reconcile accounts, or reset parameters on-site; a multi-level alarm mechanism quickly locates faults, reducing the workload of manual inspections.
[0022] 5. Comprehensive coverage of abnormal scenarios: Dedicated handling logic is designed for common on-site anomalies such as network interruptions, device power failures, cache corruption, task conflicts, and device malfunctions, providing strong fault tolerance.
[0023] 6. High scalability: The overall architecture does not require major changes. Only the actuators and business strategy models need to be replaced to apply it to other agricultural automation scenarios such as agricultural fertilization, park ventilation, and greenhouse environmental control.
[0024] 7. Data security and reliability: The log package adopts an encryption + verification mechanism to effectively prevent data tampering during transmission and meet the requirements for data traceability and supervision in agricultural IoT.
[0025] Therefore, this invention can be widely applied in the fields of agricultural and garden irrigation automation and Internet of Things technology, and can be extended to agricultural automation scenarios such as integrated water and fertilizer management, park ventilation, and environmental control. Attached Figure Description
[0026] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. In the drawings: Figure 1 This is a schematic diagram of the overall architecture of the irrigation control system based on edge caching provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the overall irrigation control process based on edge caching provided in an embodiment of the present invention; Figure 3 This is a timing flowchart of autonomous execution when the network is disconnected and data synchronization when the network is connected, provided in this embodiment of the invention. Figure 4 This is a flowchart of the network status detection and mode switching logic provided in this embodiment of the invention. Detailed Implementation
[0027] 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, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.
[0028] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0029] In some embodiments of the present invention, an irrigation control system based on edge caching and its method for self-execution and data synchronization after network outage are provided, which can solve the following problems: 1. Solve the problem of frequent network outages causing irrigation task interruptions and affecting normal crop growth; 2. This addresses the problem that traditional local timed irrigation strategies cannot be dynamically adjusted based on weather and soil moisture conditions, resulting in poor adaptability of irrigation strategies; 3. Resolve issues such as data inconsistency between local and cloud data, data loss, and reliance on manual reconciliation after network outages; 4. Resolve the issue of the lack of automatic handling mechanisms for abnormal scenarios such as irrigation volume deviation, equipment failure, network interruption, and power outage restart.
[0030] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.
[0031] Example 1 like Figure 1 As shown, this embodiment provides an irrigation control system based on edge caching, which adopts a three-tier architecture: field device layer - edge gateway layer - cloud platform layer. Specifically, it includes: The cloud platform layer is configured to generate a structured irrigation decision instruction set based on the acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records and a preset crop growth model. It is also responsible for issuing irrigation tasks, parsing offline logs, merging status, compensating for irrigation deviations, generating new plans, and pushing abnormal alarms. The edge gateway layer contains at least one edge gateway. Each edge gateway is configured to output device control signals based on the irrigation decision instruction set and is responsible for network outage autonomy, power outage resumption, data verification, and local audible and visual alarms until the queue to be synchronized is marked as empty. The field equipment layer is configured to collect meteorological data, field environmental data, and irrigation operation data in real time, providing data support for cloud platform layer and edge gateway layer to make cloud decisions and judge local anomalies. At the same time, it executes irrigation tasks according to the equipment control signals output by the edge gateway layer.
[0032] Furthermore, the cloud platform layer and the edge gateway layer communicate through a network communication layer, which supports multiple communication types such as 4G / 5G / NB-IoT / LoRa / WiFi. Specifically, for the transmission of meteorological and environmental data collected by the field equipment layer, data can be directly uploaded to the cloud platform layer when online, and uploaded to the edge gateway layer when offline. The edge gateway layer then synchronizes the data to the cloud platform layer after the network is restored. Irrigation operation data (such as pump pressure, pump flow, grid voltage and current) is uploaded to the cloud platform layer via LoRa / WiFi / 485 communication modes.
[0033] Furthermore, the cloud platform layer includes a remote monitoring terminal (Web / App), a strategy generation and rule module, a data storage and analysis engine, and a device access server cluster. The remote monitoring terminal (Web / App) provides a visual human-computer interaction interface for different users, such as farmers, park administrators, and maintenance personnel, facilitating modifications to irrigation tasks and parameters, and displaying irrigation task information, on-site equipment perception information, and fault alarm information. The strategy generation and rule module generates a structured irrigation decision instruction set based on received meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records and a preset crop growth model. Based on preset rules, it revises the irrigation strategy after network recovery, incorporating actual irrigation execution data from the offline period, and outputs the updated irrigation task to the edge gateway layer. The data storage and analysis engine uses a hybrid storage architecture of time-series and relational databases to store and analyze all data. The device access server cluster serves as a communication relay hub between the cloud platform layer and the edge gateway layer, enabling network communication between the two.
[0034] Preferably, the remote monitoring terminal Web / App includes a user permission management submodule, an irrigation instruction and parameter modification submodule, an alarm information receiving submodule, and a visualization display submodule. The user permission management submodule assigns corresponding management operation permissions to different users, enabling multi-role hierarchical permission management and switching between grouped views for multiple planting plots and gateways. The irrigation instruction and parameter modification submodule receives irrigation instructions and irrigation parameter modification information, enabling different users to temporarily issue irrigation instructions, batch modify irrigation parameters, customize irrigation compensation thresholds, and export irrigation reports. The alarm information receiving submodule receives remote fault alarm information pushes (SMS / in-site messages / APP push) for equipment offline, task execution failure, water volume deviation, cache anomalies, and synchronization anomalies. The visualization display submodule provides real-time display of irrigation task information, on-site equipment perception information, and fault alarm information. On-site equipment perception information includes the online status of all edge gateways, valve operating status, soil moisture / flow / water pressure, and other on-site perception information. Irrigation task information includes online irrigation, offline self-execution full historical logs, irrigation water volume statistics, and fault alarm records.
[0035] Preferably, the strategy generation and rule module includes an external data interface submodule, an instruction set generation submodule, a rule base submodule, an irrigation strategy correction submodule, a custom submodule, and an extension submodule. The external data interface submodule interfaces with external data, including external meteorological APIs, crop growth databases, soil moisture threshold models, meteorological data, on-site environmental data, and irrigation operation data, as well as other on-site equipment sensing information. The instruction set generation submodule automatically generates structured irrigation task instruction sets for the next 12-72 hours based on the externally interfaced data, according to a preset cycle. The rule base submodule stores and manages preset water volume deviation compensation rules, overdue re-irrigation rules, multi-device task conflict verification rules, and fault classification handling rules. The irrigation strategy correction submodule, after network synchronization is restored, combines actual irrigation execution data from the offline period with the corresponding rules in the rule base submodule to correct the irrigation strategy and output an updated version of the irrigation task, which is then sent to the edge gateway layer. The custom submodule supports manual customization of irrigation duration, irrigation volume, and rotation irrigation priority. The extension submodule supports the generation logic of control strategies for multiple scenarios such as water-fertilizer ratio and greenhouse ventilation.
[0036] Preferably, the data storage and analysis engine includes a data storage submodule, a data preprocessing submodule, and a multi-dimensional data analysis submodule. The data storage submodule employs a hybrid storage architecture combining time-series and relational databases to persistently store raw meteorological data, soil temperature and humidity data, gateway cached task plans, offline / online execution logs, equipment fault codes, synchronization verification records, alarm events, etc., and provides historical irrigation sample data support for the strategy generation and rule module, retaining end-to-end data to meet the needs of agricultural irrigation data traceability and supervision. The data preprocessing submodule provides data cleaning, deduplication, and aggregation functions, and integrates local offline logs with cloud-based task plans based on a globally unique task_id. The multi-dimensional data analysis submodule provides multi-dimensional data analysis functions, including plot water consumption statistics, irrigation efficiency analysis, network offline frequency statistics, and equipment failure rate statistics.
[0037] Preferably, the device access server cluster includes a multi-protocol device access submodule, a network status maintenance submodule, a data transceiver submodule, and a multi-load management submodule. The multi-protocol device access submodule provides access functionality for 4G / 5G / NB-IoT / LoRa multi-protocol devices; the network status maintenance submodule maintains the heartbeat connections and online status tables of all gateway devices, sends and receives network heartbeat packets in batches, and performs offline / online determination; the data transceiver submodule receives encrypted synchronization log packets uploaded from the edge gateway layer and forwards them to the data storage and analysis engine, while simultaneously distributing irrigation task instruction sets generated by the cloud platform layer; the multi-load management submodule implements device access authentication, log MD5 verification, transmission encryption and decryption, concurrent connection load balancing, and handles massive concurrent synchronization requests from multiple gateway clusters, isolating data from different devices to avoid task ID conflicts, and possesses capabilities for disconnection reconnection, message retransmission, and abnormal communication interception.
[0038] Furthermore, the edge gateway layer, as the core of local task execution and data relay, is equipped with a network status monitoring module, a running mode switching engine, a data caching and synchronization module, a local cache and time series library, a fault detection module, a communication reconnection module, and an edge gateway controller. The network status monitoring module uses a heartbeat mechanism to monitor the network communication status between the cloud platform layer and the edge control layer in real time, and sends the network status monitoring results to the edge gateway controller. The communication reconnection module continuously attempts to reconnect when the network is offline and sends the reconnection results to the edge gateway controller. The edge gateway controller determines whether the network is offline based on the network status monitoring results. When the network is determined to be offline, the operating mode switching engine switches the working mode to the offline autonomous mode, stops requesting new tasks from the cloud platform layer, and enables the data caching and synchronization module, local cache and time series library to achieve local cache task scheduling. At the same time, the reconnection result determines whether the network is online. When the network is determined to be restored, the operating mode switching engine switches the working mode to the online mode and automatically triggers full-process data synchronization. The fault detection module detects the status of the equipment in the field equipment layer and uploads the fault alarm information to the edge gateway controller. The data caching and synchronization module receives the irrigation task instruction set issued by the cloud platform layer and saves it to the local cache and time series library.
[0039] Preferably, the fault detection module includes a real-time polling submodule, a fault identification submodule, a fault coding and classification submodule, and a fault information uploading submodule. The real-time polling submodule polls the operating status of the field sensing equipment in real time, including valve actuators, various sensing sensors, local storage, communication modules, and power supply units. The fault identification submodule identifies various faults and anomalies based on the operating status of the field sensing equipment, such as valve jamming, sensor failure, cache corruption, power supply abnormalities, communication hardware failures, excessive irrigation water volume deviations, and task scheduling conflicts. The fault coding and classification submodule assigns standardized fault codes to various faults and classifies them, synchronously writing them to the local cache log after a fault occurs. Minor faults trigger local audible and visual alarms, while severe faults automatically terminate the current irrigation operation. The fault information uploading submodule uploads the fault codes along with the execution logs to the cloud platform layer after network recovery, supporting cloud-based fault tracing, re-irrigation decisions, and maintenance alarm pushes.
[0040] Preferably, the local cache and timing library adopt a Flash / EEPROM non-volatile cache database.
[0041] Furthermore, the field equipment layer includes soil temperature and humidity sensors, flow sensors, water pressure sensors, a micro weather station, solenoid valve / pump drive modules, and irrigation pipe networks and actuators. Among these, the soil temperature and humidity sensors, flow sensors, and water pressure sensors are used to collect real-time field environmental and irrigation operation data; the micro weather station is equipped with several meteorological sensors for real-time meteorological data collection; field environmental data, meteorological data, and irrigation operation data are uploaded to the edge gateway controller or cloud platform layer, providing data support for cloud-based decision-making and local anomaly detection; the solenoid valve / pump drive module is used to drive the irrigation pipe network and actuators according to the equipment control signals sent by the edge gateway controller, completing valve opening and closing, opening degree adjustment, and feeding back the operating status to the edge gateway controller.
[0042] Example 2 like Figures 2-4 As shown, based on the edge-caching-based irrigation control system provided in Embodiment 1, this embodiment provides a method for self-execution and data synchronization of the edge-caching-based irrigation control system when the network is disconnected, including the following steps: 1) Based on the acquired meteorological data, on-site environmental data and irrigation operation data, the cloud platform layer combines historical irrigation records and uses a preset crop growth model to generate a set of structured irrigation decision instructions, which are then sent to the edge gateway layer through the network communication layer.
[0043] In this embodiment, the cloud platform layer generates a list of irrigation tasks within a range of 12h to 72h at a time and distributes it to the edge gateway layer in the form of a structured instruction set. The generation of the structured irrigation decision instruction set based on acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records and a preset crop growth model, is a technique well-known to those skilled in the art, and will not be elaborated upon in this invention.
[0044] 2) After receiving the irrigation decision instruction set, the edge gateway layer immediately executes the current pending task through the field device layer and caches all subsequent tasks locally.
[0045] In this embodiment, after receiving the irrigation decision instruction set from the cloud platform layer, the edge gateway layer immediately executes the current pending task and stores all subsequent tasks in the irrigation decision instruction set in the local cache and time series library. Each task is accompanied by complete attributes, used for CRC verification of the cached data to prevent data corruption.
[0046] 3) During task execution, the network status is monitored in real time. If the network is connected, the irrigation decision instruction set issued by the cloud platform layer will be continuously received or synchronized until the queue to be synchronized is marked as empty and then the system will sleep until the next detection cycle. If the network is offline, the edge gateway layer will switch to the autonomous mode of disconnection and automatically trigger full-process data synchronization after the network is detected to be restored.
[0047] Specifically, it includes the following steps: 3.1) The edge gateway layer uses a heartbeat mechanism to detect the network status in real time and periodically sends heartbeat packets to the cloud platform layer (e.g., at intervals of 10 to 60 seconds).
[0048] 3.2) Determine whether a valid heartbeat response has been received from the cloud platform layer. If yes, determine that the network is connected and proceed to step 3.3); otherwise, proceed to step 3.4). 3.3) Pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer, and overwrite and update the local edge cache until the queue to be synchronized is marked as empty, then sleep until the next detection cycle; 3.4) Start the reconnection retry and fault tolerance timer (e.g., it can be set to 10s~60s). When no valid heartbeat response is received from the cloud platform layer for a preset number of consecutive times (e.g. 2~10 times), it is determined that the network is offline and the edge gateway layer is switched to the network disconnection autonomous mode. The fault tolerance timer is used to implement network anti-jitter delay. For short-term network interruptions, the running mode is not switched repeatedly to avoid task disorder. 3.5) During the autonomous mode of network outage, continuously attempt to reconnect to the network. After receiving a valid heartbeat response from the cloud platform layer a preset number of times (e.g., 2 to 10 times), determine that the network has recovered, switch the edge gateway layer to online mode, automatically trigger full-process data synchronization, and pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer after synchronization until the queue to be synchronized is marked as empty.
[0049] Furthermore, in step 3.4) above, the autonomous mode without internet access includes the following steps: 3.4.1) Task scheduling: Instructions are sent to the irrigation valve actuators in sequence according to the time sequence and priority of the cached tasks; if multiple tasks overlap, they are scheduled according to the preset priority to avoid insufficient water pressure caused by multiple valves working at the same time.
[0050] 3.4.2) Execution Record: During task execution, the flow sensor and water pressure sensor collect irrigation operation data in real time; after the task is completed, the edge gateway layer generates a standardized execution log locally, recording the task ID, actual execution start and end time, operating status, valve feedback value, fault code, and local timestamp.
[0051] 3.4.3) Fault handling: If the task fails due to valve failure, abnormal water pressure, equipment power failure, etc., the edge gateway layer records the corresponding fault code, skips the current task and continues to execute subsequent tasks, and triggers local audible and visual alarms.
[0052] 3.4.4) Power outage resume operation: If the edge gateway layer loses power unexpectedly during the network outage, all cached tasks and logs are retained by non-volatile storage; after the device restarts, the unexecuted tasks are automatically loaded and the autonomous operation continues.
[0053] 3.4.5) Cache anomaly handling: The edge gateway layer periodically performs CRC checks on the local cached data. When cache corruption is detected, it enters a safe standby mode and immediately triggers a local audible and visual alarm.
[0054] Furthermore, in step 3.5 above, the end-to-end data synchronization includes the following steps: 3.5.1) Log Packaging and Encryption: The edge gateway layer packages all standardized execution logs during offline periods, adds an MD5 checksum and a device encryption signature to prevent data tampering, and then uploads them to the cloud platform layer; 3.5.2) Task Matching and Status Fusion: The cloud platform layer matches the original planned task based on the unique task ID and compares the planned parameters with the actual execution parameters. If the task is executed normally, the cloud platform will mark the task as "executed (offline self-execution)" and record data such as actual irrigation volume and running status. If there is a deviation in the irrigation amount, the cloud platform layer will automatically generate a water compensation irrigation plan based on the deviation value and incorporate it into subsequent tasks. If the task is not executed or fails to execute: the cause is determined by combining the fault code, a refill decision is triggered according to the overdue rules, and a remote alarm is pushed; 3.5.3) New plan generation and distribution: The cloud platform layer combines the actual execution data during the offline period, environmental perception data, and the comparison results of the plan parameters and the actual execution parameters to generate a brand-new subsequent irrigation plan, and redistributes it to the edge gateway layer to complete a new round of caching; 3.5.4) Local cache update: After receiving a new plan, the edge gateway layer clears the historical tasks that have been synchronized and completed locally, retains the unexecuted tasks, and updates the cache synchronization flag.
[0055] Specifically, if the cloud platform has already generated the latest irrigation plan during the offline phase, the cloud platform will prioritize distributing the latest irrigation plan when synchronizing with the network. Old tasks that have been executed in the local cache will be marked as archived, and expired old tasks that have not been executed will be directly invalidated to prevent duplicate irrigation.
[0056] Example 3 This embodiment uses a single-gateway field corn irrigation scenario as an example to further illustrate the present invention.
[0057] A contiguous cornfield deploys one edge gateway, which is linked to five irrigation solenoid valves and equipped with soil temperature and humidity sensors, flow sensors, and water pressure sensors. The cloud platform generates the irrigation plan for the next day twice a day, at 8:00 and 14:00, and sends it to the edge gateway layer. The edge gateway layer stores the irrigation tasks in its local non-volatile cache.
[0058] At 10:00 that day, the on-site wireless network was interrupted, and the edge gateway started heartbeat detection. After anti-shake delay, it did not receive a response from the cloud platform layer for 4 consecutive times, and determined that it was offline and entered the network-disconnected autonomous mode. At this time, a total of 6 irrigation tasks to be executed were cached locally for the day and the next day.
[0059] At 14:00 that day, the edge gateway started the corresponding valve to perform irrigation according to the cached task on time, and closed the valve after 30 minutes; the flow sensor collected data showing that due to the fluctuation of water pressure on site, the actual irrigation volume was 2m³ less than the planned value, and the gateway recorded this data and the operation log.
[0060] At 8:00 AM the following day, the edge gateway successfully executed the second cache irrigation task, and the execution status was marked as successful.
[0061] At 10:00 the next day, the network was automatically restored, and the gateway immediately packaged, encrypted, and uploaded the two execution logs from the offline period to the cloud platform layer.
[0062] After parsing the logs at the cloud platform layer, the planned and actual irrigation parameters are compared to identify a 2m³ water volume deviation. A compensation irrigation plan is automatically generated and added to subsequent tasks. At the same time, the latest complete irrigation plan is redistributed to the edge gateway.
[0063] Operations and maintenance personnel can view complete online and offline execution records, sensor data, and compensation plans on the cloud platform, with complete and traceable data.
[0064] Supplementary test: During the network outage, the power supply to the gateway was manually disconnected. After restarting, the edge gateway layer automatically loaded the unexecuted tasks and completed irrigation normally.
[0065] Example 4 This embodiment uses a scenario of multi-gateway cluster collaboration and synchronization conflict handling as an example to further illustrate the present invention.
[0066] In this embodiment, multiple edge gateways are deployed within a large planting area, sharing a single cloud-based decision and strategy database.
[0067] Each edge gateway independently executes heartbeat detection, local caching, and autonomous logic during network outages. After the network is restored, the cloud platform layer processes the synchronization requests of each edge gateway based on the device's unique ID and device group ID. The edge gateways do not interfere with each other and there are no synchronization conflicts.
[0068] If the same task is executed repeatedly by two edge gateways due to manual configuration errors, the cloud platform layer identifies the duplicate tasks through a globally unique task_id, automatically removes duplicates, and pushes a remote alarm to the management end to remind operations and maintenance personnel to investigate configuration problems.
[0069] If the cache of a certain edge gateway is corrupted or the task fails to execute, the cloud platform layer receives the fault code, accurately locates the faulty device and the fault type, and pushes alarm information in a tiered manner.
[0070] Example 5 This embodiment takes the integrated water and fertilizer control scenario in a park as an example to further introduce the extended application of the present invention in agricultural automation scenarios such as integrated water and fertilizer control, park ventilation, and environmental regulation.
[0071] This invention was applied to an integrated water and fertilizer system in orchards, replacing the irrigation valve actuator with a water and fertilizer mixing actuator, and replacing the crop growth model in the cloud platform layer with a water and fertilizer ratio decision model. When the network is offline, the edge gateway layer still executes the cached water and fertilizer tasks autonomously; after reconnecting to the network, it automatically synchronizes the water and fertilizer execution data and corrects ratio deviations, verifying that this invention has cross-scenario scalability.
[0072] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An irrigation control system based on edge caching, characterized in that, include: The cloud platform layer is configured to generate a structured irrigation decision instruction set based on the acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records and a preset crop growth model. It is also responsible for issuing irrigation tasks, parsing offline logs, merging status, compensating for irrigation deviations, generating new plans, and pushing abnormal alarms. The edge gateway layer includes at least one edge gateway, which is configured to output device control signals based on the irrigation decision instruction set and is responsible for network outage autonomy, power outage resumption, data verification, and local audible and visual alarms until the queue to be synchronized is marked as empty. The field equipment layer is configured to collect meteorological data, field environmental data and irrigation operation data in real time, providing data support for cloud platform layer and edge gateway layer cloud decision-making and local anomaly judgment, and executing irrigation tasks according to the equipment control signals output by the edge gateway layer. The edge gateway layer is equipped with a network status monitoring module, an operating mode switching engine, a data caching and synchronization module, a local cache and time series library, a fault detection module, a communication reconnection module, and an edge gateway controller. The network status monitoring module is used to monitor the network communication status between the cloud platform layer and the edge control layer in real time using a heartbeat mechanism, and sends the network status monitoring results to the edge gateway controller. The communication reconnection module is used to continuously attempt reconnection when the network is offline, and send the reconnection result to the edge gateway controller; The edge gateway controller determines whether the network is offline based on the network status monitoring results. When the network is determined to be offline, the working mode is switched to the autonomous mode of network disconnection through the operation mode switching engine, the request for new tasks from the cloud platform layer is stopped, and the data caching and synchronization module, local cache and time series library are enabled to realize local cache task scheduling. The edge gateway controller also determines the network connection based on the reconnection result. When the network is determined to be restored, the working mode is switched to online mode through the operating mode switching engine, and the full-process data synchronization is automatically triggered. The end-to-end data synchronization includes: log packaging and encrypted uploading, task matching and status fusion, new plan generation and distribution, and local cache update; The aforementioned log packaging and encrypted upload refers to the edge gateway layer packaging all standardized execution logs during offline periods, attaching an MD5 checksum and a device encrypted signature, and then uploading them to the cloud platform layer. The task matching and status fusion refers to the cloud platform layer matching the original irrigation task based on the unique ID of the irrigation task. If the task is executed normally, the cloud platform layer marks the original irrigation task and records the actual irrigation volume and operation status data. If there is a deviation in the irrigation volume, the cloud platform layer automatically generates a water compensation irrigation plan based on the deviation value and incorporates it into subsequent irrigation tasks. If the task is not executed or fails to execute, the cause is determined by combining the fault code, a supplementary irrigation decision instruction is triggered according to the preset overdue rules, and a remote alarm is pushed. The generation and distribution of the new plan refers to the cloud platform layer combining the actual execution data during the offline period, the on-site environmental data, and the comparison results between the plan parameters and the actual execution parameters to generate a brand-new subsequent irrigation plan, and re-distributing the latest irrigation decision instructions to the edge gateway layer to complete a new round of caching; The local cache update refers to the process by which the edge gateway layer, after receiving the latest irrigation decision instruction, clears the historical tasks that have been synchronized and completed locally, retains the unexecuted tasks, and updates the cache synchronization flag.
2. The irrigation control system based on edge caching as described in claim 1, characterized in that, The cloud platform layer includes a remote monitoring terminal (Web or App), a strategy generation and rule module, a data storage and analysis engine, and a device access server cluster. The remote monitoring terminal (Web or App) is used to provide a visual human-computer interaction interface for different users, making it convenient for different users to modify irrigation tasks and parameters, and to display irrigation task information, on-site equipment perception information and fault alarm information. The strategy generation and rule module is used to generate a structured irrigation decision instruction set based on the received meteorological data, on-site environmental data and irrigation operation data, combined with historical irrigation records and a preset crop growth model. According to preset rules, after the network is restored, the irrigation strategy is modified based on the actual irrigation execution data during the offline period, and the updated version of the irrigation task is output to the edge gateway layer. The data storage and analysis engine uses a hybrid storage architecture combining time-series and relational databases to store and analyze all data. The device access server cluster serves as a communication relay hub between the cloud platform layer and the edge gateway layer, enabling network communication between the two.
3. The irrigation control system based on edge caching as described in claim 2, characterized in that, The remote monitoring terminal (Web or App) is equipped with a user permission management submodule, an irrigation instruction and parameter modification submodule, an alarm information receiving submodule, and a visualization display submodule. The user permission management submodule is used to assign corresponding management operation permissions to different users, so as to realize the hierarchical management of multi-role permissions, and the switching of group views of multiple planting plots and multiple gateways; The irrigation instruction and parameter modification submodule is used to receive irrigation instructions and irrigation parameter modification information to enable different users to temporarily issue irrigation instructions, batch modify irrigation parameters, customize irrigation compensation thresholds, and export irrigation reports. The alarm information receiving submodule is used to receive remote fault alarm information, including equipment offline, task execution failure, water volume deviation, cache abnormality, and synchronization abnormality. The visualization display submodule is used to display irrigation task information, on-site equipment perception information, and fault alarm information in real time.
4. The irrigation control system based on edge buffering as described in claim 2, characterized in that, The strategy generation and rule module includes an external data interface submodule, an instruction set generation submodule, a rule base submodule, an irrigation strategy correction submodule, a custom submodule, and an extension submodule. The external data interface submodule is used to interface with external data, including external meteorological APIs, crop growth databases, soil moisture threshold models, and field equipment sensing information. The instruction set generation submodule is used to automatically generate a structured irrigation task instruction set for a future preset time period based on external interface data and according to a preset cycle. The rule library submodule is used to store and manage preset water volume deviation compensation rules, overdue re-irrigation rules, multi-device task conflict verification rules, and fault classification and handling rules. The irrigation strategy correction submodule is used to correct the irrigation strategy by combining the actual irrigation execution data during the offline period and the corresponding rules in the rule base submodule after the network is restored and synchronized, and output the updated irrigation task to the edge gateway layer. The custom submodule is used to support manual customization of irrigation duration, irrigation water volume, and rotation irrigation priority; The extended submodule is used to support the generation logic of multi-scenario control strategies.
5. The irrigation control system based on edge buffering as described in claim 2, characterized in that, The data storage and analysis engine is equipped with a data storage submodule, a data preprocessing submodule, and a multi-dimensional data analysis submodule. The data storage submodule is used to persistently store raw meteorological data, soil temperature and humidity data, gateway cache task plans, offline or online execution logs, equipment fault codes, synchronization verification records, alarm events, and provide historical irrigation sample data support for the strategy generation and rule module, retaining full-link data to meet the needs of agricultural irrigation data traceability and supervision. The data preprocessing submodule is used to provide data cleaning, deduplication, and aggregation functions, and to complete the association and fusion of local offline logs and cloud-based scheduled tasks based on the globally unique task_id; The multi-dimensional data analysis submodule is used to provide multi-dimensional data analysis functions, including at least one of the following: plot water consumption statistics, irrigation efficiency analysis, network offline frequency statistics, and equipment failure rate statistics.
6. The irrigation control system based on edge caching as described in claim 1, characterized in that, The fault detection module includes a real-time polling submodule, a fault identification submodule, a fault coding and classification submodule, and a fault information uploading submodule. The real-time polling submodule is used to poll the operating status of field sensing equipment in real time, including the operating status of valve actuators, various sensing sensors, local storage, communication modules, and power supply units. The fault identification submodule is used to identify various faults and anomalies based on the operating status of the field sensing equipment, including at least one of the following: valve jamming, sensor failure, buffer damage, power supply abnormality, communication hardware failure, excessive irrigation water volume deviation, and task scheduling conflict. The fault coding and classification submodule is used to uniformly assign standardized fault codes and classify various faults and anomalies. After a fault occurs, it is synchronously written to the local cache log. Minor faults trigger local audible and visual alarms, and serious faults automatically terminate the current irrigation operation. The fault information uploading submodule is used to upload the fault code along with the local cache log to the cloud platform layer after the network is restored, supporting cloud-based fault tracing, refueling decisions, and operation and maintenance alarm push.
7. The irrigation control system based on edge buffering as described in claim 1, characterized in that, The field equipment layer includes soil temperature and humidity sensors, flow sensors, water pressure sensors, micro weather stations, solenoid valves or water pump drive modules, and irrigation pipe networks and actuators. The soil temperature and humidity sensor, flow sensor, and water pressure sensor are used to collect real-time data on the field environment and irrigation operation. The micro weather station is equipped with several weather sensors for real-time collection of weather data; The on-site environmental data, meteorological data, and irrigation operation data are uploaded to the edge gateway controller or cloud platform layer to provide data support for cloud-based decision-making and local anomaly detection. The solenoid valve or water pump drive module is used to drive the irrigation network and actuator according to the device control signal sent by the edge gateway layer, complete the valve opening and closing, the opening degree adjustment, and feed back the operating status to the edge gateway layer.
8. A method for self-execution of network outage and data synchronization of an irrigation control system based on edge caching as described in any one of claims 1 to 7, characterized in that, include: The cloud platform layer, based on the acquired meteorological data, on-site environmental data, and irrigation operation data, combined with historical irrigation records, uses a preset crop growth model to generate a structured irrigation decision instruction set, which is then sent to the edge gateway layer. After receiving the irrigation decision instruction set, the edge gateway layer immediately executes the current pending task through the field device layer and caches all subsequent tasks locally. During task execution, the network status is monitored in real time. If the network is connected, the irrigation decision instruction set issued by the cloud platform layer is continuously received or synchronized until the queue to be synchronized is marked as empty, and then the system sleeps until the next detection cycle. If the network is offline, the edge gateway layer switches to the autonomous mode of disconnection and automatically triggers full-process data synchronization after the network is detected to be restored.
9. The method for self-execution and data synchronization in an irrigation control system based on edge caching as described in claim 8, characterized in that, During the execution of the task, the network status is monitored in real time. If the network is connected, the irrigation decision instruction set issued by the cloud platform is continuously received or synchronized until the queue to be synchronized is marked as empty, and then the system goes into hibernation until the next detection cycle. If the network is offline, the edge gateway layer switches to autonomous mode and automatically triggers full-process data synchronization upon detecting network recovery, including: ① The edge gateway layer uses a heartbeat mechanism to detect the network status in real time and periodically sends heartbeat packets to the cloud platform layer; ② Determine whether a valid heartbeat response has been received from the cloud platform layer. If yes, determine that the network is connected and proceed to step ③; otherwise, proceed to step ④. ③ Pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer, and overwrite and update the local edge cache until the queue to be synchronized is marked as empty, then sleep until the next detection cycle; ④ Start the reconnection retry and fault tolerance timer. When a valid heartbeat response is not received from the cloud platform layer for a preset number of consecutive times, it is determined that the network is offline and the edge gateway layer is switched to the network disconnection autonomous mode. ⑤ During the autonomous mode of network outage, continuously attempt to reconnect to the network, and after receiving a valid heartbeat response from the cloud platform layer a preset number of times, determine that the network has recovered, switch the edge gateway layer to online mode, automatically trigger full-process data synchronization, and pull or synchronize the latest irrigation decision instruction set issued by the cloud platform layer after synchronization, until the queue to be synchronized is marked as empty.