A hydrological station flow monitoring system based on deep learning and a method thereof
By combining deep learning with optical flow calculation and the Manning formula in hydraulics, the roughness coefficient and hydraulic gradient coefficient of the river channel are generated, which solves the problem of the adaptability of traditional flow monitoring models to changes in river channel morphology, and realizes the physical interpretability of flow inversion and the diagnosis of river health status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG TIANYU INFORMATION TECH CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-03
Smart Images

Figure CN121959201B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of hydrological monitoring and computer vision technology, specifically to a hydrological station flow monitoring system and method based on deep learning. Background Technology
[0002] With the continuous advancement of water conservancy informatization, the complexity and dynamism of river hydrological monitoring scenarios are becoming increasingly prominent; this environmental uncertainty places higher demands on the real-time performance and physical interpretability of flow monitoring.
[0003] Currently, most existing flow monitoring methods rely on pre-calibrated water level-flow relationship curves or direct prediction using traditional pure data-driven models. In practice, technicians often rely on the ideal assumption of stable river morphology, using historical measured data for statistical fitting or neural network training. However, these methods primarily focus on numerical mapping relationships, often neglecting the physical constraints of hydraulic mechanisms. When river channels face nonlinear drift in riverbed roughness and hydraulic gradient due to siltation, vegetation growth, or sudden floods, traditional models struggle to adapt, leading not only to decreased flow inversion accuracy but also to an inability to effectively identify and warn of abnormal physical states such as river siltation. Therefore, how to construct a flow calculation logic that conforms to hydraulic laws while simultaneously achieving dynamic capture and logical verification of changes in river channel microphysical parameters has become a pressing issue in this field. Summary of the Invention
[0004] The purpose of this invention is to provide a hydrological station flow monitoring system and method based on deep learning, which avoids the shortcomings of traditional pure data-driven models, such as lack of physical interpretability and difficulty in adapting to dynamic changes in the river environment. Furthermore, it can effectively diagnose river sedimentation status by utilizing the generated physical parameters while ensuring the accuracy of flow inversion. Specifically, the technical solution of this invention is as follows:
[0005] A deep learning-based method for monitoring hydrological station flow includes:
[0006] The water level time series data of the river section and the video keyframe stream containing water surface texture were collected synchronously using water level gauges and monitoring cameras.
[0007] Based on a pre-built cross-sectional geometric mapping table, the water level time series data is converted into corresponding water flow area and hydraulic radius values through interpolation calculation;
[0008] The optical flow computing unit processes the video keyframe stream and outputs a flow feature vector characterizing the dispersion of water surface velocity;
[0009] The flow pattern feature vector and water level time series data are input parameters to generate a neural network, which outputs a physical parameter vector that changes over time. The physical parameter vector includes at least the channel roughness coefficient and the hydraulic gradient coefficient.
[0010] In the differential hydraulic calculation layer, based on the calculation logic of the hydraulic Manning formula, combined with the values of the water flow area, hydraulic radius, and physical parameter vectors, the flow inversion value is calculated.
[0011] Execution parameter consistency monitoring steps:
[0012] Calculate the moving average value of the river channel roughness coefficient within a preset time window;
[0013] Determine whether the moving average value is greater than the preset siltation alarm threshold;
[0014] If the judgment result is yes, generate a river siltation early warning data packet and send it to the remote monitoring terminal;
[0015] If the judgment result is negative, a status log of normal river operation is generated and stored in the local database.
[0016] Preferably, the cross-sectional geometry mapping table is pre-constructed through the following steps:
[0017] Obtain measured elevation data of the river cross-section;
[0018] Spline interpolation fitting was performed on the measured elevation data to establish the first mapping relationship between water level values and water area values, and the second mapping relationship between water level values and hydraulic radius values.
[0019] The first and second mapping relationships are discretized and stored as lookup tables, which serve as cross-sectional geometry mapping tables.
[0020] Preferably, the optical flow computing unit processes the video keyframe stream and outputs a flow characteristic vector representing the degree of dispersion of water surface flow velocity, specifically including:
[0021] The velocity vector of each pixel in a preset region of interest in a video keyframe stream is calculated using a dense optical flow algorithm.
[0022] Calculate the variance of the velocity vectors of all pixels as a feature of turbulence intensity;
[0023] Calculate the average consistency value of the flow velocity direction of all pixels as a flow direction stability feature;
[0024] By concatenating turbulence intensity features with flow direction stability features, a flow pattern feature vector is generated.
[0025] Preferably, the parameter generation neural network adopts a hybrid architecture of convolutional neural network and long short-term memory network:
[0026] Convolutional neural networks are used to extract spatial features from flow feature vectors;
[0027] Long Short-Term Memory (LSTM) networks are used to extract time-dependent features from water level time-series data;
[0028] The output layer of the parameter-generating neural network does not contain an activation function and directly outputs the non-normalized channel roughness coefficient and hydraulic gradient coefficient.
[0029] Preferably, in the differentiable hydraulic calculation layer, the flow inversion value is calculated according to the operational logic of the hydraulic Manning formula, specifically by executing the following mathematical operation logic:
[0030] Obtain the reciprocal of the river channel roughness coefficient;
[0031] Obtain the value of the hydraulic radius raised to the power of two thirds;
[0032] Obtain the first power of the hydraulic gradient coefficient;
[0033] Perform a multiplication operation: multiply the five data points, namely the unit system correction factor, the water flow area value, the reciprocal value, the second power of 3 value, and the first power of 2 value, and use the product as the flow inversion value.
[0034] Preferably, the training process of the parameter generation neural network includes:
[0035] Construct a loss function that includes physical consistency constraints. The loss function is composed of a weighted sum of the flow prediction error term, the roughness physical range constraint term, and the slope physical range constraint term.
[0036] With only the measured flow rate as the monitoring signal, the gradient of the flow prediction error with respect to the physical parameter vector is calculated through a differentiable hydraulic calculation layer;
[0037] The backpropagation algorithm is used to update the parameters and generate the weights of the neural network until the loss function converges.
[0038] A deep learning-based hydrological station flow monitoring system includes:
[0039] The hardware acquisition layer includes water level sensors and monitoring cameras installed at the river cross-section, used to output raw monitoring data;
[0040] The processor communicates with the hardware acquisition layer;
[0041] The memory is used to store the cross-sectional geometry mapping table and the weight file of the parameter generation neural network;
[0042] The communication module is used to send the data packet to a remote server via a wireless network when a river siltation early warning data packet is generated.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. This invention achieves a balance between physical interpretability and strong robustness. By constructing a differentiable hydraulic calculation layer based on Manning's formula, the neural network is forced to output channel roughness and hydraulic gradient coefficients that conform to physical dimensions, rather than directly fitting flow rate values. This design, which embeds physical laws, eliminates the black-box drawbacks of purely data-driven models and ensures that the flow rate inversion process strictly follows the laws of hydraulics. When facing extreme conditions such as catastrophic floods that exceed the range of training data, the model can reasonably extrapolate based on physical equations, avoiding divergence and distortion in numerical calculations.
[0045] 2. This invention possesses the function of proactive diagnosis and early warning of river health status; it uses a parameter generation mechanism to make the river resistance characteristics, which are difficult to measure directly, explicit, and achieves logical closed-loop monitoring by monitoring the moving average value of the river roughness coefficient obtained by inversion; when the roughness increases abnormally, the system can automatically identify and warn of changes in the physical state of the river such as siltation, vegetation collapse, or illegal netting; this breaks through the limitation of traditional flowmeters that can only output numerical values, and provides key diagnostic basis for the operation and maintenance of hydrological stations and flood control decisions;
[0046] 3. This invention improves the accuracy of parameter estimation under complex flow conditions. By fusing water level time-series data and video flow characteristics, the system not only captures water level changes that reflect potential energy, but also uses optical flow algorithms to extract texture features that reflect the consistency of water surface turbulence intensity and flow direction. This fusion perception of multi-source heterogeneous data enables the model to dynamically adapt to flow field changes caused by wind-induced waves or unsteady flow, accurately capture instantaneous fluctuations in hydraulic gradient and roughness, and is significantly better than traditional methods that rely solely on water level for flow propulsion.
[0047] 4. This invention significantly improves the calculation accuracy of basic geometric parameters; it decouples cross-sectional geometric calculation from neural networks, and uses a pre-constructed geometric mapping table to obtain the water flow area and hydraulic radius through interpolation; this deterministic calculation method not only transforms complex integral operations into efficient table lookup operations, greatly reducing calculation delays, but also eliminates the numerical illusion that may occur when the neural network learns geometric mapping relationships, thereby ensuring that the basic physical quantities involved in hydraulic calculations have a high degree of confidence. Attached Figure Description
[0048] The present invention will be further explained below with reference to the accompanying drawings and embodiments:
[0049] Figure 1 This is a flowchart of the method of the present invention;
[0050] Figure 2 This is a structural diagram of the system of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0052] Example 1:
[0053] Please see Figure 1 A deep learning-based method for monitoring hydrological station flow includes:
[0054] The water level time series data of the river section and the video keyframe stream containing water surface texture were collected synchronously using water level gauges and monitoring cameras.
[0055] Based on a pre-built cross-sectional geometric mapping table, the water level time series data is converted into corresponding water flow area and hydraulic radius values through interpolation calculation;
[0056] The optical flow computing unit processes the video keyframe stream and outputs a flow feature vector characterizing the dispersion of water surface velocity;
[0057] The flow pattern feature vector and water level time series data are input parameters to generate a neural network, which outputs a physical parameter vector that changes over time. The physical parameter vector includes at least the channel roughness coefficient and the hydraulic gradient coefficient.
[0058] In the differential hydraulic calculation layer, based on the calculation logic of the hydraulic Manning formula, combined with the values of the water flow area, hydraulic radius, and physical parameter vectors, the flow inversion value is calculated.
[0059] Execution parameter consistency monitoring steps:
[0060] Calculate the moving average value of the river channel roughness coefficient within a preset time window;
[0061] Determine whether the moving average value is greater than the preset siltation alarm threshold;
[0062] If the judgment result is yes, generate a river siltation early warning data packet and send it to the remote monitoring terminal;
[0063] If the judgment result is negative, a status log of normal river operation is generated and stored in the local database.
[0064] This embodiment provides a deep learning-based method for monitoring hydrological station flow; this method does not directly predict flow, but achieves flow inversion by predicting the coefficients of the physical equation; specifically, it includes the following steps:
[0065] Multi-source heterogeneous data synchronous acquisition: Water level time series data of the river section are synchronously acquired by water level gauges and monitoring cameras installed at the river section, denoted as... and the video keyframe stream containing water surface textures, denoted as ;
[0066] Water level time series data: high-frequency scalar data acquired by radar or submersible water level gauges, used to reflect the potential energy state of the river channel;
[0067] Video keyframe stream: a sequence of images acquired by an infrared or visible light camera; in this invention, the video data is not used for traditional particle image velocimetry (PIV), but rather as a texture sensor to sense the flow entropy of the water surface;
[0068] Physical mapping of cross-sectional geometric parameters: Based on a pre-constructed cross-sectional geometric mapping table, water level time series data are converted into corresponding water flow area values through interpolation calculations, denoted as... and the hydraulic radius value, denoted as ;
[0069] The purpose of this step is to convert the measurable scalar water level into the geometric variables required for hydraulic calculations. Since the cross-sectional shape of the river channel is a relatively fixed physical fact, this step does not rely on neural network generation, thus ensuring the objective accuracy of the basic physical quantities.
[0070] Visual flow feature extraction: The video keyframe stream is processed using an optical flow computing unit, and the output flow feature vector representing the dispersion of water surface velocity is denoted as... ;
[0071] Flow characteristic vectors refer to a set of statistical features that do not directly represent flow velocity but reflect the degree of flow turbulence and surface texture consistency; there is a strong correlation between the turbulence intensity at the water surface and the drag coefficient and roughness of the riverbed; it should be noted that this correlation is assumed under non-windy weather conditions; this method introduces a wind speed filter in the preprocessing stage, and when the reading of the external wind speed sensor exceeds a preset threshold, such as... At this time, the system will pause roughness inversion to avoid wind-induced waves affecting the flow characteristic vector. Generates non-physical interference;
[0072] Dynamic generation of physical parameters: Flow characteristic vectors and water level time-series data are input into a parameter generation neural network, i.e., a parameter estimation network based on physical information, which outputs a vector of physical parameters that changes over time. The physical parameter vector contains at least the following two unsupervised latent variables:
[0073] River channel roughness coefficient ( ): A physical quantity characterizing the frictional resistance at the river boundary, which changes dynamically with vegetation lodging and sediment movement;
[0074] Hydraulic gradient coefficient ( ): Characterizes the gradient energy that drives water flow, exhibiting hysteresis loop characteristics during flood rise and fall;
[0075] First-principles-based differentiable hydraulic calculation and flow inversion: In the differentiable hydraulic calculation layer, an end-to-end calculation graph is constructed based on the physical laws of the Manning formula in hydraulics; this step is not a simple numerical multiplication, but rather a physical operation that strictly adheres to dimensional homogeneity; combined with the flow area values obtained in the previous steps... Hydraulic radius value The flow inversion values are calculated from the physical parameter vectors generated by the neural network. Its physical equations are expressed in a more rigorous fractional form:
[0076]
[0077] in, For a moment The inversion flow rate, in cubic meters per second. ;
[0078] For unit system correction factors; to ensure strict dimensional balance on both sides of the above physical equations, in the International System of Units (SI) used in this embodiment, we set... It is considered a dimensionless scalar; if imperial units are used, then It should be noted that the formula used here is... This is to conform to the physical meaning of Manning's formula, that is, flow rate is inversely proportional to roughness; Setting it to be dimensionless is to match The physical properties of the material, thereby demonstrating the invention's restoration of the first principles;
[0079] For a moment The river channel roughness coefficient, generated by a neural network, is not merely a fitting coefficient in the physical framework of this invention, but is endowed with real physical resistance properties, its physical meaning corresponding to dimensions. That is, the unit is ;
[0080] The water surface area is obtained through geometric mapping and has dimensions of . That is, the unit is ;
[0081] Let be the hydraulic radius, with dimensions . That is, the unit is Therefore Contribution Dimensions ;
[0082] Here, represents the hydraulic gradient coefficient, and represents a dimensionless ratio. ;
[0083] Dimensional analysis of the above formula: Dimensions on the right side = = ,Right now , with the left-side flow The dimensions are completely consistent, thus proving the logical closed loop of the physical model;
[0084] Logical closed-loop monitoring based on physical parameter anomalies: Execute parameter consistency monitoring steps to assess river health status.
[0085] Calculate the moving average: Calculate the channel roughness coefficient Within a preset time window, such as the moving average over the past 24 hours. ;
[0086] Threshold judgment: judgment Is it greater than the preset siltation alarm threshold? The siltation alarm threshold The construction method is as follows: During the system initialization phase, a baseline period after river dredging is selected, such as 7 days, and the mean value of the river roughness coefficient output by the network during this period is calculated. with standard deviation ,set up ;
[0087] Generate alerts or logs:
[0088] If the judgment result is yes This illustrates that neural networks maintain flow With water level The balance was forced to produce an extremely high drag coefficient; due to the model's... Has definite physical dimensions This physically corresponds directly to an abnormal increase in the friction of the riverbed surface, such as the presence of fallen trees, illegal netting, or severe siltation. Based on this, the system generates a river siltation early warning data packet and sends it to the remote monitoring terminal.
[0089] If the judgment result is negative, a status log of normal river operation is generated and stored in the local database;
[0090] By employing this inverted parameter generator design, this invention achieves a balance between physical interpretability and dynamic adaptability. Compared to black-box models that directly predict flow rates, this scheme utilizes geometric mapping to ensure that the model's extrapolation capability does not diverge when the data exceeds the training data range, such as during catastrophic floods. Simultaneously, by monitoring the inverted roughness coefficient... This invention unexpectedly provides a diagnostic function for monitoring river siltation and flood discharge capacity, which is not available in traditional flow meters.
[0091] Example 2:
[0092] The cross-sectional geometry mapping table is pre-built through the following steps:
[0093] Obtain measured elevation data of the river cross-section;
[0094] Spline interpolation fitting was performed on the measured elevation data to establish the first mapping relationship between water level values and water area values, and the second mapping relationship between water level values and hydraulic radius values.
[0095] The first and second mapping relationships are discretized and stored as lookup tables, which serve as cross-sectional geometry mapping tables.
[0096] This embodiment provides a detailed description of the pre-construction process of the cross-sectional geometry mapping table;
[0097] The construction of the cross-sectional geometry mapping table is a key step in connecting one-dimensional water level data with two-dimensional cross-sectional morphology. The specific steps are as follows:
[0098] Obtain measured data: Use a total station or multibeam echo sounder to obtain measured elevation data of the river cross-section. ,in The horizontal distance. Elevation;
[0099] Spline interpolation fitting: Cubic spline interpolation is performed on the measured elevation data to construct a continuous riverbed contour function. Based on the principles of calculus, for any water level The calculation formula is:
[0100] water flow area
[0101] Wet period
[0102] hydraulic radius
[0103] This establishes the first mapping relationship between water level values and water flow area values, as well as the second mapping relationship between water level values and hydraulic radius values.
[0104] Discretized storage: In order to improve the efficiency of real-time computing, the results of the above integral operation are discretized, for example, with a step size of 1cm, and stored in an efficient lookup table or tensor form as a cross-sectional geometry mapping table.
[0105] By pre-constructing an accurate geometric mapping table, the system transforms complex integration operations into a low-latency table lookup operation with O(1) complexity, while ensuring... and These two key physical quantities strictly follow the geometric conservation law, eliminating the illusion that neural networks may produce when learning geometric relationships.
[0106] Example 3:
[0107] The optical flow computing unit processes the video keyframe stream and outputs a flow characteristic vector representing the dispersion of water surface velocity, specifically including:
[0108] The velocity vector of each pixel in a preset region of interest in a video keyframe stream is calculated using a dense optical flow algorithm.
[0109] Calculate the variance of the velocity vectors of all pixels as a feature of turbulence intensity;
[0110] Calculate the average consistency value of the flow velocity direction of all pixels as a flow direction stability feature;
[0111] By concatenating turbulence intensity features with flow direction stability features, a flow pattern feature vector is generated.
[0112] This embodiment details the specific logic of the optical flow computing unit in processing video streams;
[0113] Unlike existing technologies that attempt to precisely measure the physical velocity of each pixel using PIV technology, which is extremely difficult to achieve at night or in rainy weather, this embodiment focuses on the statistical entropy characteristics of the flow field, specifically including:
[0114] Calculate the velocity vector: Use dense optical flow algorithms, such as Farneback or FlowNet, to calculate the velocity vector of each pixel within a predefined region of interest (ROI) in the video keyframe stream. The region of interest is either a water surface mask region identified in advance by a semantic segmentation network, or a polygon region manually marked by the user during the system initialization phase, in order to eliminate the interference of riverbank vegetation on optical flow calculation.
[0115] Extracting turbulence intensity features: Calculate the variance of the velocity vectors of all pixels within the ROI. ;
[0116] It reflects the intensity of water surface fluctuations; physically, high-roughness riverbeds, such as those with rocky bottoms, lead to more intense surface turbulence; therefore, this characteristic is an inversion of roughness. Key evidence;
[0117] Extracting flow direction stability features: Calculating the average consistency value of the flow velocity direction for all pixels. The specific calculation logic is as follows: normalize the velocity vectors of all pixels within the ROI to unit vectors, and calculate the average composite vector length. The calculation formula is as follows:
[0118]
[0119] in, This represents the total number of pixels within the region of interest (ROI). Represents the coordinate index of a pixel; For pixels The direction angle of the velocity vector at a given point, in radians; The range of values is The closer the value is to 1, the more consistent the flow direction; the closer the value is to 0, the more chaotic the flow direction.
[0120] In laminar flow, the texture direction is highly consistent, while in turbulent or recirculating flow, the direction is disordered; this feature is used to help determine the hydraulic gradient. Directionality;
[0121] Generate vectors: Turbulence intensity features With flow direction stability characteristics Concatenate the vectors to generate flow feature vectors;
[0122] This embodiment overcomes the dependence of traditional visual flow measurement on clear lighting and tracer particles; even in nighttime infrared mode, where the image is blurry, the frequency and statistical characteristics of water surface ripples still exist; this solution achieves all-weather, interference-resistant flow perception by extracting these statistical characteristics.
[0123] Example 4:
[0124] The parameter-generating neural network employs a hybrid architecture combining convolutional neural networks and long short-term memory networks.
[0125] Convolutional neural networks are used to extract spatial features from flow feature vectors;
[0126] Long Short-Term Memory (LSTM) networks are used to extract time-dependent features from water level time-series data;
[0127] The output layer of the parameter-generating neural network does not contain an activation function and directly outputs the non-normalized channel roughness coefficient and hydraulic gradient coefficient.
[0128] This embodiment provides specific limitations on the architecture of the parameter generation neural network;
[0129] The network employs a hybrid heterogeneous architecture to accommodate the multimodal characteristics of the input data:
[0130] Spatial feature extraction: The input flow feature vector or original optical flow map is processed using a convolutional neural network (CNN); CNN utilizes its local receptive field to effectively extract the spatial distribution pattern of water surface ripples, such as the scale and arrangement density of the ripples;
[0131] Time-dependent feature extraction: Long Short-Term Memory (LSTM) networks or Gated Recurrent Units (GRUs) are used to process water level time-series data and their rate of change. LSTM can memorize historical states, thereby capturing the hysteresis effect during the rise and fall of floodwaters, that is, distinguishing between rising and falling water levels at the same water level.
[0132] Feature fusion layer: The feature vector of the flow space output by the convolutional neural network, denoted as... The time-dependent feature vector output by the Long Short-Term Memory network is denoted as... Perform channel concatenation to generate a fused feature vector. ;
[0133] Fully connected mapping: fuses feature vectors Input fully connected layer;
[0134] Physically Constrained Output Layer: The network's output layer adopts... Activation function This function has smooth nonlinear characteristics and its output domain is strictly greater than 0; this forces a constraint on the generated roughness. and slope It is always positive, but there is no upper limit on its value, thus allowing the model to adapt to extreme physical conditions;
[0135] As a preferred implementation detail, the input of the convolutional neural network is The optical flow field tensor, in which The normalized size of the region of interest, for example , represent Two directional components; the input to the Long Short-Term Memory network is a length of Water level sequences, for example The fused feature vector The dimension is set as ;
[0136] This hybrid architecture successfully integrates visually perceived instantaneous flow state information with historical trend information of water level changes, accurately simulating complex rope curve relationships in unsteady flow and solving the problem of low accuracy in traditional single-value correspondence models.
[0137] Example 5:
[0138] In the differentiable hydraulic calculation layer, the flow inversion value is calculated based on the operational logic of the hydraulic Manning formula, specifically by performing the following mathematical operations:
[0139] Obtain the reciprocal of the river channel roughness coefficient;
[0140] Obtain the value of the hydraulic radius raised to the power of two thirds;
[0141] Obtain the first power of the hydraulic gradient coefficient;
[0142] Perform a multiplication operation: multiply the five data points, namely the unit system correction factor, the water flow area value, the reciprocal value, the second power of 3 value, and the first power of 2 value, and use the product as the flow inversion value.
[0143] This embodiment elaborates in detail the mathematical operation logic and physical constraint mechanism in the differentiable hydraulic calculation layer;
[0144] This computational layer is designed as a parameterless physical operator, which does not contain any learnable weights or biases, but instead maps the variables output by the preceding modules to the physical space; the specific computational logic is as follows:
[0145] Alignment of physical dimensions and calculation of intermediate variables:
[0146] Receive the channel roughness coefficients output by the parameter generation neural network. Calculate its reciprocal term During this process, the system defaults to Carry physical units ;
[0147] Introducing constant tensors Its value is fixed as For the SI unit system, but retain its physical properties in the calculation diagram as a dimensional anchor point;
[0148] Receive the hydraulic radius value output from the geometry mapping table. Perform exponentiation ;
[0149] Receive the hydraulic gradient coefficient output by the parameter generation neural network. Perform exponentiation ;
[0150] Tensor product operation: Perform a series of multiplications on the above physical components to obtain the calculated flow rate value. :
[0151]
[0152] Gradient propagation from physical constraints: The above formula constructs the gradient propagation from latent variables. To observable variables The rigid physical channel; the error gradient of flow prediction during backpropagation. The partial derivatives will be decomposed strictly according to the Manning formula:
[0153] Gradient flow with roughness:
[0154] Gradient flow with respect to slope:
[0155] By explicitly introducing a unit conversion factor Furthermore, by constructing a computational layer that fully conforms to dimensional analysis, this invention ensures the model generation... and These are not merely mathematical fitting parameters, but state parameters with real physical meaning. This allows the model to reasonably extrapolate based on the robustness of the physical equations when faced with unprecedented extreme hydrological events, such as floods exceeding standard levels, thus avoiding the physical distortion problem commonly found in purely data-driven models.
[0156] Example 6:
[0157] The training process of a parameter-generating neural network includes:
[0158] Construct a loss function that includes physical consistency constraints. The loss function is composed of a weighted sum of the flow prediction error term, the roughness physical range constraint term, and the slope physical range constraint term.
[0159] With only the measured flow rate as the monitoring signal, the gradient of the flow prediction error with respect to the physical parameter vector is calculated through a differentiable hydraulic calculation layer;
[0160] The backpropagation algorithm is used to update the parameters and generate the weights of the neural network until the loss function converges.
[0161] This embodiment describes the physical consistency training process of a parameter generation neural network; in order to address the lack of... and To train the network with real labels, this embodiment employs a latent variable supervised learning strategy, constructing a loss function that includes physical consistency constraints. :
[0162]
[0163] in, In this embodiment, a weighting coefficient is set to balance the differences in magnitude. ;
[0164] Flow forecasting error term ( ): Ensure that the retrieved flow rate is consistent with the measured flow rate monitoring signal;
[0165] Physical range constraints ( This includes the physical range constraint of roughness, such as And slope physical range constraints, used to penalize parameter generation that violates basic physical principles; specifically, physical range constraint terms. The boundary penalty is constructed using the linear rectified function ReLU, and the formula is as follows:
[0166]
[0167] in, ; These are the preset lower roughness limit (0.01) and upper roughness limit (0.1), respectively. To determine the physically reasonable range of hydraulic gradient, and considering the gradient characteristics of natural river channels, this embodiment sets... ; To impose strong penalties, this embodiment sets... ;
[0168] Input only the measured flow rate As a monitoring signal, the flow error is calculated using the differentiable hydraulic calculation layer step S5. For physical parameter vectors gradient ;
[0169] The backpropagation algorithm is used to update the parameters and generate the weights of the neural network until the loss function converges.
[0170] This training method solves the problem that physical parameters are difficult to measure directly; instead of simply memorizing flow values, the network is forced to understand how the coefficients in the physical equations change with the environment; this ensures that when the model faces unseen data, the output results are still strongly constrained by the physical equations, greatly reducing the risk of overfitting.
[0171] Example 7:
[0172] Please see Figure 2 A deep learning-based hydrological station flow monitoring system includes:
[0173] The hardware acquisition layer includes a water level sensor, a network camera, a wind speed sensor, and an infrared fill light installed at the river cross-section, used to output raw monitoring data. Among them, the wind speed sensor provides real-time wind speed readings to the processor to support wind-induced wave filtering logic; the infrared fill light works in conjunction with the network camera to ensure that the video keyframe stream still has clear water surface texture features under 0 Lux illumination.
[0174] The processor communicates with the hardware acquisition layer;
[0175] The memory is used to store the cross-sectional geometry mapping table and the weight file of the parameter generation neural network;
[0176] The communication module is used to send the data packet to a remote server via a wireless network when a river siltation early warning data packet is generated.
[0177] This embodiment provides a deep learning-based hydrological station flow monitoring system that performs the above-described method; the system includes:
[0178] Hardware acquisition layer:
[0179] Water level sensor: Uses radar water level gauge or pressure water level gauge, installed below the lowest water level line, outputting data at a frequency of not less than 1Hz;
[0180] Network camera: Pointed at the river cross-section, equipped with infrared night vision function, supports RTSP streaming media transmission, and provides video streams of at least 25 frames per second;
[0181] Processor: As the computing core, it communicates with the hardware acquisition layer; the processor is configured to load pre-trained parameter-generating neural network models and runs deep learning inference frameworks such as TensorFlow Lite or ONNXRuntime inside the processor.
[0182] Memory: Used to store the cross-sectional geometry mapping table, usually in CSV or binary tensor file, and the weight file for generating neural networks; it also stores historical data from the last 7 days for moving average calculation;
[0183] Communication module: Supports 4G / 5G or NB-IoT protocols; generates roughness when the processor logic determines that an alarm is needed. If the anomaly persists, the communication module is responsible for sending a river siltation early warning data packet containing a snapshot of the abnormal parameters to a remote server.
[0184] The system implements an edge computing architecture that deploys complex physical inversion algorithms at the front end, uploading only processed key status data and alarm information, which greatly saves bandwidth and ensures monitoring continuity in the event of network disconnection.
[0185] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for monitoring hydrological station flow based on deep learning, characterized in that, include: The water level time series data of the river section and the video keyframe stream containing water surface texture were collected synchronously using water level gauges and monitoring cameras. Based on a pre-built cross-sectional geometric mapping table, the water level time series data is converted into corresponding water flow area and hydraulic radius values through interpolation calculation; The optical flow computing unit processes the video keyframe stream and outputs a flow feature vector characterizing the dispersion of water surface velocity; The flow pattern feature vector and water level time series data are input parameters to generate a neural network, which outputs a physical parameter vector that changes over time. The physical parameter vector includes at least the channel roughness coefficient and the hydraulic gradient coefficient. In the differential hydraulic calculation layer, based on the calculation logic of the hydraulic Manning formula, combined with the values of the water flow area, hydraulic radius, and physical parameter vectors, the flow inversion value is calculated. Execution parameter consistency monitoring steps: Calculate the moving average value of the river channel roughness coefficient within a preset time window; Determine whether the moving average value is greater than the preset siltation alarm threshold; If the judgment result is yes, generate a river siltation early warning data packet and send it to the remote monitoring terminal; If the judgment result is negative, a status log of normal river operation is generated and stored in the local database; The optical flow computing unit processes the video keyframe stream and outputs a flow characteristic vector representing the dispersion of water surface velocity, specifically including: The velocity vector of each pixel in a preset region of interest in a video keyframe stream is calculated using a dense optical flow algorithm. Calculate the variance of the velocity vectors of all pixels as a feature of turbulence intensity; Calculate the average consistency value of the flow velocity direction of all pixels as a flow direction stability feature; By concatenating turbulence intensity features with flow direction stability features, a flow pattern feature vector is generated. The parameter-generating neural network employs a hybrid architecture combining convolutional neural networks and long short-term memory networks. Convolutional neural networks are used to extract spatial features from flow feature vectors; Long Short-Term Memory (LSTM) networks are used to extract time-dependent features from water level time-series data; The output layer of the parameter-generating neural network does not contain an activation function and directly outputs the non-normalized channel roughness coefficient and hydraulic gradient coefficient.
2. The method for monitoring hydrological station flow based on deep learning according to claim 1, characterized in that, The cross-sectional geometry mapping table is pre-built through the following steps: Obtain measured elevation data of the river cross-section; Spline interpolation fitting was performed on the measured elevation data to establish the first mapping relationship between water level values and water area values, and the second mapping relationship between water level values and hydraulic radius values. The first and second mapping relationships are discretized and stored as lookup tables, which serve as cross-sectional geometry mapping tables.
3. The method for monitoring hydrological station flow based on deep learning according to claim 1, characterized in that, In the differentiable hydraulic calculation layer, the flow inversion value is calculated based on the operational logic of the hydraulic Manning formula, specifically by performing the following mathematical operations: Obtain the reciprocal of the river channel roughness coefficient; Obtain the value of the hydraulic radius raised to the power of two thirds; Obtain the first power of the hydraulic gradient coefficient; Perform a multiplication operation: multiply the five data points, namely the unit system correction factor, the water flow area value, the reciprocal value, the second power of 3 value, and the first power of 2 value, and use the product as the flow inversion value.
4. The method for monitoring hydrological station flow based on deep learning according to claim 1, characterized in that, The training process of a parameter-generating neural network includes: Construct a loss function that includes physical consistency constraints. The loss function is composed of a weighted sum of the flow prediction error term, the roughness physical range constraint term, and the slope physical range constraint term. With only the measured flow rate as the monitoring signal, the gradient of the flow prediction error with respect to the physical parameter vector is calculated through a differentiable hydraulic calculation layer; The backpropagation algorithm is used to update the parameters and generate the weights of the neural network until the loss function converges.
5. A hydrological station flow monitoring system based on deep learning, comprising a hydrological station flow monitoring method based on deep learning as described in any one of claims 1-4, characterized in that, include: The hardware acquisition layer includes water level sensors and monitoring cameras installed at the river cross-section, used to output raw monitoring data; The processor, which is communicatively connected to the hardware acquisition layer, is configured to execute a deep learning-based hydrological station flow monitoring method as described in any one of claims 1 to 4; The memory is used to store the cross-sectional geometry mapping table and the weight file of the parameter generation neural network; The communication module is used to send the data packet to a remote server via a wireless network when a river siltation early warning data packet is generated.