River water level risk prediction method and system based on trend prediction

By constructing a dual-channel trend semantic competition network, the sensor drift and the actual water level trend in the river water level monitoring system are distinguished, which solves the problems of false alarms and missed alarms in the existing technology and realizes high-precision flood risk early warning and sensor status monitoring.

CN122155095APending Publication Date: 2026-06-05桐柏县河道建设运行保障中心 +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
桐柏县河道建设运行保障中心
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Under long-term unattended conditions, the existing river water level monitoring system exhibits sensor drift patterns that resemble the actual gradual rise in water level. This makes it difficult for existing prediction models to distinguish the causes of the trend, leading to risk warnings of false alarms or missed alarms.

Method used

A heterogeneous spatiotemporal multi-source monitoring dataset is constructed, and a dual-channel trend semantic competition network is used for trend prediction. The theoretical water level trend and drift signal sequences are generated through the hydrological logical response channel and the equipment state evolution channel, respectively. Semantic consistency discrimination and adaptive compensation are performed to distinguish between real hydrological changes and equipment drift.

Benefits of technology

It effectively distinguishes water level change trends that are similar in form but different in cause, improves the prediction accuracy and robustness of the river water level monitoring system, and realizes accurate flood risk warning and intelligent diagnosis and remote maintenance of sensor status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155095A_ABST
    Figure CN122155095A_ABST
Patent Text Reader

Abstract

The application discloses a river water level risk prediction method and system based on trend prediction, and the method comprises the following steps: extracting an observed trend component of an original water level sequence; adopting a double-channel trend semantic competition network, wherein a hydrological logic response channel predicts a theoretical water level trend according to a hydrological driving factor prediction theory, and a device state evolution channel predicts a theoretical drift trend according to device state fingerprint data; judging the source attribute of the observed trend by calculating the semantic consistency of the observed trend component, the theoretical water level trend and the theoretical drift trend; and performing adaptive compensation on the observed trend according to the judgment result and performing risk prediction. The application solves the problem that the existing prediction model is difficult to distinguish the trend causes due to the similar physical drift of the sensor and the slow rising trend form of the real water level, thereby causing false positives or false negatives, can not only provide more accurate flood risk warning, but also realize remote intelligent diagnosis and forward-looking maintenance warning of the sensor state, and improve the reliability of the monitoring system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of water conservancy monitoring and artificial intelligence technology, specifically to a method and system for predicting river water level risks based on trend forecasting. Background Technology

[0002] In modern water management systems, automated river level monitoring networks are crucial infrastructure for flood warning and water resource allocation. These systems typically deploy numerous water level monitoring stations throughout the basin, utilizing sensors such as submersible pressure gauges, radar level gauges, or ultrasonic level gauges to collect water level data in real time and transmit the data to a central server via wireless communication networks. To predict future water level changes, existing technologies often employ artificial intelligence models, such as Long Short-Term Memory (LSTM) networks or Gated Recurrent Units (GRUs), to learn and analyze the collected water level time-series data to predict water level trends and assess potential flood risks.

[0003] However, in long-term, unattended monitoring applications in wide-area, field environments, existing data-driven prediction methods face severe challenges. Front-end sensor equipment is exposed to complex natural environments for extended periods, and its performance is affected by physical interference from non-hydrological factors or gradual aging. For example, the pressure-sensing diaphragm surface of submersible pressure sensors is prone to the adhesion of microorganisms or algae in the water, which accumulate over time to form biofilms, or become covered by sediment carried by water flow. Similarly, the probes of non-contact radar or ultrasonic sensors may be obstructed by spider webs, insect nests, or vegetation growing on the shore. These gradual physical changes are reflected in the collected data as a monotonous, continuous, and gently shifting trend.

[0004] This pseudo-trend, caused by changes in the equipment's own condition or external environmental factors, exhibits a high degree of similarity in its time scale (typically weeks to months) and morphological characteristics (smooth, gradual change) to some real hydrological phenomena, such as the slow rise in water levels caused by upstream glacial meltwater or continuous small-flow discharge from reservoirs during the transition from dry to wet seasons. Traditional signal processing techniques, such as low-pass filtering or wavelet denoising, are primarily designed to filter out high-frequency random noise and are difficult to effectively separate low-frequency drift signals that are close to the frequency of the real signal. Furthermore, most existing artificial intelligence prediction models rely on fitting statistical patterns to historical data and lack a deep understanding of the physical causes behind the trend. Therefore, they can easily misidentify the sensor's pathological drift as a real rise in water level, leading to false risk warnings. Conversely, excessive detrending to suppress drift may misjudge it as equipment drift and filter it out in the early stages of a real, slow-moving flood event, resulting in missed reports and posing a safety hazard. Therefore, how to intelligently identify the source attributes of observed trends through algorithms, i.e., distinguish whether they originate from real hydrological changes or equipment status evolution, under the condition of lack of frequent manual on-site calibration, is a technical challenge to improve the robustness and reliability of automatic river level monitoring systems. Summary of the Invention

[0005] This invention provides a method and system for predicting river water level risk based on trend forecasting, in order to solve the technical problem in the background art where the physical drift of the sensor is similar to the actual slow rise trend of the water level, making it difficult for the existing prediction model to distinguish the trend and thus causing false alarms or missed alarms.

