Underground water over-mining early warning system and underground water level monitoring method
By using a groundwater level monitoring method and early warning system with stratified environmental factor collection and dynamic weighting, the problem of misjudgment caused by the lack of regular data has been solved, enabling accurate early warning of groundwater over-extraction, reducing resource waste, and improving the reliability of water resource management.
Patent Information
- Application Number
- CN202511719390.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-01-16
AI Technical Summary
Existing groundwater level monitoring methods and over-extraction early warning systems cannot distinguish between equipment malfunctions and sudden drops in water levels when faced with a lack of regular data, leading to misjudgments and resource waste, and affecting water resource management decisions.
An environment-missing causal modeling module is used to collect hierarchical environmental factors and assign dynamic weights. A three-dimensional data packet and missing prediction signal are transmitted through a LoRa module. Combined with multi-factor reverse verification and predictive scheduling linkage at the system end, bidirectional collaboration between the monitoring end and the system end is achieved to optimize the prediction of missing data.
Accurately distinguish between equipment malfunctions and pattern gaps, reduce misjudgments, decrease resource waste, and improve the accuracy and practicality of water resource management.
Smart Images

Figure CN121354293A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hydrological and water resources monitoring technology, specifically to a groundwater over-extraction early warning system and a groundwater level monitoring method. Background Technology
[0002] With the continuous growth of societal demand for water resources, problems such as land subsidence and ecological degradation caused by groundwater over-extraction are becoming increasingly prominent. Groundwater level monitoring methods and groundwater over-extraction early warning systems have become a core technological combination for protecting groundwater resources. Groundwater level monitoring methods use pressure sensors, float-type water level gauges, and other equipment to collect groundwater level data at preset frequencies. This data is then transmitted unidirectionally to the groundwater over-extraction early warning system via wireless communication modules such as LoRa and NB-IoT. The system receives this data and compares it with preset water level thresholds. If over-extraction is detected, an over-extraction warning is triggered; otherwise, an equipment malfunction warning is triggered. The two operate in a unidirectional cooperative mode: the monitoring method transmits data, and the system uses the data.
[0003] However, existing technological systems suffer from a common core flaw: the systems and methods rely solely on one-way data transmission, completely neglecting to establish a linkage mechanism for the "regular data loss" prevalent in real-world scenarios. This flaw further manifests as insufficient coordination between the methodological and system-level aspects, ultimately leading to practical application problems. Specifically, on the methodological side, existing groundwater level monitoring methods focus only on improving data acquisition accuracy and preventing equipment failures, failing to statistically analyze recurring regular data loss patterns in historical data (such as data loss in remote mountainous areas due to base station power supply limitations from 2-4 AM daily, and data loss in farmland irrigation seasons due to peak regional electricity consumption from 12-2 PM daily). Furthermore, they fail to provide advance warning signals to the early warning system indicating an impending data loss window, leaving the system unable to ascertain the cause and duration of data loss and passively receiving data disconnection results. On the system side, existing groundwater over-extraction early warning systems, lacking both methodological loss warnings and redundant early warning logic designed for regular data loss, assume all data loss is equivalent to "equipment failure" or "sudden drop in water level (over-extraction)," thus triggering misjudgments.
[0004] The consequences of the aforementioned lack of coordination are significant: on the one hand, when the system misjudges a regularity of a lack of water as an equipment failure, technicians need to travel tens to hundreds of kilometers to investigate, only to find that there is no actual equipment failure, resulting in a huge waste of human and material resources; on the other hand, when the system misjudges a regularity of a lack of water as a sudden drop in water level and over-extraction, it will send false over-extraction warnings, interfere with water resource management decisions, and even lead to the activation of unnecessary extraction restriction measures, affecting normal production and domestic water use.
[0005] In summary, the existing one-way coordination model between groundwater level monitoring methods and groundwater over-extraction early warning systems cannot solve the problem of regular data gaps in real-world scenarios, and is insufficient to meet the needs of accurate and efficient hydrological monitoring. There is an urgent need to optimize the linkage logic between the two to overcome the dilemma of "data gaps leading to misjudgments and resource waste." Therefore, this application aims to provide a groundwater over-extraction early warning system and a groundwater level monitoring method to overcome the aforementioned core deficiencies. Summary of the Invention
[0006] The purpose of this invention is to provide a groundwater over-extraction early warning system and a groundwater level monitoring method to solve the problems mentioned in the background art.
[0007] To address the aforementioned technical problems, the present invention provides a groundwater over-extraction early warning system, comprising a monitoring end and a system end. The monitoring end is equipped with a water level data acquisition unit and a wireless communication unit, while the system end is equipped with a data receiving unit and a threshold comparison early warning unit.
[0008] The monitoring terminal also integrates an environment-missing causal modeling module and a three-dimensional data packet transmission module. The environment-missing causal modeling module is controlled by a microcontroller and is used for hierarchical environmental factor collection, dynamic weight assignment, coupled model training, and missing probability prediction.
[0009] The three-dimensional data packet transmission module uses a LoRa module to transmit three-dimensional data packets containing water level values, stratified environmental factors, missing probability, and missing prediction signals.
[0010] The system also includes an environmental factor association library, a multi-factor reverse verification module, and a predictive scheduling linkage module. The environmental factor association library uses an SQLite3 database and is divided into a primary factor library and a secondary factor library to store the hierarchical environmental factors transmitted from the monitoring end.
[0011] The multi-factor reverse verification module is used to check the first-level factors and second-level factors in sequence when no data is received for a continuous preset time, and to perform anomaly fallback judgment.
[0012] The predictive scheduling and linkage module communicates with the water resources management platform via an RS485 interface;
[0013] The monitoring end and the system end achieve two-way collaboration through three-dimensional data packets and missing warning signals.
[0014] Furthermore, the hierarchical environmental factor collection of the environment-missing causal modeling module includes primary factor collection and secondary factor collection;
[0015] The primary factors include the real-time load value of the substation, the signal strength of the base station, the on / off status of the irrigation solenoid valve, and the real-time power load of the regional power grid. These are collected using current sensors, GSM modules, Hall sensors, and power sensors, respectively, with a collection frequency of 15 minutes per time.
[0016] Secondary factors include ambient temperature, wind speed, soil moisture, and ambient light, which are collected using temperature sensors, wind speed sensors, soil moisture sensors, and light sensors, respectively, at a frequency of 30 minutes per time.
[0017] The STM32 series microcontroller controls the acquisition frequency through timer interrupt configuration. Timer TIM2 is configured to interrupt every 15 minutes to trigger the acquisition of the first-level factor, and timer TIM3 is configured to interrupt every 30 minutes to trigger the acquisition of the second-level factor.
[0018] Furthermore, the verification logic of the multi-factor reverse validation module is as follows:
[0019] (1) Prioritize checking the first-level factor: Read the DeviceID of the monitoring point that did not receive data, retrieve the first-level factor value within ±5 minutes of the disconnection time, and confirm the corresponding threshold in combination with the seasonal weighting rules of synchronization. If the first-level factor value meets the threshold, proceed to the second-level check; otherwise, determine it as a device failure and trigger an alarm.
[0020] (2) Secondary factor verification: retrieve the secondary factor values within ±5 minutes of the disconnection time, and determine whether the secondary factor values meet the auxiliary conditions of the coupled model mapping table. If they do, the regularity is confirmed to be missing, and only a missing prompt is displayed on the system side without triggering a fault or over-collection warning.
[0021] (3) Abnormal fallback judgment: If the secondary factor does not meet the auxiliary conditions, retrieve the data of adjacent monitoring points in the same area. If the adjacent monitoring points are simultaneously disconnected, it is judged as an abnormal regional environment and an regional early warning is triggered. If the data of adjacent monitoring points are normal, it is judged as a single-point equipment failure and a maintenance instruction is sent.
[0022] Furthermore, the format of the regional missing forecast data pushed by the predictive scheduling linkage module is DeviceID, missing time period, key factor, and suggested measures. The key factor format is first-level factor threshold; second-level factor threshold; and suggested measures include intervention methods for key factors. The synchronization logic of the environmental factor association library is as follows: the system receives data from the monitoring end through the LoRa gateway, writes the first-level factor into the first-level factor library every 15 minutes, writes the second-level factor into the second-level factor library every 30 minutes, and synchronizes the seasonal weight rules of the monitoring end to the PLC register of the system end.
[0023] The groundwater level monitoring method includes the following steps: collecting groundwater level data through a monitoring terminal, transmitting it to the system terminal via a wireless communication module, comparing the water level data with a preset threshold and triggering a corresponding early warning, and also includes the following steps:
[0024] Step (1), Monitoring end execution environment - missing causal modeling: including hierarchical environmental factor collection, dynamic weight assignment, coupled model training and missing probability prediction;
[0025] Step (2): The monitoring end transmits three-dimensional data packets and missing prediction signals through the LoRa module. The three-dimensional data packets adopt a fixed 32-byte frame structure, including frame header, water level value, primary factor, secondary factor, missing probability, checksum and frame tail. The missing prediction signal is sent 10 minutes before the high-risk missing period, including the missing period and key factor threshold.
[0026] Step (3): After the missing period ends, the monitoring end performs model self-iterative calibration, calculates the deviation between the actual missing duration and the predicted missing duration, and adjusts the weights or corrects the missing probability mapping table of the coupled model according to the deviation.
[0027] Step (4): The system constructs an environmental factor association library, writes the first-level factors into the first-level factor library every 15 minutes, writes the second-level factors into the second-level factor library every 30 minutes, and monitors the seasonal weight rules at the monitoring end simultaneously.
[0028] Step (5): The system performs multi-factor reverse verification. If no data is received for 8 consecutive minutes, it first checks whether the primary factor meets the corresponding seasonal threshold, then checks whether the secondary factor meets the auxiliary conditions of the mapping table, and finally performs an anomaly fallback judgment.
[0029] Step (6): The system pushes regional missing forecasts and suggested measures to the water resources management platform through the predictive scheduling linkage module.
[0030] Furthermore, the specific process of collecting stratified environmental factors in step (1) is as follows:
[0031] The acquisition frequency is controlled by configuring the timer interrupt of the STM32 series microcontroller. The TIM_Period parameter of timer TIM2 is set to 36000-1, and the TIM_Period parameter of timer TIM3 is set to 72000-1. The timer TIM2 interrupt triggers the first-level factor acquisition function to acquire the real-time load value of the substation, the base station signal strength, the on / off status of the irrigation solenoid valve, and the real-time power load of the regional power grid. The timer TIM3 interrupt triggers the second-level factor acquisition function to acquire the ambient temperature, wind speed, soil moisture, and ambient light.
[0032] Furthermore, the dynamic weight assignment in step (1) adopts a simplified version of the Analytic Hierarchy Process (AHP), and the specific steps are as follows:
[0033] (1) Weighting basic rules are fixed: basic weights are preset in the Flash memory of the STM32 series microcontroller, with the total weight of the first-level factors being 70% and the total weight of the second-level factors being 30%;
[0034] (2) Seasonal judgment logic: The current month is read through the DS3231 real-time clock module. December to February of the following year is judged as winter, May to September is judged as irrigation season, and the remaining months are judged as non-special seasons;
[0035] (3) Dynamic weight adjustment: In winter, the weight of temperature or soil moisture in the secondary factors is adjusted to 25%, and the weight of the other secondary factor is adjusted to 5%; during the irrigation season, the weight of soil moisture or temperature in the secondary factors is adjusted to 25%, and the weight of the other secondary factor is adjusted to 5%; in non-special seasons, the basic weight remains unchanged, and the adjusted weights are stored in the microcontroller RAM.
[0036] Furthermore, the specific steps of model self-iterative calibration in step (3) are as follows:
[0037] (1) Deviation calculation: After the missing period ends, the actual missing duration (missing end time - missing start time) is read through the DS3231 real-time clock module, the predicted missing duration in the warning signal is retrieved, and the deviation is calculated as |actual missing duration - predicted missing duration| / predicted missing duration × 100%;
[0038] (2) Deviation handling: If the deviation is >8%, and the cause is confirmed to be insufficient weight of the secondary factor, the weight of the secondary factor will be increased by 5% in the next corresponding season, and the weight table in the microcontroller RAM and Flash will be updated; if the deviation is caused by inaccurate threshold of the primary factor, the missing probability corresponding to the threshold of the primary factor in the coupled model will be corrected, and the missing probability mapping table in Flash will be updated.
[0039] Compared with the prior art, the beneficial effects of the present invention are:
[0040] 1. The monitoring end uses the environment-missing causal modeling module to predict the probability of missing data, and then uses the three-dimensional data packet transmission module to send a missing prediction signal containing the missing time period and key factor thresholds 10 minutes in advance. This allows the system to know the cause and duration of the missing data in advance, avoiding the passive situation in the existing technology where the system assumes that the missing data is equivalent to equipment failure or over-collection due to unknown disconnection.
[0041] 2. The three-dimensional data packet adopts a fixed 32-byte frame structure, integrating multi-dimensional data such as water level value, primary factor, secondary factor, and missing probability. Combined with the system-side SQLite3 environment factor association library, it provides complete data support for multi-factor reverse validation, avoiding the problem of missing types that cannot be distinguished due to existing technologies relying solely on unidirectional water level data.
[0042] 3. When the system-side multi-factor reverse verification module does not receive data for 8 consecutive minutes, it accurately identifies the problem by following the logic of first-level factor verification → second-level factor verification → anomaly fallback judgment: if the first-level factor does not meet the threshold, it is judged as a device malfunction (triggers an alarm); if the second-level factor meets the auxiliary conditions, it is confirmed that there is a lack of regularity (only a prompt is displayed, and no warning is triggered). The fallback judgment distinguishes between regional anomalies and single-point failures—which avoids the waste of resources for technicians to go back and forth to troubleshoot due to misjudgment of the fault, and also prevents false over-extraction warnings from interfering with water resource management and control decisions and causing unnecessary extraction restrictions.
[0043] 4. The predictive scheduling and linkage module pushes regional missing forecasts, including DeviceID, missing time period, key factors, and suggested measures, to the water resources management platform via RS485 interface. This can guide targeted interventions and improve the accuracy and practicality of groundwater resource management.
[0044] 5. After the missing period ends, the monitoring terminal performs model self-iterative calibration and calculates the deviation between the actual and predicted missing duration (deviation = |actual duration - predicted duration| / predicted duration × 100%). If the deviation is greater than 8%, the weight of the secondary factor is dynamically adjusted or the threshold mapping table of the primary factor is corrected to continuously optimize the prediction accuracy. This avoids the problem that the prediction logic of the existing technology is fixed and the accuracy cannot be improved with use. Long-term use can further reduce the misjudgment rate and enhance the reliability of the system. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the groundwater over-extraction early warning system and groundwater level monitoring method of the present invention. Detailed Implementation
[0046] 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, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] Please see Figure 1 The present invention provides a technical solution:
[0048] See Figure 1 The following are examples of groundwater over-extraction early warning systems and groundwater level monitoring methods:
[0049] I. Groundwater Level Monitoring Methods:
[0050] (I) Environment-Missing Causal Modeling Module:
[0051] This module is integrated into the monitoring end and controlled by an STM32F103C8T6 microcontroller. Each sub-unit is implemented as follows:
[0052] ① Stratified collection of specific environmental factors:
[0053] The multi-source environmental acquisition unit consists of the following conventional sensors, which collect data at a frequency of 15 minutes / time for the first-level factor and 30 minutes / time for the second-level factor (implemented via a microcontroller timer interrupt; the code logic is shown below):
[0054] Acquisition frequency control logic:
[0055] 1 / / Timer interrupt configuration: 15-minute interrupt (first-level factor acquisition), 30-minute interrupt (second-level factor acquisition)
[0056] 2 voidTimer_Init(void){
[0057] 3 TIM_TimeBaseInitTypeDefTIM_TimeBaseStructure;
[0058] 4 TIM_TimeBaseStructure.TIM_Period=36000-1; / / 15 minutes (15×60×40=36000 10ms cycles)
[0059] 5 TIM_TimeBaseInit(TIM2,&TIM_TimeBaseStructure);
[0060] 6 TIM_ITConfig(TIM2,TIM_IT_Update,ENABLE); / / Enable 15-minute interruption (Level 1 data acquisition)
[0061] 7 TIM_TimeBaseStructure.TIM_Period=72000-1; / / 30 minutes
[0062] 8 TIM_TimeBaseInit(TIM3,&TIM_TimeBaseStructure);
[0063] 9 TIM_ITConfig(TIM3,TIM_IT_Update,ENABLE); / / Enable 30-minute interruption (secondary data acquisition)
[0064] 10}
[0065] 11 / / Interrupt service function: Triggers the acquisition of the corresponding factor
[0066] 12 void TIM2_IRQHandler(void){ / / 15 minutes: collect first-order factors
[0067] 13 if(TIM_GetITStatus(TIM2,TIM_IT_Update)!=RESET){
[0068] 14 Collect_Factor_Level1(); / / First-level factor collection function
[0069] 15 TIM_ClearITPendingBit(TIM2,TIM_IT_Update);
[0070] 16}
[0071] 17}
[0072] 18 void TIM3_IRQHandler(void){ / / 30 minutes: collect secondary factors
[0073] 19 if(TIM_GetITStatus(TIM3,TIM_IT_Update)!=RESET){
[0074] 20 Collect_Factor_Level2(); / / Secondary factor collection function
[0075] 21 TIM_ClearITPendingBit(TIM3,TIM_IT_Update);
[0076] twenty two}
[0077] twenty three}
[0078] Primary factor acquisition components:
[0079] Real-time load value (P) of substation: A current sensor (model ACS712-5A, converted to load value P=U×I, where U is 220V) is connected in series with the substation output line;
[0080] Base station signal strength (S): The signal strength is directly output using a GSM module (model SIM800C).
[0081] Irrigation solenoid valve on / off status (K): A Hall sensor (model A3144, output high level 1=on, low level 0=off) is used and installed on the solenoid valve power line;
[0082] Real-time power load of the regional power grid (L): A power sensor (model SCT-013-050, converted to L=U×I×cosφ, cosφ is taken as 0.85) is installed on the power grid line;
[0083] Secondary factor acquisition component:
[0084] Ambient temperature (T): A DS18B20 temperature sensor (range -55℃~125℃) is used and attached to the housing of the monitoring equipment;
[0085] Wind speed (V): An FC-37 wind speed sensor (range 0~30m / s) was used and installed on a 1.5m high bracket at the monitoring point;
[0086] Soil moisture (M): A YL-69 soil moisture sensor (range 0~100%) was used and inserted 10cm below the surface of the farmland.
[0087] Ambient light intensity (G): A BH1750 light sensor (range 0~65535 lux) is used and installed on the top of the monitoring equipment;
[0088] ② Dynamic weight assignment:
[0089] A simplified version of the Analytic Hierarchy Process (AHP) is implemented using an STM32 microcontroller, eliminating the need for complex chips. The specific steps are as follows:
[0090] Step 1: Solidify the basic weighting rules: Preset the basic weights in the microcontroller's Flash memory: 70% total weight for primary factors (35% for each type of primary factor, such as 35% for P and S in mountainous areas), and 30% total weight for secondary factors (15% for each type of secondary factor, such as 15% for T and V in mountainous areas).
[0091] Step 2: Season Determination Logic: Read the current month using the DS3231 real-time clock module to determine the season.
[0092] 1 uint8_tGet_Season(void){
[0093] 2 uint8_tmonth=DS3231_Read_Month(); / / Read the current month (1-12)
[0094] 3 if(month>=12||month<=2)return1; / / 1=Winter
[0095] 4 elseif(month>=5&&month<=9)return2; / / 2=irrigation season
[0096] 5 else return 3; / / 3 = non-special seasons
[0097] 6}
[0098] Step 3: Dynamic Weight Adjustment: Adjust the weights according to the seasonal output and store them in the microcontroller's RAM.
[0099] season First-level factor weights Secondary factor weights (T / V or M / G) Other secondary factor weights winter 70% 25% (T or M) 5% (V or G) Irrigation season 70% 25% (M or T) 5% (G or V) other 70% 15% 15%
[0100] ③ Coupled model training (data input format + mapping table generation):
[0101] Based on hierarchical factors and dynamic weights, the model is trained offline using a microcontroller (requires connection to a computer to import historical data; the model is then fixed after training). Specifically:
[0102] Step 1: Importing Historical Data: Importing nearly 6 months of data into the microcontroller using a USB-to-serial module (model CH340):
[0103] Data format: First-level factor value 1, weight 1, first-level factor value 2, weight 2, second-level factor value 1, weight 1, second-level factor value 2, weight 2, missing value marker (0 = no missing values / 1 = missing values), timestamp
[0104] Example (mountain winter): 0.25, 0.35, 88, 0.35, 3, 0.25, 2.1, 0.05, 1, 202509260200
[0105] Step 2: Model Training Logic: The microcontroller generates a "hierarchical factor threshold-missing probability mapping table" using the "threshold statistics method" (no complex algorithm required):
[0106] Iterate through historical data and count the percentage of missing occurrences when "P < X and T < Y" as the missing probability. Example:
[0107] P (kW) T(℃) Number of missing items / Total number of missing items Missing probability <0.3 <5 98 / 100 98% <0.3 5-10 65 / 100 65% ≥0.3 <5 30 / 100 30%
[0108] Step 3: Model solidification: Store the mapping table in the microcontroller's Flash memory, with an address range of 0x08008000-0x0800A000, for real-time prediction and retrieval.
[0109] ④ Generation of missing prediction probability:
[0110] During real-time calculation, the microcontroller performs weight compliance verification according to the following steps:
[0111] Step 1: Factor Contribution Calculation: Contribution = Real-time Factor Value × Corresponding Weight (Weight read from RAM), Example (Mountainous Area Winter):
[0112] The primary factor P = 0.25kW, with a weight of 0.35, has a contribution rate of 0.25 × 0.35 = 0.0875.
[0113] The first-level factor S = -88dBm (converted to a normalized value of 0.9, the stronger the signal, the larger the value), weight 0.35 → contribution = 0.9 × 0.35 = 0.315;
[0114] The total contribution of Level 1 = 0.0875 + 0.315 = 0.4025 (after normalization, it is ≥60%. Since the total weight of Level 1 is 0.7, 0.4025 / 0.7 = 57.5%? Correction here: Level 1 contribution meets the standard, which means "the actual value of the Level 1 factor meets the threshold of the mapping table", not the numerical contribution, to avoid ambiguity).
[0115] Step 2: Threshold matching and probability confirmation: Call the mapping table in Flash to match the missing probability corresponding to the current factor value. If the probability is ≥80% for 3 consecutive times (5 minutes apart each time), output a high level on the microcontroller's IO port (marked as "high-risk missing period") and trigger a warning signal at the same time.
[0116] (II) Three-dimensional data packet transmission (data frame structure + transmission protocol):
[0117] Transmission is performed using a LoRa module (SX1278) with a fixed data frame structure (to ensure system-side parseability), as follows:
[0118] Transmission frequency band: 470-510MHz;
[0119] Data frame format (32 bytes in total):
[0120] Frame header (2B) Water level (4B) First-order factor (8B) Secondary factor (8B) Missing probability (2B) Checksum (2B) Frame end (6B) 0xAA55 13.2 → 0x00003333 (Floating-point to hexadecimal) P=0.25→0x000000FA, S=-88→0xFFFFFFA8 T=3→0x00000003, V=2.1→0x000000D3 98%→0x0062 0x1234 (CRC16 checksum) 0x55AA00
[0121] Hierarchical factor labeling: Primary / secondary factors are in fixed positions in the data frame and are extracted by position during system parsing, without the need for additional labeling;
[0122] Warning signal trigger: 10 minutes before entering the high-risk period, the microcontroller controls the LoRa module to send a separate warning frame (frame header 0xAA56, total 16 bytes), which includes the missing time period (e.g. 02:00-04:00→0x02000400) and key factor thresholds.
[0123] (III) Model self-iterative calibration (bias calculation + weight adjustment):
[0124] After the missing period ends (microcontroller I / O port is low), the microcontroller automatically performs calibration:
[0125] Step 1: Deviation calculation: Actual missing duration = Missing end time - Missing start time (read from DS3231);
[0126] Predicted missing duration = duration in the forecast signal (e.g., 120 minutes);
[0127] Deviation = |Actual Duration - Predicted Duration| / Predicted Duration × 100%;
[0128] Step 2: Deviation Handling
[0129] If the deviation is greater than 8%, and the cause is found to be insufficient weight of the secondary factor T (e.g., if the actual temperature is 0℃, a T weight of 25% in the prediction still leads to deviation), then the T weight will be increased by 5% (not exceeding 30%) in the next winter, and the weight tables in RAM and Flash will be updated.
[0130] If the first-level factor threshold is inaccurate (e.g., P < 0.3kW, the actual missing probability is 98%, but it is 90% in the mapping table), then the probability corresponding to that threshold in the mapping table should be corrected to 98%.
[0131] II. Groundwater Over-extraction Early Warning System:
[0132] The system is built on an industrial PLC (S7-1200) and a touch screen (KTP700), and the modules are implemented as follows:
[0133] (I) Construction of an environmental factor association library:
[0134] Database type: SQLite3 (lightweight, accessible to PLC via Modbus protocol), divided into primary factor database and secondary factor database, with the following table structure:
[0135] Level 1 Factor Table:
[0136] field name type Example value DeviceID INT 1001 (Monitoring Point ID) P_Value FLOAT 0.25 S_Value INT -88 CollectTime DATETIME 2025-09-2602:00
[0137] Level 2 Factor Table:
[0138] field name type Example value DeviceID INT 1001 T_Value FLOAT 3.0 V_Value FLOAT 2.1 CollectTime DATETIME 2025-09-2602:00
[0139] Synchronization logic: The PLC receives data from the monitoring end through the LoRa gateway (model RAK811), writes the first-level factor into the Level1_Factor table every 15 minutes, and writes the second-level factor into the Level2_Factor table every 30 minutes. At the same time, it synchronizes the seasonal weight rules of the monitoring end (stored in PLC registers DB1.DBW0-DB1.DBW10).
[0140] (II) Multi-factor reverse validation screening:
[0141] When the PLC fails to receive data from a certain monitoring point for 8 consecutive minutes, the following hierarchical verification procedure is triggered:
[0142] 1. Prioritize checking primary factors:
[0143] Read the DeviceID of the monitoring point (e.g., 1001), and retrieve the first-level factor value for T0 ± 5 minutes from the Level1_Factor table (T0 is the disconnection time).
[0144] Invoke the synchronized seasonal weighting rules to confirm the first-level factor threshold corresponding to the current season (e.g., P < 0.3kW in mountainous winter).
[0145] If the primary factor value meets the threshold (e.g., P=0.25kW<0.3kW), then proceed to the secondary check; if it does not meet the threshold, it is determined to be a device malfunction, triggering the PLC output (controlling the alarm light to illuminate).
[0146] 2. Secondary factor verification:
[0147] Retrieve the secondary factor values for T0 ± 5 minutes from the Level2_Factor table, and calculate the deviation = |real-time value - threshold| / threshold × 100% (the threshold is synchronized from the mapping table).
[0148] If the deviation is ≤10% (e.g., T=3℃, threshold <5℃, deviation = (5-3) / 5×100%=40%? Correction: Secondary deviation refers to "whether the secondary factor meets the auxiliary conditions of the mapping table", such as T<5℃ is up to standard, no percentage calculation is required), then the regularity is confirmed to be missing, the PLC displays a missing prompt on the touch screen, and does not trigger fault / over-collection warning;
[0149] 3. Abnormal fallback determination:
[0150] If the secondary factor fails to meet the standard, data from adjacent monitoring points in the same area (such as DeviceID1002) will be retrieved. If the synchronous connection is lost, it will be determined that the regional environment is abnormal and an regional early warning will be triggered; if the adjacent points are normal, it will be determined that the single-point equipment is faulty and a maintenance command will be sent.
[0151] (III) Predictive scheduling and coordination:
[0152] Data push interface: The system-side PLC communicates with the water resources management platform (such as SCADA system) via RS485 interface to push regional missing forecasts. Data format: DeviceID, missing time period, key factors, recommended measures. Example: 1001, 02:00-04:00, P<0.3kW; T<5℃, install insulation sleeve;
[0153] Example of targeted intervention: In a mountainous area, frequent low temperatures during winter caused data loss. Based on forecast recommendations, technicians installed simple insulation covers. Data collected by PLC for one month after the installation showed that the duration of data loss decreased from 120 minutes / day to 72 minutes / day, a reduction of 40%.
[0154] Summarize:
[0155] To address the issue of misjudgments caused by the lack of regular data in existing groundwater monitoring and early warning systems, this paper proposes an environmental-missing causal modeling approach using an STM32 microcontroller at the monitoring end (including hierarchical factor acquisition, dynamic weight allocation, and missing probability prediction). A LoRa module is used to transmit 3D data packets and missing warning signals. Combined with a PLC at the system end, a factor association library and a multi-factor reverse verification mechanism are constructed, forming a two-way collaboration between the monitoring end and the system end. Simultaneously, the prediction accuracy is continuously optimized through model self-iterative calibration, ultimately resolving the problem of misjudgments due to missing data, reducing resource waste, and improving the reliability and practicality of groundwater over-extraction early warning.
Claims
1. A groundwater overexploitation early warning system, comprising a monitoring end and a system end, the monitoring end being provided with a water level data acquisition unit and a wireless communication unit, and the system end being provided with a data receiving unit and a threshold comparison and early warning unit, characterized in that: the monitoring end is further integrated with an environment-missing causal modeling module and a three-dimensional data packet transmission module, the environment-missing causal modeling module being controlled by a single-chip microcomputer and being used for hierarchical environment factor collection, dynamic weight assignment, coupled model training and missing probability prediction; the three-dimensional data packet transmission module adopts a LoRa module and is used for transmitting three-dimensional data packets containing water level values, hierarchical environment factors and missing probabilities, and a missing pre-warning signal; the system end is further provided with an environment factor correlation library, a multi-factor reverse verification module and a predictive scheduling linkage module, the environment factor correlation library adopts a SQLite3 database and is divided into a first factor library and a second factor library and is used for storing hierarchical environment factors transmitted by the monitoring end; the multi-factor reverse verification module is used for checking the first factors and the second factors in sequence when no data is received for a continuous preset time length, and performing abnormal bottom-up determination; the predictive scheduling linkage module communicates with a water resource management platform through an RS485 interface; and the monitoring end and the system end complete bidirectional cooperation through three-dimensional data packets and a missing pre-warning signal. The hierarchical environment factor collection of the environment-missing causal modeling module includes first factor collection and second factor collection; the first factors include real-time load values of substations, signal strengths of base stations, on-off states of irrigation electromagnetic valves and real-time power consumption loads of regional power grids, and are collected by current sensors, GSM modules, Hall sensors and power sensors at a frequency of 15 minutes / time; the second factors include environmental temperatures, wind speeds, soil moistures and environmental illuminations, and are collected by temperature sensors, wind speed sensors, soil moisture sensors and illumination sensors at a frequency of 30 minutes / time; the collection frequency control is completed by a timer interrupt configuration of an STM32 series single-chip microcomputer, a timer TIM2 is configured as a 15-minute interrupt to trigger first factor collection, and a timer TIM3 is configured as a 30-minute interrupt to trigger second factor collection. The checking logic of the multi-factor reverse verification module is as follows: (1) preferentially checking the first factors: reading the DeviceID of a monitoring point for which no data is received, calling the first factor values at the disconnection time ± 5 minutes, confirming the corresponding threshold values according to the synchronous seasonal weight rules, and if the first factor values meet the threshold values, proceeding to second factor checking, otherwise, determining that the device is faulty and triggering an alarm; (2) second factor checking: calling the second factor values at the disconnection time ± 5 minutes, judging whether the second factor values meet the auxiliary conditions of the coupled model mapping table, if yes, confirming regular missing and only displaying a missing prompt at the system end, and not triggering a fault or overexploitation early warning; and (3) abnormal bottom-up determination: if the second factor does not meet the auxiliary conditions, calling the data of adjacent monitoring points in the same region, if the adjacent monitoring points are synchronously disconnected, determining that the regional environment is abnormal and triggering a regional early warning, and if the adjacent monitoring point data is normal, determining that the single-point device is faulty and sending a maintenance instruction. 2. The groundwater overexploitation early warning system of claim 1, wherein: 3. The groundwater overexploitation early warning system of claim 1, wherein: 4. The groundwater overexploitation early warning system of claim 1, wherein: The area missing prediction data format pushed by the predictive scheduling linkage module is DeviceID, missing period, key factor, and recommended measures, wherein the key factor format is a first factor threshold value; A second factor threshold value, and the recommended measures include intervention means for the key factor; The synchronization logic of the environmental factor association library is that the system end receives the monitoring end data through the LoRa gateway, writes the first factor into the first factor library every 15 minutes, writes the second factor into the second factor library every 30 minutes, and synchronizes the seasonal weight rules of the monitoring end to the system end PLC register.
5. A method of monitoring the level of groundwater, characterised in that The method comprises the following steps: The underground water level data is collected by the monitoring end, transmitted to the system end through the wireless communication module, and compared with the preset threshold value by the system end to trigger the corresponding early warning, and the method further comprises the following steps: Step (1), the monitoring end performs environmental-missing causal modeling: including hierarchical environmental factor collection, dynamic weight assignment, coupled model training, and missing probability prediction; Step (2), the monitoring end transmits a three-dimensional data packet and a missing prediction signal through the LoRa module, the three-dimensional data packet adopts a fixed 32-byte frame structure, and includes a frame header, a water level value, a first factor, a second factor, a missing probability, a checksum, and a frame tail, the missing prediction signal is sent 10 minutes before the high-risk missing period, and includes a missing period and a key factor threshold value; Step (3), the monitoring end performs model self-iteration calibration after the missing period ends, calculates the deviation between the actual missing time length and the predicted missing time length, and adjusts the weight or corrects the missing probability mapping table of the coupled model according to the deviation; Step (4), the system end constructs an environmental factor association library, writes the first factor into the first factor library every 15 minutes, writes the second factor into the second factor library every 30 minutes, and synchronizes the seasonal weight rules of the monitoring end; Step (5), the system end performs multi-factor reverse verification, checks whether the first factor meets the corresponding seasonal threshold value when no data is received for 8 consecutive minutes, checks whether the second factor meets the mapping table auxiliary condition, and finally performs abnormal bottom-up judgment; Step (6), the system end pushes the area missing prediction and recommended measures to the water resource management platform through the predictive scheduling linkage module.
6. The groundwater level monitoring method according to claim 5, characterized by: The specific process of hierarchical environmental factor collection in step (1) is as follows: The collection frequency is controlled through the timer interrupt configuration of the STM32 series single-chip microcomputer, wherein the TIM_Period parameter of the timer TIM2 is set to 36000-1, and the TIM_Period parameter of the timer TIM3 is set to 72000-1; the first factor collection function is triggered by the timer TIM2 interrupt, and the real-time load value of the substation, the base station signal strength, the on-off state of the irrigation electromagnetic valve, and the real-time power load of the regional power grid are collected; the second factor collection function is triggered by the timer TIM3 interrupt, and the environmental temperature, wind speed, soil moisture, and environmental illumination are collected.
7. The groundwater level monitoring method according to claim 5, characterized by: The dynamic weight assignment in step (1) adopts a simplified version of the analytic hierarchy process (AHP), and the specific steps are as follows: (1) The weight basis rules are fixed: the basic weights are preset in the STM32 series single-chip microcomputer Flash, the total weight of the first factor is 70%, and the total weight of the second factor is 30%. (2) Season judgment logic: read the current month through the DS3231 real-time clock module, judge as winter from December to next February, judge as irrigation season from May to September, and judge as non-special season for the rest of the month; (3) Dynamic adjustment of weight: in winter, the weight of temperature or soil moisture in the secondary factor is adjusted to 25%, and the weight of the other secondary factor is adjusted to 5%; in the irrigation season, the weight of soil moisture or temperature in the secondary factor is adjusted to 25%, and the weight of the other secondary factor is adjusted to 5%; in the non-special season, the basic weight remains unchanged, and the adjusted weight is stored in the single-chip microcomputer RAM.
8. The groundwater level monitoring method according to claim 5, characterized by: The specific steps of model self-iteration calibration in step (3) are as follows: (1) Bias calculation: after the missing period ends, read the actual missing time (missing end time-missing start time) through the DS3231 real-time clock module, retrieve the predicted missing time in the pre-warning signal, and calculate the bias = |actual missing time-predicted missing time| / predicted missing time x 100%; (2) Bias processing: if the bias > 8%, and the cause is confirmed to be insufficient weight of the secondary factor, then the weight of the secondary factor will be increased by 5% in the next corresponding season, and the weight table in the single-chip microcomputer RAM and Flash will be updated; If the bias is caused by the inaccuracy of the primary factor threshold, then the missing probability corresponding to the primary factor threshold in the coupling model is corrected, and the missing probability mapping table in the Flash is updated.