[0006] To achieve the above objectives, one aspect of the present invention provides a method for predicting river water level risk based on trend forecasting, comprising the following steps: Step 1: Construct a heterogeneous spatiotemporal multi-source monitoring dataset. The dataset includes the original water level observation sequence of the target monitoring station, environmental factor data associated with the target monitoring station, and device status fingerprint data characterizing the sensor equipment status of the target monitoring station. Step 2: Decompose the original water level observation sequence to extract the observation trend sequence reflecting low-frequency changes in water level; Step 3: A dual-channel trend semantic competition network is used to predict trends. The environmental factor data is input into the hydrological logic response channel of the dual-channel trend semantic competition network to generate a theoretical water level trend sequence driven by physics. The equipment status fingerprint data is input into the equipment status evolution channel of the dual-channel trend semantic competition network to generate a theoretical drift signal sequence under equipment aging. Step 4: Perform semantic consistency discrimination. Measure the semantic consistency between the observed trend sequence and the outputs of the two channels by calculating the semantic consistency distance between the observed trend sequence and the theoretical water level trend sequence and the theoretical drift signal sequence under equipment aging, respectively. Generate a discrimination probability based on the semantic consistency. The discrimination probability is used to characterize the confidence that the observed trend sequence belongs to the real hydrological change. Step 5: Perform adaptive compensation and risk prediction. Based on the discrimination probability, modify the observed trend sequence to generate a modified water level trend, and output the risk prediction result based on the modified water level trend.

[0007] Further, step two specifically includes: decomposing the original water level observation sequence using variational mode decomposition; adaptively determining the number of modes in the variational mode decomposition by combining the center frequency observation method with the energy difference criterion; and linearly superimposing and reconstructing the low-frequency mode components obtained from the decomposition to obtain the observation trend sequence.

[0008] Furthermore, the hydrological logic response channel is used to simulate the real hydrological response process, and it adopts a composite structure of spatiotemporal attention mechanism and bidirectional long short-term memory network; wherein, the spatiotemporal attention mechanism includes a spatial attention layer and a temporal attention layer, the spatial attention layer is used to adaptively weight the environmental factor data from multiple input sources, and the temporal attention layer is used to capture the lag effect of historical environmental events on the current water level.

[0009] Furthermore, the environmental factor data includes water level sequences from one or more associated hydrological stations upstream of the target station, as well as rainfall sequences in the area where the target station is located.

[0010] Furthermore, the device state evolution channel is used to simulate the nonlinear drift process of the sensor. It adopts a monotonic constraint temporal convolutional network, which forces the drift increment output by the network to conform to the preset monotonic physical characteristics through a monotonic constraint activation function or a monotonic constraint loss term. In addition, the device state evolution channel is connected in parallel with a parameterized physical model layer, which is pre-set with a mathematical model describing the specific physical drift process of the sensor, so as to integrate the physical prior knowledge with the feature representation capability of deep learning.

[0011] Optionally, the device status fingerprint data includes at least one of the following: the signal-to-noise ratio of the sensor echo signal, water temperature data, and the time elapsed since the last manual maintenance operation.

[0012] Furthermore, the calculation of the semantic consistency distance combines Euclidean distance and dynamic time warping distance; the generation of the discrimination probability also incorporates explicit prior features, namely the Pearson correlation coefficient between the observed water level and the rainfall sequence.

[0013] Preferably, the model training employs a joint loss function, which includes a semantic contrastive loss term to force the maximization of output similarity for channels that match the semantic labels and the minimization of output similarity for channels that do not match the semantic labels during training. Before model training, a self-supervised pre-training step based on counterfactual physical synthesis is also included. The pre-training step utilizes historically confirmed normal pure water level data to artificially synthesize a large number of training sample pairs with clear semantic labels through a counterfactual generator. The training sample pairs include positive hydrological samples generated by applying time-dimensional elastic deformation to the pure water level data, and drift counterfactual samples generated by superimposing synthetic drift components on the pure water level data.

[0014] Further, the calculation formula for the adaptive compensation is: T_final(t) = T_obs(t) - (1 - P_real) * T_hat_drift(t); where T_final(t) is the corrected water level trend, T_obs(t) is the observed trend sequence, P_real is the discrimination probability, and T_hat_drift(t) is the theoretical drift signal sequence; the risk prediction also includes: generating an equipment maintenance warning when the discrimination probability is lower than a preset threshold for a continuous preset time period.

[0015] Another aspect of the present invention provides a river water level risk prediction system based on trend forecasting, the system comprising: A multi-source heterogeneous sensing module is used to construct a heterogeneous spatiotemporal multi-source monitoring dataset, which includes the original water level observation sequence of the target monitoring station, environmental factor data associated with the target monitoring station, and device status fingerprint data characterizing the sensor equipment status of the target monitoring station. The trend feature extraction module is used to decompose the original water level observation sequence to extract the observation trend sequence that reflects the low-frequency changes in water level. A dual-channel semantic reasoning module is used to perform trend prediction using a dual-channel trend semantic competition network. The dual-channel trend semantic competition network includes a hydrological logic response channel and an equipment state evolution channel. Environmental factor data is input into the hydrological logic response channel to generate a theoretical water level trend sequence driven by physical factors, and equipment state fingerprint data is input into the equipment state evolution channel to generate a theoretical drift signal sequence under equipment aging. The dual-channel semantic reasoning module internally includes a hydrological response reasoning unit deployed with the hydrological logic response channel and an equipment evolution reasoning unit deployed with the equipment state evolution channel. The intelligent diagnosis and decision-making module is used to perform semantic consistency discrimination. It measures the semantic consistency between the observed trend sequence and the outputs of the two channels by calculating the semantic consistency distance between the observed trend sequence and the theoretical water level trend sequence and the theoretical drift signal sequence, respectively. Based on the semantic consistency, it generates a discrimination probability, which is used to characterize the confidence that the observed trend sequence belongs to the real hydrological change. It also performs adaptive compensation and risk prediction. Based on the discrimination probability, it corrects the observed trend sequence to generate a corrected water level trend and outputs a risk prediction result based on the corrected water level trend.

[0016] The river water level risk prediction method and system provided by this invention constructs a dual-channel semantic competition architecture consisting of a hydrological logic response channel and an equipment state evolution channel. Sensor drift is modeled as an independent physical process, and the model is trained through contrastive learning to compete for the right to interpret current observation data at the semantic level. This method can effectively distinguish between water level change trends that are similar in form but different in cause, mitigating the false alarms and false negatives caused by source attribute confusion in existing technologies. Furthermore, by introducing monotonicity constraints based on the physical model and counterfactual data augmentation, the model not only improves prediction accuracy but also enhances its robustness and applicability in small sample scenarios. Ultimately, this method not only provides more accurate flood risk warnings but also enables remote intelligent diagnosis and proactive maintenance warnings of the front-end sensor status, improving the intelligence level and operational reliability of the entire automated river water level monitoring system. Attached Figure Description

[0017] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart of a river water level risk prediction method based on trend prediction provided by an embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the structure of the dual-channel trend semantic competition network (DT-SCN) in an embodiment of the present invention.

[0020] Figure 3 This is an example diagram of variational mode decomposition (VMD) of the original water level sequence in an embodiment of the present invention.

[0021] Figure 4 This is a structural block diagram of a river water level risk prediction system based on trend prediction provided in an embodiment of the present invention.

[0022] Figure 5 This is a diagram showing the deployment structure of river water level monitoring stations in an embodiment of the present invention.

[0023] Figure 6 This is a schematic diagram of the submersible pressure water level sensor structure and biofilm adhesion in an embodiment of the present invention.

[0024] Figure 7 This is a curve showing the dynamic change of the discrimination probability P_real in an embodiment of the present invention.

[0025] Figure 8 This is a comparison diagram of water levels before and after adaptive compensation in an embodiment of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0027] Example 1 Please see Figure 1 This embodiment provides a method for predicting river water level risk based on trend forecasting. This method constructs parallel hydrological logic response channels and equipment state evolution channels to intelligently identify the source attributes of water level observation trends, thereby effectively distinguishing between actual hydrological fluctuations and sensor physical drift. Specifically, it includes the following steps: Step S100: Construct a heterogeneous spatiotemporal multi-source monitoring dataset.

[0028] The purpose of this step is to collect data related to water level changes at the target monitoring station from multiple dimensions, providing comprehensive information input for the subsequent dual-channel competitive model. Specifically, the collected and integrated data includes three categories: The first category is the core observation data of the target monitoring station, namely the raw water level observation sequence L_raw(t), where t represents the sampling timestamp. The second category is environmental factor data that can reflect the hydrological dynamics of the watershed. Preferably, based on the topology of the watershed system where the target station is located, one or more key upstream hydrological stations that have a significant impact on its water level are selected, and their water level sequences L_up(t) are collected; at the same time, the rainfall sequence R(t) of the catchment area where the target station is located or its upstream area is collected. In some application scenarios, if there is a regulating reservoir upstream, the real-time discharge data of the reservoir, as a strongly correlated physical driving factor, should also be collected. The third category is fingerprint data S_dev(t) that can indirectly or directly characterize the health status of the sensor equipment. The specific content of this data depends on the type of sensor. For example, for non-contact radar or ultrasonic level gauges, the signal-to-noise ratio (SNR) and echo intensity spectral width of the echo signal are key state fingerprints because foreign object obstruction significantly alters echo quality. For submersible pressure level gauges, since the attachment and growth of biofilms are closely related to water temperature, synchronously measured water temperature data can be collected as a state fingerprint. Furthermore, the time elapsed since the last manual on-site maintenance or calibration operation (delta_T_maint) is also an important characteristic characterizing the cumulative effects of equipment aging. These collected multi-source heterogeneous data are organized into a multi-dimensional time-series tensor, serving as the unified input for subsequent models.

[0029] Step S200: Extract trend components from the original water level sequence based on variational mode decomposition (VMD).

[0030] The original water level sequence L_raw(t) often contains components of various time scales, including high-frequency random noise, mid-frequency intraday fluctuations, and low-frequency trends that require focused analysis. To accurately separate the low-frequency trend information, this step employs a variational mode decomposition algorithm. Specifically, this step includes the following sub-steps: Sub-step S201 adaptively determines the optimal number of modes K for the VMD algorithm. The choice of K value is crucial to the decomposition effect. To avoid the subjectivity of manual setting, this invention uses a center frequency observation method combined with an energy difference criterion to automatically determine the K value. Specifically, a large candidate number of modes is first set, for example, K_max=8, and pre-decomposition is performed on a representative historical water level data. Then, the center frequency omega_k of each of the K_max intrinsic mode functions (IMFs) obtained from the decomposition is calculated. If it is found that the center frequencies omega_k of adjacent modes are very close to omega_(k-1), i.e., frequency aliasing occurs, it indicates that the current K value is set too large, leading to over-decomposition. Simultaneously, the residual component energy E_res after each decomposition is calculated. Finally, the smallest integer K that makes the residual energy E_res less than the preset threshold epsilon without significant frequency aliasing is selected as the optimal number of modes. In typical river water level monitoring data, the value of K is usually between 3 and 5.

[0031] Sub-step S202 involves performing formal decomposition and trend reconstruction. Using the optimal number of modes K determined in the previous step, a formal VMD decomposition is performed on the original water level sequence L_raw(t), yielding K intrinsic mode functions IMF_1(t), IMF_2(t), ..., IMF_K(t). Please refer to [link to relevant documentation]. Figure 3 The figure shows an example where the original water level sequence is decomposed into multiple modal components of different frequencies.

[0032] Sub-step S203 automatically filters out components representing low-frequency trends based on the center frequencies of each IMF component. Typically, the one or two IMF components with the lowest frequencies correspond to the long-term trend of water level changes. This can be achieved by setting a frequency threshold, for example, selecting all IMF components with center frequencies lower than the frequency corresponding to the daily variation cycle (approximately 1.16e-5 Hz). The filtered low-frequency components are linearly superimposed to reconstruct the current observed trend sequence, denoted as T_obs(t). Compared to the original data L_raw(t), this T_obs(t) sequence has filtered out high-frequency noise and some periodic fluctuations, allowing subsequent source identification to focus on the core, gradually changing trend.

[0033] Step S300: Construct a dual-channel trend semantic competition network (DT-SCN) and perform trend prediction.

[0034] Please see Figure 2 This is the core processing module of this method. The network contains two parallel deep learning branches that model and predict trends from two different semantic dimensions: hydrophysical logic and device state evolution.

[0035] Channel A, the hydrological logic response channel, aims to simulate the actual water level trend driven by environmental factors such as upstream inflow and rainfall under normal hydrological conditions. This channel employs a composite structure of a spatiotemporal attention mechanism and a bidirectional long short-term memory network (Bi-LSTM). Its inputs are the environmental factor data collected in step S100, such as rainfall R(t) and upstream water level L_up(t). The spatial attention layer dynamically evaluates the importance of multiple input sources (such as multiple upstream stations) at the current moment. For example, upstream stations closer to the target station or with a larger catchment area typically have higher correlation in water level changes; the spatial attention mechanism can learn this spatial dependence and assign it higher weight. The temporal attention layer captures the time lag effects in the hydrological process; for example, the impact of a rainstorm may not be reflected at downstream stations for hours or even tens of hours. The temporal attention mechanism allows the model to automatically focus on the most valuable time points in historical time series for current prediction. The output of this channel is a theoretical water level trend sequence driven by physics, denoted as T_hat_hydro(t). Furthermore, in scenarios applicable to snowmelt-fed rivers, the channel can also incorporate meteorological features such as accumulated positive temperature to simulate the snowmelt runoff process.

[0036] Channel B, the device state evolution channel, aims to simulate unrealistic drift trends that may arise from changes in the physical state of the sensor itself (such as aging, adhesion, and sedimentation). This channel employs a Monotonic Constrained Temporal Convolutional Network (TCN) as its core architecture. TCN efficiently captures long-term dependencies in time series through causal convolution and dilated convolution. To make the model's output more consistent with the physical characteristics of the drift process (e.g., biofilm growth is a cumulative process), this invention introduces a monotonic constraint after the TCN's output layer. Specifically, this constraint can be an activation function that forces the drift increment value of the network output to be non-negative, or a regularization term that penalizes outputs that do not conform to monotonicity in the loss function. The input to this channel is the device state fingerprint data S_dev(t) collected in step S100, such as signal-to-noise ratio, water temperature, and the time since the last maintenance, delta_T_maint. Preferably, to incorporate prior physical knowledge into the model, this channel can also be connected in parallel with a parameterized physical model layer. For example, a Logistic growth curve model f_bio(t) = K / (1 + a * exp(-r*t)) can be used to explicitly simulate the S-shaped growth process of the biofilm, where a is a constant related to the initial state, and parameters such as the saturation drift K and the growth rate r are dynamically fitted by the network based on the input data. The output of this channel is a theoretical drift signal sequence under device aging, denoted as T_hat_drift(t).

[0037] Step S400: Perform semantic consistency judgment and model training.

[0038] This step aims to train the DT-SCN model using the designed metrics and loss function to accurately determine which channel's prediction result the observed trend T_obs(t) is semantically closer to.

[0039] Sub-step S401: Measuring semantic consistency. The distances between the observed trend T_obs(t) and the theoretical outputs T_hat_hydro(t) and T_hat_drift(t) of the two channels are calculated respectively. To comprehensively consider both numerical proximity and morphological similarity, this invention employs a weighted combined distance. The formulas for calculating the hydrological logical consistency distance D_hydro and the equipment drift consistency distance D_drift are: D_hydro = alpha * ||T_obs - T_hat_hydro||_2 + beta * DTW(T_obs, T_hat_hydro), and D_drift = alpha * ||T_obs - T_hat_drift||_2 + beta * DTW(T_obs, T_hat_drift). Where ||.||_2 represents the Euclidean distance, used to measure the point-to-point numerical error; DTW(.,.) represents the dynamic time warping distance, used to measure the shape similarity of two sequences under conditions that allow nonlinear distortion of the time axis, and is robust to small time phase differences; alpha and beta are adjustable weighting coefficients.

[0040] Sub-step S402: Calculate the discrimination probability. Construct a soft-gated module, which is a small neural network. Its inputs are the two distances D_hydro and D_drift calculated in the previous step, and an additional explicit prior feature, namely the Pearson correlation coefficient C_corr between the observed water level and the concurrent rainfall sequence. This module outputs a probability value P_real between 0 and 1, representing the confidence level that the current observed trend T_obs(t) is judged as a true hydrological change. Its calculation formula is: P_real = sigmoid(W_g * [D_hydro, D_drift, C_corr] + b_g), where sigmoid is the activation function, and W_g and b_g are the learnable parameters of this gating network. When P_real is close to 1, it indicates that the system is highly confident that the observed trend is driven by a true hydrological event.

[0041] Sub-step S403 involves designing a ternary joint loss function for end-to-end model training. The training loss function L_total consists of three parts: L_total = L_pred + lambda_1 * L_mono + lambda_2 * L_contrast. Here, L_pred is the basic mean squared error of prediction, used to ensure that the predicted outputs of the two channels can basically fit their corresponding targets; L_mono is a monotonicity constraint loss term that only applies to channel B, used to penalize jitter in its output that does not conform to physical laws; L_contrast is the core semantic contrast loss term; lambda_1 and lambda_2 are weight coefficients used to balance the various loss terms. For labeled training samples (i.e., knowing whether a certain trend is a real rise in water level or equipment drift), this loss term forces the network to narrow the distance between the observed trend and the correct channel prediction result (reducing D_positive), while simultaneously widening the distance between the observed trend and the incorrect channel prediction result (increasing D_negative).

[0042] Preferably, to address the scarcity of labeled drift samples in practical applications, this invention introduces a self-supervised pre-training step based on counterfactual physical synthesis before formal training. This step utilizes a large amount of historically confirmed uncontaminated pure water level data to artificially synthesize training samples with clear semantic labels. For example, slightly different morphological positive hydrological samples are generated by applying a small random time scale to the pure water level data; simultaneously, a synthetic drift signal generated by the parameterized physical model in channel B is superimposed on the pure water level data to generate drift counterfactual samples. This method enables the model to learn the essential features that distinguish between two trends even without a large amount of real fault data.

[0043] Step S500: Perform adaptive compensation and risk prediction.

[0044] This step intelligently corrects the observed data based on the discrimination probability P_real output in step S400 and outputs the final decision result.

[0045] Sub-step S501 involves trend correction. The final corrected water level trend T_final(t) is calculated. The formula is: T_final(t) = T_obs(t) - (1 - P_real) * T_hat_drift(t). This formula implements adaptive compensation: when the system determines the current trend as a real hydrological event (P_real approaches 1), the (1 - P_real) term approaches 0, and T_final(t) is approximately equal to T_obs(t), thus preserving the original observed trend; conversely, when the system determines it as equipment drift (P_real approaches 0), the (1 - P_real) term approaches 1, and the system subtracts the predicted theoretical drift component T_hat_drift(t) from the observed trend, thereby achieving online correction of the drift.

[0046] Sub-step S502 involves risk warning classification. The corrected water level trend T_final(t) is recombined with the high-frequency components separated from the original sequence L_raw(t) to obtain the corrected complete water level sequence. Based on this corrected sequence and its future predicted values, combined with preset warning water level thresholds at each level, the probability of the water level exceeding the warning level in the next 6 hours or 12 hours is calculated, and risk warning information of different levels such as "attention," "blue," and "yellow" is generated accordingly.

[0047] Sub-step S503 generates an equipment maintenance warning. The system continuously monitors the discrimination probability P_real. If P_real remains below a preset threshold (e.g., 0.2) for M consecutive time steps (e.g., 72 consecutive hours), and the cumulative correction drift exceeds the sensor's maximum permissible error, the system will automatically generate a sensor anomaly maintenance work order. This work order may include possible fault type diagnostic information (e.g., based on the activation status of the physical model in channel B, it may be judged as "suspected biofilm adhesion causing high readings"), and is pushed to the operation and maintenance management platform to achieve proactive diagnosis and maintenance scheduling of equipment faults.

[0048] Example 2 Please see Figure 4 This embodiment provides a river water level risk prediction system based on trend forecasting. This system serves as the hardware and software platform for the aforementioned method, implementing all or part of its steps. The system can be deployed on a central server, cloud platform, or edge computing gateway. Specifically, it includes: The multi-source heterogeneous sensing module 10 is used to construct a heterogeneous spatiotemporal multi-source monitoring dataset. This dataset includes the original water level observation sequences of the target monitoring stations, environmental factor data associated with the target monitoring stations, and device status fingerprint data characterizing the sensor equipment status of the target monitoring stations. Module 10 contains multiple data interface units, such as an interface unit for accessing real-time data from front-end water level sensors via IoT protocols, an environmental factor acquisition unit for acquiring rainfall data from meteorological bureaus and upstream hydrological station data via API or database integration, and a device status monitoring unit for reading and recording sensor status parameters (such as signal-to-noise ratio, water temperature, maintenance date, etc.). This module is responsible for data acquisition, alignment, cleaning, and integration.

[0049] The trend feature extraction module 20 is used to decompose the original water level observation sequence to extract the observation trend sequence reflecting low-frequency changes in water level. This module 20 internally integrates a variational mode decomposition (VMD) algorithm engine. It receives the original water level sequence L_raw(t) from the multi-source heterogeneous sensing module 10 and performs adaptive mode decomposition, decomposing the original sequence into multiple intrinsic mode functions (IMFs), and automatically reconstructs a clean low-frequency observation trend sequence T_obs(t) according to preset rules. The output of this module 20 is then transmitted to the subsequent inference module.

[0050] The dual-channel semantic reasoning module 30 is the core computing unit of the system, used to construct a dual-channel trend semantic competition network and perform trend prediction. The dual-channel trend semantic competition network includes a hydrological logical response channel and a device state evolution channel. Environmental factor data is input into the hydrological logical response channel to generate a theoretical water level trend sequence driven by physics, and device state fingerprint data is input into the device state evolution channel to generate a theoretical drift signal sequence under device aging. This module 30 contains parallel reasoning units: a hydrological response reasoning unit 31 deployed with the hydrological logical response channel, and a device evolution reasoning unit 32 deployed with the device state evolution channel. The hydrological response reasoning unit 31 deploys a pre-trained hydrological logical response channel model (e.g., a model based on spatiotemporal attention and Bi-LSTM), which receives environmental factor data as input and outputs the theoretical water level trend T_hat_hydro(t). The device evolution inference unit 32 deploys a pre-trained device state evolution channel model (e.g., a TCN model containing a monotonicity constraint layer and a physical parameter layer), which receives device state fingerprint data as input and outputs the theoretical drift trend T_hat_drift(t).

[0051] The intelligent diagnosis and decision-making module 40 is used for semantic consistency discrimination and model training. It measures the semantic consistency between the observed trend sequence and the outputs of the two channels by calculating the semantic consistency distance between the observed trend sequence and the theoretical water level trend sequence and the theoretical drift signal sequence, respectively. Based on the semantic consistency, it generates a discrimination probability, which characterizes the confidence level that the observed trend sequence belongs to real hydrological changes. It also performs adaptive compensation and risk prediction, correcting the observed trend sequence based on the discrimination probability to generate a corrected water level trend, and outputting a risk prediction result based on the corrected water level trend. This module 40 receives the observed trend T_obs(t) and two theoretical trends T_hat_hydro(t) and T_hat_drift(t). Internally, it includes a contrast loss calculation unit, a soft-gated discriminator for calculating the discrimination probability P_real, and a risk assessment engine. The module 40 first calculates the semantic consistency and outputs the discrimination probability, then performs adaptive compensation on the observed trend based on this probability to calculate the final corrected water level. Finally, based on the corrected water level and its prediction results, combined with the preset risk rule base, the system outputs graded flood risk warnings and possible equipment maintenance work orders.

[0052] The technical solution provided by this invention creatively constructs two parallel semantic competition channels—hydrological logic and equipment status—transforming the originally ambiguous problem of trend source identification into a clear, physically constrained comparative learning problem. This enables the model not only to learn the statistical regularities of data but also to understand the physical causes behind the trends, thereby making more accurate and robust judgments when faced with real floods and equipment drift that have similar patterns.

[0053] Example 3 This embodiment illustrates how the method described in this invention can be used to solve the problem of false trend warnings caused by biofilm adhesion to sensors in a specific application scenario. The scenario is set at a remote, unmanned monitoring station in a mountainous watershed, equipped with an immersion-type pressure level gauge. During a prolonged dry season lasting several weeks, there were no significant rainfall events in the area, and upstream hydrological station data showed a stable inflow. However, the raw water level data L_raw(t) collected by the monitoring station exhibited a slow but continuous monotonically increasing trend. If a traditional time-series forecasting model is used, this trend may be incorrectly extrapolated, leading to the triggering of warnings when there is no actual flood risk.

[0054] In response to this situation, the system described in this invention processes the problem according to the following steps.

[0055] like Figure 5As shown, the physical deployment of the monitoring equipment at the river level monitoring station is illustrated using a cross-sectional view. The monitoring station is located on the top of the left bank slope of the river, with a monitoring pole as the main support structure. The pole is fixed to the bank railing at its base via a reinforced base. An equipment box is installed in the middle of the pole, integrating three core functional units: a data acquisition unit 101, a wireless communication module 102, and a solar power supply unit 103. The data acquisition unit 101 collects water level and temperature data from various sensors; the wireless communication module 102 transmits data wirelessly to a remote data center via an antenna mounted on the top of the pole; and the solar power supply unit 103, in conjunction with a solar panel mounted on the top of the pole, provides continuous power to the entire monitoring station. For non-contact measurement, a radar level gauge 104 is installed on a cross-bracing structure extending from the pole upwards over the river, directly above the water surface. It measures water level by emitting a downward-facing detection beam and receiving reflected signals from the water surface; the detection beam is indicated by a dashed arrow. In terms of contact measurement, the submersible pressure level gauge 105 extends from the bank through the water surface to the riverbed via a cable. Its pressure-sensing diaphragm is located at the bottom of the water, and the water level depth is calculated by measuring the hydrostatic pressure of the water column. The cable is marked with a solid line. The water temperature sensor 106 is deployed in the water together with the pressure level gauge 105 and is connected to the main cable via a short-circuit cable to achieve synchronous water temperature acquisition. This deployment structure realizes complementary verification of non-contact and contact dual water level monitoring, improving the reliability and accuracy of monitoring data. First, in the step of constructing a heterogeneous spatiotemporal multi-source monitoring dataset, the system integrates the original water level sequence L_raw(t) of the station and simultaneously acquires the rainfall sequence R(t) of the area (the value is close to zero during this period), as well as the water level sequence L_up(t) of the upstream associated station (showing a stable or slightly decreasing trend). At the same time, the system collects fingerprint data characterizing the equipment status, including water temperature data measured synchronously with the water level gauge (consistently at a high level, conducive to microbial growth), and the time since the last manual maintenance delta_T_maint (more than six months).

[0056] like Figure 6As shown, the left side displays the cross-sectional structure of the submersible pressure level gauge under normal operating conditions. This level gauge mainly consists of a housing 201, a pressure-sensing diaphragm 202, a pressure sensing core 203, a signal lead 204, and a vent pipe 205. The housing 201 is a cylindrical stainless steel structure with the pressure-sensing diaphragm 202 at its bottom. This diaphragm is in direct contact with the water being measured, transmitting the water pressure to the pressure sensing core 203 located above the diaphragm. The pressure sensing core 203 uses a piezoelectric element to convert the pressure signal into an electrical signal. The signal lead 204 extends from the top of the housing 201 and is used to transmit the electrical signal to the data acquisition system. The vent pipe 205 runs through the inside of the signal lead 204, forming an atmospheric reference air passage, ensuring that the reference side of the sensing core 203 is always connected to atmospheric pressure, thereby achieving accurate measurement of gauge pressure. The right side shows the abnormal state of the sensor after several weeks to months of long-term operation, affected by biofilm adhesion. In an aquatic environment, microorganisms gradually form a biofilm layer 206 on the surface of the pressure-sensitive diaphragm 202. This biofilm layer 206 covers the diaphragm surface in an irregular shape, altering the mechanical transmission characteristics between the diaphragm and the water, resulting in a systematically higher pressure measurement. Simultaneously, suspended particulate matter in the water deposits at the bottom of the sensor, forming a sediment layer 207, further deteriorating the sensor's measurement environment. The combined effect of biofilm adhesion and sediment deposition causes a gradual drift in the water level gauge reading, which is one of the core technical problems this invention aims to solve.

[0057] Subsequently, the system performs variational mode decomposition on the original water level sequence L_raw(t) to extract its low-frequency observation trend component T_obs(t), which is characterized by a smooth, monotonically increasing curve. Next, a dual-channel trend semantic competition network receives the corresponding data input and performs parallel inference. The hydrological logic response channel (channel A) receives near-zero rainfall R(t) and a stable upstream water level L_up(t) as input, and its output theoretical water level trend T_hat_hydro(t) is a basically horizontal straight line, reflecting that the actual water level should remain stable under the current hydrological driving conditions. Simultaneously, the equipment state evolution channel (channel B) receives consistently high water temperature and a long maintenance interval delta_T_maint as input. The monotonic constrained temporal convolutional network built into this channel, containing a Logistic growth curve parameterization layer, fits an S-shaped growth curve conforming to the biofilm growth law based on these inputs, serving as the theoretical drift signal sequence T_hat_drift(t). The shape of T_hat_drift(t) closely matches the observed trend T_obs(t) extracted from the original data.

[0058] In the semantic consistency discrimination step, the system calculates that the distance D_hydro between the observed trend T_obs(t) and the hydrological logical prediction T_hat_hydro(t) is relatively large, while the distance D_drift between it and the equipment drift prediction T_hat_drift(t) is very small. Combined with the near-zero Pearson correlation coefficient C_corr between the observed water level and the rainfall sequence, the soft-gating module ultimately outputs an extremely low discrimination probability P_real (e.g., P_real < 0.1). This indicates that the system determines with high confidence that the currently observed water level rise trend is not due to a real hydrological process, but rather to physical equipment drift.

[0059] like Figure 7 As shown in the figure, this graph uses a dual Y-axis curve to illustrate the dynamic variation of the discrimination probability P_real over a continuous monitoring period of approximately 60 days and its correspondence with water level observation data. The left vertical axis represents the range of the discrimination probability P_real (0 to 1), the right vertical axis represents the water level value (unit: m), and the horizontal axis represents time (unit: days). The thick solid line in the graph represents the curve of P_real changing over time, the thin solid line represents the original observed water level L_raw(t), and the thin dashed line represents the corrected water level T_final(t). A horizontal dotted line is set at a P_real value of 0.2 as the equipment maintenance early warning threshold. When P_real remains below this threshold for more than 72 hours, the system determines that the data collected by the current sensor does not conform to the characteristics of the true hydrological signal, the corresponding interval is marked with shade, and a maintenance work order is triggered, prompting maintenance personnel to check or calibrate the equipment. When P_real approaches 1.0, it indicates that the discriminator confirms the current water level change as a real hydrological event with high confidence. The corresponding interval in the graph is labeled "Hydrological Event Confirmation." At this point, both the original observed water level L_raw(t) and the corrected water level T_final(t) show a significant upward trend, verifying the discriminator's effective ability to identify real hydrological events. This curve intuitively reflects the dual role of the discriminant probability P_real based on generative adversarial networks in data quality monitoring and hydrological event identification.

[0060] Finally, in the adaptive compensation and risk prediction steps, the system, based on the extremely low P_real value, executes the trend correction calculation formula T_final(t) = T_obs(t) - (1 - P_real) * T_hat_drift(t), thereby subtracting most of the predicted drift component from the observed trend. The corrected water level trend T_final(t) recovers to a near-horizontal stationary sequence, consistent with the prediction results of the hydrological logic response channel and the upstream water inflow. Therefore, the system did not issue any flood risk warnings. Conversely, because the system determined that the P_real value was low for several consecutive days, and the cumulative drift amplitude exceeded the preset sensor tolerance error, the system automatically generated an equipment maintenance work order, indicating that the sensor at this site may have a biofilm adhesion problem, and pushed it to the operation and maintenance management platform, realizing accurate and proactive diagnosis of equipment failure.

[0061] like Figure 8 As shown, the upper part displays the original observation data before compensation, including equipment drift, while the lower part displays the corrected water level results after adaptive drift compensation. In the upper subplot, the original observation curve T_obs(t) exhibits a false, continuous upward trend due to the cumulative effect of equipment drift. The solid line represents the original observation value, the dashed line represents the predicted value T_hydro(t) based on hydrological logic, and the dotted line represents the equipment drift predicted value T_drift(t). When the original observation value exceeds the warning water level line, a false alarm interval is formed, which is the range marked by the gray filled area in the figure. The water level exceeding the limit within this interval is not caused by a real hydrological event, but by false alarms caused by equipment sensor drift. In the lower subplot, the water level curve T_final(t) after compensation formula correction closely matches the true water level reference line. The corrected water level value is always below the warning water level line, effectively eliminating false alarms caused by equipment drift. Comparing the two figures above and below, it can be clearly seen that the adaptive compensation mechanism of the present invention can accurately identify and remove the equipment drift component, and eliminate the measurement deviation caused by sensor degradation while retaining the true hydrological change information, thereby significantly reducing the false alarm rate of the water level monitoring system and improving the reliability of early warning decisions.

[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for predicting river water level risk based on trend forecasting, characterized in that, Includes the following steps: Step 1: Construct a heterogeneous spatiotemporal multi-source monitoring dataset, which includes the original water level observation sequence of the target monitoring station, environmental factor data associated with the target monitoring station, and device status fingerprint data characterizing the sensor equipment status of the target monitoring station. Step 2: Decompose the original water level observation sequence to extract the observation trend sequence reflecting low-frequency changes in water level; Step 3: A dual-channel trend semantic competition network is adopted for trend prediction. The dual-channel trend semantic competition network includes a hydrological logic response channel and an equipment state evolution channel. The environmental factor data is input into the hydrological logic response channel to generate a theoretical water level trend sequence under physical drive, and the equipment state fingerprint data is input into the equipment state evolution channel to generate a theoretical drift signal sequence under equipment aging. Step 4: Perform semantic consistency discrimination. Measure the semantic consistency between the observed trend sequence and the outputs of the two channels by calculating the semantic consistency distance between the observed trend sequence and the theoretical water level trend sequence and the theoretical drift signal sequence, respectively. Generate a discrimination probability based on the semantic consistency. The discrimination probability is used to characterize the confidence that the observed trend sequence belongs to the real hydrological change. Step 5: Perform adaptive compensation and risk prediction. Based on the discrimination probability, modify the observed trend sequence to generate a modified water level trend, and output the risk prediction result based on the modified water level trend.

2. The method according to claim 1, characterized in that, Step two specifically includes: The original water level observation sequence was decomposed using variational mode decomposition. The number of modes in the variational mode decomposition is adaptively determined by combining the center frequency observation method with the energy difference criterion; and The low-frequency modal components obtained from the decomposition are linearly superimposed and reconstructed to obtain the observed trend sequence.

3. The method according to claim 1, characterized in that, The hydrological logic response channel is used to simulate the real hydrological response process. It adopts a composite structure of spatiotemporal attention mechanism and bidirectional long short-term memory network. The spatiotemporal attention mechanism includes a spatial attention layer and a temporal attention layer. The spatial attention layer is used to adaptively weight the environmental factor data from multiple input sources, and the temporal attention layer is used to capture the lag effect of historical environmental events on the current water level.

4. A river water level risk prediction system based on trend forecasting, characterized in that, include: A multi-source heterogeneous sensing module is used to construct a heterogeneous spatiotemporal multi-source monitoring dataset, which includes the original water level observation sequence of the target monitoring station, environmental factor data associated with the target monitoring station, and device status fingerprint data characterizing the sensor equipment status of the target monitoring station. The trend feature extraction module is used to decompose the original water level observation sequence to extract the observation trend sequence that reflects the low-frequency changes in water level. A dual-channel semantic reasoning module is used to perform trend prediction using a dual-channel trend semantic competition network. The dual-channel trend semantic competition network includes a hydrological logic response channel and an equipment state evolution channel. Environmental factor data is input into the hydrological logic response channel to generate a theoretical water level trend sequence driven by physical factors, and equipment state fingerprint data is input into the equipment state evolution channel to generate a theoretical drift signal sequence under equipment aging. The dual-channel semantic reasoning module internally includes a hydrological response reasoning unit deployed with the hydrological logic response channel and an equipment evolution reasoning unit deployed with the equipment state evolution channel. The intelligent diagnosis and decision-making module is used to perform semantic consistency discrimination. It measures the semantic consistency between the observed trend sequence and the output of the two channels by calculating the semantic consistency distance between the observed trend sequence and the theoretical water level trend sequence and the theoretical drift signal sequence, respectively. Based on the semantic consistency, a discrimination probability is generated. The discrimination probability is used to characterize the confidence that the observed trend sequence belongs to the real hydrological change. It also performs adaptive compensation and risk prediction, corrects the observed trend sequence based on the discrimination probability to generate a corrected water level trend, and outputs the risk prediction result based on the corrected water level trend.